/* ===========================
   Custom Properties
   =========================== */
:root {
  --color-accent: #c0687a;
  --color-dark: #1a1a1a;
  --color-light: #fafafa;
  --color-white: #ffffff;
  --color-border: #eeeeee;
  --color-text: #1a1a1a;
  --color-text-muted: #888888;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --nav-height: 64px;
  --nav-pad: 24px;
  --transition: 0.2s ease;
  --container-max: 1200px;
  --section-pad: 80px;
}

/* ===========================
   Reset & Base
   =========================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-white);
  font-weight: 300;
  line-height: 1.6;
}
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }

/* ===========================
   Utilities
   =========================== */
.container { max-width: var(--container-max); margin: 0 auto; padding: 0 24px; }

.label {
  display: block;
  font-size: 10px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 8px;
}

.section-header { text-align: center; margin-bottom: 48px; }
.section-header h2 {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 300;
  line-height: 1.25;
}
.section-header--light h2 { color: #fff; }

/* ===========================
   Buttons
   =========================== */
.btn {
  display: inline-block;
  padding: 12px 28px;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  border: none;
  transition: opacity var(--transition);
  font-family: var(--font-sans);
  font-weight: 400;
}
.btn:hover { opacity: 0.82; }
.btn--primary { background: var(--color-accent); color: #fff; }
.btn--outline { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,0.45); }
.btn--full { width: 100%; text-align: center; display: block; }

/* ===========================
   Navigation
   =========================== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-height);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--nav-pad);
}
.nav__logo { display: flex; flex-direction: column; gap: 2px; }
.nav__brand { font-size: 13px; letter-spacing: 3px; color: var(--color-dark); font-weight: 500; }
.nav__tagline { font-size: 9px; letter-spacing: 2px; color: var(--color-accent); text-transform: uppercase; }
.nav__links { display: flex; align-items: center; gap: 24px; }
.nav__links a {
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #555;
  transition: color var(--transition);
}
.nav__links a:hover { color: var(--color-accent); }
.nav__lang {
  background: none;
  border: 1px solid var(--color-border);
  padding: 4px 10px;
  font-size: 10px;
  letter-spacing: 1px;
  cursor: pointer;
  color: #999;
  font-family: var(--font-sans);
  transition: border-color var(--transition), color var(--transition);
}
.nav__lang:hover { border-color: var(--color-accent); color: var(--color-accent); }
.nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav__hamburger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--color-dark);
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav__hamburger.is-open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav__hamburger.is-open span:nth-child(2) { opacity: 0; }
.nav__hamburger.is-open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ===========================
   Hero
   =========================== */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  background: var(--color-dark) url('assets/images/soap-shop-kami-sapun-lavanda.jpg') center / cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: var(--nav-height);
}
.hero__overlay {
  position: absolute;
  inset: 0;
  background: rgba(16, 8, 8, 0.68);
}
.hero__content {
  position: relative;
  z-index: 1;
  padding: 0 24px;
  max-width: 660px;
}
.hero__preheadline {
  font-size: 10px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 24px;
}
.hero__title {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 300;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 40px;
}
.hero__cta {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.hero__scroll {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 1;
}
.hero__scroll span {
  font-size: 9px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
}
.hero__scroll-line {
  width: 1px;
  height: 32px;
  background: var(--color-accent);
  transform-origin: top center;
  animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%, 100% { opacity: 0.25; transform: scaleY(0.5); }
  50%       { opacity: 1;    transform: scaleY(1); }
}

/* ===========================
   Gallery
   =========================== */
.gallery { padding: var(--section-pad) 0; background: var(--color-light); }
.gallery__item { overflow: hidden; aspect-ratio: 1 / 1; }
.gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}
.gallery__item:hover img { transform: scale(1.05); }
.gallery__note {
  text-align: center;
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--color-text-muted);
}
/* Soap draw animation */
.gallery__draw-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 28px 20px 36px;
}
.gallery__draw-svg { max-width: 520px; width: 100%; }

