/* ==========================================================================
   Subitas Crackers — storefront stylesheet.

   Every colour here is a var(--token) supplied by the active theme and
   emitted into :root by _Layout. Never hard-code a hex in this file: doing so
   breaks theme switching for that element only, which is the worst outcome.
   The fallbacks after each var() are the Green & gold preset, so the page
   still renders if a token is ever dropped.
   ========================================================================== */

:root {
  --font-display: Archivo, system-ui, -apple-system, sans-serif;
  --font-body: Mulish, system-ui, -apple-system, sans-serif;
  --radius: 12px;
  --radius-sm: 8px;
  --shell: 1440px;
  --gutter: 40px;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--page-bg, #FBF7F1);
  color: var(--ink, #1B1412);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: var(--font-display); margin: 0; letter-spacing: -0.02em; }
a { color: var(--accent, #C42130); text-decoration: none; }
a:hover { color: var(--accent-dark, #8E1622); text-decoration: underline; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font-family: var(--font-body); font-size: inherit; }

.shell { max-width: var(--shell); margin: 0 auto; padding: 0 var(--gutter); }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------- Bands ---------- */

.legal-band {
  background: var(--legal-bg, #0E4A32);
  color: var(--legal-fg, #DFF0E5);
  font-size: 12.5px;
  line-height: 1.5;
  padding: 10px 0;
  text-align: center;
}
.legal-band strong, .legal-band em { color: var(--legal-em, #F1B434); font-style: normal; }

.marquee {
  background: var(--marquee-bg, #F1B434);
  color: var(--marquee-fg, #143021);
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  padding: 9px 0;
  text-align: center;
}

/* ---------- Header ---------- */

.site-header {
  background: var(--surface, #fff);
  border-bottom: 1px solid var(--line, #EADFD4);
  padding: 16px 0;
}
.site-header .shell { display: flex; align-items: center; gap: 24px; }

.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.logo:hover { text-decoration: none; }
.logo-mark {
  width: 54px; height: 54px; border-radius: 50%;
  background: var(--accent, #C42130);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.logo-name {
  font-family: var(--font-display); font-weight: 900; font-size: 25px;
  color: var(--ink, #1B1412); line-height: 1;
}
.logo-sub {
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.22em;
  color: var(--accent-dark, #8E1622);
}

.searchbar {
  flex-grow: 1; display: flex; align-items: center; height: 48px;
  background: var(--page-bg, #FBF7F1);
  border: 1.5px solid var(--line, #EADFD4);
  border-radius: 10px; padding: 0 6px 0 16px;
}
.searchbar input {
  flex-grow: 1; height: 44px; border: 0; outline: 0; background: transparent;
  color: var(--ink, #1B1412); padding: 0 12px; font-size: 14.5px;
}
.header-icons { display: flex; align-items: center; gap: 6px; }
.icon-btn {
  width: 46px; height: 46px; border-radius: 9px; position: relative;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-muted, #6B5A56);
}
.icon-btn:hover { background: var(--surface-alt, #FDFBF8); text-decoration: none; }
.icon-btn .count {
  position: absolute; top: 4px; right: 3px; min-width: 17px; height: 17px;
  border-radius: 9px; background: var(--accent, #C42130); color: var(--accent-ink, #fff);
  font-size: 10.5px; font-weight: 800; padding: 0 4px;
  display: flex; align-items: center; justify-content: center;
}
.btn-login {
  height: 46px; padding: 0 18px; border: 1.5px solid var(--line, #EADFD4);
  border-radius: 9px; display: flex; align-items: center; gap: 9px;
  color: var(--ink, #1B1412); font-size: 13.5px; font-weight: 700;
}
.btn-login:hover { text-decoration: none; border-color: var(--accent, #C42130); }

/* ---------- Category nav ---------- */

.cat-nav { background: var(--nav-bg, #12764A); }
.cat-nav .shell {
  display: flex; align-items: center; gap: 2px; height: 52px;
  /* Nine labels plus the CTA overflow below ~1280px. Scrolling sideways keeps every item on
     one line; wrapping made the bar two rows tall and unreadable. */
  overflow-x: auto; scrollbar-width: none;
}
.cat-nav .shell::-webkit-scrollbar { display: none; }
.cat-nav a {
  color: var(--nav-fg, #fff); font-size: 13.5px; font-weight: 700;
  padding: 0 14px; height: 52px; display: flex; align-items: center;
  white-space: nowrap; flex-shrink: 0;
}
.cat-nav a:hover { text-decoration: none; background: rgba(0, 0, 0, .14); }
.cat-nav .spacer { flex-grow: 1; }
.nav-cta {
  border: 1.5px solid var(--nav-outline, #8CC7A8); border-radius: var(--radius-sm);
  height: 36px !important; font-size: 13px !important; font-weight: 800 !important; gap: 8px;
}

/* ---------- Hero ---------- */

.hero { background: var(--hero-bg, #0E4A32); color: var(--hero-fg, #fff); padding: 44px 0; }
.hero .shell { display: flex; gap: 40px; align-items: center; }
.hero-copy { flex-grow: 1; display: flex; flex-direction: column; gap: 20px; }
.hero-chip {
  align-self: flex-start;
  background: var(--hero-chip-bg, #F1B434); color: var(--hero-chip-fg, #43210B);
  font-size: 11.5px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 7px 14px; border-radius: 6px;
}
.hero h1 { font-size: 58px; font-weight: 900; line-height: 1.04; max-width: 640px; }
.hero p { margin: 0; font-size: 16.5px; color: var(--hero-muted, #CFE7D8); max-width: 560px; }
.hero-actions { display: flex; gap: 14px; align-items: center; }
.btn-hero {
  height: 52px; padding: 0 28px; border-radius: 10px;
  background: var(--hero-chip-bg, #F1B434); color: var(--hero-chip-fg, #43210B);
  font-size: 15px; font-weight: 800; display: flex; align-items: center; border: 0;
}
.btn-hero:hover { text-decoration: none; filter: brightness(1.06); }
.btn-hero-ghost {
  height: 52px; padding: 0 26px; border-radius: 10px;
  border: 1.8px solid var(--nav-outline, #5E9B7C); color: var(--hero-fg, #fff);
  font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 10px;
  background: transparent;
}
.btn-hero-ghost:hover { text-decoration: none; background: rgba(255, 255, 255, .1); }

.enquiry-card {
  width: 384px; flex-shrink: 0; background: var(--surface, #fff);
  border: 1px solid var(--line, #EADFD4); border-radius: 14px; padding: 26px;
  display: flex; flex-direction: column; gap: 14px; color: var(--ink, #1B1412);
}
.enquiry-card h2 { font-size: 20px; font-weight: 800; }
.enquiry-card p { margin: 0; font-size: 13px; color: var(--ink-muted, #6B5A56); }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12px; font-weight: 700; color: var(--ink-muted, #6B5A56); }
.field input, .field textarea, .field select {
  min-height: 46px; border: 1.5px solid var(--line, #EADFD4); border-radius: 9px;
  padding: 11px 13px; background: var(--surface-alt, #FDFBF8); color: var(--ink, #1B1412);
}
.field textarea { resize: vertical; }
.field-error { font-size: 12px; font-weight: 700; color: var(--accent-dark, #8E1622); }

/* ---------- Buttons ---------- */

.btn-accent {
  height: 48px; padding: 0 22px; border: 0; border-radius: var(--radius-sm);
  background: var(--accent, #C42130); color: var(--accent-ink, #fff);
  font-size: 14.5px; font-weight: 800; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
}
.btn-accent:hover { background: var(--accent-dark, #8E1622); color: var(--accent-ink, #fff); text-decoration: none; }
.btn-outline {
  height: 46px; padding: 0 20px; border: 1.5px solid var(--accent, #C42130);
  border-radius: var(--radius-sm); background: transparent; color: var(--accent, #C42130);
  font-size: 14px; font-weight: 800; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
}
.btn-outline:hover { background: var(--accent, #C42130); color: var(--accent-ink, #fff); text-decoration: none; }
.btn-search { height: 38px; padding: 0 20px; }

/* ---------- Trust row ---------- */

.trust-row {
  background: var(--surface, #fff); border-bottom: 1px solid var(--line, #EADFD4);
  padding: 22px 0;
}
.trust-row .shell { display: flex; gap: 20px; }
.trust { flex: 1; display: flex; align-items: center; gap: 13px; }
.trust-icon {
  width: 42px; height: 42px; border-radius: 9px; flex-shrink: 0;
  background: var(--assured-bg, #FBF1E6); color: var(--assured-fg, #8A5A12);
  display: flex; align-items: center; justify-content: center;
}
.trust b { display: block; font-size: 13.5px; }
.trust span { font-size: 12px; color: var(--ink-muted, #6B5A56); }

/* ---------- Sections ---------- */

.section { padding: 40px 0 0; }
.section-head { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 20px; }
.section-eyebrow {
  font-size: 11.5px; font-weight: 800; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--assured-fg, #A8641B);
}
.section-head h2 { font-size: 30px; font-weight: 900; }
.section-head .rule { flex-grow: 1; height: 1px; background: var(--line, #EADFD4); }
.section-head .more { font-size: 13.5px; font-weight: 800; white-space: nowrap; }
.pill-count {
  background: var(--surface-alt, #F1E4D5); color: var(--ink-muted, #6B5A56);
  font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: 6px;
}

/* ---------- Product grid and card ---------- */

.product-grid { display: grid; gap: 18px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.product-grid.rail-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }

.product-card {
  position: relative;
  background: var(--surface, #fff); border: 1px solid var(--line, #EADFD4);
  border-radius: var(--radius); padding: 12px;
  display: flex; flex-direction: column; gap: 9px;
  color: var(--ink, #1B1412);
}
.product-card:hover { border-color: var(--accent, #C42130); }

/* The clickable region. The wishlist and CTA controls sit outside it as siblings. */
.product-card-link {
  display: flex; flex-direction: column; gap: 9px;
  color: var(--ink, #1B1412); text-decoration: none;
}
.product-card-link:hover { text-decoration: none; color: var(--ink, #1B1412); }
.product-card-link:focus-visible { outline: 2px solid var(--accent, #C42130); outline-offset: 3px; border-radius: var(--radius-sm); }
.product-tags { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.card-cta-form { display: flex; }
.card-cta-form .card-cta { flex-grow: 1; }
.product-thumb {
  position: relative; height: 158px; border-radius: var(--radius-sm);
  background: var(--surface-alt, #F6EADC);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.product-thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb-placeholder {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  color: var(--assured-fg, #A88B57);
}
.thumb-placeholder span { font-size: 9.5px; font-weight: 800; letter-spacing: 0.14em; }

.badge-discount {
  position: absolute; top: 8px; left: 8px;
  background: var(--discount-bg, #12764A); color: var(--discount-fg, #fff);
  font-size: 10.5px; font-weight: 800; padding: 4px 8px; border-radius: 5px;
}
.badge-oos {
  position: absolute; inset: 0; background: rgba(27, 20, 18, .62);
  color: #fff; font-size: 13px; font-weight: 800; letter-spacing: 0.08em;
  display: flex; align-items: center; justify-content: center; text-transform: uppercase;
}
.badge-assured {
  background: var(--assured-bg, #FBF1E6); border: 1px solid var(--assured-line, #EBD9BE);
  color: var(--assured-fg, #8A5A12); font-size: 10.5px; font-weight: 800;
  letter-spacing: 0.06em; padding: 4px 7px; border-radius: 5px;
}

/* Sits beside the assured badge on a gift box card. Green rather than the assured amber, so
   "30 items" reads as a fact about the pack and not as another trust mark. */
.badge-box {
  background: #E7F6EC; border: 1px solid #BFE3CC;
  color: #0E5C3A; font-size: 10.5px; font-weight: 800;
  letter-spacing: 0.04em; padding: 4px 7px; border-radius: 5px;
}
/* Positioned against the card, not the thumbnail, now that it lives outside the link. */
.wish-btn {
  position: absolute; top: 18px; right: 18px; z-index: 2;
  width: 32px; height: 32px; border-radius: 50%; padding: 0;
  background: var(--surface, #fff); border: 1px solid var(--line, #EADFD4);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  color: var(--ink-muted, #8A756D);
}
.wish-btn:hover { border-color: var(--accent, #C42130); color: var(--accent, #C42130); }

.product-name { font-size: 13.5px; font-weight: 700; line-height: 1.35; height: 36px; overflow: hidden; }
.product-meta { font-size: 11.5px; color: var(--ink-muted, #6B5A56); }
.stars { display: flex; gap: 1.5px; color: var(--hero-chip-bg, #E8A020); }

.price-row { display: flex; align-items: baseline; gap: 8px; }
.price-now { font-family: var(--font-display); font-size: 21px; font-weight: 900; }
.price-mrp { font-size: 12px; color: var(--ink-muted, #8A756D); text-decoration: line-through; }
.stock-in { font-size: 11.5px; font-weight: 700; color: var(--discount-bg, #12764A); }
.stock-low { font-size: 11.5px; font-weight: 700; color: var(--accent-dark, #B8420E); }
.stock-out { font-size: 11.5px; font-weight: 700; color: var(--ink-muted, #8A756D); }

.card-cta {
  height: 42px; border-radius: var(--radius-sm); border: 0;
  background: var(--accent, #C42130); color: var(--accent-ink, #fff);
  font-size: 13px; font-weight: 800; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.card-cta:disabled { background: var(--line, #EADFD4); color: var(--ink-muted, #8A756D); cursor: not-allowed; }

/* ---------- Coupon strip ---------- */

.coupon-strip {
  margin-top: 40px;
  background: var(--assured-bg, #FBF1E6); border: 1.5px solid var(--assured-line, #EBD9BE);
  border-radius: 14px; padding: 24px 26px;
  display: flex; align-items: center; gap: 22px;
}
.coupon-strip h2 { font-size: 21px; font-weight: 900; }
.coupon-strip > div:first-child { width: 268px; flex-shrink: 0; }
.coupon-list { flex-grow: 1; display: flex; gap: 14px; }
.coupon {
  flex: 1; background: var(--surface, #fff); border: 1.5px dashed var(--assured-fg, #D9A94E);
  border-radius: 11px; padding: 15px 17px; display: flex; flex-direction: column; gap: 5px;
}
.coupon code {
  font-family: var(--font-display); font-size: 17px; font-weight: 900;
  letter-spacing: 0.04em; color: var(--accent-dark, #8E1622);
}
.coupon b { font-size: 12.5px; }
.coupon span { font-size: 11.5px; color: var(--ink-muted, #6B5A56); }

/* ---------- Brands ---------- */

.brand-grid { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 16px; }
.brand-tile {
  background: var(--surface, #fff); border: 1px solid var(--line, #EADFD4);
  border-radius: 11px; height: 116px; color: var(--ink, #1B1412);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
}
.brand-tile:hover { text-decoration: none; border-color: var(--accent, #C42130); color: var(--ink, #1B1412); }
.brand-initial {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--assured-bg, #F6EADC); color: var(--assured-fg, #A8641B);
  font-family: var(--font-display); font-size: 16px; font-weight: 900;
  display: flex; align-items: center; justify-content: center;
}
.brand-tile b { font-size: 12px; font-weight: 700; text-align: center; line-height: 1.3; }

/* ---------- Footer ---------- */

.site-footer {
  margin-top: 44px; background: var(--footer-bg, #241715); color: var(--footer-fg, #E8D9D2);
  padding: 38px 0 0;
}
.site-footer .cols { display: flex; gap: 44px; padding-bottom: 30px; }
.site-footer .about { width: 320px; flex-shrink: 0; display: flex; flex-direction: column; gap: 12px; }
.site-footer .brandline { font-family: var(--font-display); font-size: 21px; font-weight: 900; color: #fff; }
.site-footer p, .site-footer address {
  margin: 0; font-size: 13px; line-height: 1.65; font-style: normal;
  color: var(--footer-muted, #BFA9A2);
}
.site-footer .col { flex: 1; display: flex; flex-direction: column; gap: 10px; }
.site-footer .col h3 {
  font-size: 12px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--footer-head, #F1B434);
}
.site-footer .col a { font-size: 13px; color: var(--footer-fg, #D8C6BF); }
.site-footer .seo, .site-footer .legal {
  border-top: 1px solid rgba(255, 255, 255, .1); padding: 15px 0;
  font-size: 11.5px; line-height: 1.8; color: var(--footer-muted, #9C8880);
}
.site-footer .legal { display: flex; align-items: center; gap: 16px; padding-bottom: 20px; }
.site-footer .legal .spacer { flex-grow: 1; }
.site-footer .legal a { color: var(--footer-muted, #BFA9A2); }

/* ---------- Floating WhatsApp button and mobile nav ---------- */

.wa-fab {
  position: fixed; right: 20px; bottom: 20px; z-index: 40;
  width: 58px; height: 58px; border-radius: 50%;
  background: #12764A; color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .28);
}
.wa-fab:hover { text-decoration: none; color: #fff; filter: brightness(1.08); }

.mobile-nav { display: none; }

/* ---------- Responsive ---------- */

@media (max-width: 1100px) {
  :root { --gutter: 20px; }
  .product-grid, .product-grid.rail-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .brand-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .hero .shell { flex-direction: column; align-items: stretch; }
  .enquiry-card { width: auto; }
  .hero h1 { font-size: 44px; }
  .coupon-strip { flex-direction: column; align-items: stretch; }
  .coupon-strip > div:first-child { width: auto; }
  .site-footer .cols { flex-wrap: wrap; }
  .site-footer .about { width: 100%; }
}

@media (max-width: 760px) {
  .product-grid, .product-grid.rail-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .brand-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .site-header .shell { flex-wrap: wrap; }
  .searchbar { order: 3; flex-basis: 100%; }
  .cat-nav .shell { overflow-x: auto; }
  .trust-row .shell { flex-wrap: wrap; }
  .trust { flex-basis: calc(50% - 10px); }
  .hero h1 { font-size: 34px; }
  .coupon-list { flex-direction: column; }
  .section-head { flex-wrap: wrap; }
  .section-head h2 { font-size: 24px; }

  body { padding-bottom: 66px; }
  .wa-fab { bottom: 78px; width: 52px; height: 52px; }

  /* Bottom bar, as on every Indian retail site — thumb reach beats a hamburger. */
  .mobile-nav {
    display: flex; position: fixed; inset: auto 0 0 0; z-index: 45;
    background: var(--surface, #fff); border-top: 1px solid var(--line, #EADFD4);
    padding: 6px 4px; box-shadow: 0 -2px 14px rgba(0, 0, 0, .08);
  }
  .mobile-nav a {
    flex: 1; min-height: 54px; display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 3px;
    font-size: 10.5px; font-weight: 700; color: var(--ink-muted, #6B5A56);
    position: relative;
  }
  .mobile-nav a:hover, .mobile-nav a.active { text-decoration: none; color: var(--accent, #C42130); }
  .mobile-nav .count {
    position: absolute; top: 4px; right: 22%; min-width: 16px; height: 16px;
    border-radius: 8px; background: var(--accent, #C42130); color: var(--accent-ink, #fff);
    font-size: 10px; font-weight: 800; display: flex; align-items: center; justify-content: center;
  }
}

@media print {
  .legal-band, .marquee, .cat-nav, .site-header .header-icons, .searchbar,
  .wa-fab, .mobile-nav, .site-footer, .hero { display: none !important; }
  body { background: #fff; }
}

/* ---------- Gift box cards on the home page ---------- */

/* Naming three of the contents is the pitch: a box is bought for what is in it, and the
   struck-through figure is only believable next to the items it adds up from. */
.box-grid {
  display: grid; gap: 16px; justify-content: start;
  /* Capped rather than 1fr: with only two boxes a stretched column makes each card half the
     page wide, which letterboxes the photo and strands the quantities out on the right. */
  grid-template-columns: repeat(auto-fit, minmax(240px, 330px));
}

.box-card {
  display: flex; flex-direction: column; gap: 10px;
  background: #fff; border: 1px solid var(--line, #EFE3D6); border-radius: 14px;
  padding: 16px; color: inherit; text-decoration: none;
}
.box-card:hover { border-color: var(--accent, #C42130); text-decoration: none; color: inherit; }

.box-card-media {
  height: 150px; border-radius: 10px; overflow: hidden;
  background: var(--surface-soft, #FBF7F1);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-muted, #6B5A56);
}
.box-card-media img { width: 100%; height: 100%; object-fit: cover; }

.box-card-head b {
  display: block; font-family: Archivo, system-ui, sans-serif;
  font-size: 15px; font-weight: 900; line-height: 1.25;
}
.box-card-head em {
  display: block; font-style: normal; font-size: 12px; margin-top: 3px;
  color: var(--ink-muted, #6B5A56);
}

.box-card-list {
  display: flex; flex-direction: column; gap: 3px;
  border-top: 1px solid var(--line, #EFE3D6); padding-top: 9px;
  font-size: 12.5px; color: var(--ink-muted, #6B5A56);
}
.box-card-list > span { display: flex; justify-content: space-between; gap: 10px; }
.box-card-list i { font-style: normal; flex-shrink: 0; }
.box-card-more { color: var(--accent, #C42130); font-weight: 700; }

.box-card-foot {
  margin-top: auto; display: flex; align-items: baseline; justify-content: space-between;
  gap: 10px; flex-wrap: wrap;
}
.box-card-price { display: flex; align-items: baseline; gap: 7px; }
.box-card-price b { font-family: Archivo, system-ui, sans-serif; font-size: 19px; font-weight: 900; }
.box-card-price s { font-size: 12.5px; color: var(--ink-muted, #6B5A56); }

.box-card-save {
  font-size: 11.5px; font-weight: 800; padding: 3px 9px; border-radius: 999px;
  background: #E7F6EC; color: #0E5C3A;
}

@media (max-width: 520px) {
  /* One per row on a phone, filling the width — a capped column would sit left-biased. */
  .box-grid { grid-template-columns: 1fr; }
  .box-card-media { height: 104px; }
}
