/* ============================================================
   Siriwarin — premium herbal haircare
   Drenched dark luxury · black + gold
   ============================================================ */

:root{
  --bg:        #100d09;
  --bg-deep:   #0a0805;
  --surface:   #1a160f;
  --surface-2: #221c12;
  --line:      #3a3120;
  --line-soft: #271f14;
  --gold:      #c9a14a;
  --gold-lite: #e7cd86;
  --gold-deep: #9c7a32;
  --ink:       #f1e9da;
  --muted:     #b3a489;
  --muted-dim: #8a7d65;
  --danger:    #d98a6a;

  --font-display: 'Marcellus', 'Trirong', Georgia, serif;
  --font-body:    'Anuphan', 'Trirong', system-ui, -apple-system, sans-serif;

  --maxw: 1240px;
  --pad: clamp(1.1rem, 4vw, 3rem);
  --radius: 3px;

  --ease: cubic-bezier(.16,1,.3,1);          /* ease-out-expo-ish */
  --ease-soft: cubic-bezier(.22,.61,.36,1);

  --z-header: 100;
  --z-backdrop: 200;
  --z-drawer: 210;
  --z-toast: 300;
}

*,*::before,*::after{ box-sizing:border-box; }
html{ scroll-behavior:smooth; -webkit-text-size-adjust:100%; }
@media (prefers-reduced-motion: reduce){ html{ scroll-behavior:auto; } }

body{
  margin:0;
  background:var(--bg);
  color:var(--ink);
  font-family:var(--font-body);
  font-size:clamp(1rem,.96rem + .2vw,1.075rem);
  line-height:1.75;
  font-weight:300;
  letter-spacing:.005em;
  overflow-x:hidden;
  -webkit-font-smoothing:antialiased;
}

img{ max-width:100%; display:block; }
a{ color:inherit; text-decoration:none; }
button{ font-family:inherit; cursor:pointer; }
:focus-visible{ outline:2px solid var(--gold); outline-offset:3px; }

h1,h2,h3,h4{
  font-family:var(--font-display);
  font-weight:400;
  line-height:1.12;
  letter-spacing:-.01em;
  text-wrap:balance;
  margin:0;
  color:var(--ink);
}

.container{ width:100%; max-width:var(--maxw); margin-inline:auto; padding-inline:var(--pad); }
.section{ padding-block:clamp(3.5rem,8vw,7rem); }

/* ---- shared bits ---------------------------------------------------- */
.kicker{
  font-family:var(--font-body);
  font-size:.78rem; font-weight:500;
  letter-spacing:.32em; text-transform:uppercase;
  color:var(--gold);
}
.lead{ color:var(--muted); max-width:60ch; font-weight:300; }
.gold{ color:var(--gold); }
.center{ text-align:center; }
.rule{ width:54px; height:1px; background:var(--gold); border:0; margin:1.4rem 0; }
.center .rule{ margin-inline:auto; }

.btn{
  display:inline-flex; align-items:center; gap:.55em; justify-content:center;
  font-family:var(--font-body); font-weight:500; font-size:.92rem;
  letter-spacing:.04em; text-transform:uppercase;
  padding:.95em 2em; border-radius:var(--radius);
  border:1px solid var(--gold); background:var(--gold); color:#1a1206;
  transition:background .4s var(--ease), color .4s var(--ease), transform .4s var(--ease);
}
.btn:hover{ background:var(--gold-lite); transform:translateY(-2px); }
.btn--ghost{ background:transparent; color:var(--gold); }
.btn--ghost:hover{ background:rgba(201,161,74,.10); color:var(--gold-lite); transform:translateY(-2px); }
.btn--block{ width:100%; }
.btn--lg{ padding:1.1em 2.6em; font-size:.98rem; }

/* ===================================================================
   HEADER
   =================================================================== */
