/* ============================================================
   CRISPY CRUNCH — Design System
   ============================================================ */

:root{
  /* colour */
  --cream:        #FBF6EC;
  --cream-2:      #F6EEDF;
  --cream-3:      #F1E7D6;
  --amber-bg:     #FBF0DC;
  --ink:          #111111;
  --ink-2:        #1A1815;
  --ink-soft:     #35302A;
  --muted:        #857B6E;
  --muted-2:      #B3A899;
  --gold:         #FFC107;
  --gold-deep:    #E8A400;
  --red:          #F15A24;
  --red-deep:     #D8431350;
  --line:         rgba(17,17,17,.12);
  --line-dark:    rgba(255,255,255,.14);

  /* type */
  --f-display: "Playfair Display", "Times New Roman", serif;
  --f-body:    "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --f-script:  "Kaushan Script", cursive;

  /* metrics */
  --nav-h: 92px;
  --pad-x: clamp(20px, 5.2vw, 96px);
  --maxw: 1560px;
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 26px;

  --ease: cubic-bezier(.22,.61,.36,1);
}

/* ---------- reset ---------- */
*,*::before,*::after{box-sizing:border-box}
html{ -webkit-text-size-adjust:100%; scroll-behavior:smooth }
body{
  margin:0;
  background:var(--cream);
  color:var(--ink);
  font-family:var(--f-body);
  font-weight:400;
  font-size:16px;
  line-height:1.65;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  overflow-x:hidden;
}
img{max-width:100%;height:auto;display:block}
a{color:inherit;text-decoration:none}
button,input,select,textarea{font:inherit;color:inherit}
button{background:none;border:0;cursor:pointer}
ul{list-style:none;margin:0;padding:0}
h1,h2,h3,h4,p{margin:0}
::selection{background:var(--gold);color:var(--ink)}

/* ---------- type ---------- */
.display{
  font-family:var(--f-display);
  font-weight:700;
  line-height:.98;
  letter-spacing:-.022em;
}
.d-xl{ font-size:clamp(46px, 7.4vw, 118px) }
.d-lg{ font-size:clamp(38px, 5.6vw, 88px) }
.d-md{ font-size:clamp(30px, 3.6vw, 56px) }
.d-sm{ font-size:clamp(24px, 2.4vw, 36px) }

.script{ font-family:var(--f-script); font-weight:400; letter-spacing:.01em }
.eyebrow{
  font-size:12px; letter-spacing:.22em; text-transform:uppercase;
  font-weight:500; color:var(--muted);
}
.sec-num{
  font-family:var(--f-display); font-weight:700;
  font-size:clamp(30px,3.4vw,48px); color:rgba(17,17,17,.16);
  letter-spacing:.02em; line-height:1;
}
.lede{ font-size:clamp(15px,1.15vw,18px); color:var(--ink-soft); max-width:44ch }
.accent{ color:var(--red) }
.accent-gold{ color:var(--gold) }
.rule{ width:70px; height:4px; border-radius:4px; background:var(--gold); margin:26px 0 0 }

