/* ==========================================================================
   NB BAZAAR — DESIGN SYSTEM
   A neighbourhood bazaar, built for a phone screen: mono price-tags,
   a perforated "ticket" motif for receipts/carts, and a warm bottle-green
   + turmeric-gold palette drawn from produce, not a template.
   ========================================================================== */

:root {
  /* ---- Color ---- */
  --ink:            #1F2B1F;
  --ink-soft:        #4B5B49;
  --paper:          #F6F1E4;
  --paper-raised:   #FFFFFF;
  --bottle:         #1F4D3A;
  --bottle-dark:    #163A2B;
  --bottle-light:   #2E6B4F;
  --marigold:       #E2A33B;
  --marigold-dark:  #C6842A;
  --tomato:         #C1462F;
  --mist:           #E9EEE3;
  --line:           #E1D9C4;
  --line-on-dark:   rgba(255,255,255,0.18);
  --white:          #FFFFFF;

  /* ---- Type ---- */
  --font-display: 'Fraunces', Georgia, serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono:    'JetBrains Mono', 'SFMono-Regular', Menlo, monospace;

  /* ---- Spacing scale ---- */
  --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px;
  --sp-5: 24px; --sp-6: 32px; --sp-7: 48px; --sp-8: 64px;
  --sp-9: 96px; --sp-10: 128px;

  /* ---- Radius / shadow / motion ---- */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --radius-full: 999px;
  --shadow-sm: 0 1px 2px rgba(31,43,31,.07);
  --shadow-md: 0 10px 28px rgba(31,43,31,.10);
  --shadow-lg: 0 24px 56px rgba(20,30,20,.20);
  --ease: cubic-bezier(.25,.8,.25,1);
  --t-fast: 150ms;
  --t-med: 260ms;

  --header-h: 68px;
  --container-w: 1240px;
}

/* ==========================================================================
   Reset / base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Component classes below set their own `display` (flex/inline-flex) for
   layout. Without this, an element that is both .btn and [hidden] would
   stay visible: author rules of equal specificity beat the UA [hidden]
   rule, and source order would otherwise let .btn win. This restores
   [hidden] as an absolute override everywhere in the app. */
[hidden] { display: none !important; }

img { max-width: 100%; display: block; }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1,h2,h3,h4,p { margin: 0; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 8px; top: -60px; background: var(--bottle);
  color: var(--white); padding: 10px 16px; border-radius: var(--radius-sm);
  z-index: 999; transition: top var(--t-fast) var(--ease);
}
.skip-link:focus { top: 8px; }

:focus-visible {
  outline: 2px solid var(--marigold-dark);
  outline-offset: 2px;
  border-radius: 4px;
}

.container {
  max-width: var(--container-w);
  margin-inline: auto;
  padding-inline: var(--sp-4);
}

.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.muted-note { color: var(--ink-soft); font-size: .84rem; }
/* !important is deliberate: these two utilities exist solely to
   override a component's own `display` (e.g. .main-nav sets
   display:flex later in this file). Without it, equal-specificity
   source order would let the component win and the nav would never
   hide on mobile. */
.desktop-only { display: none !important; }
.mobile-only { display: inline-flex !important; }

/* ==========================================================================
   Reveal-on-scroll
   ========================================================================== */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-body); font-weight: 700; font-size: .95rem;
  padding: 13px 24px; border-radius: var(--radius-full); border: 2px solid transparent;
  transition: transform var(--t-fast) var(--ease), background var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
  white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn--primary { background: var(--marigold); color: var(--bottle-dark); box-shadow: var(--shadow-sm); }