.site-header{
  position:sticky; top:0; z-index:var(--z-header);
  background:color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter:blur(14px);
  border-bottom:1px solid var(--line-soft);
  transition:background .4s var(--ease), border-color .4s var(--ease);
}
.site-header.scrolled{ background:color-mix(in srgb, var(--bg-deep) 94%, transparent); }
.nav{
  display:flex; align-items:center; justify-content:space-between;
  gap:1rem; height:74px;
}
.brand{
  font-family:var(--font-display);
  font-size:1.5rem; letter-spacing:.16em; text-transform:uppercase;
  color:var(--ink); white-space:nowrap;
}
.brand b{ color:var(--gold); font-weight:400; }
.nav-links{ display:flex; gap:2.1rem; list-style:none; margin:0; padding:0; }
.nav-links a{
  font-size:.82rem; letter-spacing:.14em; text-transform:uppercase;
  color:var(--muted); font-weight:400; position:relative; padding-block:.4rem;
  transition:color .35s var(--ease);
}
.nav-links a::after{
  content:""; position:absolute; left:0; bottom:-2px; height:1px; width:0;
  background:var(--gold); transition:width .4s var(--ease);
}
.nav-links a:hover{ color:var(--ink); }
.nav-links a:hover::after{ width:100%; }

.nav-actions{ display:flex; align-items:center; gap:1.1rem; }
.lang{ font-size:.78rem; letter-spacing:.1em; color:var(--muted-dim); display:flex; gap:.4rem; }
.lang b{ color:var(--gold); font-weight:500; }
.cart-btn{
  position:relative; background:none; border:0; color:var(--ink);
  display:inline-flex; padding:.3rem; transition:color .3s var(--ease);
}
.cart-btn:hover{ color:var(--gold); }
.cart-btn svg{ width:23px; height:23px; }
.cart-count{
  position:absolute; top:-6px; right:-8px; min-width:18px; height:18px; padding:0 4px;
  background:var(--gold); color:#1a1206; border-radius:999px;
  font-size:.66rem; font-weight:700; line-height:18px; text-align:center;
  transform:scale(0); transition:transform .35s var(--ease);
}
.cart-count.show{ transform:scale(1); }
.nav-toggle{ display:none; background:none; border:0; color:var(--ink); padding:.3rem; }
.nav-toggle svg{ width:26px; height:26px; }

/* ===================================================================
   HERO
   =================================================================== */
