/* ═══════════════════════════════════════════════════════════════
   css/styles.css — Shared site stylesheet
   Extracted from index.html so pages beyond the homepage (starting
   with the dynamic /products/ template) can share one nav, footer,
   product-grid and design-token implementation instead of each
   page carrying its own copy.
   ═══════════════════════════════════════════════════════════════ */

:root {
  --ink:      #4A2A20;
  --choc:     #4A1F35;
  --espresso: #6B4030;
  --caramel:  #EC6F91;
  --gold:     #F6C667;
  --cream:    #FDF6EC;
  --warm:     #FCE8ED;
  --rust:     #E2557B;
  --white:    #FFFFFF;
  --dark:     #2A1810;
  --pad-x:    clamp(1rem, 5vw, 5rem);
  --pad-y:    clamp(3rem, 6vw, 6rem);
  --radius:   20px;
  --radius-sm: 12px;
  --radius-pill: 999px;
  --shadow-pink: 0 14px 34px rgba(236,111,145,.2);
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Nunito', 'Noto Sans Devanagari', sans-serif;
  background: var(--cream);
  color: var(--ink);
  overflow-x: hidden;
  max-width: 100%;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
p, h1, h2, h3, li, span, a { word-wrap: break-word; overflow-wrap: break-word; min-width: 0; }
section { padding: var(--pad-y) var(--pad-x); }

/* ── SCROLL REVEAL (see js/core/reveal.js) ── */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s, transform .7s; }
.reveal.visible { opacity: 1; transform: translateY(0); }
.no-js .reveal { opacity: 1; transform: translateY(0); }

/* ═══════════════════════════════════════════════════════════════
   NAV
   ═══════════════════════════════════════════════════════════════ */
#wwb-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 900;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem var(--pad-x);
  background: rgba(250,243,227,0.97);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(236,111,145,0.18);
  transition: box-shadow .3s, padding .3s;
  gap: 1rem;
}
#wwb-nav.scrolled {
  box-shadow: 0 2px 30px rgba(236,111,145,0.12);
  padding-top: .72rem; padding-bottom: .72rem;
}
.wwb-nav-logo {
  font-family: 'Baloo 2', cursive;
  font-size: clamp(1.25rem,2.8vw,1.55rem); font-weight: 900;
  color: var(--ink); text-decoration: none;
  white-space: nowrap; flex-shrink: 0; letter-spacing: -.01em;
}
.wwb-nav-logo em { font-style: normal; color: var(--caramel); font-weight: 800; }
.wwb-nav-links {
  display: none; gap: clamp(.8rem,1.6vw,1.8rem);
  list-style: none; align-items: center;
}
.wwb-nav-links a {
  font-size: .78rem; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--ink);
  text-decoration: none; opacity: .72; white-space: nowrap;
  transition: opacity .2s, color .2s;
}
.wwb-nav-links a:hover,
.wwb-nav-links a.active { opacity: 1; color: var(--caramel); }
.wwb-nav-links a.wwb-partner-link {
  color: var(--caramel); opacity: .9;
}
.wwb-nav-links a.wwb-partner-link::after { content: ' ✦'; font-size: .65rem; }
.wwb-nav-links a.wwb-partner-link:hover { opacity: 1; }
.wwb-nav-cta {
  display: none;
  background: var(--caramel); color: var(--white); border-radius: var(--radius-pill);
  font-size: .72rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; text-decoration: none; white-space: nowrap;
  padding: .7rem 1.5rem; border: none; flex-shrink: 0;
  transition: background .22s, color .22s, border-color .22s;
}
.wwb-nav-cta:hover { background: var(--rust); color: var(--white); }
.wwb-hamburger {
  display: flex; flex-direction: column; gap: 5px; cursor: pointer;
  flex-shrink: 0; background: none; border: none; padding: 6px;
  z-index: 910;
}
.wwb-hamburger span {
  width: 24px; height: 2px; background: var(--ink);
  transition: transform .3s, opacity .3s; display: block;
}
.wwb-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.wwb-hamburger.open span:nth-child(2) { opacity: 0; }
.wwb-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
@media (min-width: 901px) {
  .wwb-nav-links { display: flex; }
  .wwb-nav-cta   { display: inline-block; }
  .wwb-hamburger { display: none; }
}