.btn--primary:hover { background: var(--marigold-dark); box-shadow: var(--shadow-md); }
.btn--secondary { background: transparent; color: var(--bottle); border-color: var(--bottle); }
.btn--secondary:hover { background: var(--bottle); color: var(--white); }
.btn--ghost-light { background: transparent; color: var(--paper); border-color: var(--line-on-dark); }
.btn--ghost-light:hover { background: rgba(255,255,255,.1); border-color: var(--paper); }
.btn--whatsapp { background: #25D366; color: #08361D; }
.btn--whatsapp:hover { background: #1FB855; }
.btn--block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none !important; }

.btn__spinner {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(0,0,0,.25); border-top-color: currentColor;
  animation: spin .7s linear infinite;
}
.btn.is-loading .btn__label { visibility: hidden; }
.btn.is-loading .btn__spinner { display: inline-block !important; position: absolute; }
.btn.is-loading { position: relative; }
@keyframes spin { to { transform: rotate(360deg); } }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%; background: transparent;
  border: none; color: var(--ink); position: relative;
  transition: background var(--t-fast) var(--ease);
}
.icon-btn:hover { background: var(--mist); }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header { position: sticky; top: 0; z-index: 60; }
.header-bar { background: rgba(246,241,228,.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); transition: box-shadow var(--t-fast) var(--ease); }
.site-header.is-scrolled .header-bar { box-shadow: var(--shadow-sm); }
.header-bar__inner { display: flex; align-items: center; gap: var(--sp-3); height: var(--header-h); }

.logo { display: inline-flex; align-items: center; gap: 8px; margin-right: auto; }
.logo__mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 9px; background: var(--bottle);
  color: var(--marigold); font-family: var(--font-mono); font-weight: 700; font-size: .8rem;
}
.logo__word { font-family: var(--font-display); font-weight: 700; font-size: 1.28rem; color: var(--bottle-dark); }
.logo--footer .logo__word { color: var(--paper); }
.logo--footer .logo__mark { background: var(--marigold); color: var(--bottle-dark); }

.main-nav { display: flex; gap: var(--sp-6); margin-inline: auto; }
.main-nav a { font-weight: 600; font-size: .92rem; color: var(--ink-soft); transition: color var(--t-fast); position: relative; }
.main-nav a:hover { color: var(--bottle); }