.hero{ position:relative; min-height:clamp(560px,92vh,860px); display:flex; align-items:center; overflow:hidden; }
.hero__bg{ position:absolute; inset:0; z-index:0; }
.hero__bg img{ width:100%; height:100%; object-fit:cover; object-position:center 28%; }
.hero__bg::after{
  content:""; position:absolute; inset:0;
  background:
    linear-gradient(90deg, rgba(10,8,5,.92) 0%, rgba(10,8,5,.74) 38%, rgba(10,8,5,.30) 70%, rgba(10,8,5,.55) 100%),
    linear-gradient(0deg, rgba(10,8,5,.85) 0%, transparent 40%);
}
.hero__inner{ position:relative; z-index:1; max-width:660px; padding-block:clamp(4rem,10vw,7rem); }
.hero h1{
  font-size:clamp(2.7rem,7vw,5.1rem); line-height:1.04; margin:.6rem 0 0;
  letter-spacing:-.02em;
}
.hero h1 .scriptmark{ display:block; color:var(--gold); font-size:1.06em; }
.hero .lead{ margin-top:1.6rem; font-size:clamp(1.02rem,.98rem + .4vw,1.22rem); color:#e4d9c4; }
.hero__cta{ display:flex; flex-wrap:wrap; gap:1rem; margin-top:2.4rem; }
.hero__meta{
  display:flex; gap:2.2rem; flex-wrap:wrap; margin-top:3rem;
  padding-top:1.8rem; border-top:1px solid var(--line-soft);
}
.hero__meta div{ display:flex; flex-direction:column; }
.hero__meta b{ font-family:var(--font-display); font-size:1.7rem; color:var(--gold); font-weight:400; }
.hero__meta span{ font-size:.78rem; letter-spacing:.12em; text-transform:uppercase; color:var(--muted-dim); }

/* ===================================================================
   SECTION HEADINGS
   =================================================================== */
.s-head{ max-width:62ch; }
.s-head.center{ margin-inline:auto; }
.s-head h2{ font-size:clamp(2rem,4.5vw,3.2rem); margin-top:.7rem; }
.s-head p{ margin-top:1.1rem; }

/* ===================================================================
   PRODUCTS
   =================================================================== */
.products-grid{
  display:grid; gap:clamp(1.2rem,2.5vw,2.2rem);
  grid-template-columns:repeat(auto-fit,minmax(248px,1fr));
  margin-top:clamp(2.4rem,5vw,3.6rem);
}
.pcard{
  position:relative; display:flex; flex-direction:column;
  background:var(--surface); border:1px solid var(--line-soft);
  border-radius:var(--radius); overflow:hidden;
  transition:border-color .5s var(--ease), transform .5s var(--ease), box-shadow .5s var(--ease);
}
.pcard:hover{ border-color:var(--gold-deep); transform:translateY(-5px); box-shadow:0 24px 50px -28px rgba(0,0,0,.9); }
.pcard__media{ position:relative; aspect-ratio:4/5; overflow:hidden; background:var(--bg-deep); }
.pcard__media img{ width:100%; height:100%; object-fit:cover; transition:transform 1.1s var(--ease); }
.pcard:hover .pcard__media img{ transform:scale(1.05); }
.pcard__tag{
  position:absolute; top:.9rem; left:.9rem; z-index:2;
  font-size:.66rem; letter-spacing:.16em; text-transform:uppercase; font-weight:600;
  padding:.35em .8em; border-radius:999px;
  background:rgba(16,13,9,.78); color:var(--gold-lite); border:1px solid var(--gold-deep);
  backdrop-filter:blur(4px);
}
.pcard__body{ padding:1.4rem 1.4rem 1.6rem; display:flex; flex-direction:column; flex:1; }
.pcard__name{ font-size:1.32rem; }
.pcard__desc{ color:var(--muted); font-size:.9rem; margin:.5rem 0 1.1rem; flex:1; }
.pcard__foot{ display:flex; align-items:center; justify-content:space-between; gap:1rem; }
.price{ display:flex; align-items:baseline; gap:.5rem; }
.price b{ font-family:var(--font-display); font-size:1.45rem; color:var(--gold); font-weight:400; }
.price s{ color:var(--muted-dim); font-size:.92rem; }
.add-btn{
  display:inline-flex; align-items:center; gap:.4rem;
  background:transparent; border:1px solid var(--line); color:var(--ink);
  padding:.62em 1.1em; border-radius:var(--radius); font-size:.8rem;
  letter-spacing:.06em; text-transform:uppercase; font-weight:500;
  transition:all .35s var(--ease); white-space:nowrap;
}
.add-btn:hover{ border-color:var(--gold); background:var(--gold); color:#1a1206; }

/* placeholder / coming soon card */
.pcard--soon{ display:flex; align-items:center; justify-content:center; text-align:center;
  border-style:dashed; border-color:var(--line); background:transparent; min-height:340px; }
.pcard--soon div{ padding:2rem; }
.pcard--soon .kicker{ color:var(--muted-dim); }
.pcard--soon p{ color:var(--muted); margin:.8rem 0 0; font-size:.92rem; }

/* ===================================================================
   STORY / SPLIT
   =================================================================== */
.split{ display:grid; grid-template-columns:1fr 1fr; gap:clamp(2rem,5vw,5rem); align-items:center; }
.split--rev .split__media{ order:2; }
.split__media{ position:relative; }
.split__media img{ width:100%; border-radius:var(--radius); }
.split__media::before{
  content:""; position:absolute; inset:14px -14px -14px 14px; border:1px solid var(--gold-deep);
  border-radius:var(--radius); z-index:-1;
}
.split__body h2{ font-size:clamp(1.9rem,4vw,3rem); }
.split__body p{ color:var(--muted); margin-top:1.2rem; }

/* ingredient list (11 extracts) */
.ingredients{ display:flex; flex-wrap:wrap; gap:.6rem; margin-top:1.8rem; }
.ingredients li{
  list-style:none; font-size:.82rem; letter-spacing:.02em; color:var(--ink);
  padding:.5em 1em; border:1px solid var(--line); border-radius:999px;
  background:var(--surface); transition:all .35s var(--ease);
}
.ingredients li:hover{ border-color:var(--gold); color:var(--gold-lite); }

/* ===================================================================
   BENEFITS / FEATURE ROW
   =================================================================== */
.features{ display:grid; gap:clamp(1.4rem,3vw,2.6rem); grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); margin-top:3rem; }
.feature{ }
.feature__ic{ width:42px; height:42px; color:var(--gold); margin-bottom:1rem; }
.feature__ic svg{ width:100%; height:100%; }
.feature h3{ font-size:1.3rem; }
.feature p{ color:var(--muted); margin-top:.6rem; font-size:.92rem; }

/* ===================================================================
   STEPS (how to use)
   =================================================================== */
.steps{ counter-reset:step; display:grid; gap:1.6rem; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); margin-top:3rem; }
.step{ position:relative; padding-top:1.4rem; border-top:1px solid var(--line-soft); }
.step::before{
  counter-increment:step; content:counter(step,decimal-leading-zero);
  font-family:var(--font-display); font-size:1.5rem; color:var(--gold); display:block; margin-bottom:.6rem;
}
.step h3{ font-size:1.15rem; }
.step p{ color:var(--muted); margin-top:.5rem; font-size:.9rem; }