/* ── MOBILE MENU OVERLAY ── */
#wwb-mobile-menu {
  display: none; position: fixed; inset: 0; z-index: 20000;
  background: var(--cream);
  flex-direction: column; align-items: center; justify-content: center;
  gap: 0; overflow-y: auto;
}
#wwb-mobile-menu.open { display: flex; }
.wwb-mobile-close {
  position: absolute; top: 1.1rem; right: 1.4rem;
  background: none; border: none; font-size: 1.7rem;
  color: var(--espresso); cursor: pointer; line-height: 1;
  padding: .4rem; z-index: 860;
}
#wwb-mobile-menu ul { list-style: none; width: 100%; text-align: center; }
#wwb-mobile-menu ul li a {
  display: block; padding: 1.15rem 1rem;
  font-size: 1rem; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; color: var(--espresso);
  text-decoration: none;
  border-bottom: 1px solid rgba(236,111,145,.12);
  transition: color .2s, background .2s;
}
#wwb-mobile-menu ul li a:hover,
#wwb-mobile-menu ul li a.active { color: var(--caramel); background: rgba(236,111,145,.04); }
#wwb-mobile-menu ul li a.wwb-partner-link { color: var(--caramel); }
.wwb-mobile-cta {
  display: block; margin: 1.4rem 1.5rem 0;
  width: calc(100% - 3rem); text-align: center;
  background: var(--caramel); color: var(--white); border-radius: var(--radius-pill);
  font-size: .82rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; text-decoration: none;
  padding: 1rem 1.5rem; border: none;
  transition: background .22s, color .22s;
}
.wwb-mobile-cta:hover { background: var(--rust); color: var(--white); }