.header-actions { display: flex; align-items: center; gap: var(--sp-1); }
.whatsapp-header-link { color: #25D366; }

.cart-btn__count {
  position: absolute; top: 2px; right: 2px; min-width: 18px; height: 18px; padding: 0 4px;
  background: var(--tomato); color: var(--white); border-radius: var(--radius-full);
  font-size: .68rem; font-weight: 700; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
}

.search-overlay {
  border-bottom: 1px solid var(--line); background: var(--paper-raised);
  padding-block: var(--sp-4); animation: dropIn var(--t-med) var(--ease);
}
@keyframes dropIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
.search-overlay__inner { display: flex; align-items: center; gap: var(--sp-3); color: var(--ink-soft); }
.search-overlay__inner input {
  flex: 1; border: none; background: transparent; font-size: 1.1rem; padding: 8px 0; color: var(--ink);
}
.search-overlay__inner input:focus { outline: none; }
.search-suggestions:empty { display: none; }
.search-suggestions { padding-block: var(--sp-2); display: flex; flex-wrap: wrap; gap: 8px; }
.search-suggestions button {
  background: var(--mist); border: none; padding: 6px 14px; border-radius: var(--radius-full);
  font-size: .84rem; font-weight: 600; color: var(--bottle-dark);
}

.mobile-nav {
  position: fixed; top: 0; left: 0; bottom: 0; width: min(84vw, 340px); z-index: 90;
  background: var(--bottle); color: var(--paper); padding: calc(var(--sp-7) + env(safe-area-inset-top, 0px)) var(--sp-5) var(--sp-5);
  display: flex; flex-direction: column; justify-content: space-between;
  transform: translateX(-100%); transition: transform var(--t-med) var(--ease);
}
.mobile-nav:not([hidden]) { transform: translateX(0); }
.mobile-nav nav { display: flex; flex-direction: column; gap: var(--sp-5); }
.mobile-nav nav a { font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; }
.mobile-nav__footer { display: flex; flex-direction: column; gap: var(--sp-3); }
.mobile-nav__hours { font-size: .82rem; opacity: .75; text-align: center; }

.scrim {
  position: fixed; inset: 0; background: rgba(22,30,22,.5); z-index: 80;
  animation: fadeIn var(--t-med) var(--ease);
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero { background: var(--bottle); background-image: radial-gradient(120% 140% at 85% -10%, var(--bottle-light) 0%, var(--bottle) 55%); color: var(--paper); overflow: hidden; }
.hero__inner { padding-block: var(--sp-8) var(--sp-8); display: flex; flex-direction: column; gap: var(--sp-7); }
.hero__eyebrow { font-family: var(--font-mono); font-size: .78rem; letter-spacing: .04em; color: var(--marigold); font-weight: 600; margin-bottom: var(--sp-4); text-transform: uppercase; }
.hero__title { font-family: var(--font-display); font-weight: 700; font-size: clamp(2rem, 6vw, 3.4rem); line-height: 1.08; letter-spacing: -.01em; max-width: 14ch; }
.hero__subtitle { margin-top: var(--sp-4); font-size: 1.06rem; color: rgba(246,241,228,.82); max-width: 46ch; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin-top: var(--sp-6); }
.hero__visual { display: flex; justify-content: center; }
.hero-illustration { width: min(340px, 78vw); height: auto; }

.trust-ticket {
  margin-top: var(--sp-7); display: flex; align-items: center; gap: var(--sp-4);
  background: rgba(246,241,228,.08); border: 1px dashed rgba(226,163,59,.55);
  border-radius: var(--radius-lg); padding: var(--sp-4) var(--sp-5); flex-wrap: wrap;
}
.trust-ticket__item { display: flex; flex-direction: column; gap: 2px; }
.trust-ticket__value { font-family: var(--font-mono); font-weight: 700; font-size: 1.15rem; color: var(--marigold); display: inline-flex; align-items: center; gap: 4px; }
.trust-ticket__label { font-size: .74rem; color: rgba(246,241,228,.7); }
.trust-ticket__div { width: 1px; align-self: stretch; background: rgba(226,163,59,.35); }
.star-icon { color: var(--marigold); }

/* ==========================================================================
   Sections
   ========================================================================== */
.section { padding-block: var(--sp-8); }
.section--mist { background: var(--mist); }
.section--bottle { background: var(--bottle-dark); color: var(--paper); }

.section__header { max-width: 640px; margin-bottom: var(--sp-6); }
.section__eyebrow { font-family: var(--font-mono); font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; color: var(--bottle); font-weight: 700; margin-bottom: var(--sp-2); }
.section__eyebrow--light { color: var(--marigold); }
.section__title { font-family: var(--font-display); font-size: clamp(1.6rem, 3.4vw, 2.3rem); font-weight: 700; letter-spacing: -.01em; }
.section__title--light { color: var(--paper); }
.section__subtitle { margin-top: var(--sp-2); color: var(--ink-soft); font-size: 1rem; }
.section--bottle .section__subtitle { color: rgba(246,241,228,.75); }

/* ==========================================================================
   Categories
   ========================================================================== */
.categories__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-4); }
.category-card {
  background: var(--paper-raised); border-radius: var(--radius-lg); padding: var(--sp-5);
  display: flex; flex-direction: column; gap: var(--sp-3); box-shadow: var(--shadow-sm);
  border: 1px solid var(--line); transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
  text-align: left; position: relative; overflow: hidden;
}
.category-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.category-card__icon {
  width: 48px; height: 48px; border-radius: var(--radius-md); background: var(--mist);
  display: flex; align-items: center; justify-content: center; color: var(--bottle); overflow: hidden;
}
.category-card__icon img { width: 100%; height: 100%; object-fit: cover; }
.category-card__name { font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; }
.category-card__count { font-family: var(--font-mono); font-size: .78rem; color: var(--ink-soft); }
.category-card__link { font-size: .82rem; font-weight: 700; color: var(--bottle); margin-top: auto; }

/* ==========================================================================
   Catalogue toolbar
   ========================================================================== */
.catalogue__toolbar { display: flex; flex-direction: column; gap: var(--sp-4); margin-bottom: var(--sp-6); }
.filter-chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.filter-chips::-webkit-scrollbar { display: none; }
.filter-chip {
  flex-shrink: 0; background: var(--paper-raised); border: 1px solid var(--line); color: var(--ink-soft);
  padding: 9px 18px; border-radius: var(--radius-full); font-weight: 600; font-size: .86rem;
  transition: all var(--t-fast) var(--ease);
}
.filter-chip.is-active, .filter-chip:hover { background: var(--bottle); border-color: var(--bottle); color: var(--white); }