/* ===================================================================
   LIFESTYLE BAND
   =================================================================== */
.band{ position:relative; }
.band__media{ position:relative; min-height:clamp(420px,60vh,640px); overflow:hidden; }
.band__media img{ width:100%; height:100%; object-fit:cover; object-position:center 25%; position:absolute; inset:0; }
.band__media::after{ content:""; position:absolute; inset:0; background:linear-gradient(0deg,rgba(10,8,5,.9),rgba(10,8,5,.35)); }
.band__quote{ position:relative; z-index:1; max-width:680px; padding:clamp(3rem,8vw,6rem) var(--pad); }
.band__quote blockquote{ font-family:var(--font-display); font-size:clamp(1.5rem,3.2vw,2.4rem); line-height:1.3; margin:0; }
.band__quote cite{ display:block; margin-top:1.4rem; font-style:normal; color:var(--gold); letter-spacing:.1em; font-size:.85rem; text-transform:uppercase; }

/* ===================================================================
   TIKTOK VIDEO BAND
   =================================================================== */
.tiktok-band{ background:var(--surface); }
.tiktok-row{
  display:grid; gap:1.4rem; margin-top:clamp(2rem,4vw,3rem);
  grid-template-columns:repeat(auto-fit,minmax(260px,1fr)); justify-items:center;
}
.tiktok-row .tiktok-embed{ width:100%; max-width:325px; margin:0 !important; border-radius:var(--radius); overflow:hidden; }
.tiktok-cta{ text-align:center; margin-top:2.4rem; }

/* ===================================================================
   CONTACT / CTA
   =================================================================== */
.cta{ text-align:center; background:var(--bg-deep); border-block:1px solid var(--line-soft); }
.cta h2{ font-size:clamp(2rem,5vw,3.4rem); }
.cta__btns{ display:flex; gap:1rem; justify-content:center; flex-wrap:wrap; margin-top:2.2rem; }

/* ===================================================================
   FOOTER
   =================================================================== */
.footer{ background:var(--bg-deep); padding-block:clamp(3rem,6vw,4.5rem) 2rem; border-top:1px solid var(--line-soft); }
.footer__grid{ display:grid; gap:2.4rem; grid-template-columns:1.4fr 1fr 1fr; }
.footer .brand{ font-size:1.7rem; }
.footer__col h4{ font-family:var(--font-body); font-size:.78rem; letter-spacing:.2em; text-transform:uppercase; color:var(--gold); font-weight:600; margin-bottom:1.1rem; }
.footer__col p,.footer__col a{ color:var(--muted); font-size:.92rem; line-height:1.9; display:block; }
.footer__col a:hover{ color:var(--gold-lite); }
.socials{ display:flex; gap:.8rem; margin-top:1.2rem; }
.socials a{ width:38px; height:38px; border:1px solid var(--line); border-radius:50%; display:grid; place-items:center; color:var(--muted); transition:all .35s var(--ease); }
.socials a:hover{ border-color:var(--gold); color:var(--gold); transform:translateY(-2px); }
.socials svg{ width:18px; height:18px; }
.footer__base{ margin-top:3rem; padding-top:1.6rem; border-top:1px solid var(--line-soft); display:flex; justify-content:space-between; flex-wrap:wrap; gap:.8rem; color:var(--muted-dim); font-size:.82rem; }