@keyframes gd-draw {
  0%   { stroke-dashoffset: var(--dl); opacity: 0; }
  8%   { opacity: 1; }
  100% { stroke-dashoffset: 0; opacity: 1; }
}
@keyframes gd-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes gd-fade-in-up {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes gd-curl-in {
  0%   { stroke-dashoffset: 110; opacity: 0; }
  18%  { opacity: 0.52; }
  100% { stroke-dashoffset: 0;   opacity: 0.52; }
}
@keyframes gd-curl-float {
  0%, 100% { opacity: 0.48; transform: translateY(0); }
  50%       { opacity: 0.14; transform: translateY(-8px); }
}
@keyframes gd-pulse {
  0%, 100% { opacity: 0.65; }
  50%       { opacity: 1; }
}

/* Base state — invisible until IntersectionObserver adds .is-animated */
.gd-fill  { opacity: 0; }
.gd-outline {
  stroke: #c0687a; stroke-width: 2; stroke-linecap: round;
  --dl: 1280; stroke-dasharray: 1280; stroke-dashoffset: 1280; opacity: 0;
}
.gd-rule  { stroke: #c0687a; stroke-width: 0.9; stroke-linecap: round; opacity: 0; }
.gd-rule--tl, .gd-rule--tr { --dl: 135; stroke-dasharray: 135; stroke-dashoffset: 135; }
.gd-rule--bot { --dl: 290; stroke-dasharray: 290; stroke-dashoffset: 290; }
.gd-orn   { fill: #c0687a; opacity: 0; }
.gd-brand { fill: #c0687a; opacity: 0; }
.gd-tag   { fill: #c0687a; opacity: 0; }
.gd-curl  { fill: none; stroke: #c0687a; stroke-linecap: round; stroke-dasharray: 110; stroke-dashoffset: 110; opacity: 0; }

/* Animated state — triggered when element scrolls into view */
.gallery__draw-svg.is-animated .gd-fill    { animation: gd-fade-in 1.1s ease 0.2s forwards; }
.gallery__draw-svg.is-animated .gd-outline { animation: gd-draw 1.45s ease-out forwards; }
.gallery__draw-svg.is-animated .gd-rule--tl { animation: gd-draw 0.45s ease 1.2s forwards; }
.gallery__draw-svg.is-animated .gd-rule--tr { animation: gd-draw 0.45s ease 1.32s forwards; }
.gallery__draw-svg.is-animated .gd-rule--bot { animation: gd-draw 0.5s ease 1.8s forwards; }
.gallery__draw-svg.is-animated .gd-orn  {
  animation: gd-fade-in 0.35s ease 1.44s forwards, gd-pulse 3.2s ease-in-out 2.1s infinite;
}
.gallery__draw-svg.is-animated .gd-brand { animation: gd-fade-in-up 0.7s ease 1.55s forwards; }
.gallery__draw-svg.is-animated .gd-tag   { animation: gd-fade-in 0.55s ease 2.1s forwards; }
.gallery__draw-svg.is-animated .gd-curl--1 {
  animation: gd-curl-in 0.7s ease 1.9s forwards, gd-curl-float 2.6s ease-in-out 2.62s infinite;
}
.gallery__draw-svg.is-animated .gd-curl--2 {
  animation: gd-curl-in 0.7s ease 2.1s forwards, gd-curl-float 2.6s ease-in-out 2.82s infinite;
}
.gallery__draw-svg.is-animated .gd-curl--3 {
  animation: gd-curl-in 0.7s ease 2.3s forwards, gd-curl-float 2.6s ease-in-out 3.02s infinite;
}

/* ===========================
   Products (subsections within #galerija)
   =========================== */
.products__subsection {
  margin-top: 64px;
}
.products__subheader {
  text-align: center;
  margin-bottom: 28px;
}
.products__subtitle {
  font-size: clamp(0.85rem, 2vw, 1rem);
  font-weight: 300;
  color: var(--color-text-muted);
  margin-top: 4px;
}
.products__grid {
  display: grid;
  gap: 10px;
}
.products__grid--large {
  grid-template-columns: repeat(4, 1fr);
}
.products__grid--small {
  grid-template-columns: repeat(2, 1fr);
  max-width: 640px;
  margin: 0 auto;
}
.products__item {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  background: var(--color-border);
}
.products__item--small {
  aspect-ratio: 4 / 3;
}
.products__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.products__item:hover img {
  transform: scale(1.04);
}
.products__item-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.48);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.products__item:hover .products__item-overlay {
  opacity: 1;
}
.products__item-name {
  color: #fff;
  font-size: 12px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  font-weight: 500;
  text-align: center;
  padding: 0 12px;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6);
}

/* ===========================
   Carousel (veliki sapuni)
   =========================== */
.carousel {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
}
.carousel__viewport {
  flex: 1;
  overflow: hidden;
}
.carousel__track {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
}
.carousel__btn {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border: 1px solid var(--color-border);
  background: var(--color-white);
  color: #999;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: border-color var(--transition), color var(--transition);
}
.carousel__btn:hover:not(:disabled) {
  border-color: var(--color-accent);
  color: var(--color-accent);
}
.carousel__btn:disabled {
  opacity: 0.25;
  cursor: default;
}

/* ===========================
   Gift Set
   =========================== */
.gift-set {
  padding: var(--section-pad) 0;
  background: #fdf8f9;
}
.gift-set__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  max-width: 900px;
  margin: 0 auto;
}
.gift-set__image {
  overflow: hidden;
}
.gift-set__image img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.5s ease;
}
.gift-set__image:hover img {
  transform: scale(1.02);
}
.gift-set__content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.gift-set__title {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 300;
  line-height: 1.25;
}
.gift-set__price {
  font-size: 28px;
  color: var(--color-accent);
  font-weight: 500;
  letter-spacing: 1px;
}
.gift-set__desc {
  font-size: 13px;
  color: #555;
  line-height: 1.75;
  max-width: 380px;
}

/* ===========================
   Pricing
   =========================== */
.pricing { padding: var(--section-pad) 0; background: var(--color-white); }
.pricing__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  max-width: 720px;
  margin: 0 auto;
}
.pricing__card { border: 1px solid var(--color-border); padding: 28px; }
.pricing__card--featured { border-color: var(--color-accent); background: #fdf8f9; }
.pricing__card-header { margin-bottom: 20px; }
.pricing__item {
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--color-border);
}
.pricing__card--featured .pricing__item { border-bottom-color: #f0d0d6; }
/* Works because .pricing__note is a <p>, not <div>, so last-of-type targets the last .pricing__item div */
.pricing__item:last-of-type { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
.pricing__item-name { font-size: 11px; color: #555; margin-bottom: 6px; }
.pricing__item-row { display: flex; justify-content: space-between; align-items: center; }
.pricing__qty { font-size: 10px; color: var(--color-text-muted); }
.pricing__price { font-size: 18px; color: var(--color-accent); font-weight: 500; }
.pricing__note { font-size: 10px; color: var(--color-text-muted); margin-top: 16px; }
.pricing__card--featured .pricing__note { color: #b07080; }

/* ===========================
   Fragrances
   =========================== */
.fragrances { padding: var(--section-pad) 0; background: var(--color-dark); }
.fragrances__pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.pill {
  border: 1px solid #3a3a3a;
  color: #bbb;
  padding: 7px 18px;
  font-size: 11px;
  letter-spacing: 1px;
  border-radius: 20px;
  transition: border-color var(--transition), color var(--transition);
  cursor: default;
  user-select: none;
}
.pill:hover { border-color: var(--color-accent); color: var(--color-accent); }
.pill--accent { border-color: var(--color-accent); color: var(--color-accent); }

/* ===========================
   Contact
   =========================== */
.contact { padding: var(--section-pad) 0; background: var(--color-light); }
.contact__subtitle { font-size: 12px; color: var(--color-text-muted); margin-top: 8px; }
.contact__email {
  display: block;
  text-align: center;
  color: var(--color-accent);
  font-size: 12px;
  letter-spacing: 1px;
  margin-top: -4px;
  margin-bottom: 8px;
  transition: opacity var(--transition);
}
.contact__email:hover { opacity: 0.7; }
.contact__location {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  color: var(--color-text-muted);
  font-size: 11px;
  letter-spacing: 0.8px;
  text-decoration: none;
  margin-bottom: 28px;
  transition: color var(--transition);
}
.contact__location svg { flex-shrink: 0; opacity: 0.7; }
.contact__location:hover { color: var(--color-accent); }
.contact__location:hover svg { opacity: 1; }
.contact__form { max-width: 540px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.contact__row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.contact__form input,
.contact__form select,
.contact__form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--color-border);
  background: #fff;
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--color-text);
  outline: none;
  transition: border-color var(--transition);
  border-radius: 0;
  appearance: none;
  -webkit-appearance: none;
}
.contact__form input::placeholder,
.contact__form textarea::placeholder { color: #bbb; }
.contact__form input:focus,
.contact__form select:focus,
.contact__form textarea:focus { border-color: var(--color-accent); }
.contact__form select {
  cursor: pointer;
  color: #bbb;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23bbb'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}
.contact__form select option { color: var(--color-text); }
.contact__form textarea { resize: vertical; min-height: 120px; }
.contact__success {
  text-align: center;
  color: var(--color-accent);
  font-size: 13px;
  padding: 12px;
  border: 1px solid var(--color-accent);
  background: #fdf8f9;
}

/* ===========================
   Footer
   =========================== */
.footer { background: var(--color-dark); padding: 48px 0; }
.footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
}
.footer__brand { font-size: 13px; letter-spacing: 3px; color: #fff; }
.footer__social { display: flex; gap: 12px; }
.footer__social-link {
  border: 1px solid #3a3a3a;
  color: #bbb;
  padding: 7px 18px;
  font-size: 11px;
  letter-spacing: 1px;
  transition: border-color var(--transition), color var(--transition);
}
.footer__social-link:hover { border-color: var(--color-accent); color: var(--color-accent); }
.footer__copy { font-size: 10px; color: #888; letter-spacing: 1px; }
.footer__email {
  color: var(--color-accent);
  font-size: 11px;
  letter-spacing: 1px;
  transition: opacity var(--transition);
  text-decoration: none;
}
.footer__email:hover { opacity: 0.7; }
.footer__legal {
  font-size: 10px;
  color: #888;
  letter-spacing: 0.5px;
}
.footer__vat {
  font-size: 10px;
  color: #888;
  letter-spacing: 0.5px;
  font-style: italic;
}
.footer__credit {
  display: flex;
  align-items: center;
  gap: 8px;
}
.footer__credit-text {
  font-size: 10px;
  color: #555;
  letter-spacing: 1px;
}
.footer__credit-logo {
  height: 50px;
  width: auto;
  display: block;
  opacity: 0.55;
  transition: opacity var(--transition);
}
.footer__credit a:hover .footer__credit-logo { opacity: 1; }

/* ===========================
   Lightbox
   =========================== */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 600;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0s 0.25s;
}
.lightbox.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.25s ease, visibility 0s;
}
.lightbox__close {
  position: fixed;
  top: 20px;
  right: 24px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  padding: 8px;
  line-height: 0;
  transition: color var(--transition);
}
.lightbox__close:hover { color: #fff; }
.lightbox__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  max-width: min(90vw, 620px);
}
.lightbox__img {
  max-width: 100%;
  max-height: 75vh;
  object-fit: contain;
  display: block;
}
.lightbox__name {
  color: #fff;
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  text-align: center;
}
/* Carousel items are clickable */
.carousel .products__item { cursor: pointer; }

/* ===========================
   Responsive — Tablet (≤1023px)
   =========================== */
@media (max-width: 1023px) {
  :root { --section-pad: 60px; }

  /* Show hamburger, hide inline links */
  .nav__hamburger { display: flex; }
  .nav__links {
    position: absolute;
    top: 100%;
    left: calc(-1 * var(--nav-pad));
    right: calc(-1 * var(--nav-pad));
    background: rgba(255, 255, 255, 0.98);
    flex-direction: column;
    align-items: flex-start;
    padding: 24px 32px;
    gap: 20px;
    border-bottom: 1px solid var(--color-border);
    transform: translateY(-110%);
    transition: transform 0.3s ease, visibility 0s 0.3s;
    z-index: 200;
    pointer-events: none;
    visibility: hidden;
  }
  .nav__links.is-open {
    transform: translateY(0);
    transition: transform 0.3s ease, visibility 0s;
    pointer-events: auto;
    visibility: visible;
  }

  /* Gift set: reduce gap at tablet */
  .gift-set__inner { gap: 40px; }

  /* Products grid: tablet */
  .products__grid--large { grid-template-columns: repeat(3, 1fr); }

  /* Carousel: 3 items */
  .carousel__track { gap: 10px; }

  /* Pricing: 2 columns still ok, reduce padding */
  .pricing__card { padding: 20px; }
}

/* ===========================
   Responsive — Mobile (≤767px)
   =========================== */
@media (max-width: 767px) {
  :root { --section-pad: 48px; }

  /* Use svh for better mobile browser chrome handling */
  .hero { height: 100svh; }
  .hero__title { font-size: clamp(1.7rem, 7vw, 2.4rem); }
  .hero__cta { flex-direction: column; align-items: center; }
  .hero__cta .btn { width: 220px; text-align: center; }

  /* Products grid: mobile */
  .products__grid--large { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .products__grid--small { grid-template-columns: 1fr; max-width: 400px; }
  .products__subsection { margin-top: 48px; }

  /* Carousel: 2 items, smaller gap */
  .carousel__track { gap: 8px; }
  .carousel__btn { width: 32px; height: 32px; }

  /* Gift set: mobile stack */
  .gift-set__inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .gift-set__desc { max-width: 100%; }

  /* Pricing: stack to 1 column */
  .pricing__grid { grid-template-columns: 1fr; max-width: 420px; }

  /* Contact row: stack to 1 column */
  .contact__row { grid-template-columns: 1fr; }
}