.catalogue__toolbar-row { display: flex; flex-wrap: wrap; gap: var(--sp-3); align-items: center; justify-content: space-between; }
.select-wrap select {
  background: var(--paper-raised); border: 1px solid var(--line); border-radius: var(--radius-full);
  padding: 9px 16px; font-weight: 600; font-size: .86rem; color: var(--ink);
}
.toggle-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.toggle-chip {
  background: transparent; border: 1px solid var(--line); color: var(--ink-soft);
  padding: 8px 14px; border-radius: var(--radius-full); font-size: .82rem; font-weight: 600;
  transition: all var(--t-fast) var(--ease);
}
.toggle-chip[aria-pressed="true"] { background: var(--marigold); border-color: var(--marigold); color: var(--bottle-dark); }

/* ==========================================================================
   Products
   ========================================================================== */
.products__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-4); }

.product-card {
  background: var(--paper-raised); border-radius: var(--radius-lg); overflow: hidden;
  border: 1px solid var(--line); display: flex; flex-direction: column;
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
  position: relative;
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

.product-card__media { position: relative; aspect-ratio: 1 / 1; background: var(--mist); overflow: hidden; }
.product-card__media img { width: 100%; height: 100%; object-fit: cover; }
.product-card__media-fallback { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: var(--bottle); opacity: .4; }
.product-card__badges { position: absolute; top: 10px; left: 10px; display: flex; flex-direction: column; gap: 6px; }
.badge {
  font-family: var(--font-mono); font-size: .66rem; font-weight: 700; text-transform: uppercase;
  padding: 4px 8px; border-radius: 6px; letter-spacing: .02em;
}
.badge--bestseller { background: var(--marigold); color: var(--bottle-dark); }
.badge--new { background: var(--bottle); color: var(--paper); }
.badge--featured { background: var(--tomato); color: var(--white); }
.badge--discount { position: absolute; top: 10px; right: 10px; background: var(--ink); color: var(--paper); }
.badge--oos { position: absolute; inset: 0; background: rgba(31,43,31,.55); color: var(--white); display: flex; align-items: center; justify-content: center; border-radius: 0; font-size: .78rem; letter-spacing: .04em; }

.product-card__body { padding: var(--sp-4); display: flex; flex-direction: column; gap: 6px; flex: 1; }
.product-card__brand { font-size: .72rem; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .03em; font-weight: 600; }
.product-card__name { font-weight: 600; font-size: .95rem; line-height: 1.3; }
.product-card__unit { font-size: .76rem; color: var(--ink-soft); }
.product-card__price-row { display: flex; align-items: baseline; gap: 8px; margin-top: 4px; }
.product-card__price { font-family: var(--font-mono); font-weight: 700; font-size: 1.05rem; color: var(--bottle-dark); }
.product-card__mrp { font-family: var(--font-mono); font-size: .82rem; color: var(--ink-soft); text-decoration: line-through; }

.product-card__footer { padding: 0 var(--sp-4) var(--sp-4); margin-top: auto; }
.add-to-cart-btn {
  width: 100%; background: var(--bottle); color: var(--paper); border: none; border-radius: var(--radius-full);
  padding: 10px; font-weight: 700; font-size: .86rem; display: flex; align-items: center; justify-content: center; gap: 6px;
  transition: background var(--t-fast) var(--ease);
}
.add-to-cart-btn:hover { background: var(--bottle-dark); }
.add-to-cart-btn:disabled { background: var(--line); color: var(--ink-soft); cursor: not-allowed; }

.qty-stepper { display: flex; align-items: center; justify-content: space-between; background: var(--bottle); border-radius: var(--radius-full); overflow: hidden; }
.qty-stepper button { background: transparent; border: none; color: var(--paper); width: 36px; height: 38px; font-size: 1.1rem; }
.qty-stepper button:hover { background: var(--bottle-dark); }
.qty-stepper span { color: var(--paper); font-family: var(--font-mono); font-weight: 700; min-width: 24px; text-align: center; }

/* ==========================================================================
   Skeletons
   ========================================================================== */
.skeleton { background: linear-gradient(100deg, var(--line) 30%, #EFE8D6 45%, var(--line) 60%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: var(--radius-lg); }
.skeleton-category { height: 128px; }
.skeleton-product { height: 300px; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ==========================================================================
   Empty / offline states
   ========================================================================== */
.empty-state { text-align: center; padding: var(--sp-9) var(--sp-4); color: var(--ink-soft); display: flex; flex-direction: column; align-items: center; gap: var(--sp-2); }
.empty-state svg { color: var(--bottle); opacity: .5; margin-bottom: var(--sp-2); }
.empty-state h3 { font-family: var(--font-display); font-size: 1.15rem; color: var(--ink); font-weight: 600; }
.empty-state p { max-width: 34ch; }
.empty-state .btn { margin-top: var(--sp-2); }

.load-more-wrap { display: flex; justify-content: center; margin-top: var(--sp-6); }

/* ==========================================================================
   About
   ========================================================================== */
.about__inner { display: grid; gap: var(--sp-7); }
.about__lead { margin-top: var(--sp-4); font-size: 1.08rem; color: rgba(246,241,228,.86); max-width: 52ch; }
.about__list { margin-top: var(--sp-5); display: flex; flex-direction: column; gap: var(--sp-3); }
.about__list li { position: relative; padding-left: 26px; color: rgba(246,241,228,.86); }
.about__list li::before { content: ''; position: absolute; left: 0; top: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--marigold); }
.about__list strong { color: var(--paper); }

.faq-card { background: var(--paper); border-radius: var(--radius-lg); padding: var(--sp-6); color: var(--ink); }
.faq-card h3 { font-family: var(--font-display); font-size: 1.2rem; margin-bottom: var(--sp-4); }
.accordion details { border-top: 1px dashed var(--line); padding-block: var(--sp-3); }
.accordion details:first-child { border-top: none; }
.accordion summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after { content: '+'; font-size: 1.2rem; color: var(--bottle); transition: transform var(--t-fast); }
.accordion details[open] summary::after { content: '−'; }
.accordion p { margin-top: var(--sp-2); color: var(--ink-soft); font-size: .92rem; }

/* ==========================================================================
   Store info
   ========================================================================== */
.store-info__grid { display: grid; grid-template-columns: 1fr; gap: var(--sp-4); }
.store-info__card { background: var(--paper-raised); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--sp-5); }
.store-info__card svg { color: var(--bottle); }
.store-info__card h3 { font-family: var(--font-display); font-size: 1.05rem; margin: var(--sp-3) 0 var(--sp-2); }
.store-info__card p { color: var(--ink-soft); font-size: .92rem; }
.store-info__link { color: var(--bottle); font-weight: 700; display: inline-block; margin-top: var(--sp-2); font-size: .88rem; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { background: var(--bottle-dark); color: rgba(246,241,228,.85); }
.footer__inner { padding-block: var(--sp-8); display: grid; gap: var(--sp-6); }
.footer__col h4 { font-family: var(--font-display); color: var(--paper); font-size: 1rem; margin-bottom: var(--sp-3); }
.footer__col a, .footer__col p { display: block; font-size: .88rem; margin-bottom: var(--sp-2); color: rgba(246,241,228,.72); }
.footer__col a:hover { color: var(--marigold); }
.footer__col--brand p { max-width: 34ch; margin-top: var(--sp-3); }
.footer__categories { display: flex; flex-direction: column; }
.footer__social { display: flex; gap: 10px; margin-top: var(--sp-4); }
.footer__social a { width: 36px; height: 36px; border-radius: 50%; background: rgba(246,241,228,.08); display: flex; align-items: center; justify-content: center; }

.footer__bottom { border-top: 1px solid rgba(246,241,228,.12); }
.footer__bottom-inner { padding-block: var(--sp-4); font-size: .8rem; color: rgba(246,241,228,.55); }

/* ==========================================================================
   Modals (product detail + checkout)
   ========================================================================== */
.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: flex-end; justify-content: center; }
.modal__overlay { position: absolute; inset: 0; background: rgba(22,30,22,.55); animation: fadeIn var(--t-med) var(--ease); }
.modal__panel {
  position: relative; background: var(--paper-raised); width: 100%; max-height: 92vh; overflow-y: auto;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0; padding: var(--sp-6) var(--sp-5);
  animation: slideUp var(--t-med) var(--ease);
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.modal__close { position: absolute; top: var(--sp-4); right: var(--sp-4); background: var(--mist); z-index: 2; }

.product-modal__image { width: 100%; aspect-ratio: 1/1; border-radius: var(--radius-md); background: var(--mist); overflow: hidden; margin-bottom: var(--sp-4); display: flex; align-items: center; justify-content: center; }
.product-modal__image img { width: 100%; height: 100%; object-fit: cover; }
.product-modal__brand { font-size: .76rem; text-transform: uppercase; letter-spacing: .03em; color: var(--ink-soft); font-weight: 600; }
.product-modal__name { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; margin-top: 4px; }
.product-modal__meta { display: flex; gap: var(--sp-4); margin-top: var(--sp-2); font-size: .86rem; color: var(--ink-soft); }
.product-modal__price-row { display: flex; align-items: baseline; gap: 10px; margin-top: var(--sp-4); }
.product-modal__price { font-family: var(--font-mono); font-size: 1.6rem; font-weight: 700; color: var(--bottle-dark); }
.product-modal__mrp { font-family: var(--font-mono); color: var(--ink-soft); text-decoration: line-through; }
.product-modal__desc { margin-top: var(--sp-4); color: var(--ink-soft); font-size: .94rem; }
.product-modal__actions { display: flex; align-items: center; gap: var(--sp-4); margin-top: var(--sp-6); }
.product-modal__actions .qty-stepper { flex-shrink: 0; }
.availability { font-size: .84rem; font-weight: 600; margin-top: var(--sp-3); display: flex; align-items: center; gap: 6px; }
.availability::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--bottle-light); }
.availability.is-low::before { background: var(--marigold); }
.availability.is-out::before { background: var(--tomato); }

/* ==========================================================================
   Cart drawer
   ========================================================================== */
.cart-drawer { position: fixed; inset: 0; z-index: 100; }
.cart-drawer__overlay { position: absolute; inset: 0; background: rgba(22,30,22,.5); animation: fadeIn var(--t-med) var(--ease); }
.cart-drawer__panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: 100%; background: var(--paper-raised);
  display: flex; flex-direction: column; animation: slideInRight var(--t-med) var(--ease);
  padding-top: env(safe-area-inset-top, 0px);
}
@keyframes slideInRight { from { transform: translateX(100%); } to { transform: translateX(0); } }
.cart-drawer__header { display: flex; align-items: center; justify-content: space-between; padding: var(--sp-5); border-bottom: 1px solid var(--line); }
.cart-drawer__header h2 { font-family: var(--font-display); font-size: 1.3rem; }
.cart-drawer__items { flex: 1; overflow-y: auto; padding: var(--sp-4) var(--sp-5); }