/* ===================================================================
   CART DRAWER
   =================================================================== */
.backdrop{
  position:fixed; inset:0; z-index:var(--z-backdrop); background:rgba(6,5,3,.6);
  backdrop-filter:blur(3px); opacity:0; visibility:hidden; transition:opacity .4s var(--ease), visibility .4s;
}
.backdrop.open{ opacity:1; visibility:visible; }
.drawer{
  position:fixed; top:0; right:0; bottom:0; z-index:var(--z-drawer);
  width:min(420px,100%); background:var(--surface); border-left:1px solid var(--line);
  display:flex; flex-direction:column;
  transform:translateX(100%); transition:transform .5s var(--ease);
}
.drawer.open{ transform:translateX(0); }
.drawer__head{ display:flex; align-items:center; justify-content:space-between; padding:1.4rem 1.5rem; border-bottom:1px solid var(--line-soft); }
.drawer__head h3{ font-size:1.3rem; letter-spacing:.02em; }
.drawer__close{ background:none; border:0; color:var(--muted); font-size:1.4rem; line-height:1; padding:.2rem; transition:color .3s; }
.drawer__close:hover{ color:var(--gold); }
.drawer__items{ flex:1; overflow-y:auto; padding:1rem 1.5rem; }
.drawer__empty{ text-align:center; color:var(--muted-dim); padding:4rem 1rem; }
.drawer__empty svg{ width:48px; height:48px; color:var(--line); margin:0 auto 1rem; }
.citem{ display:grid; grid-template-columns:64px 1fr auto; gap:1rem; padding:1.1rem 0; border-bottom:1px solid var(--line-soft); }
.citem img{ width:64px; height:80px; object-fit:cover; border-radius:2px; }
.citem__name{ font-family:var(--font-display); font-size:1.05rem; }
.citem__price{ color:var(--gold); font-size:.92rem; margin-top:.2rem; }
.qty{ display:inline-flex; align-items:center; border:1px solid var(--line); border-radius:3px; margin-top:.6rem; }
.qty button{ background:none; border:0; color:var(--ink); width:28px; height:28px; font-size:1rem; transition:color .25s; }
.qty button:hover{ color:var(--gold); }
.qty span{ min-width:26px; text-align:center; font-size:.9rem; }
.citem__remove{ background:none; border:0; color:var(--muted-dim); font-size:.78rem; align-self:start; transition:color .25s; }
.citem__remove:hover{ color:var(--danger); }
.drawer__foot{ padding:1.4rem 1.5rem; border-top:1px solid var(--line); background:var(--bg-deep); }
.drawer__total{ display:flex; justify-content:space-between; align-items:baseline; margin-bottom:.4rem; }
.drawer__total b{ font-family:var(--font-display); font-size:1.6rem; color:var(--gold); font-weight:400; }
.drawer__note{ color:var(--muted-dim); font-size:.78rem; margin:0 0 1.1rem; }

/* ===================================================================
   TOAST
   =================================================================== */
.toast{
  position:fixed; left:50%; bottom:2rem; z-index:var(--z-toast);
  transform:translate(-50%,140%); background:var(--surface-2); color:var(--ink);
  border:1px solid var(--gold-deep); border-radius:var(--radius);
  padding:.9rem 1.5rem; font-size:.9rem; box-shadow:0 18px 40px -18px rgba(0,0,0,.8);
  transition:transform .5s var(--ease); display:flex; align-items:center; gap:.6rem;
}
.toast.show{ transform:translate(-50%,0); }
.toast svg{ width:18px; height:18px; color:var(--gold); }

/* ===================================================================
   REVEAL ANIMATION (enhances visible content)
   =================================================================== */