/* ═══════════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════════ */
#wwb-footer {
  background: var(--choc, #4A1F35);
  color: rgba(250,243,227,.72);
  padding: clamp(3rem,6vw,5rem) var(--pad-x) 0;
  position: relative; z-index: 2;
}
.wwb-footer-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr 1.1fr;
  gap: 2.5rem 3rem;
  max-width: 1300px; margin: 0 auto;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(250,243,227,.1);
}
.wwb-footer-logo {
  font-family: 'Baloo 2', cursive;
  font-size: 1.35rem; font-weight: 900;
  color: #FFFFFF; text-decoration: none;
  display: inline-block; margin-bottom: 1rem;
  letter-spacing: -.01em;
}
.wwb-footer-logo em { font-style: normal; color: var(--caramel, #EC6F91); font-weight: 800; }
.wwb-footer-desc {
  font-size: .83rem; color: rgba(250,243,227,.6);
  line-height: 1.85; max-width: 300px; margin-bottom: 1.4rem;
}
.wwb-footer-badges { display: flex; flex-wrap: wrap; gap: .45rem; }
.wwb-footer-badge {
  font-size: .66rem; font-weight: 600; letter-spacing: .05em;
  background: rgba(255,255,255,.06); border: 1px solid rgba(236,111,145,.22);
  color: rgba(250,243,227,.7); padding: .28rem .7rem;
}
.wwb-footer-col h3, .wwb-footer-col h4 {
  font-size: .65rem; font-weight: 700; letter-spacing: .22em;
  text-transform: uppercase; color: var(--gold, #F6C667);
  margin-bottom: 1.1rem;
}
.wwb-footer-col ul { list-style: none; display: flex; flex-direction: column; gap: .55rem; }
.wwb-footer-col ul li a {
  font-size: .82rem; color: rgba(250,243,227,.65);
  text-decoration: none; transition: color .2s;
}
.wwb-footer-col ul li a:hover { color: var(--gold, #F6C667); }
.wwb-footer-col ul li { font-size: .82rem; color: rgba(250,243,227,.52); }
.wwb-footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: .6rem;
  padding: 1.2rem 0 1rem;
  font-size: .76rem; color: rgba(250,243,227,.42);
  max-width: 1300px; margin: 0 auto;
}
.wwb-footer-tagline {
  font-family: 'Baloo 2', cursive; font-style: italic;
  color: rgba(233,184,74,.62);
}
.wwb-footer-legal {
  text-align: center; padding: .8rem 0 1.3rem;
  font-size: .73rem; border-top: 1px solid rgba(250,243,227,.07);
  max-width: 1300px; margin: 0 auto;
}
.wwb-footer-legal a {
  color: rgba(250,243,227,.38); text-decoration: underline;
  margin: 0 .55rem; transition: color .2s;
}
.wwb-footer-legal a:hover { color: var(--gold, #F6C667); }

@media (max-width: 1100px) {
  .wwb-footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
}
@media (max-width: 600px) {
  .wwb-footer-grid { grid-template-columns: 1fr; gap: 1.8rem; }
  .wwb-footer-bottom { flex-direction: column; text-align: center; }
}

/* ═══════════════════════════════════════════════════════════════
   SECTION TITLES + PRODUCT GRID / CARD
   (shared by every renderProductGrid() call — bestsellers, related
   products, category pages, etc. — see js/components/product-card.js)
   ═══════════════════════════════════════════════════════════════ */
.section-title {
  font-family: 'Baloo 2', cursive; font-weight: 800;
  font-size: clamp(2rem,4vw,3.8rem);
  font-weight: 900; line-height: 1.0;
  color: var(--ink); margin-bottom: 1rem; letter-spacing: -.02em;
}
.section-title em { font-style: normal; color: var(--caramel); font-weight: 800; }
.section-title.light { color: var(--white); }
.section-title.light em { color: var(--gold); }
.section-sub {
  font-size: .95rem; color: #3D2108; max-width: 520px; line-height: 1.9;
}
.section-chip {
  font-size: .72rem; font-weight: 700; letter-spacing: .18em;
  text-transform: uppercase; color: var(--caramel); margin-bottom: .6rem; display: block;
}

.products { background: var(--cream); }
.products-header {
  display: flex; justify-content: space-between; align-items: flex-end;
  margin-bottom: 2.5rem; flex-wrap: wrap; gap: 1rem;
}
.view-all {
  font-size: .72rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--caramel);
  text-decoration: none; border-bottom: 1.5px solid var(--caramel);
  padding-bottom: 2px; transition: color .2s; white-space: nowrap;
}
.view-all:hover { color: var(--ink); border-color: var(--ink); }
.products-grid {
  display: grid; grid-template-columns: repeat(4,1fr);
  gap: 3px; max-width: 1400px; margin: 0 auto;
}
@media (max-width: 1100px) { .products-grid { grid-template-columns: repeat(3,1fr); } }
@media (max-width: 860px)  { .products-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 480px)  { .products-grid { grid-template-columns: 1fr; } }

.product-card-link { display: contents; text-decoration: none; color: inherit; }
.product-card-link .product-card { cursor: pointer; }
.product-card-link .product-card:hover { transform: translateY(-4px); box-shadow: 0 12px 40px rgba(0,0,0,0.18); }
.product-card {
  background: var(--white); position: relative;
  transition: transform .35s, box-shadow .35s; overflow: hidden;
}
.product-card:hover { transform: translateY(-5px); box-shadow: 0 20px 50px rgba(236,111,145,.18); }
.product-badge {
  position: absolute; top: .8rem; left: .8rem; z-index: 2;
  font-size: .65rem; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; padding: .3rem .7rem .3rem .55rem;
  border-radius: 999px; display: flex; align-items: center; gap: .3rem;
  box-shadow: 0 4px 14px rgba(236,111,145,.25);
  animation: wwb-badge-pop .45s cubic-bezier(.34,1.56,.64,1) both;
}
.product-badge-icon { font-size: .85rem; line-height: 1; }
@keyframes wwb-badge-pop {
  0%   { opacity: 0; transform: scale(.4) translateY(4px); }
  70%  { opacity: 1; transform: scale(1.08) translateY(0); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}
.badge-best { background: var(--gold); color: var(--ink); }
.badge-new { background: var(--ink); color: var(--gold); }
.badge-seasonal { background: var(--rust); color: var(--white); }
/* Kawaii accent trio — reserved for the playful badge types, so they read
   as a deliberate "fun" pop against the card rather than a full repaint. */
.badge-chef    { background: #CDE8C5; color: #2F4A28; } /* pistachio */
.badge-limited { background: #FFD9C4; color: #7A3B1D; } /* peach */
.badge-fresh   { background: #FFC9D0; color: #7A2036; } /* strawberry */
.product-img-wrap {
  width: 100%; aspect-ratio: 4 / 3;
  display: flex; align-items: center; justify-content: center;
  font-size: clamp(5rem, 8vw, 9rem); background: var(--cream);
  transition: background .4s; line-height: 1; overflow: hidden;
}
.product-card:hover .product-img-wrap { background: var(--warm); }
.product-img-wrap img { transition: transform .5s ease; }
.product-card:hover .product-img-wrap img { transform: scale(1.06); }
.wwb-emoji-fallback { transition: transform .4s ease; }
.product-card:hover .wwb-emoji-fallback { animation: wwb-emoji-wave .6s ease-in-out; }
@keyframes wwb-emoji-wave {
  0%, 100% { transform: rotate(0deg); }
  25%      { transform: rotate(-8deg) scale(1.05); }
  75%      { transform: rotate(8deg) scale(1.05); }
}
.product-info { padding: 1.2rem 1.1rem 1.4rem; }
.product-cat {
  font-size: .68rem; font-weight: 700; letter-spacing: .16em;
  text-transform: uppercase; color: var(--caramel); margin-bottom: .3rem;
}
.product-name {
  font-family: 'Baloo 2', cursive;
  font-size: 1.05rem; font-weight: 700; color: var(--ink); margin-bottom: .3rem; line-height: 1.25;
}
.product-desc { font-size: .82rem; color: #3A2008; line-height: 1.6; margin-bottom: .9rem; }
.product-footer { display: flex; align-items: center; justify-content: space-between; }
.product-price {
  font-family: 'Baloo 2', cursive;
  font-size: 1.15rem; font-weight: 700; color: var(--ink);
}
.product-price small { font-size: .76rem; color: #3A2008; font-family: 'Nunito', sans-serif; font-weight: 400; }
.add-btn {
  width: 38px; height: 38px; background: var(--caramel); color: var(--white); border-radius: 50%;
  border: none; cursor: pointer; font-size: 1.4rem; line-height: 1;
  display: flex; align-items: center; justify-content: center; transition: background .2s, transform .2s; flex-shrink: 0;
}
.add-btn:hover { background: var(--rust); transform: scale(1.08); }

.loading-state, .empty-state {
  grid-column: 1 / -1; text-align: center; padding: 3rem 1rem;
  font-size: .9rem; color: #8a7060;
}

/* ═══════════════════════════════════════════════════════════════
   PRODUCT DETAIL TEMPLATE (/products/index.html)
   Powers every /products/<slug>/ page via js/pages/product-detail.js.
   Was previously entirely unstyled (see docs/history) — new rules
   below, matching the tokens and hand-styled look of the older
   static product pages rather than inventing a new design.
   ═══════════════════════════════════════════════════════════════ */
.product-detail {
  width: 100%; max-width: 1200px; margin: 0 auto;
  padding: calc(var(--pad-y) + 3rem) var(--pad-x) 3rem;
  display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: start;
}
@media (max-width: 768px) {
  .product-detail { display: flex; flex-direction: column; gap: 1.5rem; padding: 6rem 1rem 3rem; }
}
.pd-gallery {
  border-radius: var(--radius-sm); position: sticky; top: 7rem;
}
@media (max-width: 768px) {
  .pd-gallery { position: static; aspect-ratio: 1 !important; }
}
.pd-info { min-width: 0; width: 100%; }
.pd-info .product-cat {
  font-size: .72rem; font-weight: 700; letter-spacing: .2em;
  text-transform: uppercase; color: var(--caramel); margin-bottom: .75rem;
}
.pd-info h1 {
  font-family: 'Baloo 2', cursive;
  font-size: clamp(2rem, 4vw, 3rem); font-weight: 900; line-height: 1.05;
  color: var(--choc); margin-bottom: .6rem;
}
.pd-price {
  font-family: 'Baloo 2', cursive;
  font-size: 2rem; font-weight: 700; color: var(--choc);
  margin-bottom: 1.2rem;
}
.pd-variants {
  display: flex; gap: .6rem; flex-wrap: wrap; margin-bottom: 1.4rem;
}
.variant-btn {
  padding: .6rem 1.2rem; border: 1.5px solid rgba(236,111,145,.4);
  background: transparent; cursor: pointer;
  font-family: 'Nunito', sans-serif; font-size: .85rem; font-weight: 600;
  color: var(--espresso); transition: all .2s; border-radius: var(--radius-sm);
}
.variant-btn:hover, .variant-btn.active { background: var(--ink); color: var(--gold); border-color: var(--ink); }
.pd-info .price-block .price-label {
  font-size: .72rem; font-weight: 700; letter-spacing: .15em;
  text-transform: uppercase; color: #8a7060; margin-bottom: .8rem; display: block;
}
.pd-description {
  font-size: .93rem; line-height: 1.9; color: #4a3828; margin: 1.4rem 0 1.8rem;
}
.add-btn-lg {
  width: 100%; height: auto; border-radius: var(--radius-sm);
  background: var(--gold); color: var(--ink);
  font-family: 'Nunito', sans-serif;
  font-size: .85rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  padding: 1rem 2rem; border: 1.5px solid var(--gold);
  transition: all .25s;
}
.add-btn-lg:hover { background: var(--espresso); color: var(--gold); border-color: var(--espresso); }

.not-found {
  max-width: 600px; margin: 0 auto; text-align: center;
  padding: 9rem 1.5rem 5rem;
}
.not-found h1 {
  font-family: 'Baloo 2', cursive; font-size: 2rem; font-weight: 700;
  color: var(--choc); margin-bottom: .8rem;
}
.not-found p { color: #6b5040; }
.not-found a { color: var(--caramel); }