.cart-item { display: flex; gap: var(--sp-3); padding-block: var(--sp-4); border-bottom: 1px dashed var(--line); }
.cart-item__media { width: 64px; height: 64px; border-radius: var(--radius-sm); background: var(--mist); flex-shrink: 0; overflow: hidden; display: flex; align-items: center; justify-content: center; color: var(--bottle); }
.cart-item__media img { width: 100%; height: 100%; object-fit: cover; }
.cart-item__body { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.cart-item__name { font-weight: 600; font-size: .92rem; }
.cart-item__unit { font-size: .76rem; color: var(--ink-soft); }
.cart-item__row { display: flex; align-items: center; justify-content: space-between; margin-top: 4px; }
.cart-item__price { font-family: var(--font-mono); font-weight: 700; font-size: .92rem; }
.cart-item .qty-stepper { transform: scale(.85); transform-origin: left center; }
.cart-item__remove { font-size: .76rem; color: var(--tomato); font-weight: 600; background: none; border: none; padding: 4px 0; }

.cart-empty { flex: 1; display: none; flex-direction: column; align-items: center; justify-content: center; gap: var(--sp-2); padding: var(--sp-7); text-align: center; color: var(--ink-soft); }
.cart-empty svg { color: var(--bottle); opacity: .45; }
.cart-empty h3 { font-family: var(--font-display); color: var(--ink); font-size: 1.1rem; }
.cart-drawer.is-empty .cart-empty { display: flex; }
.cart-drawer.is-empty .cart-drawer__items { display: none; }
.cart-drawer.is-empty .cart-drawer__summary { display: none; }

.cart-drawer__summary { padding: var(--sp-5); border-top: 1px solid var(--line); }
.cart-ticket-div { height: 0; border-top: 1px dashed var(--line); margin-bottom: var(--sp-4); position: relative; }
.summary-row { display: flex; justify-content: space-between; font-size: .92rem; margin-bottom: var(--sp-2); color: var(--ink-soft); }
.summary-row--total { font-weight: 700; font-size: 1.1rem; color: var(--ink); margin-top: var(--sp-2); }
.cart-drawer__note { font-size: .74rem; color: var(--ink-soft); margin: var(--sp-2) 0 var(--sp-4); }

/* ==========================================================================
   Checkout form
   ========================================================================== */
.modal__panel--checkout { max-width: 520px; }
.checkout__subtitle { color: var(--ink-soft); font-size: .92rem; margin-top: 6px; }
.form-row { margin-top: var(--sp-4); display: flex; flex-direction: column; gap: 6px; }
.form-row label, .form-row__legend { font-size: .84rem; font-weight: 700; }
.form-row input, .form-row textarea {
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px;
  background: var(--paper); font-size: .95rem; resize: vertical;
}
.form-row input:focus, .form-row textarea:focus { outline: none; border-color: var(--bottle); background: var(--white); }
.form-row input.is-invalid, .form-row textarea.is-invalid { border-color: var(--tomato); }
.field-error { color: var(--tomato); font-size: .78rem; display: none; }
.form-row input.is-invalid + .field-error, .form-row textarea.is-invalid + .field-error { display: block; }

.segmented { display: flex; gap: 8px; }
.segmented__option { flex: 1; }
.segmented__option input { position: absolute; opacity: 0; pointer-events: none; }
.segmented__option span {
  display: block; text-align: center; padding: 11px; border-radius: var(--radius-sm); border: 1px solid var(--line);
  font-weight: 600; font-size: .86rem; transition: all var(--t-fast) var(--ease);
}
.segmented__option input:checked + span { background: var(--bottle); border-color: var(--bottle); color: var(--white); }

.checkout__summary { margin-top: var(--sp-5); background: var(--mist); border-radius: var(--radius-md); padding: var(--sp-4); font-size: .88rem; }
.checkout__summary-row { display: flex; justify-content: space-between; padding-block: 3px; }
.checkout__fineprint { text-align: center; font-size: .74rem; color: var(--ink-soft); margin-top: var(--sp-3); }
#checkoutForm .btn { margin-top: var(--sp-5); }

.modal__panel--confirm { max-width: 420px; text-align: center; padding-top: var(--sp-7); }
.order-confirm { display: flex; flex-direction: column; align-items: center; gap: var(--sp-3); }
.order-confirm__icon {
  width: 56px; height: 56px; border-radius: 50%; background: var(--mist); color: var(--bottle);
  display: flex; align-items: center; justify-content: center; margin-bottom: var(--sp-2);
}
.order-confirm h2 { font-family: var(--font-display); font-size: 1.4rem; }
.order-confirm__order-id { color: var(--ink-soft); font-size: .9rem; }
.order-confirm__body { color: var(--ink-soft); font-size: .92rem; max-width: 32ch; margin-bottom: var(--sp-2); }
.order-confirm .btn { width: 100%; margin-top: 0; }
.order-confirm__fallback { font-size: .82rem; color: var(--ink-soft); background: var(--mist); padding: var(--sp-3); border-radius: var(--radius-sm); }

/* ==========================================================================
   Toasts
   ========================================================================== */
.toast-container { position: fixed; top: calc(var(--header-h) + 12px); left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; width: min(92vw, 380px); }
.toast {
  background: var(--ink); color: var(--paper); padding: 13px 18px; border-radius: var(--radius-md);
  font-size: .88rem; font-weight: 600; box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 10px;
  animation: toastIn var(--t-med) var(--ease);
}
.toast--success { background: var(--bottle-dark); }
.toast--error { background: var(--tomato); }
.toast.is-leaving { animation: toastOut var(--t-fast) var(--ease) forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-12px) scale(.96); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-12px) scale(.96); } }