/* content is visible by default; only the JS-enabled page gates it for the reveal */
.js .reveal{ opacity:0; transform:translateY(22px); transition:opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.in{ opacity:1; transform:none; }
.reveal[data-d="1"]{ transition-delay:.08s; }
.reveal[data-d="2"]{ transition-delay:.16s; }
.reveal[data-d="3"]{ transition-delay:.24s; }
.reveal[data-d="4"]{ transition-delay:.32s; }

/* hero load animation */
.hero__inner > *{ opacity:0; transform:translateY(26px); animation:rise .95s var(--ease) forwards; }
.hero__inner > *:nth-child(1){ animation-delay:.15s; }
.hero__inner > *:nth-child(2){ animation-delay:.30s; }
.hero__inner > *:nth-child(3){ animation-delay:.45s; }
.hero__inner > *:nth-child(4){ animation-delay:.60s; }
.hero__inner > *:nth-child(5){ animation-delay:.75s; }
@keyframes rise{ to{ opacity:1; transform:none; } }

@media (prefers-reduced-motion: reduce){
  .reveal{ opacity:1; transform:none; transition:none; }
  .hero__inner > *{ animation:none; opacity:1; transform:none; }
  *{ scroll-behavior:auto !important; }
}

/* ===================================================================
   PRODUCT DETAIL PAGE
   =================================================================== */
.pdp{ padding-top:clamp(2.5rem,5vw,4rem); }
.crumbs{ font-size:.82rem; color:var(--muted-dim); margin-bottom:1.6rem; letter-spacing:.04em; }
.crumbs a:hover{ color:var(--gold); }
.pdp__grid{ display:grid; grid-template-columns:1fr 1fr; gap:clamp(2rem,5vw,4.5rem); align-items:start; }
.pdp__media img{ width:100%; border-radius:var(--radius); border:1px solid var(--line-soft); }
.pdp__thumbs{ display:flex; gap:.8rem; margin-top:.9rem; }
.pdp__thumbs button{ flex:1; padding:0; border:1px solid var(--line-soft); border-radius:2px; overflow:hidden; background:none; transition:border-color .3s; aspect-ratio:1; }
.pdp__thumbs button.active,.pdp__thumbs button:hover{ border-color:var(--gold); }
.pdp__thumbs img{ width:100%; height:100%; object-fit:cover; }
.pdp__info h1{ font-size:clamp(2rem,4vw,2.9rem); }
.pdp__sub{ color:var(--gold); letter-spacing:.16em; text-transform:uppercase; font-size:.82rem; }
.pdp__price{ display:flex; align-items:baseline; gap:.8rem; margin:1.4rem 0; }
.pdp__price b{ font-family:var(--font-display); font-size:2.1rem; color:var(--gold); font-weight:400; }
.pdp__price s{ color:var(--muted-dim); }
.pdp__desc{ color:var(--muted); }
.pdp__buy{ display:flex; gap:1rem; align-items:center; margin:2rem 0; flex-wrap:wrap; }
.pdp__buy .qty{ margin:0; height:48px; }
.pdp__buy .qty button{ height:46px; width:40px; }
.pdp__list{ margin:2rem 0 0; padding:1.6rem 0 0; border-top:1px solid var(--line-soft); list-style:none; }
.pdp__list li{ display:flex; gap:.8rem; padding:.5rem 0; color:var(--ink); font-size:.95rem; }
.pdp__list svg{ width:18px; height:18px; color:var(--gold); flex:none; margin-top:.35rem; }

/* ===================================================================
   RESPONSIVE
   =================================================================== */
@media (max-width:900px){
  .split,.pdp__grid{ grid-template-columns:1fr; }
  .split--rev .split__media{ order:0; }
  .split__media{ max-width:520px; }
  .footer__grid{ grid-template-columns:1fr 1fr; }
}
@media (max-width:720px){
  .nav-links{
    position:fixed; inset:74px 0 auto 0; flex-direction:column; gap:0;
    background:var(--bg-deep); border-bottom:1px solid var(--line);
    padding:0; max-height:0; overflow:hidden; transition:max-height .5s var(--ease);
  }
  .nav-links.open{ max-height:380px; }
  .nav-links li{ width:100%; }
  .nav-links a{ display:block; padding:1.05rem var(--pad); border-bottom:1px solid var(--line-soft); }
  .nav-links a::after{ display:none; }
  .nav-toggle{ display:inline-flex; }
  .lang{ display:none; }
  .footer__grid{ grid-template-columns:1fr; }
  .hero__meta{ gap:1.6rem; }
}