/* ---------- buttons ---------- */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:12px;
  height:56px; padding:0 30px; border-radius:6px;
  font-size:15px; font-weight:500; letter-spacing:.01em;
  transition:transform .35s var(--ease), background-color .3s, color .3s, border-color .3s, box-shadow .35s;
  will-change:transform;
}
.btn:hover{ transform:translateY(-2px) }
.btn:active{ transform:translateY(0) }
.btn-primary{ background:var(--gold); color:var(--ink); box-shadow:0 10px 26px -12px rgba(232,164,0,.9) }
.btn-primary:hover{ background:var(--gold-deep); box-shadow:0 18px 34px -14px rgba(232,164,0,.95) }
.btn-dark{ background:var(--ink); color:#fff }
.btn-dark:hover{ background:#000 }
.btn-ghost{ border:1px solid var(--line); color:var(--ink) }
.btn-ghost:hover{ border-color:var(--ink) }
.btn-ghost-light{ border:1px solid rgba(255,255,255,.35); color:#fff }
.btn-ghost-light:hover{ border-color:#fff; background:rgba(255,255,255,.06) }
.btn-sm{ height:46px; padding:0 22px; font-size:14px }
.btn-block{ width:100% }
.btn-arrow{ width:34px;height:34px;border-radius:50%;background:rgba(17,17,17,.12);display:grid;place-items:center;flex:0 0 auto }

/* ---------- layout ---------- */
.wrap{ width:100%; max-width:var(--maxw); margin-inline:auto; padding-inline:var(--pad-x) }
.section{ position:relative; padding:clamp(80px,9vw,150px) 0 }
.page-head{ padding-block:calc(var(--nav-h) + clamp(48px,6vw,96px)) clamp(30px,4vw,60px) }

/* ============================================================
   NAV
   ============================================================ */
.nav{
  position:fixed; top:0; left:0; right:0; z-index:200;
  height:var(--nav-h);
  display:flex; align-items:center;
  transition:background-color .45s var(--ease), backdrop-filter .45s, height .45s var(--ease), box-shadow .45s, border-color .45s;
  border-bottom:1px solid transparent;
}
.nav__in{
  width:100%; max-width:var(--maxw); margin-inline:auto;
  padding-inline:var(--pad-x);
  display:flex; align-items:center; gap:28px;
}
.logo{ display:flex; flex-direction:column; align-items:flex-start; line-height:1; flex:0 0 auto; width:max-content; padding-top:6px }
.logo__mark{ font-family:var(--f-script); font-size:33px; line-height:.92; letter-spacing:.005em; position:relative }
.logo__mark::after{
  content:""; position:absolute; top:-7px; right:2px; width:9px; height:9px;
  background:var(--gold); border-radius:50% 50% 50% 0; transform:rotate(-16deg);
}
.logo__sub{ font-size:10px; letter-spacing:.4em; font-weight:600; padding-left:3px; margin-top:7px }
.nav__links{ display:flex; gap:clamp(18px,2.4vw,44px); margin-inline:auto }
.nav__links a{
  position:relative; font-size:15px; font-weight:400; padding:6px 0;
  transition:color .3s, opacity .3s; opacity:.85;
}
.nav__links a:hover{ opacity:1 }
.nav__links a::after{
  content:""; position:absolute; left:0; right:0; bottom:-2px; height:2px;
  background:var(--gold); transform:scaleX(0); transform-origin:left;
  transition:transform .4s var(--ease);
}
.nav__links a:hover::after,.nav__links a.is-active::after{ transform:scaleX(1) }
.nav__links a.is-active{ color:var(--gold); opacity:1 }
.nav__right{ display:flex; align-items:center; gap:16px; flex:0 0 auto }
.cart-btn{
  width:48px;height:48px;border-radius:50%;
  border:1px solid var(--gold); display:grid;place-items:center;position:relative;
  transition:background-color .3s;
}
.cart-btn:hover{ background:rgba(255,193,7,.16) }
.cart-btn svg{ width:20px;height:20px }
.cart-count{
  display:none;
  position:absolute; top:-5px; right:-5px; min-width:21px; height:21px; padding:0 5px;
  border-radius:11px; background:var(--gold); color:var(--ink);
  font-size:11px; font-weight:600; display:grid; place-items:center;
}
.burger{ display:none; width:44px;height:44px; }
.burger span{ display:block;height:1.5px;background:currentColor;margin:5px auto;width:22px;transition:.35s var(--ease) }

/* nav themes */
.nav--dark{ color:#fff }
.nav--dark .nav__links a::after{ background:var(--gold) }
.nav--light{ color:var(--ink) }
.nav.is-stuck{ height:74px; backdrop-filter:blur(16px); -webkit-backdrop-filter:blur(16px) }
.nav.is-stuck.nav--dark{ background:rgba(10,10,10,.72); border-bottom-color:var(--line-dark) }
.nav.is-stuck.nav--light{ background:rgba(251,246,236,.78); border-bottom-color:var(--line) }
.nav.is-stuck .logo__mark{ font-size:28px }
.nav.is-stuck .logo{ padding-top:4px }

/* mobile drawer */
.drawer{
  position:fixed; inset:0; z-index:190; background:var(--ink); color:#fff;
  display:flex; flex-direction:column; justify-content:center; gap:6px;
  padding:0 var(--pad-x);
  clip-path:inset(0 0 100% 0); transition:clip-path .7s var(--ease);
  pointer-events:none;
}
.drawer.is-open{ clip-path:inset(0 0 0 0); pointer-events:auto }
.drawer a{ font-family:var(--f-display); font-size:clamp(32px,7vw,54px); font-weight:700; padding:8px 0; opacity:.9 }
.drawer a:hover{ color:var(--gold) }

/* ============================================================
   FOOTER
   ============================================================ */
.footer{ background:var(--ink); color:#fff; padding:clamp(60px,7vw,100px) 0 40px; position:relative; z-index:40 }
.footer__grid{
  display:grid; gap:48px 40px;
  grid-template-columns:1.6fr 1fr 1fr 1.2fr;
}
.footer h4{ font-size:13px; letter-spacing:.18em; text-transform:uppercase; color:var(--gold); font-weight:600; margin-bottom:20px }
.footer li{ margin-bottom:11px }
.footer li a{ font-size:14.5px; color:rgba(255,255,255,.66); transition:color .3s }
.footer li a:hover{ color:#fff }
.footer .logo{ color:#fff }
.footer__blurb{ color:rgba(255,255,255,.5); font-size:14px; margin-top:20px; max-width:30ch }
.socials{ display:flex; gap:12px; margin-top:24px }
.socials a{
  width:38px;height:38px;border-radius:50%;border:1px solid rgba(255,255,255,.18);
  display:grid;place-items:center;transition:.3s
}
.socials a:hover{ background:var(--gold); border-color:var(--gold); color:var(--ink) }
.socials svg{ width:16px;height:16px }
.store-badge svg{ width:19px;height:19px;flex:0 0 auto }
.store-badge{
  display:flex;align-items:center;gap:11px;border:1px solid rgba(255,255,255,.2);
  border-radius:8px;padding:9px 16px;margin-bottom:10px;transition:.3s
}
.store-badge:hover{ border-color:var(--gold) }
.store-badge small{ display:block;font-size:10px;color:rgba(255,255,255,.5);line-height:1.2 }
.store-badge strong{ font-size:14px;font-weight:500 }
.footer__bar{
  margin-top:60px; padding-top:26px; border-top:1px solid rgba(255,255,255,.1);
  display:flex; justify-content:space-between; gap:20px; flex-wrap:wrap;
  font-size:13px; color:rgba(255,255,255,.42);
}

/* ============================================================
   SHARED COMPONENTS
   ============================================================ */
.card{
  background:#fff; border:1px solid rgba(17,17,17,.07); border-radius:var(--r-md);
  transition:transform .55s var(--ease), box-shadow .55s var(--ease), border-color .4s;
}
.card:hover{ transform:translateY(-6px); box-shadow:0 30px 60px -34px rgba(60,40,10,.45); border-color:rgba(17,17,17,.12) }

.prod{ padding:22px 22px 26px; display:flex; flex-direction:column; position:relative }
.prod__media{
  aspect-ratio:1/.86; display:grid; place-items:center; padding:6px; position:relative; flex:0 0 auto;
}
.prod__media img{
  position:absolute; inset:8px; width:calc(100% - 16px); height:calc(100% - 16px);
  object-fit:contain; transition:transform .7s var(--ease);
}
.card:hover .prod__media img{ transform:scale(1.06) rotate(-2deg) }
.prod__fav{
  position:absolute; top:16px; right:16px; width:36px;height:36px;border-radius:50%;
  border:1px solid var(--line); display:grid;place-items:center; z-index:3; background:rgba(255,255,255,.6);
  transition:.3s
}
.prod__fav:hover,.prod__fav.is-on{ border-color:var(--gold); color:var(--gold-deep); background:#fff }
.prod__fav.is-on svg{ fill:var(--gold) }
.prod__name{ font-family:var(--f-display); font-weight:700; font-size:20px; line-height:1.25; margin-top:16px; min-height:2.5em }
.prod__desc{ font-size:13.5px; color:var(--muted); margin-top:8px; min-height:2.8em }
.prod__foot{ display:flex; align-items:center; justify-content:space-between; margin-top:auto; padding-top:18px }
.prod__price{ font-family:var(--f-display); font-weight:700; font-size:21px; color:var(--red) }
.add-btn{
  width:46px;height:46px;border-radius:50%;background:var(--gold);color:var(--ink);
  display:grid;place-items:center; transition:.35s var(--ease); flex:0 0 auto;
}
.add-btn:hover{ background:var(--gold-deep); transform:rotate(90deg) }

.field{ display:block; margin-bottom:16px }
.field span{ display:block; font-size:12.5px; letter-spacing:.1em; text-transform:uppercase; color:var(--muted); margin-bottom:8px }
.input{
  width:100%; height:54px; padding:0 18px; border-radius:8px;
  background:var(--cream-2); border:1px solid transparent;
  transition:border-color .3s, background-color .3s;
}
textarea.input{ height:auto; padding:16px 18px; resize:vertical; min-height:150px }
.input:focus{ outline:none; border-color:var(--gold); background:#fff }
.input::placeholder{ color:var(--muted-2) }

.qty{ display:inline-flex; align-items:center; border:1px solid var(--line); border-radius:8px; height:48px }
.qty button{ width:44px; height:100%; display:grid; place-items:center; color:var(--muted); transition:color .25s }
.qty button:hover{ color:var(--ink) }
.qty span{ min-width:40px; text-align:center; font-weight:500 }

.chip{
  height:42px; padding:0 22px; border-radius:999px; border:1px solid var(--line);
  font-size:14px; display:inline-flex; align-items:center; transition:.3s var(--ease);
}
.chip:hover{ border-color:var(--ink) }
.chip.is-on{ background:var(--ink); color:#fff; border-color:var(--ink) }

.toast{
  position:fixed; left:50%; bottom:34px; transform:translate(-50%, 140%);
  background:var(--ink); color:#fff; padding:15px 26px; border-radius:999px;
  font-size:14px; z-index:400; box-shadow:0 24px 50px -20px rgba(0,0,0,.6);
  transition:transform .6s var(--ease);
  display:flex; align-items:center; gap:10px;
}
.toast.is-on{ transform:translate(-50%,0) }
.toast svg{ width:17px;height:17px;color:var(--gold) }

/* reveal-on-scroll (cheap, transform+opacity only) */
.rv{ opacity:0; transform:translateY(26px); transition:opacity .9s var(--ease), transform .9s var(--ease) }
.rv.is-in{ opacity:1; transform:none }
.rv-d1{ transition-delay:.08s } .rv-d2{ transition-delay:.16s } .rv-d3{ transition-delay:.24s }
.rv-d4{ transition-delay:.32s } .rv-d5{ transition-delay:.4s }

/* ---------- responsive ---------- */
@media (max-width:1100px){
  .footer__grid{ grid-template-columns:1fr 1fr }
}
@media (max-width:960px){
  :root{ --nav-h:76px }
  .nav__links{ display:none }
  .burger{ display:block; margin-left:auto }
  .nav__right .btn{ display:none }
}
@media (max-width:640px){
  .footer__grid{ grid-template-columns:1fr }
  .btn{ height:52px; padding:0 24px }
}

@media (prefers-reduced-motion:reduce){
  html{ scroll-behavior:auto }
  *,*::before,*::after{ animation-duration:.001ms !important; transition-duration:.001ms !important }
  .rv{ opacity:1; transform:none }
}
