/* Light Golden Purple palette (2026-10-30, replaces the previous round's
   Light Lavender + White + Premium Plum theme -- same lavender
   background/border/text, but the PRIMARY accent is no longer a dark
   plum: it's now a light golden tone, with a separate soft
   golden-purple reserved for secondary accents). Variable NAMES are
   kept as they were (--forest-green, --muted-gold, --gold-text) so
   every existing rule below keeps working unchanged -- only the VALUES
   changed, same convention every re-theme round on this project has
   used. --forest-green now carries the spec's "Primary Button: Light
   Golden" role. --muted-gold/--accent-yellow-dark are UNCHANGED (Buy
   Now, cart badge, search button) -- this round's palette doesn't
   mention replacing them, so per "preserve unless explicitly changed"
   they're left exactly as before. --secondary-accent is the one
   genuinely NEW variable this round needs (Soft Golden Purple,
   #C9B4D8) -- used sparingly, only in the few spots called out in the
   final report, not as a blanket replacement for --forest-green. */
:root {
  /* 2026-10-31, Phase 1 reference-video color-theme audit: cleans up the
     lavender/plum tint that had crept across the whole site (body
     background, header/footer, secondary surfaces, borders, text) by
     moving those NEUTRAL surfaces to clean white/light-grey/charcoal,
     per the reference video's "clean white interface, restrained
     colors" observation. --forest-green/--gold-text/--primary-blue-dark
     (the site's existing golden link/heading/active-nav accent) are
     deliberately UNCHANGED -- not part of this request's comparison
     table, and changing them would be a much bigger visual shift than
     "clean up the neutrals" calls for. Approved button colors
     (--add-to-cart-bg, --buy-now-bg-exact, brand-name #A8B86A) are
     untouched. */
  --bg-main: #FFFFFF;
  --bg-secondary: #F5F5F5;       /* light neutral grey secondary background (was lavender #F1E8F5) */
  --forest-green: #B49A65;       /* light golden -- primary button / brand accent */
  --primary-blue-dark: #947E53;  /* darker golden for hover states */
  --text: #1F1F1F;               /* neutral charcoal primary text (was dark plum #30283A) */
  --muted-gold: #FFE500;         /* accent yellow (Buy Now, badges, highlights) -- unchanged, not in new palette */
  --accent-yellow-dark: #E6CE00; /* darker yellow for hover states -- unchanged */
  --gold-text: #B49A65;          /* readable accent text -- matches the new golden brand accent */
  --card-bg: #FFFFFF;
  --border: #E5E5E5;             /* light neutral grey border (was lavender #E8E0F0) */
  --muted: #6B6B6B;               /* neutral grey secondary text (was purple-grey #706878) */
  --deep-forest-green: #1F1F1F;  /* header/footer text+icons, main heading text -- neutral charcoal (was dark plum #30283A) */
  --header-footer-bg: #FAF7F0;   /* warm off-white header/footer background, in the brand's golden family -- distinct from the pure-white main content without copying the reference's navy (was lavender #F8F5FC) */
  --light-sage: #F5F5F5;         /* light neutral grey -- compact trust-strip background (was lavender #F1E8F5) */
  --secondary-accent: #C9B4D8;   /* soft golden purple -- defined but not currently used anywhere in this file */
  /* 2026-10-30, button-color-only request: a dedicated set of variables,
     deliberately NOT reusing --forest-green/--muted-gold (which also
     drive non-button links/icons/badges/the active banner dot that this
     request explicitly leaves untouched -- "बाकी पूरी वेबसाइट...वैसी ही
     रखनी है"). Only the specific button rules listed in the final report
     read these three variables; everything else on the site keeps its
     existing color exactly as it was. */
  --button-bg: #A7F432;          /* light lime green -- Add to Cart / View Product / other main buttons */
  --button-bg-hover: #93D72C;    /* darker lime for hover/active states */
  --button-text: #1A1A1A;        /* near-black -- readable on the light lime background */
  /* 2026-10-30 follow-up: Buy Now gets its OWN distinct yellow again
     (was briefly the same lime as Add to Cart) -- a separate variable,
     not a reuse of --muted-gold, since --muted-gold still drives the
     cart badge and the active banner dot, neither of which this request
     touches. */
  --buy-now-bg: #FFD54F;         /* yellow -- Buy Now only */
  --buy-now-bg-hover: #E6C047;   /* darker yellow for hover/active state */
  /* 2026-10-30 exact-HEX request: Add to Cart and Buy Now now use these
     two dedicated pairs instead of --button-bg/--buy-now-bg above, since
     the request specifies exact codes ("कोई दूसरा Green या Yellow
     इस्तेमाल मत करना") that don't match the existing lime/yellow tokens.
     Those older tokens are left in place untouched -- --button-bg still
     drives View Product/Login/Search/other buttons, which this request
     does not mention. */
  --add-to-cart-bg: #2F7D32;        /* exact green requested */
  --add-to-cart-bg-hover: #255F27;  /* darker shade for hover/active */
  --add-to-cart-text: #FFFFFF;      /* exact text color requested */
  --buy-now-bg-exact: #FFE500;      /* exact yellow requested */
  --buy-now-bg-exact-hover: #E6CE00; /* darker shade for hover/active */
  --buy-now-text-exact: #000000;    /* exact text color requested */
  /* 2026-11-07, Checkout color-correction request: Razorpay's own brand
     blue, used ONLY for the real "Pay Securely with Razorpay" button --
     a dedicated pair (not reusing --add-to-cart-bg/--forest-green/etc,
     which drive other buttons this request doesn't touch) since this is
     a one-off brand requirement specific to that single button. The
     Order Summary prices and the modal's own Verify & Continue/Resend
     buttons reuse the EXISTING --add-to-cart-bg/--add-to-cart-bg-hover/
     --add-to-cart-text (#2F7D32/#255F27/#FFFFFF) above -- confirmed
     already the project's own real, approved brand green from an
     earlier request, not a new color. */
  --razorpay-blue: #3395FF;
  --razorpay-blue-hover: #1C7ED6;  /* darker shade for hover/active -- no exact hex was specified for this state, so a proportionally-darker variant of the same blue */
  --razorpay-blue-text: #FFFFFF;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  /* 2026-10-31, Phase 1 color-theme audit: clean white page background,
     matching the reference video's "clean white shopping interface"
     observation, replacing the previous round's hardcoded lavender
     (#F8F5FC). Still hardcoded here rather than reusing --bg-main,
     for the same reason as before -- --bg-main doubles as WHITE TEXT
     COLOR against colored backgrounds elsewhere in this file, so giving
     it a non-white value would tint unrelated text, not just this
     background. --card-bg (product cards) and --bg-secondary (trust
     badges) are separate variables, both intentionally left as their
     own distinct surfaces, not collapsed into this one. */
  background: #FFFFFF;
  color: var(--text);
  line-height: 1.5;
}

/* Headings keep the original serif face, preserving the existing My
   Ayurvedic brand identity even though body text is now a clean sans-serif
   ecommerce face. */
h1,
h2,
h3 {
  font-family: Georgia, "Times New Roman", serif;
}

/* Explicit sizes/margins instead of relying on browser defaults, which
   vary with nesting depth and read inconsistently across the page (e.g.
   the product title sat at a different effective size than category
   headings purely because of where each happened to be nested). */
h1 {
  font-size: 1.75rem;
  line-height: 1.25;
  margin: 0 0 0.5rem;
}

h2 {
  font-size: 1.35rem;
  margin: 0 0 0.75rem;
}

h3 {
  font-size: 1.05rem;
  margin: 0 0 0.35rem;
}

.visually-hidden-heading {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.site-header {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem;
  background: var(--header-footer-bg);
  color: var(--deep-forest-green);
}

.site-header .brand {
  color: var(--deep-forest-green);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

/* 2026-10-30, brand-name-color-only request: a dedicated, more specific
   selector (beats .site-header .brand's own color declaration above by
   source order at equal specificity) so only the brand NAME picks up
   the new golden-purple -- .brand-tagline keeps inheriting
   var(--deep-forest-green) from .site-header .brand exactly as before,
   completely untouched. */
.site-header .brand-name {
  font-size: 1.5rem;
  font-weight: bold;
  /* 2026-10-31 approved brand color correction: brand green (reused from
     --add-to-cart-bg, same exact #2F7D32 -- not a new color), replacing
     the earlier sage/golden #A8B86A. Scoped to the brand NAME text only
     -- .brand-tagline keeps its own separate, already-neutral color
     (var(--deep-forest-green), now #1F1F1F from the Phase 1 theme fix)
     untouched, per "do not recolor every header element green". */
  color: var(--add-to-cart-bg);
  /* 2026-10-30 mobile single-line fix: .brand is a flex column inside the
     .header-top flex row, so without this the brand-name text box was
     free to shrink below its own max-content width and wrap at the space
     ("My" / "Ayurvedic" on two lines) -- confirmed from a real screenshot.
     nowrap pins the flex item's min-content width to the full text, which
     is what keeps it on one line at both the base and the mobile
     font-size below. */
  white-space: nowrap;
}

/* Overridden from --muted-gold to --deep-forest-green: the bright yellow
   accent kept everywhere else it still has its own contrasting fill (Buy
   Now button, cart badge, search button) is nearly unreadable as plain
   text directly on the new light cream header background -- confirmed by
   contrast check (~1:1) before making this change. */
.brand-tagline {
  font-size: 0.7rem;
  color: var(--deep-forest-green);
  font-weight: normal;
}

.nav-item-pending {
  display: inline-block;
  color: rgba(48, 40, 58, 0.55);
  cursor: default;
}


/* :not([hidden]) -- an unconditional display:flex here would override the
   browser's native [hidden] -> display:none behaviour (the exact bug
   already fixed once this session for the gallery video tile), which
   would make nav-toggle.js's hidden list keep rendering anyway. */
.site-nav ul:not([hidden]) {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  color: var(--deep-forest-green);
  text-decoration: none;
  padding-bottom: 0.25rem;
  border-bottom: 2px solid transparent;
}

.site-nav a[aria-current="page"] {
  border-bottom-color: var(--forest-green);
}

/* Hidden on desktop/Desktop-Site widths -- the full nav list always shows
   inline there, unchanged from before this change. */
.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid rgba(48, 40, 58, 0.4);
  color: var(--deep-forest-green);
  padding: 0.3rem 0.5rem;
  border-radius: 6px;
}

.nav-toggle:hover {
  background: rgba(48, 40, 58, 0.15);
}

/* Moved here, BEFORE the @media (max-width: 640px) block below, so that
   block's .header-top override (flex-wrap: nowrap, justify-content:
   flex-start) actually wins the cascade at narrow widths. Both rules target
   the exact same selector (.header-top), so with equal specificity the one
   LATER in the file wins regardless of the media query -- this base rule
   used to sit after the media query, which silently cancelled its
   flex-wrap/justify-content/gap overrides on real narrow phones (confirmed:
   Account/Orders/Cart dropped to a visible second row at 320-375px, even
   though it looked fine at 390px+ by coincidence). Same cascade-order
   mistake already fixed a few times elsewhere in this file for other
   selectors -- this is the last outstanding instance of it. */
.header-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  /* The mobile nav dropdown below is positioned absolute relative to THIS
     element (not .site-nav, which is only as wide as the hamburger
     button) -- otherwise its left:0/right:0 span only the button's own
     narrow width and every link's text gets clipped on the right. */
  position: relative;
}

@media (max-width: 640px) {
  .nav-toggle {
    display: inline-flex;
    align-items: center;
  }

  /* Collapsed (list.hidden set by nav-toggle.js): dropdown panel instead
     of the normal inline-wrapping row, so the header doesn't need 3 lines
     of height just to show every link at once. Positioned absolute
     relative to .header-top (full header width), not .site-nav (only as
     wide as the hamburger button) -- see the comment on .header-top. */
  .site-nav ul:not([hidden]) {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 20;
    flex-direction: column;
    gap: 0;
    background: var(--header-footer-bg);
    border: 1px solid rgba(48, 40, 58, 0.25);
    border-radius: 0 0 8px 8px;
    padding: 0.5rem 0;
    margin-top: 0.25rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  }

  .site-nav ul:not([hidden]) li {
    padding: 0.5rem 1rem;
  }

  /* 2026-10-31 medium-size correction: after the previous round shrank
     everything (brand 1.1rem, icons 15px, labels 0.52rem) to force a one-
     row fit, the result read as too small with unused horizontal space --
     explicit instruction to size back up to a "medium" header, not the
     original oversized one and not this undersized one. Padding increased
     from 0.6rem to 0.875rem (14px) sides, within the requested 12-16px
     target. */
  .site-header {
    padding: 0.5rem 0.875rem;
    gap: 0.3rem;
  }

  /* The base .header-top rule uses justify-content:space-between, which
     with 3 direct children (hamburger-nav, brand, quick-icons) spreads
     them with EQUAL gaps across the whole row -- putting the hamburger in
     the middle instead of grouped at the far left with the brand beside
     it, as the reference shows. Switched to flex-start + order (below) so
     hamburger+brand sit together on the left, with margin-left:auto on
     the icons pushing them to the far right instead -- two groups, not
     three evenly-spaced items.
     2026-10-31 overflow fix (superseded below): flex-wrap was briefly
     changed to "wrap" after real measurement showed the pre-existing
     content (brand at 1.1rem + fixed-size quick-icons) genuinely didn't
     fit one row at 360-320px -- but that produced a 2-row header
     (Account/Orders/Cart dropping below the brand), which is not the
     desired design. The real, explicit requirement is ONE row at every
     required width (320-430px), so the fix now goes the other way: shrink
     the content itself (brand-name font-size, quick-icon size/gaps below)
     enough that it genuinely fits one row even at 320px, confirmed by
     real Playwright measurement after the change, then go back to
     "nowrap" -- not nowrap alone (which would silently overflow again if
     the content didn't actually shrink enough), but nowrap backed by
     content that's been measured to fit. */
  .header-top {
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 0.5rem;
    /* 2026-10-31: min-height only, not a width/padding change -- doesn't
       touch the real-available-width budget the one-row fit depends on.
       Row content (quick-icon-link, the tallest child) measured at ~50px
       without this; 4.4rem (70.4px) lands inside the requested 68-74px
       main-row-height target. */
    min-height: 4.4rem;
  }

  .header-top .site-nav {
    order: -1;
  }

  .header-top .brand {
    order: 0;
  }

  .header-top .mobile-quick-icons {
    order: 1;
    margin-left: auto;
  }

  /* 2026-10-31 real bug found during the compact-header audit: this rule
     (and every earlier round's version of it, back to whenever the
     mobile font-size override was first added) was NEVER actually
     applying. ".site-header .brand-name" (unconditional, two classes --
     see that rule above) has HIGHER specificity than a plain
     ".brand-name" selector, and specificity beats source order/media
     queries regardless -- so the unconditional rule's 1.5rem always won,
     at every viewport, silently. Confirmed by real measurement: the
     brand's rendered width was identical (154.3px) before and after
     changing this value, which only makes sense if the change was never
     taking effect. Fixed by matching the other rule's own selector
     (".site-header .brand-name"), making specificity equal -- at equal
     specificity this rule (later in the file) correctly wins. */
  /* 2026-10-31 medium-size correction: 1.1rem (confirmed, via real
     measurement, to render at a genuinely tiny 17.6px) raised to 1.25rem
     (20px) -- within the requested 19-21px target, still comfortably
     fits one row at every required width (see the real-available-width
     calculation + measurement in this round's own report). */
  .site-header .brand-name {
    font-size: 1.25rem;
  }

  /* Tagline handled independently of the one-row requirement (explicit
     instruction: "if the tagline cannot fit, use a responsive approach
     for the tagline only; do not move Account, Orders or Cart to
     another row") -- it has no white-space:nowrap of its own, so at this
     smaller font it simply wraps to its own second line within .brand's
     own column if it doesn't fit on one, which only changes the header's
     height, never a sibling's row placement. 0.7rem (11.2px) is within
     the requested 11-12px target for normal mobile widths; a narrower
     ≤340px breakpoint further down reduces this modestly instead of
     hiding it, per the explicit fallback order (shrink before hide). */
  .brand-tagline {
    font-size: 0.7rem;
  }

  /* 2026-10-31: this is NOT the winning ".mobile-quick-icons" gap
     declaration -- a second, later ".mobile-quick-icons { gap: ... }"
     rule (further down this file, inside the auth-links media query)
     has equal specificity and comes after this one, so it was the one
     actually controlling the real gap value (confirmed by measurement).
     The gap property is removed from here entirely to avoid two
     conflicting values existing for the same property; flex-shrink:0
     stays, since nothing else sets that property. */
  .mobile-quick-icons {
    flex-shrink: 0;
  }

  /* 2026-10-31 medium-size correction: "icon size" target 25-27px, with
     the existing box-shadow glass ring (drawn flush against this box's
     own edge, not a separate padding layer -- see the rule below) making
     the rendered circle read visually larger than the raw glyph size, so
     30px lands the actual glyph within the requested range while the
     ring around it approaches the separately-requested 34-38px "icon
     container" target, given this codebase's existing structure has no
     distinct inner-glyph/outer-ring elements to size independently. */
  .quick-icon-link svg {
    width: 30px;
    height: 30px;
  }

  .nav-toggle {
    /* 2026-10-31 medium-size correction: explicit 42x42px (the requested
       target) instead of relying on padding math around the inner 20x20
       svg -- padding removed (box-sizing:border-box is set globally, so
       the icon is centered via the existing align-items/justify-content
       below, not via padding contributing to the box size). */
    width: 42px;
    height: 42px;
    padding: 0;
    justify-content: center;
    flex-shrink: 0;
  }

}

.auth-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-size: 0.875rem;
}

.auth-links a {
  color: var(--deep-forest-green);
}

/* 2026-10-24 explicit button-color request: Login reads as a real green
   button with white text (ID selector beats the plain-link rule above),
   Signup is intentionally left as the existing text link -- only Login's
   color was requested. */
#auth-link-login {
  display: inline-block;
  background: var(--button-bg);
  color: var(--button-text);
  padding: 0.4rem 0.9rem;
  border-radius: 6px;
  text-decoration: none;
}

/* Logout reads as a red button with white text everywhere it appears --
   the main header's own button (desktop, and still present but CSS-hidden
   on mobile below) and its mobile-dropdown twin. Overrides the generic
   button{} green default via ID specificity. Same red already used by
   .auth-logout-error above, reused here for one consistent error/danger
   color rather than inventing a second one. */
#auth-logout-btn,
#auth-logout-btn-mobile {
  background: #B3261E;
  color: #fff;
}

.auth-logout-error {
  color: #B3261E;
  font-size: 0.78rem;
}

.auth-logout-error:empty {
  display: none;
}

/* Mobile header icons (Account/Orders/Cart) -- hidden by default (desktop
   and Desktop-Site, both unaffected), shown only under 640px. */
.mobile-quick-icons {
  display: none;
}

@media (max-width: 640px) {
  /* 2026-10-31: this is the real, effective gap value for
     .mobile-quick-icons (see the comment on the OTHER ".mobile-quick-icons"
     rule, earlier in this file, for why -- equal specificity, this one is
     later in the file, so it wins). 0.5rem (8px) is the "consistent
     spacing" target for the medium-size header. */
  .mobile-quick-icons {
    display: flex;
    gap: 0.5rem;
  }

  /* Log in/Sign up are redundant with the quick-icons "Account" link above
     and stay hidden on mobile, as before. The authenticated name and
     Logout button, previously kept visible here too (see the git history
     of this comment for that earlier fix), now move into the "Account"
     quick-icon's own dropdown panel instead (.mobile-account-panel below)
     -- minimal-scope request 2026-10-24: keep the main mobile header row
     compact so Cart/Orders/Account are never crowded out. Desktop is
     unaffected; #auth-account-name/#auth-logout-btn still render directly
     in .auth-links there. */
  .header-top > .auth-links #auth-link-login,
  .header-top > .auth-links #auth-link-signup,
  .header-top > .auth-links #auth-account-name,
  .header-top > .auth-links #auth-logout-btn {
    display: none;
  }

  .header-top > .auth-links {
    display: flex;
    font-size: 0.78rem;
  }
}

.quick-icon-account-wrap {
  position: relative;
}

.mobile-account-panel {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.5rem;
  background: var(--bg-main);
  border: 1px solid #E7D5BB;
  border-radius: 10px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  padding: 0.65rem;
  min-width: 150px;
  z-index: 20;
}

.mobile-account-panel[hidden] {
  display: none;
}

.mobile-account-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--deep-forest-green);
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Fixed, equal width per icon (rather than sizing to each label's own
   text length) so Account/Orders/Cart line up as a deliberate, evenly
   spaced row instead of a ragged one.
   2026-10-31 real-bug fix found during the compact-header audit: this is
   the LAST ".quick-icon-link" rule in the file, unconditional (no media
   query) -- so at equal specificity it was winning the cascade over the
   earlier, mobile-scoped override that used to set a smaller min-width/
   font-size here (@media max-width:640px, much earlier in this file),
   silently cancelling it on every real mobile device regardless of
   viewport width. That earlier override has been removed (it did
   nothing) and the real, effective compact sizing is set directly here
   instead -- safe to do because .quick-icon-link only ever renders
   inside .mobile-quick-icons, which is itself display:none except inside
   that same ≤640px media query, so this value is already mobile-only in
   practice despite having no media query of its own. */
.quick-icon-link {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  /* 2026-10-31 medium-size correction: gap (icon-label spacing) 0.1rem ->
     0.2rem; min-width 2rem -> 2.3rem (within the 34-38px "icon container"
     target once the label text, usually the wider of the two, is
     accounted for); font-size 0.52rem -> 0.7rem (11.2px, within the
     11-12px label target). */
  gap: 0.2rem;
  min-width: 2.3rem;
  color: var(--deep-forest-green);
  text-decoration: none;
  text-align: center;
  font-size: 0.7rem;
}

/* 2026-10-31: real-available-width calculation (viewport minus padding
   minus hamburger minus the Account/Orders/Cart group minus gaps) showed
   the "medium" sizing above -- correct and comfortably fitting one row at
   360-430px, confirmed by measurement -- genuinely cannot also fit 320px
   in one row (needs roughly 339px of content, only ~292px actually
   available after padding). Per the explicit instruction to implement "a
   carefully calculated compact breakpoint" at 320px rather than let it
   overflow or push a sibling to a second row, this narrower tier trims
   each element modestly (not to the previous round's tiny sizes) --
   confirmed by measurement to close the real gap with margin to spare.
   Nothing is hidden: hamburger, brand name, and all three of Account/
   Orders/Cart stay visible, with real (not icon-only) accessible names,
   at every one of these sizes.
   Placed here deliberately, AFTER every rule it needs to override
   (.site-header, .header-top, .site-header .brand-name, .brand-tagline,
   .nav-toggle, .mobile-quick-icons, .quick-icon-link all appear earlier
   in this file) -- every one of those is a plain, single-class selector
   at equal specificity to the matching rule here, so per this cascade
   (confirmed, and already hit more than once this session), the LATER
   rule wins regardless of its own media query. Putting this block earlier
   in the file, inside a narrower max-width, would NOT make it win --
   it would silently do nothing, the exact bug this round's audit already
   found and fixed once for .quick-icon-link and .mobile-quick-icons. */
@media (max-width: 340px) {
  .site-header {
    padding: 0.5rem 0.6rem;
  }

  .header-top {
    gap: 0.3rem;
  }

  .nav-toggle {
    width: 36px;
    height: 36px;
  }

  .site-header .brand-name {
    font-size: 1.05rem;
  }

  .brand-tagline {
    font-size: 0.6rem;
  }

  .mobile-quick-icons {
    gap: 0.35rem;
  }

  .quick-icon-link {
    min-width: 2rem;
    font-size: 0.62rem;
  }

  .quick-icon-link svg {
    width: 25px;
    height: 25px;
  }
}

/* Approved premium cream-orange "3D glass" icon treatment. Label text
   stays var(--deep-forest-green) (the .quick-icon-link rule above,
   untouched) -- only the icon glyph itself (via color, which currentColor
   on the SVG's own stroke reads) changes.
   The glass ring/highlight/shadow are all box-shadow layers, not a real
   border/padding -- box-shadow never affects an element's layout box
   size, so the icon's rendered dimensions (width/height="20" in the
   markup, untouched) and therefore the header's own height stay exactly
   as they were. A real border+padding here was tried first and measured
   to add ~8px to the header row's height, which would have broken "do
   not change the header layout" -- this approach avoids that tradeoff
   entirely instead of accepting it. */
.quick-icon-link svg {
  color: #C98546;
  background: rgba(255, 248, 237, 0.78);
  border-radius: 50%;
  box-shadow:
    0 0 0 1px #E7D5BB,
    0 1px 2px rgba(181, 138, 74, 0.25),
    inset 0 1px 1px rgba(255, 255, 255, 0.6);
}

.quick-icon-link .cart-badge {
  position: absolute;
  top: -0.3rem;
  right: -0.5rem;
}

/* Overridden from --muted-gold to --deep-forest-green, same reason as
   .brand-tagline above: yellow text directly on the new cream header
   background reads as nearly invisible. */
.auth-note {
  color: var(--deep-forest-green);
  font-size: 0.75rem;
}

.cart-badge {
  display: inline-block;
  background: var(--muted-gold);
  color: var(--text);
  border-radius: 999px;
  padding: 0 0.4rem;
  font-size: 0.75rem;
  font-weight: bold;
  margin-left: 0.25rem;
}

.cart-badge[hidden] {
  display: none;
}

.site-search {
  display: flex;
  gap: 0.5rem;
}

/* Explicit, identical height on both -- previously relied on matching
   padding to produce matching height, but the input and button's
   different default font metrics meant they rendered 4px apart (34px vs
   38px), a small but real visual-consistency gap. */
.site-search input,
.site-search button {
  height: 2.5rem;
}

.site-search input {
  flex: 1;
  padding: 0 0.6rem;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: #FFFFFF;
  font-family: inherit;
}

/* 2026-10-31 search-bar-restore: the search input/button at mobile widths
   (≤640px, below) are back to a thin/compact size -- this base rule is
   unconditional (desktop keeps it exactly as before, untouched, per the
   header/unrelated-styles lock) but its own border-radius (4px) and
   padding also apply on mobile unless overridden there, so the mobile
   block below overrides just those two properties to hit the requested
   6px radius / 12px left padding, leaving every other base property
   (border, background, font-family) shared and untouched. */

.site-search input::placeholder {
  color: var(--muted);
}

.site-search button {
  /* 2026-10-31 approved color correction: brand green with white text
     (reused from --add-to-cart-bg/--add-to-cart-text, same exact
     #2F7D32/#FFFFFF -- not a new color), replacing the leftover lime
     --button-bg/--button-text this button used to share with Login and
     other generic buttons. Scoped to this one selector only -- Login and
     any other --button-bg consumer are untouched. */
  background: var(--add-to-cart-bg);
  color: var(--add-to-cart-text);
  padding: 0 0.9rem;
}

.site-search button:hover {
  background: var(--add-to-cart-bg-hover);
}

/* Placed AFTER the base height:2.5rem rule above (not before -- an
   earlier attempt placed a smaller mobile override before the base rule,
   and the base rule won the cascade regardless, since @media doesn't add
   specificity -- same cascade-order mistake made and fixed a few times
   already this session).
   2026-10-31 search-bar-restore: the previous round's medium-size pass
   (3.125rem/50px height, 2.25rem button padding -> 90px button) read as
   too tall/thick once seen live -- explicit instruction to go back to a
   thin, compact search bar, with exact target numbers this time (44px
   height, 54px fixed button width) rather than the earlier "within a
   48-52px range" approximation. This block ONLY touches .site-search and
   its own input/button -- .header-top, the brand, and the Account/
   Orders/Cart icons are untouched by this block, confirmed by reading
   it: nothing here selects any of those. */
@media (max-width: 640px) {
  .site-search input,
  .site-search button {
    height: 44px;
  }

  .site-search {
    align-items: center;
    gap: 10px;
    /* Search row's own horizontal inset -- NOT a change to
       .site-header's own (locked) padding, which .header-top also
       shares and must stay exactly as it is. Current locked header
       padding is 14px each side; this adds 6px more on top of that,
       specifically for this row, reaching the requested 20px without
       touching the shared, locked property. */
    margin: 0 6px;
  }

  .site-search input {
    /* Chrome's UA stylesheet puts a 4px top-only margin on <input> but
       not <button>; this keeps the two flush at the new 44px height,
       same fix as before, re-tuned for this height. */
    margin: 2px 0;
    padding-left: 12px;
    padding-right: 12px;
    border-radius: 6px;
    font-size: 16px;
    color: var(--muted);
  }

  .site-search button {
    /* Fixed width (not padding-driven) -- explicit instruction not to
       let the button grow oversized again. flex-shrink:0 keeps it at
       exactly 54px regardless of how little room the input leaves. */
    width: 54px;
    flex-shrink: 0;
    padding: 0;
  }

  .site-search button svg {
    width: 22px;
    height: 22px;
  }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

main {
  padding: 1rem;
  max-width: 900px;
  margin: 0 auto;
}

.hero {
  text-align: center;
  padding: 2rem 1rem;
  background: var(--bg-secondary);
  border-radius: 8px;
}

.hero h1 {
  color: var(--deep-forest-green);
  margin-bottom: 0.25rem;
}

.banner-slider {
  position: relative;
  margin-bottom: 1.5rem;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
}

/* All slides stacked in the same grid cell so the crossfade below never
   collapses the track's height or needs any JS measurement -- every
   slide's <img> shares the same width:100%/aspect-ratio per breakpoint,
   so whichever slide is laid out, the track's intrinsic size is
   identical; no visual size/position change versus the old
   display:none toggle. 2026-11-07: added so removing the prev/next
   arrows could be paired with a smooth, professional fade instead of
   the previous instant display:none/"" swap (there was no transition
   at all before). */
.banner-track {
  display: grid;
}

.banner-slide {
  grid-area: 1 / 1;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.banner-slide.active {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .banner-slide {
    transition: none;
  }
}

.banner-slide img {
  width: 100%;
  height: auto;
  display: block;
}

.banner-caption {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  background: rgba(255, 255, 255, 0.92);
  padding: 0.75rem 1rem;
  border-radius: 8px;
  max-width: 80%;
}

/* Mobile: the slider shows images only -- no heading, description, or CTA
   button on any slide (an earlier version moved the caption below the
   image instead of overlaying it, to stop it overlapping; now it's
   removed from the mobile layout entirely instead, per explicit
   instruction: every slide must be image-only, and switching slides must
   never change the slider's height, which a variable-length caption would
   risk doing on slides that do/don't have a CTA button). The caption and
   its button still show normally on desktop/Desktop-Site, unchanged. */
@media (max-width: 640px) {
  .banner-caption {
    display: none;
  }

  /* Grown from 3.9/1 to 1.62/1 to absorb exactly the vertical space freed
     by removing .hero-bullets/.hero-cta below (display:none, mobile only
     -- see those rules further down) -- not a general redesign, just the
     slider occupying the space the hero text/button used to take so the
     trust strip after it lands in the same position as before, with no
     new gap above or below. Still image-only, still object-fit:cover,
     same crop behavior as before -- just a taller crop window. */
  .banner-slide img {
    aspect-ratio: 1.615 / 1;
    object-fit: cover;
    height: auto;
  }

  /* Completely removed on mobile, not just visually faded -- display:none
     drops its own padding/gap/background along with it, so no blank strip
     is left where it was. The arrows and slide-switching JS keep working
     exactly as before: banner-slider.js still calls
     dot.setAttribute('aria-selected', ...) on these elements every slide
     change, it just has no visible effect since they're not rendered.
     Desktop keeps the dots, completely unchanged -- this rule only exists
     inside this mobile media query. The image area is untouched (no
     aspect-ratio change here), so the banner's total height simply
     shrinks by what the dots row used to take, rather than anything
     growing to compensate.

     div.banner-dots, not plain .banner-dots -- the base (unscoped)
     .banner-dots rule further down this file (display:flex) has the exact
     same specificity as a bare class selector and comes later in the
     file, so it was silently winning over this media-query override
     regardless of viewport width -- confirmed via a real measurement
     (computed display stayed "flex", dots row still 25.59px tall). Same
     cascade-order bug already hit twice before this session (.header-top,
     .hero-cta via the shared .button class); same fix each time: raise
     this selector's own specificity instead of moving code around or
     reaching for !important. */
  div.banner-dots {
    display: none;
  }
}

.banner-caption h2 {
  margin: 0 0 0.25rem;
  color: var(--deep-forest-green);
}

/* 2026-11-07: .banner-arrow/.banner-prev/.banner-next removed here --
   explicit instruction to remove the left/right arrow buttons
   completely (not just hide them), on both mobile and desktop. The
   markup (home-page.js) and their click-handling JS (banner-slider.js)
   were removed in the same pass; dots + swipe + auto-advance are the
   only navigation left, per that same instruction. */

.banner-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem;
  background: var(--bg-secondary);
}

.banner-dot {
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background: var(--border);
  padding: 0;
}

.banner-dot[aria-selected="true"] {
  background: var(--muted-gold);
}

.hero-bullets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  font-size: 0.9rem;
  color: var(--forest-green);
  font-weight: bold;
}

.hero-bullets li::before {
  content: "✓ ";
}

.hero-cta {
  display: inline-block;
  margin-bottom: 1.5rem;
}

/* Tighter hero rhythm on mobile -- reduces the distance from the top of
   the page to the trust strip/product grid. */
@media (max-width: 640px) {
  /* Reduced again from 0.75rem -- 10px lands inside the requested
     ~8-12px gap to the trust badges below, rather than sitting right on
     its edge. */
  .banner-slider {
    margin-bottom: 0.625rem;
  }

  /* Reduced from the base 1.5rem -- "unnecessary margins above and below
     the [trust] cards" per explicit instruction. The space below trust
     strip itself is now mostly controlled by #hair-oil's own margin-top
     further down (see that rule's comment) rather than this value, since
     margin-collapse takes whichever of the two is larger.

     section.trust-strip, not plain .trust-strip -- same cascade-order
     issue hit twice already just above (.banner-dots, .hero-cta): the
     base (unscoped) .trust-strip rule further down this file has equal
     specificity and comes later in the file, so it was silently winning
     over this override regardless of viewport. Raising specificity via
     the element type, same fix as the others. */
  section.trust-strip {
    margin-bottom: 0.75rem;
  }

  /* Removed entirely from the mobile layout, per explicit instruction --
     same display:none pattern already used a few lines up for
     .banner-caption on mobile (that comment explains the reasoning: this
     is a genuine removal from layout/rendering for this viewport, not a
     cosmetic overlay -- the element occupies zero space and isn't
     interactive). The markup itself can't be removed at the source without
     also removing it from desktop (there's no server-side mobile/desktop
     split in this codebase -- every "mobile differs from desktop" case,
     including the one right above, is CSS-only), and desktop is locked
     unchanged, so this is the only option that satisfies both. The
     underlying properties (margin-bottom etc.) are kept here even though
     they now do nothing visually, just so nothing is silently lost if
     .hero-bullets/.hero-cta were ever un-hidden again. The banner image's
     taller aspect-ratio above is sized to exactly absorb the space this
     frees, so the trust strip after it doesn't move. */
  .hero-bullets {
    display: none;
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
    gap: 0.3rem 0.9rem;
  }

  /* a.hero-cta, not plain .hero-cta -- the element also carries the shared
     .button class, whose own display:inline-block rule (much further down
     this file, outside any media query) has the SAME specificity as a
     bare .hero-cta class selector. Equal specificity means source order
     decides, and .button comes later in the file, so it was silently
     winning and keeping this visible despite display:none here --
     confirmed via a real measurement (computed display was
     "inline-block", not "none"). Adding the element type raises this
     selector's specificity just enough to win regardless of order,
     without touching the shared .button rule itself (used by other real
     buttons sitewide) or resorting to !important. */
  a.hero-cta {
    display: none;
    margin-bottom: 0.75rem;
  }
}

/* Single row of 4 at every width, including mobile (previously 2x2 on
   mobile, 262px tall, pushing the product grid far down the page -- the
   approved mobile reference explicitly shows this as one compact row). */
.trust-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.4rem;
  margin-bottom: 1.5rem;
}

@media (min-width: 640px) {
  .trust-strip {
    gap: 0.75rem;
  }
}

/* Desktop: icon + label only now (subtitle markup removed at the source --
   the previous subtitle copy was tied to the old, now-replaced badge
   claims, and no replacement subtitle text was specified for these four,
   so none is invented). Icon sized larger than the mobile 16px spec below
   since no desktop pixel spec was given; this is a natural scaled-up
   version of the same compact visual language, same colour tokens. */
/* 2026-10-29 UI touch-up: a flat var(--bg-secondary) fill read as plain/
   light against the rest of the page -- replaced with a subtle two-stop
   sage gradient (same herbal-green family as --bg-secondary/--light-sage,
   just closer stops than those two tokens' own gap, so it stays gentle,
   not a visible band) plus a slightly richer, warmer-sage border and a
   soft lifted shadow with a faint inner highlight -- a restrained "premium
   card" treatment, not a bright/decorative one. Icons/labels/order/
   functionality are untouched; only this container's own fill/border/
   shadow changed. */
.trust-badge {
  /* 2026-10-31: neutral light-grey gradient (was lavender), matching the
     --bg-secondary/--light-sage tokens this tile's background is
     conceptually tied to, which moved to #F5F5F5 in this round's audit. */
  background: linear-gradient(180deg, #FAFAFA 0%, #F5F5F5 100%);
  border: 1px solid #E5E5E5;
  border-radius: 8px;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  text-align: center;
  box-shadow: 0 2px 6px rgba(48, 40, 58, 0.07), inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

/* Same premium cream-orange "3D glass" treatment as .quick-icon-link svg
   above -- box-shadow layers only (ring/highlight/shadow), no real
   border or padding, so width/height stay exactly 24px and this element
   adds nothing to the trust-badge's own layout height. */
.trust-badge svg {
  width: 24px;
  height: 24px;
  color: #C98546;
  background: rgba(255, 248, 237, 0.78);
  border-radius: 50%;
  box-shadow:
    0 0 0 1px #E7D5BB,
    0 1px 2px rgba(181, 138, 74, 0.25),
    inset 0 1px 1px rgba(255, 255, 255, 0.6);
  flex-shrink: 0;
}

.trust-badge strong {
  color: var(--forest-green);
  font-size: 0.85rem;
}

/* Approved "A1 Compact" trust-strip spec -- exact pixel values per
   instruction, not rem-based like the rest of this file, since the spec
   itself is given in pixels and the target total height (36-40px) has to
   be hit precisely. Background moves from each individual .trust-badge
   (desktop) to the shared .trust-strip itself here: four separately
   coloured/boxed badges would still read as "4 boxes" even without a
   border, so one continuous strip background is what actually satisfies
   "no borders by default; no large individual boxes". */
@media (max-width: 640px) {
  /* 2026-10-29 UI touch-up: same premium-sage direction as the desktop
     .trust-badge rule above, applied to the shared strip background
     instead (mobile still puts the fill on .trust-strip itself, not on
     each .trust-badge -- unchanged). A border is safe to add here without
     affecting the strip's own approved height ceiling: `* { box-sizing:
     border-box }` is set globally (top of this file), so a border is
     drawn inside the existing box, not added on top of it -- padding/
     gap/grid are completely untouched. Confirmed via a real measurement
     after this change that the strip's total height is unchanged. */
  .trust-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 2px;
    padding: 4px 2px;
    background: linear-gradient(180deg, #FAFAFA 0%, #F5F5F5 100%);
    border: 1px solid #E5E5E5;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(48, 40, 58, 0.06);
  }

  .trust-badge {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0 1px;
    gap: 0px;
    text-align: center;
    align-items: center;
    justify-content: center;
  }

  /* box-shadow layers only here too (see the base .trust-badge svg rule
     above) -- critically important at this breakpoint specifically, since
     the compact strip's height is already right at its approved ceiling
     (bottlenecked by the "Natural Ingredients" label wrapping to 2 lines);
     a real border/padding would grow this icon and push the whole strip
     taller, directly against "never increase [strip] height". Confirmed
     via measurement after this change that the strip height is unchanged. */
  .trust-badge svg {
    width: 16px;
    height: 16px;
    color: #C98546;
    background: rgba(255, 248, 237, 0.78);
    border-radius: 50%;
    box-shadow:
      0 0 0 1px #E7D5BB,
      0 1px 1px rgba(181, 138, 74, 0.25),
      inset 0 1px 1px rgba(255, 255, 255, 0.6);
  }

  .trust-badge strong {
    display: block;
    color: #1F1F1F;
    font-size: 10px;
    line-height: 12px;
    font-weight: 600;
  }
}

/* 2026-10-31 premium circular category design (replaces the previous
   text-pill nav -- same two-copy mobile/desktop structure, same real
   hrefs, same category-dots.js/category-filter.js scripts untouched,
   since both already operate generically on this nav's <a href> values
   and scroll position, not on the pill-specific markup/text that's being
   replaced here). No automatic sliding -- see renderCategoryNav()'s own
   comment in home-page.js for why only manual swipe (scroll-snap, same
   mechanism as before) is used for 5 fixed nav items. */
.category-nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.1rem;
  list-style: none;
  padding: 0;
  margin: 1.1rem 0;
}

.category-circle-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  width: 4.75rem;
  text-decoration: none;
}

.category-circle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 4.5rem;
  height: 4.5rem;
  flex-shrink: 0;
  border-radius: 50%;
  overflow: hidden;
  background: var(--header-footer-bg);
  border: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.category-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-circle svg {
  width: 28px;
  height: 28px;
  color: var(--forest-green);
}

.category-circle-label {
  font-size: 0.78rem;
  color: var(--text);
  text-align: center;
  line-height: 1.25;
}

/* category-filter.js sets aria-current="page" on whichever category link
   is active -- a real existing behavior this design now actually shows,
   rather than leaving unstyled. */
.category-nav a[aria-current="page"] .category-circle {
  border-color: var(--add-to-cart-bg);
  box-shadow: 0 0 0 2px rgba(47, 125, 50, 0.18), 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* Two copies of the same nav exist in the HTML (see renderCategoryNav() in
   home-page.js) -- one positioned before the banner, one in the original
   post-trust-strip position -- so it can appear in a different document
   position on mobile vs. desktop without reordering shared HTML (which
   would move it for desktop too) or risking collapsed-margin spacing
   changes elsewhere on the page. Exactly one is ever visible. */
.category-nav--mobile-top {
  display: none;
}

@media (max-width: 640px) {
  .category-nav--desktop-default {
    display: none;
  }

  /* Compact horizontal circular strip, scrolled internally
     (overflow-x: auto on the ul) if all 5 don't fit at once -- never the
     page itself (confirmed via real-browser measurement at 320-414px).
     The desktop copy above keeps its own centered, wrapping row,
     completely unchanged. */
  .category-nav--mobile-top {
    display: block;
    /* Pulls the strip up out of <main>'s global 16px top padding (shared
       by every page -- not touched here, and the header itself is not
       touched either) to close almost all of the gap that sat between the
       search row and this strip. Same -0.9rem safety margin as before, so
       it still never touches or overlaps the header. */
    margin-top: -0.9rem;
  }

  .category-nav--mobile-top ul {
    flex-wrap: nowrap;
    justify-content: flex-start;
    margin: 0;
    /* 2026-10-31 compact pass: reduced top/bottom padding (was 0.6rem/
       0.3rem) now that the circles themselves are smaller too -- real
       measurement confirmed the combined effect meaningfully shortens
       the gap before the hero banner. */
    padding: 0.35rem 0.6rem 0.2rem;
    gap: 0.85rem;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    /* Native scrollbar replaced by the subtle 3-dot indicator below
       (.category-scroll-dots) -- this just hides the browser-drawn
       scrollbar track/thumb, scrolling itself is unaffected. */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* legacy Edge */
  }

  .category-nav--mobile-top ul::-webkit-scrollbar {
    display: none; /* Chrome, Safari */
  }

  .category-nav--mobile-top li {
    flex: 0 0 auto;
  }

  /* All 5 categories are shown here now, including Combos -- the previous
     text-pill version hid it on mobile (:last-child { display: none }),
     which this redesign deliberately does not carry forward, since every
     actual category must be present.
     2026-10-31 compact pass: circle diameter reduced from 3.75rem (60px)
     to 3rem (48px) -- about 80% of the previous diameter, per explicit
     instruction, not a drastic icon-sized shrink. Link width and the
     link's own internal gap (base .category-circle-link rule above,
     0.4rem) are both reduced to match, so the smaller circle isn't left
     sitting in an oversized box.
     2026-10-31 follow-up (~12% further reduction): actual current CSS
     checked first (3rem/48px, confirmed from the rule just below, not
     assumed) -- 48px x 0.88 = 42.24px (2.64rem). Link wrapper width is
     deliberately LEFT UNCHANGED (3.3rem) this time, unlike the previous
     pass -- shrinking it in proportion to the circle was tried first and
     measured to make "Hair Spray"/"Face Care" wrap to 2 lines at their
     existing font-size, which reads as indirectly shrinking label
     spacing even though the font-size itself never changed, going
     against the explicit "don't shrink label font-size or spacing"
     instruction. Keeping the wrapper at its current width leaves a
     little more breathing room around the now-smaller circle instead,
     which is a smaller tradeoff than an unintended label wrap. */
  .category-nav--mobile-top .category-circle-link {
    width: 3.3rem;
    gap: 0.25rem;
    scroll-snap-align: start;
  }

  .category-nav--mobile-top .category-circle {
    width: 2.64rem;
    height: 2.64rem;
  }

  .category-nav--mobile-top .category-circle svg {
    width: 17.6px;
    height: 17.6px;
  }

  .category-nav--mobile-top .category-circle-label {
    font-size: 0.64rem;
    line-height: 1.15;
  }

  /* Tiny, low-contrast proxy for the native scrollbar hidden above --
     deliberately NOT styled like a slider/carousel control: no visible
     scrollbar, no long underline, minimal height, muted colors in both
     states so it never competes with the category circles above it.
     category-dots.js hides this entirely (sets [hidden]) when the strip
     has nothing to scroll (e.g. wide enough that all 5 categories already
     fit) -- :not([hidden]), not a plain selector, because an unconditional
     display:flex here would be an AUTHOR rule and so would always beat the
     browser's own native [hidden] -> display:none default, silently
     keeping the dots visible regardless of what JS sets. Same fix already
     applied once in this file for .site-nav ul. */
  .category-scroll-dots:not([hidden]) {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.25rem;
    padding: 0 0 0.2rem;
  }

  .category-dot {
    width: 0.25rem;
    height: 0.25rem;
    border-radius: 50%;
    background: var(--border);
  }

  .category-dot[aria-selected="true"] {
    background: var(--muted);
  }
}

.category-section {
  margin: 2rem 0;
  scroll-margin-top: 1rem;
}

.category-heading-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.category-heading-row h2 {
  margin-bottom: 0;
}

.view-all-link {
  color: var(--forest-green);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: bold;
  white-space: nowrap;
}

.view-all-link:hover {
  text-decoration: underline;
}

/* 2026-10-29 (homepage redesign): premium My Ayurvedic palette, exact
   hex values per explicit instruction, scoped only to these two new
   sections (.brand-info/.brand-benefit-*, .product-showcase/.showcase-*)
   -- the site-wide --forest-green/--bg-secondary/etc. tokens used
   everywhere else (checkout, cart, product pages, admin) are
   deliberately left untouched, so this redesign can't have any
   unintended effect outside the homepage's own new sections. */
.brand-info {
  background: #F1E8F5;
  border: 1px solid #E8E0F0;
  border-radius: 14px;
  padding: 1.5rem;
  margin: 1.5rem 0;
}

.brand-info h2 {
  color: #30283A;
  text-align: center;
  font-size: 1.3rem;
  margin: 0 0 1.1rem;
}

.brand-benefit-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

@media (min-width: 641px) {
  .brand-benefit-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
  }
}

.brand-benefit-card {
  background: #FFFFFF;
  border: 1px solid #E8E0F0;
  border-radius: 12px;
  padding: 1rem 0.85rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  animation: brand-card-fade-in 0.5s ease-out both;
}

/* Staggered entrance only -- a one-time fade/slide-up on page load, never
   a repeating/looping animation ("subtle... no continuous distracting
   animation" per explicit instruction). Pure CSS, no JS, no library. */
.brand-benefit-card:nth-child(2) { animation-delay: 0.08s; }
.brand-benefit-card:nth-child(3) { animation-delay: 0.16s; }
.brand-benefit-card:nth-child(4) { animation-delay: 0.24s; }

.brand-benefit-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #C9B4D8; /* soft golden purple accent, 2026-10-30 */
  color: #30283A;
  flex-shrink: 0;
}

.brand-benefit-icon svg {
  width: 20px;
  height: 20px;
}

.brand-benefit-card h3 {
  color: #30283A;
  font-size: 0.88rem;
  margin: 0;
}

.brand-benefit-card p {
  color: #706878;
  font-size: 0.78rem;
  margin: 0;
  line-height: 1.4;
}

@keyframes brand-card-fade-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .brand-benefit-card {
    animation: none;
  }
}

@media (max-width: 640px) {
  .brand-info {
    padding: 1rem 0.85rem;
    margin: 0.75rem 0;
  }

  .brand-info h2 {
    font-size: 1.1rem;
  }
}

/* ---------- Product Showcase: native CSS scroll-snap carousel, no JS
   library, no autoplay (explicit instruction: autoplay is optional --
   skipped entirely here, since a user-driven native swipe/scroll is
   already the "smooth transition" asked for, with zero added script and
   zero risk of a "continuous distracting animation"). ---------- */
.product-showcase {
  margin: 1.5rem 0;
}

.product-showcase h2 {
  color: #30283A;
  text-align: center;
  font-size: 1.3rem;
  margin: 0 0 1rem;
}

.showcase-scroll {
  display: flex;
  gap: 0.65rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  padding: 0.25rem 0.25rem 0.75rem;
  margin: 0 -0.25rem;
}

/* 2026-10-29: ~20% more compact than the original approved design --
   card width 78% -> 62% (mobile), 260px -> 208px (desktop), padding/gap
   reduced proportionally. Image area shrinks automatically along with
   the card (aspect-ratio:1/1 on .showcase-image below is unchanged, so
   proportions/clarity stay identical, never stretched/distorted -- only
   smaller). Text sizes are deliberately NOT cut by the same ~20% --
   explicit instruction not to shrink text to the point reading becomes
   difficult -- so name/summary/button font-sizes are only slightly
   reduced, not proportionally scaled with the box. */
.showcase-card {
  flex: 0 0 62%;
  scroll-snap-align: start;
  background: #FFFFFF;
  border: 1px solid #E8E0F0;
  border-radius: 12px;
  padding: 0.7rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.22rem;
}

@media (min-width: 641px) {
  .showcase-card {
    flex: 0 0 208px;
  }
}

.showcase-media-link {
  display: block;
  width: 100%;
}

/* width/height set on the <img> itself (home-page.js markup) reserves
   this box before the image loads, so it never causes layout shift;
   object-fit:contain (not cover) never crops a real product photo.
   aspect-ratio unchanged (1/1) -- the image only gets smaller along with
   its smaller card, never stretched or cropped differently. */
.showcase-image {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  border-radius: 9px;
  background: #F1E8F5;
}

.showcase-name {
  margin: 0.25rem 0 0;
  font-size: 0.86rem;
}

.showcase-name a {
  color: #30283A;
  text-decoration: none;
}

.showcase-summary {
  color: #706878;
  font-size: 0.72rem;
  margin: 0;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Still the same shared, sitewide .button component (same real button
   every "View"/"Buy"/"Add to Cart" control uses) -- padding/font-size
   overridden here specifically to compact it along with the rest of the
   card, kept comfortably readable/tappable (not reduced by the full 20%
   the box itself was). */
.showcase-view-btn {
  margin-top: 0.3rem;
  width: 100%;
  text-align: center;
  padding: 0.48rem 0.9rem;
  font-size: 0.85rem;
}

/* 2026-10-30 exact-HEX request: dedicated color override, reusing the
   --add-to-cart-* variables already added for Add to Cart's own exact
   #2F7D32/#FFFFFF (same color, no new duplicate hex values). Needed
   "a.showcase-view-btn" rather than plain ".showcase-view-btn" -- the
   generic ".button, button" rule further down this file has the SAME
   specificity (one class/element selector) and sits later in source
   order, so at equal specificity it was winning the cascade and keeping
   this button lime-green despite this rule setting the same property --
   same cascade-order bug class already fixed a few times elsewhere in
   this file. The extra "a" element selector gives this rule higher
   specificity so it wins regardless of source order. */
a.showcase-view-btn {
  background: var(--add-to-cart-bg);
  color: var(--add-to-cart-text);
}

a.showcase-view-btn:hover {
  background: var(--add-to-cart-bg-hover);
  color: var(--add-to-cart-text);
}

@media (max-width: 640px) {
  .product-showcase h2 {
    font-size: 1.1rem;
  }
}

/* 2026-10-29 (delivery-date display): shared widget styling for both the
   product page (always visible) and homepage showcase cards (desktop
   only, see .showcase-delivery's own mobile-hide rule below). Compact
   by design -- a single row, no large icon, no extra vertical space
   beyond what the row itself needs. */
.delivery-estimate-wrap {
  margin: 0.6rem 0;
}

.delivery-estimate {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--text);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.5rem 0.7rem;
}

.delivery-estimate-icon {
  color: var(--forest-green);
  flex-shrink: 0;
  display: inline-flex;
}

.delivery-estimate-text {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.delivery-estimate-action {
  flex-shrink: 0;
  background: none;
  border: none;
  color: var(--forest-green);
  font-weight: 600;
  font-size: 0.8rem;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
}

/* Honest "not serviceable"/error state reads as muted, not alarming --
   never styled like a broken/invalid field, since this is real, expected
   information, not a form validation error. */
.delivery-estimate-wrap.delivery-estimate-unavailable .delivery-estimate {
  color: var(--muted);
}

.delivery-pin-form {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.4rem;
}

/* Root-cause fix, same bug class as .button[hidden]/button[hidden]
   further down this file: the unconditional "display: flex" just above
   is an AUTHOR rule, so it beats the browser's built-in
   "[hidden] { display: none }" rule regardless of specificity -- caught
   here by actually looking at a real screenshot (the PIN form was
   visibly showing by default, confirmed before this fix), not assumed
   safe just because the element count/behavior tests passed. */
.delivery-pin-form[hidden] {
  display: none;
}

.delivery-pin-input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.85rem;
  font-family: inherit;
}

.delivery-pin-form button[type="submit"] {
  flex-shrink: 0;
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
  border-radius: 6px;
  /* 2026-10-30, button-color-only request explicitly protects the
     delivery-estimate widget ("delivery estimate...को बिल्कुल touch मत
     करना") -- this button had no background/color of its own, so it was
     silently inheriting the generic button{} rule above; frozen here at
     the exact colors it already resolved to before this round's change
     (var(--forest-green)/var(--bg-main), i.e. the current golden theme),
     so this one widget's appearance stays untouched even though the
     generic rule itself now points new/other buttons at the new lime
     green. */
  background: var(--forest-green);
  color: var(--bg-main);
}

.delivery-pin-form button[type="submit"]:hover {
  background: var(--primary-blue-dark);
}

/* Homepage showcase cards only: slightly smaller than the product page's
   own widget, to match the already-compact card it sits inside, and
   hidden entirely below 641px -- explicit instruction ("Mobile Homepage
   पर Delivery Date बिल्कुल नहीं दिखानी"). delivery-estimate.js's own
   matching window.matchMedia check is what actually stops the fetch on
   mobile; this display:none is the visual half of that same rule, never
   relied on alone. */
.showcase-delivery .delivery-estimate {
  font-size: 0.72rem;
  padding: 0.35rem 0.5rem;
  gap: 0.3rem;
}

.showcase-delivery .delivery-estimate-icon svg {
  width: 13px;
  height: 13px;
}

.showcase-delivery .delivery-estimate-action {
  font-size: 0.68rem;
}

@media (max-width: 640px) {
  .showcase-delivery {
    display: none;
  }
}

.pending-note {
  color: var(--gold-text);
  font-style: italic;
}

.product-grid {
  display: grid;
  /* Exactly 2 per row at every width below 640px, including narrow phones
     -- previously this dropped to a single column under 420px.
     minmax(0, 1fr), not plain 1fr -- plain 1fr has an implicit "auto"
     minimum, so a card whose content (e.g. the marketplace-badge row)
     doesn't want to shrink below its own min-content width will force the
     whole grid column wider than its track, overflowing the viewport.
     Confirmed via a real measurement: cards were rendering 5px past the
     390px viewport edge before this fix. */
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

@media (max-width: 640px) {
  .product-grid {
    gap: 0.6rem;
  }
}

/* .all-products-grid flattens the (now data-driven, non-empty-only --
   see renderTenCardCategories() in home-page.js) category sections into a
   SINGLE unified grid on mobile -- no category-based homepage sections or
   headings, one consistent two-column list.

   2026-10-26: the Combos section used to be force-hidden here via a
   mobile-only #combos selector, as a CSS-only band-aid for its one
   product having no real photo yet. That hid the card on mobile while
   desktop kept showing it -- the actual mobile(9)-vs-desktop(10) card-
   count bug. Removed: home-page.js itself now excludes any image-less
   product's card from the data before it ever reaches either breakpoint,
   so there is nothing left for this stylesheet to separately hide, and a
   category (Combos or otherwise) appears here identically on mobile and
   desktop the moment it has a real, imaged product again -- no CSS
   change needed when that happens.

   display:contents on .category-section and .product-grid removes only
   THEIR OWN boxes from layout -- it does not touch the DOM, so product
   IDs/order/content are completely unaffected -- which promotes their
   children (the heading row and the actual .product-card elements) to be
   direct, equal participants in .all-products-grid's own 2-column grid.
   .category-heading-row is hidden outright (no per-category heading
   shows in the unified list, per instruction); the "View All" link inside
   it is a same-page jump to a section that would no longer be visually
   distinct anyway, so it goes with it.

   Scoped entirely to .all-products-grid and mobile -- on desktop this
   wrapper is a plain, unstyled div (no rule below applies there), so
   .category-section/.product-grid keep their normal display:block/grid,
   and every section renders exactly as before: own heading, own grid,
   own order, completely unchanged. */
@media (max-width: 640px) {
  .all-products-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
    margin-top: 0.875rem;
    margin-bottom: 0.5rem;
  }

  .all-products-grid .category-section {
    display: contents;
  }

  .all-products-grid .category-heading-row {
    display: none;
  }

  /* 2026-11-20 layout fix. The legacy anchor spans (#hair-oil,
     #hair-spray, #face-mask, #face-wash, #face-gel -- added 2026-11-19)
     are the FIRST children of .category-section. With display:contents on
     that section they are promoted to real grid items here, so each one
     consumed a cell of this 2-column grid. Face Care carries three of
     them, an odd number, so the third landed in the left cell of a row
     whose right cell held a real product card -- the card-sized blank
     space customers saw -- and every card after it was pushed one cell
     out of alignment.

     Spanning them across the full row keeps each span exactly where it is
     in the DOM, so the old #hair-oil / #face-mask links still scroll to
     the right products, while it can no longer occupy a card's cell or
     shift the columns. They stay height:0 (see .anchor-alias), so these
     rows render as nothing. display:none would also clear the blank, but
     it would break those legacy anchors, which is the one thing these
     spans exist to do. */
  .all-products-grid .anchor-alias {
    grid-column: 1 / -1;
  }

  .all-products-grid .product-grid {
    display: contents;
  }

  /* Shows the temporary four-pack preview cards (hidden everywhere by
     default -- see the base .product-card--preview-demo rule above) --
     mobile only, so desktop never sees them. display:flex, matching
     .product-card's own base display value, not block -- these are still
     normal .product-card elements internally (column flex layout for
     title/price/etc.), just with an extra class controlling whether the
     whole thing renders at all. */
  .all-products-grid .product-card--preview-demo {
    display: flex;
  }
}

@media (min-width: 640px) {
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.product-card,
.product-detail {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem;
  box-shadow: 0 1px 3px rgba(48, 40, 58, 0.08);
  position: relative;
}

/* Every one of the 9 cards shares the exact same DOM structure (see
   renderCard() in home-page.js); this is what makes their height, and the
   vertical position of their buttons, line up regardless of which slots
   have real content vs. a "pending" placeholder. */
.product-card {
  display: flex;
  flex-direction: column;
  /* 2026-10-26: a hard structural guarantee that NOTHING inside a card
     can ever visually spill onto a neighboring card, regardless of what
     causes it (a user's larger system font-size setting, a future long
     product name, anything) -- not a fix for one specific element, a
     guarantee for the whole card. Checked against every child that's
     deliberately positioned near/at the card edge (.product-image-wrap's
     own bleed margin goes exactly to the card's padding edge, never past
     it; .wishlist-icon/.offer-badge corner placements stay inside the
     border) -- none of them relies on overflowing this boundary, so this
     has no visible effect on any of them, only on content that
     shouldn't be escaping in the first place. */
  overflow: hidden;
}

/* Hides the 3 temporary four-pack preview cards (see
   FOUR_PACK_PREVIEW_CARDS in home-page.js) everywhere by default --
   they're not real catalogue products. Only the mobile-scoped override
   inside .all-products-grid (below, in the max-width:640px block) ever
   shows them, so desktop never renders them at all. */
.product-card--preview-demo {
  display: none;
}

/* No fixed min-height on the title/size/price below: the grid row already
   stretches every card in the SAME row to match its tallest sibling
   (CSS Grid's default align-items:stretch), and .add-to-cart-form's
   margin-top:auto below absorbs whatever gap that leaves before the
   buttons. A site-wide min-height instead reserved the same blank space
   on every card regardless of its actual row partner, which is the
   "large blank area just to equalize heights" pattern to avoid. */
/* 2-line clamp (previously mobile-only) now applies at every breakpoint --
   found via a real stress test with a long product title: at tablet/
   desktop widths, an unclamped title could wrap to many lines and push
   the card well past its hard-maximum height. min-height reserves room
   for a full 2 lines regardless, so 1-line and 2-line titles don't leave
   sibling cards at different heights within a row. */
.product-card h3 {
  font-size: 1rem;
  margin: 0 0 0.25rem;
  min-height: 2.4em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card .size {
  margin: 0 0 0.25rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.product-card .summary {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0 0 0.25rem;
}


/* Pushes the purchase buttons + marketplace row to a consistent position
   near the bottom of every card, however much text sits above it. */
.product-card .add-to-cart-form {
  margin-top: auto;
}

/* At 2-per-row on a ~390px phone, each card is roughly 170px wide --
   about half its previous single-column width. Every internal element
   needs to shrink to stay legible at that width, not just the grid. */
@media (max-width: 640px) {
  .product-card {
    padding: 0.6rem;
  }

  /* Reduced again, from 0.5rem to 0.4rem -- image dimensions themselves
     (aspect-ratio, width) are untouched, only the gap below the image is
     tightened further per a later "slightly more" instruction.
     Top/left/right -0.6rem added here to match .product-card's own
     0.6rem padding at this breakpoint (the base rule's -1rem would
     under-bleed here, since the card's own padding shrinks to 0.6rem on
     mobile) -- same flush-to-edge technique as the base rule above,
     just re-matched to this breakpoint's actual padding value. Bottom
     stays the pre-existing 0.4rem, unchanged. 2026-10-24: moved from
     .product-image-placeholder to .product-image-wrap, which now owns
     the bleed margin. */
  .product-card .product-image-wrap {
    margin: -0.6rem -0.6rem 0.4rem -0.6rem;
  }

  /* Mobile gets a taller ratio than tablet/desktop's 1.09 (above) --
     removing the in-flow badge freed more room relative to card height
     here specifically, confirmed via a real measurement (see the
     implementation report), with a safety margin against the hard
     maximum card height. */
  .product-card .product-image-placeholder,
  .product-card .product-image {
    aspect-ratio: 1 / 1.13;
  }

  /* min-height still reserves room for a full 2 lines (unchanged, keeps
     card/button-row heights consistent across siblings with 1-line vs.
     2-line titles); line-clamp is new and handles the opposite case --
     a title long enough to wrap to a 3rd+ line gets cut with an ellipsis
     instead of growing the card. */
  .product-card h3 {
    font-size: 0.8rem;
    min-height: 2.1em;
    margin-bottom: 0.15rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .product-card .size {
    font-size: 0.7rem;
    margin-bottom: 0.15rem;
  }

  /* The summary line is secondary/redundant with the title at this size
     and is the first thing to go to keep the card from feeling cramped --
     it's still shown in full on the product detail page. */
  .product-card .summary {
    display: none;
  }

  /* Tightened from the inherited 0.25rem/0.5rem split -- this and the
     price/feedback margins below are the real fix for the "excessive
     gap" complaint: .rating-placeholder is a styled <div> so its base
     margin was at least deliberate, but see .price and
     .add-to-cart-feedback further down for two that had NO margin
     override at all and were silently inheriting the browser's default
     <p> margin (1em top AND bottom, computed against each one's own
     font-size) -- confirmed via a real measurement: .price alone carried
     16px top + 16px bottom of pure, unintentional whitespace. */
  .product-card .rating-placeholder {
    font-size: 0.7rem;
    flex-wrap: wrap;
  }

  .product-card .rating-badge-row {
    margin: 0.08rem 0 0.15rem;
  }

  /* Fallback placement (spec section 5): at this hard-capped 174px card
     width, real measurement showed the price row doesn't have room for
     both prices and the badge on one line for anything beyond the
     shortest test price (₹299/₹1) -- a ₹12,999/₹9,999 pair plus the
     badge needs ~190px, well past the ~155px actually available inside
     the card's padding. Swap to the rating-row copy here instead, same
     76x22px dimensions, never on the image, never overlapping the stars
     or numeric rating. Tablet/desktop keep the primary (price-row)
     placement -- confirmed via measurement that those widths have room
     to spare across the full price range. */
  .product-card .offer-badge--price {
    display: none;
  }

  .product-card .offer-badge--rating {
    display: inline-flex;
  }

  /* Measured regression found while verifying this fallback: with the
     badge now sharing the rating row, the stars + "4.5" + "Preview" no
     longer fit the remaining ~80px on one line, so the (already
     flex-wrap:wrap) .rating-placeholder wrapped "Preview" onto its own
     second line, growing the card past its hard-maximum height. The
     "Preview" tag is purely decorative (aria-hidden="true" in
     home-page.js) -- the real, accessible "temporary display rating, not
     a verified review" wording lives on .rating-placeholder's own
     aria-label regardless, so hiding it here visually, only when the
     badge is also present, loses no information for assistive tech.
     flex-wrap:nowrap + min-width:0 on the placeholder (rather than
     leaving it free to wrap) is what actually stops the second line from
     reappearing. The stars/number below are also shrunk slightly (not
     just "Preview" hidden) -- a first attempt relied on overflow:hidden
     as a safety net instead, which a real screenshot showed was actually
     CLIPPING the "4.5" rating number's trailing digit whenever the badge
     text was long -- removed in favour of genuinely fitting the content,
     confirmed via real measurement across the full ₹298-₹3000 badge text
     range, not assumed. */
  .product-card .rating-badge-row .rating-placeholder {
    flex: 1 1 auto;
    flex-wrap: nowrap;
    min-width: 0;
    gap: 0.25rem;
  }

  .product-card .rating-badge-row .demo-rating-tag {
    display: none;
  }

  .product-card .rating-badge-row .demo-stars {
    font-size: 0.95em;
    letter-spacing: 0.02em;
  }

  .product-card .rating-badge-row .demo-rating-number {
    font-size: 0.75rem;
  }

  /* #168653 ("parrot/leaf green") per explicit instruction, with the
     existing font-weight:bold (from the base .price rule) already giving
     the "clear font weight" also asked for -- contrast against the
     card's white background is well above WCAG AA for this text size.
     Scoped to .product-card, not the bare .price class, so the product
     detail page's own (larger) price display is untouched -- same reason
     every other card-only color/spacing rule here is scoped this way.
     display:flex (was block) applies to BOTH the real price <p> and the
     price-demo <p> (every .price element shares this base styling) --
     needed so the "20% OFF" badge further down can use margin-left:auto
     to sit at the row's right edge without an extra wrapper element. */
  .product-card .price {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.25rem;
    font-size: 1rem;
    color: #1F1F1F;
  }

  .product-card .product-price-row {
    margin: 0.1rem 0;
  }

  /* Removed 2026-10-24: this used to hide the real <p class="price"> on
     mobile whenever a sibling .price-demo wasn't present, on the
     assumption that DEMO_PRICING_PREVIEW would always be enabled to
     provide one. It's disabled (home-page.js), and has been for a while
     -- so this rule was silently hiding every real price, for every
     product, on every mobile device, with nothing shown in its place.
     Found while verifying the new real purple offer badge (which lives
     inside this same .price element) didn't render on mobile. Real
     prices, and the badge, now show on mobile exactly as they always
     have on desktop. */

  /* Static "20% OFF" design badge -- explicit instruction, design/demo
     only, no discount math, no admin control yet (that's a separate,
     later phase). Pure CSS, no markup change in home-page.js at all:
     ::after on the price-demo line itself, so this entire feature is
     exactly one block to delete later with zero risk of leaving stray
     HTML behind. Targets .price-demo specifically (not the old
     :not(.price-unconfirmed) on the generic .price) now that every card
     shows the same demo block -- the real, possibly-unconfirmed price is
     already hidden above regardless, so this never has to reason about
     "Price pending confirmation" text at all any more.
     margin-left:auto (flex item on the shared .price row above) pushes
     it to the row's right edge -- "the currently available white space
     beside the price" -- rather than it being pinned to the price text
     itself; flex-shrink:0 and white-space:nowrap keep it from ever being
     the thing that compresses/wraps if space gets tight. Fits with real
     room to spare even with both the ₹399/₹99 price pair AND this badge
     on the same line -- confirmed via a real measurement, not just
     visual inspection. Accent purple (#8E6BD9, approved cream-theme
     palette, replacing the earlier #6A1B9A) with white text comfortably
     clears WCAG AA contrast at this size. */
  .product-card .price-demo::after {
    content: "20% OFF";
    margin-left: auto;
    flex-shrink: 0;
    /* 2026-10-31: matches .offer-badge's new restrained red -- was purple
       #8E6BD9, keeping both discount-style badges on the same color. */
    background: #C62828;
    color: #fff;
    font-size: 0.55rem;
    font-weight: bold;
    line-height: 1;
    padding: 0.2rem 0.35rem;
    border-radius: 999px;
    white-space: nowrap;
    animation: offer-badge-fade-in 0.25s ease-out;
  }

  /* One-time entrance only (no infinite/repeat) -- explicit instruction
     allows a brief fade/scale-in but rules out continuous pulsing,
     flashing, or bouncing. */
  @media (prefers-reduced-motion: reduce) {
    .product-card .price-demo::after {
      animation: none;
    }
  }

  /* Was display:block -- "do not add a GST/delivery explanatory line to
     homepage cards" per explicit instruction. 2026-10-24: now hidden on
     every card breakpoint, not just mobile (see the unscoped
     .product-card .price .price-note rule) -- found via a real stress
     test that without this, a 5-digit price ("₹12999 ₹9999") plus this
     note's text no longer fit one line at tablet/desktop card widths
     either, wrapping the price row to 2 lines and pushing the card past
     its hard-maximum height. */

  /* Both the buttons and the (usually-empty) feedback line below them are
     removed on mobile per explicit instruction -- "including the
     vertical space they occupy", which display:none satisfies directly
     (zero height, not just hidden). Markup is untouched (same
     <form>/<button> elements as always), so desktop keeps full Add to
     Cart / Buy Now functionality exactly as before -- this is mobile-only.
     The whole card becomes the tap target to the product page instead
     (see .card-media-link::after below), the standard "tap the card,
     dedicated buttons live on the product page" mobile commerce pattern. */
  .product-card .add-to-cart-form {
    display: none;
  }

  .product-card .add-to-cart-feedback {
    display: none;
    margin: 0;
  }

  /* Needs its own stacking context above .card-media-link::after's
     full-card overlay (added further down) so its real marketplace links
     stay independently clickable instead of being caught by the card-wide
     tap target. position:relative with no offset doesn't move it from its
     normal-flow position -- only enables the z-index.

     margin-top:auto (was a fixed 0.4rem): the base .product-card
     .add-to-cart-form rule a few lines up carries margin-top:auto to push
     the trailing content to the bottom of the (grid-stretched) card --
     but that form is display:none on mobile, and an auto margin on a
     display:none element has no effect at all, since it's removed from
     the flex formatting context entirely. Confirmed via a real
     measurement before this fix: two grid-stretched cards of IDENTICAL
     height, differing only in title text length, had their marketplace
     rows 11.5px apart vertically -- the row was just following the
     shorter natural content flow instead of being pushed down. Moving
     the auto margin onto .marketplace-row itself (the last element
     that's actually visible on mobile) fixes this at the source, for any
     combination of title/size/description length, not just today's
     catalogue data. padding-top (0.35rem) still guarantees a minimum gap
     above the row even when the auto margin collapses to 0. */
  .product-card .marketplace-row {
    /* 2026-10-27: 0.25rem -> 0.15rem, explicit instruction -- real
       measurement at a 320px viewport (iPhone SE-class width) found
       "amazon"/"Flipkart"/"meesho" clipping even after removing the
       accent icon (home-page.js's renderMarketplaceRow() no longer
       renders one, see its own comment) -- the icon wasn't actually the
       bottleneck here, since .marketplace-link's flex:1 1 0 gives each
       button an equal THIRD of the row regardless of its content; the
       real constraint is this row's own total width at a 2-cards-per-row,
       320px-viewport card (measured: a 139px-wide card, 118px row). This
       small gap reduction, plus the padding/font tweaks just below, close
       that real, measured gap. */
    gap: 0.1rem;
    margin-top: auto;
    padding-top: 0.35rem;
    position: relative;
    z-index: 2;
  }

  .product-card .marketplace-link {
    /* 2026-10-27: horizontal padding 0.2rem -> 0.08rem and font-size
       0.6rem -> 0.54rem, explicit instruction ("suitable font sizes,
       balanced padding... instead of shrinking the text too much") --
       both are small, deliberately kept modest specifically so the text
       itself isn't shrunk more than this (a ~10% font reduction, not a
       drastic one). Combined with the row gap reduction above, this
       closes a real, measured shortfall at a 320px viewport -- the
       first, smaller padding/font/gap combination tried here (0.12rem/
       0.56rem/0.15rem) still clipped by ~1-4px once this rule's own
       1.75px border (set per-platform further down, e.g.
       .marketplace-amazon) was counted; that border cost wasn't in the
       first pass's own working-out, caught by testing against the real
       page rather than trusting the arithmetic alone. Vertical padding
       is untouched -- it was never the bottleneck. No icon gap needed
       anymore (home-page.js's renderMarketplaceRow() no longer renders
       one into this row at all -- product-page.js's own compact row is
       untouched and still uses its icon+gap, unaffected by this rule,
       which is scoped to .product-card only).
    */
    padding: 0.25rem 0.08rem;
    font-size: 0.54rem;
  }

  /* 2026-10-29: the homepage/related-products wishlist heart (and the
     mobile-scoped solid-heart-glyph trick that used to live here) was
     removed from renderCard() entirely -- see home-page.js's own comment
     on that change for why. This rule now only needs to keep the
     card-wide stretched tap target working; the z-index reasoning below
     is only about that, not about coexisting with a wishlist button that
     no longer exists in this component. Makes the WHOLE card a tap
     target to the product page, not just the image+title that
     .card-media-link visually wraps -- explicit instruction, now that
     the card-level Add to Cart/Buy Now buttons are gone above. Standard
     "stretched link" CSS technique: a ::after pseudo-element, absolutely
     positioned, with no positioned ancestor closer than .product-card
     itself (.card-media-link stays position:static, untouched) -- so
     inset:0 sizes it to the whole card, not just the <a>'s own in-flow
     box. The <a>'s VISIBLE content (image, title) is completely
     untouched and stays exactly where it already renders; this only
     extends what's clickable. z-index:1, one below .marketplace-row's
     z-index:2, so that one keeps working as its own separate tap target
     instead of being swallowed by this one. Mobile only -- desktop's
     .card-media-link has no ::after override, so there the link still
     only covers image+title, exactly as before. Non-real (pending) cards
     have no .card-media-link element at all (see renderCard() in
     home-page.js), so this rule simply doesn't apply there -- never a
     link to a page that doesn't exist. */
  .product-card .card-media-link::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
  }
}

/* Used by .product-card .price:not(.price-unconfirmed)::after above --
   kept at the top level (not nested in that media query) since @keyframes
   only needs to be declared once and referencing it from inside a
   mobile-scoped rule works regardless of where the definition itself
   lives. */
@keyframes offer-badge-fade-in {
  from {
    opacity: 0;
    transform: scale(0.85);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Reserves room so the title never renders underneath the absolutely-
   positioned wishlist icon in the corner (confirmed via a real screenshot:
   without this, "Ayurvedic Herbal Hair Oil" overlapped/clipped behind it).
   min-height (2026-10-29 UI touch-up) is the icon's own full footprint --
   its base rule's top:0.6rem offset + 2rem height, both further down this
   file -- so whatever comes after the title (.rating-price-row, carrying
   the purple .offer-badge) never starts before the icon's bottom edge
   either. Confirmed via real measurement this was a genuine few-px
   overlap on a short, single-line title at mobile widths (the icon, at a
   fixed 2rem/32px, is taller than one line of this title's mobile
   font-size): a short title's own box was shorter than the icon's
   footprint, so content below it started too soon. rem-based, matching
   the icon's own rem-based box model exactly, rather than a breakpoint-
   specific pixel guess -- correct at every width a title might render at,
   and a no-op wherever the title is already taller than this (a longer,
   wrapped title, or the larger desktop font-size, both already clear it
   on their own, confirmed via the same measurement). */
.product-purchase-panel h1 {
  padding-right: 2.75rem;
  min-height: 2.6rem;
}

.wishlist-icon {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 2rem;
  height: 2rem;
  line-height: 1;
  padding: 0;
  font-size: 1.1rem;
  color: var(--muted);
  cursor: not-allowed;
}

.card-media-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.card-media-link:hover h3 {
  color: var(--forest-green);
}

/* No "Also on" (or any other) label text here -- removed permanently from
   the markup itself (home-page.js), not just hidden with CSS. The three
   badges alone, directly on the card, are self-explanatory. */
.marketplace-row {
  margin-top: 0.75rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: stretch;
  gap: 0.4rem;
  font-size: 0.75rem;
}

/* Base marketplace-badge shape; real brand colors are applied further down
   (after the generic .button rule, so they aren't overridden by it when
   combined on the detail page's affiliate buttons).
   Equal width (flex: 1) and centered text -- all three badges always get
   identical size/spacing/border treatment, on every card, at every
   breakpoint, whether 2 are active links and 1 is pending or any other
   combination -- never one badge stretching alone while others don't. */
/* font-weight:600 (was the browser's generic "bold"/700) gives these a
   slightly more deliberate, "set" wordmark feel instead of plain coloured
   text. letter-spacing and line-height are deliberately left alone (not
   set explicitly) -- both were tried and both measurably changed the
   button's footprint (letter-spacing:0.01em widened it ~0.6px;
   line-height:1 shrank its height from 22.4px to 17.6px), directly
   against "keep the exact existing button width/height." Footprint
   (flex/gap/border-radius/padding, and every mobile-scoped padding/
   font-size override further down) is otherwise completely untouched, so
   button width/height/overall size is identical to before this change --
   confirmed via a real measurement, not assumption. */
.marketplace-link {
  flex: 1 1 0;
  /* Without this, a flex item's default min-width:auto floors its shrink
     at its CONTENT's own min-content width -- with the accent icon (fixed
     size, can't shrink) plus white-space:nowrap label text, that floor was
     wider than the card itself, so flex:1 1 0 was never actually honored
     and the row overflowed its card on narrow screens (confirmed via a
     real measurement: the row's own box fit, but the individual links'
     combined natural width didn't, and page overflow-x appeared). This is
     THE fix -- .marketplace-link-label's own overflow:hidden/ellipsis
     further down can only do anything once this lets the item shrink
     below its content's natural width in the first place. */
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  border-radius: 6px;
  padding: 0.4rem 0.35rem;
  font-weight: 700;
  text-decoration: none;
  text-align: center;
  box-shadow: 0 1px 2px rgba(20, 20, 20, 0.06);
  transition: transform 0.12s ease-out, box-shadow 0.12s ease-out, border-color 0.12s ease-out, background 0.12s ease-out;
}

.marketplace-link-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Subtle, light feedback only -- no heavy animation. A lift + stronger
   shadow (not filter:brightness, which barely reads against a near-white
   card background) -- each platform's own :hover rule above already
   handles the border/background tint. */
a.marketplace-link:hover,
a.marketplace-link:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(20, 20, 20, 0.12);
}

a.marketplace-link:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(20, 20, 20, 0.06);
}

/* Disabled (no real URL configured yet): keeps the real brand color
   (matches the approved reference's colored badge appearance) --
   inactivity is conveyed by cursor/tooltip and the small "not linked" dot,
   not by desaturating the badge into grey, and it never animates on
   hover/tap since it isn't a real link. */
.marketplace-link-pending {
  cursor: not-allowed;
  position: relative;
}

.marketplace-link-pending::after {
  content: "";
  position: absolute;
  top: -2px;
  right: -2px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--bg-main);
  border: 1.5px solid currentColor;
}

.marketplace-external-icon {
  vertical-align: middle;
  flex-shrink: 0;
  opacity: 0.85;
}

.affiliate-button .marketplace-external-icon {
  margin-left: 0.4rem;
}

/* A deliberately-designed placeholder, not a bare dashed "under
   construction" box -- a soft gradient + solid rounded border reads as
   part of the page design. The icon + "Image coming soon" text stay
   exactly as honest as before; only the container's polish changed.

   negative top/left/right margin (-1rem, matching .product-card's own
   1rem padding exactly) makes this bleed flush to the card's inner
   top/left/right edges -- there's no padding on this element itself to
   zero out; the visible gap on those three sides was always the parent
   .product-card's own padding showing through, confirmed by inspecting
   the computed styles before making this change. Bottom margin (0.75rem)
   is the exact pre-existing value, left untouched, so the gap below the
   image before the title is unchanged. Both this element's own
   border-radius (10px) and the card's (10px) are identical, so the
   bled top-left/top-right corners align with the card's own rounded
   corners exactly rather than poking a square corner past them. */
/* 2026-10-24: the bleed-to-card-edge negative margin moved to the new
   .product-image-wrap (below) -- this element now just fills that
   wrapper completely. aspect-ratio grown from 1/1 to 1/1.09 (tablet/
   desktop; mobile gets its own, larger override further down), computed
   from the real measured vertical room the removed in-flow badge freed
   up at these breakpoints, with a small safety margin -- verified against
   the actual rendered card height afterward (see the implementation
   report), not assumed from the math alone. */
/* .product-image (2026-10-25, image-wiring): a real Admin-Panel-uploaded
   photo, rendered in place of .product-image-placeholder once a product
   has one. Shares this exact selector list with the placeholder for
   every box-model property (border/radius/aspect-ratio) so the two are
   never able to drift apart and silently change the card's measured
   dimensions -- only object-fit/display/width below are image-specific. */
.product-image-placeholder,
.product-image {
  border: 1px solid var(--border);
  border-radius: 10px;
  aspect-ratio: 1 / 1.03;
}

.product-image-placeholder {
  background: #FFFDF8;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.product-image {
  display: block;
  width: 100%;
  /* contain, not cover: cover crops whatever doesn't fit the card's fixed
     aspect-ratio box, which visibly cut off portrait/landscape product
     photos (herbs/product not fully visible). contain always shows the
     complete image, letterboxed/pillarboxed within the same box instead
     -- the box's own size/border/border-radius are unchanged, only how
     the image fits inside it. Matches .product-image-placeholder's own
     background so the letterbox space reads as deliberate, not a bug. */
  object-fit: contain;
  background: #FFFDF8;
}

/* Wraps .product-image-placeholder so the corner offer badge (below) has
   a position: relative anchor to sit against, as a real DOM sibling of
   the aria-hidden placeholder rather than a descendant of it (aria-hidden
   cascades to descendants with no way to opt a child back in, and the
   badge's "₹X OFF" text must stay real, announced content). Takes over
   the placeholder's old bleed-to-card-edge negative margin unchanged. */
.product-image-wrap {
  position: relative;
  margin: -1rem -1rem 0.75rem -1rem;
}

.product-image-placeholder span {
  color: var(--muted);
  font-size: 0.8rem;
}

.breadcrumb {
  margin: 1rem 0 0.5rem;
  font-size: 0.875rem;
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.breadcrumb li:not(:last-child)::after {
  content: "›";
  margin-left: 0.35rem;
  color: var(--muted);
}

.breadcrumb a {
  color: var(--forest-green);
}

.breadcrumb li[aria-current="page"] {
  color: var(--muted);
}

.product-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.25rem;
}

@media (min-width: 768px) {
  .product-detail-layout {
    /* Equal columns. 0.85fr measured out too narrow in a real browser --
       at that width the gallery column couldn't fit the 340px main image
       plus a usable thumbnail strip at the same time, so the thumbs got
       squeezed down to ~26px slivers. Confirmed fixed below via real
       bounding-box measurements, not just visual inspection. */
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
  }
}

.product-purchase-panel {
  position: relative;
}

/* 2026-10-26: holds .product-gallery + the "More Videos" thumbnail row
   together as ONE grid item (same column .product-gallery alone used to
   occupy) -- min-width:0 for the exact same reason .product-gallery
   itself needs it just below (a grid item's default min-width:auto would
   stop this from shrinking below its content's natural width, which
   would stop .gallery-thumbs' own overflow-x:auto from ever actually
   kicking in). This wrapper changes nothing about .product-gallery's own
   CSS/behavior or about .product-detail-layout's 2-column grid --
   .product-purchase-panel stays exactly where and how it already was. */
.product-gallery {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0; /* otherwise this won't shrink below its content's natural
    width on narrow screens, and overflow-x:auto on .gallery-thumbs below
    never gets a chance to actually kick in -- classic flex/grid gotcha. */
}

/* Desktop: thumbnails as a compact vertical strip to the left of the main
   image (matching the approved reference), instead of a full-width row
   underneath it eating vertical space. Mobile keeps the horizontal
   scrollable row below the image -- more thumb space is wasted in a
   narrow vertical strip on a narrow screen. */
@media (min-width: 768px) {
  .product-gallery {
    flex-direction: row-reverse;
    align-items: flex-start;
  }

  .gallery-thumbs {
    flex-direction: column;
    overflow-x: visible;
    overflow-y: auto;
    max-height: 340px;
    /* Fixed width, not left to the flex-shrink algorithm -- that's what
       squeezed this strip down to ~26px slivers before: as a flex item in
       a row, a column's width isn't governed by its children's widths the
       way flex-basis governs the main axis, so it shrank to fill whatever
       space .gallery-main's fixed 340px left over. */
    flex: 0 0 56px;
    width: 56px;
  }

  .gallery-thumb {
    width: 48px;
  }

  .gallery-thumb img {
    width: 44px;
    height: 44px;
  }
}

.gallery-main img {
  /* Sizing comes entirely from .gallery-main's own width/aspect-ratio below
     -- this used to also set max-width/aspect-ratio itself, which fought
     with .gallery-main's own box and made the image overflow its container
     by ~100px, physically overlapping (and blocking real clicks on) the
     thumbnail row underneath it. */
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 10px;
}

/* display:block only when NOT hidden -- an unconditional display here would
   override the browser's native [hidden] -> display:none behaviour, which
   is exactly the bug just fixed for .gallery-video-embed above. The image
   is toggled hidden/shown via JS when the video tile is clicked. */
.gallery-main img:not([hidden]) {
  display: block;
}

/* 2026-10-27: NEW wrapper around the existing, byte-for-byte unchanged
   .gallery-main below -- added specifically so the video thumbnail row
   (nested inside this frame, as .gallery-main's sibling, in
   renderGallery()) can be positioned exactly 8px below .gallery-main's
   OWN bottom edge via position:absolute, regardless of .gallery-thumbs'
   height (see renderGallery()'s own comment on why a simpler flex-gap
   approach didn't hold up in a real, reproducible case). This frame
   duplicates .gallery-main's own max-width/flex-shrink (base rule) and
   max-width/flex (mobile override, further down) -- NOT because
   .gallery-main changed, but because THIS element, not .gallery-main, is
   now the direct flex item inside .product-gallery, so it needs the same
   sizing .gallery-main always had, as a direct copy, so .gallery-main
   and .gallery-thumbs render at the exact same positions/sizes as
   before. margin-bottom reserves exactly enough extra space below this
   flex item for the video row's own height (~41px) + its 8px gap, so
   whatever comes after .product-gallery in the page (the title, on
   mobile's single-column layout) never gets visually covered by the
   row -- a margin (not padding) deliberately, so it doesn't also shift
   what "100%" means for the row's own absolute top:100% positioning
   inside this frame. */
.gallery-main-frame {
  position: relative;
  max-width: 340px;
  flex-shrink: 0;
  min-width: 0;
  margin-bottom: 54px;
}

.gallery-main {
  position: relative;
  width: 100%;
  /* Reduced from 500px -- the main image was disproportionately large
     relative to the title/price/buttons column next to it. */
  max-width: 340px;
  /* The single source of the gallery box's size -- keeps it even when the
     image is hidden (video shown): the image is display:none then, so
     without this the container would collapse to zero height and the
     absolutely-positioned video would too. */
  aspect-ratio: 1 / 1;
  cursor: zoom-in;
  overflow: hidden; /* clips the magnified image to the frame instead of spilling out */
  flex-shrink: 0;
  /* 2026-11-05 (swipe gallery): tells the browser a horizontal drag here
     is handled by JS (gallery.js), not the browser's own pinch-zoom/pan
     gestures, while explicitly still allowing (pan-y) native vertical
     scrolling -- the actual fix for "vertical page scroll must stay
     normal, swipe must never zoom/scroll the page". No size/ratio/
     position change -- purely a touch-gesture hint. */
  touch-action: pan-y;
}

/* Mobile gallery layout, per explicit reference: vertical thumbnail strip
   on the LEFT, main image immediately to its right -- row-reverse (same
   technique the desktop >=768px rule below already uses), not the
   previous centered-stack-with-horizontal-thumbs-below arrangement.
   .product-gallery's own available width at 390px measured 324px (16px
   .product-detail padding x2 inside 16px <main> padding x2, confirmed via
   a real measurement, not assumed); 44px for the thumb column (same
   44px-image-in-a-48px-button math as the desktop rule, just without
   that rule's extra breathing room) + 8px gap leaves 272px for the main
   image -- still a clearly visible square, not the cropped sliver this
   would become without capping the thumb column's width explicitly.
   flex:1 1 0 (overriding the base rule's width:100%/flex-shrink:0 for
   this breakpoint) lets it fill exactly that remaining space rather than
   trying to be 100% of some other box; align-items:flex-start on
   .product-gallery below means nothing stretches this to a different
   height than aspect-ratio:1/1 dictates from that width, so the image is
   never cropped or distorted. */
@media (max-width: 640px) {
  .product-gallery {
    flex-direction: row-reverse;
    align-items: flex-start;
  }

  .gallery-main {
    max-width: none;
    width: auto;
    flex: 1 1 0;
    margin: 0;
  }

  /* .gallery-main-frame (the actual flex item now, see its own base-rule
     comment) gets the same max-width/flex override .gallery-main itself
     gets here -- margin-bottom (the video row's reserved space) is set
     once in the base rule and intentionally NOT overridden here. */
  .gallery-main-frame {
    max-width: none;
    flex: 1 1 0;
  }

  /* Top/right border removed, left/bottom left exactly as the base rule
     above already set them (1px solid var(--border)) -- explicit
     instruction to change only 2 of the 4 sides, not redesign the whole
     frame. border-radius (10px, all 4 corners) is untouched too: the box
     shape/size/aspect-ratio/object-fit are unaffected by which sides
     happen to have a visible border line. */
  .gallery-main img {
    border-top: none;
    border-right: none;
  }

  /* Caps the mobile thumbnail strip at exactly 5 real items (this
     product's own image count) by hiding the video thumbnail -- never
     added as item 1 in the first place, since OIL_YOUTUBE_URL in
     product-page.js is still empty (no real YouTube link/asset exists
     yet). Per explicit instruction, a missing real video means it's
     left out entirely here rather than kept as a fake/placeholder first
     slot. Desktop is untouched -- this rule only applies inside this
     mobile media query, so the video thumbnail still shows there exactly
     as before. */
  .gallery-video-thumb {
    display: none;
  }
}

.gallery-main img {
  /* opacity added 2026-11-05 (swipe gallery) for a smooth image-swap
     transition on both thumbnail tap and swipe -- transform (zoom) was
     already here, untouched. Same element, same size/ratio/position;
     only ever the src/alt, a short transform (drag-follow/slide-in),
     and this opacity change on a swap. gallery.js toggles this
     transition off/on with inline style.transition during a drag and
     the instant "place the new image off to the side" step, specifically
     so the live drag-follow and the final slide-in snap never fight this
     default -- see that file's own comment.
     touch-action repeated here (not just on the .gallery-main wrapper
     above): 2026-11-06 root-cause fix for a real reported bug ("gallery
     feels locked after reversing swipe direction on a real Android
     phone") -- the wrapper's touch-action is supposed to cover this
     child too per the touch-action spec's ancestor-chain rule, but real
     Android Chrome was observed treating the gesture as its own native
     scroll before this element's own value was considered, racing
     against (and sometimes winning over) this file's JS-side
     preventDefault(). Setting it directly on the actual touch target
     removes that ambiguity. Still pan-y only -- vertical scroll is
     never affected. */
  touch-action: pan-y;
  transition: transform 0.15s ease-out, opacity 0.15s ease-out;
}

.gallery-main img.zoomed {
  transform: scale(2.2);
  cursor: zoom-out;
}

/* A small always-visible hint that the image can be zoomed, since a
   hover-only affordance (the cursor) isn't visible on a touch device. */
.gallery-main::after {
  content: "Zoom";
  position: absolute;
  bottom: 0.5rem;
  right: 0.5rem;
  background: rgba(255, 255, 255, 0.9);
  color: var(--muted);
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  pointer-events: none;
}

.gallery-thumbs {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
  min-width: 0;
  scroll-snap-type: x proximity;
}

.gallery-thumb {
  background: var(--card-bg);
  border: 2px solid var(--border);
  border-radius: 8px;
  padding: 2px;
  flex: 0 0 auto;
  scroll-snap-align: start;
}

.gallery-thumb img {
  display: block;
  width: 56px;
  height: 56px;
  object-fit: contain;
}

/* Vertical left-hand thumbnail column on mobile (see the .gallery-main
   mobile rule above for the full reasoning/measurements) -- replaces the
   previous centered horizontal row below the image. Same proportions as
   the desktop >=768px rule (44px image in a 48px... here 36px image in a
   44px button, scaled down to fit the narrower 390px column), same
   vertical-scroll-if-needed behaviour via max-height/overflow-y, so a
   product with more thumbnails than fit still scrolls instead of
   overflowing past the main image or the viewport. */
@media (max-width: 640px) {
  .gallery-thumbs {
    flex-direction: column;
    overflow-x: visible;
    overflow-y: auto;
    max-height: 272px;
    flex: 0 0 44px;
    width: 44px;
    max-width: none;
    margin: 0;
    justify-content: flex-start;
  }

  .gallery-thumb {
    width: 40px;
  }

  .gallery-thumb img {
    width: 36px;
    height: 36px;
  }
}

.gallery-thumb.active {
  border-color: var(--muted-gold);
}

/* Product Media Manager (2026-10-26): the gallery no longer has its own
   video area -- see .product-video-section/.product-video-frame further
   down for the one real video section the page now has. This rule (and
   .video-placeholder-text, still used by that section's own "coming
   soon" text) is kept here as the one shared "muted, italic placeholder
   text" style, reused wherever this project needs that exact look. */
.video-placeholder-text {
  color: var(--muted);
  font-style: italic;
}

.rating-placeholder {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.25rem 0 0.5rem;
}

/* Permanent (2026-10-24) temporary-display-rating row -- visible on every
   viewport now, not just mobile (see renderRatingSlot() in home-page.js /
   renderProductRating() in product-page.js, which each render exactly
   ONE rating element per card -- never two competing ones needing a CSS
   toggle between them, unlike the earlier disabled-by-default version
   this replaces). */
.rating-demo {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

/* Two stacked copies of the same 5-star glyph row -- a muted/empty
   background layer plus a gold "filled" layer clipped to a percentage
   width (set inline per-product in home-page.js, e.g. 90% for a 4.5/5
   rating) -- so partial ratings render as a precisely partial-filled
   star, not just rounded to a whole star. .demo-stars shrink-wraps
   exactly to the 5-star text's own width (ordinary inline-block sizing,
   driven only by the in-flow .demo-stars-bg layer, since .demo-stars-fill
   is taken out of flow by position:absolute), so the fill percentage is
   always relative to the full 5-star width, never to some other box.
   Same star glyph and gold color as the plain outline-star placeholder
   elsewhere on the site, just filled instead of empty, so it reads as
   the same design language. */
.demo-stars {
  position: relative;
  display: inline-block;
  line-height: 1;
  font-size: 1.1em;
  letter-spacing: 0.1em;
  color: var(--border);
}

.demo-stars-bg {
  white-space: nowrap;
}

/* #F28C28 per explicit instruction ("clear, premium orange"), specific to
   the demo-rating stars only -- deliberately NOT applied to the plain
   outline-star "No reviews yet" placeholder elsewhere (.rating-placeholder
   .stars), which isn't really "a rating" and stays its existing muted
   color. No media-query scoping needed here: this element is already
   display:none on desktop via .rating-demo's own base rule above, so its
   color is simply never visible there regardless. */
.demo-stars-fill {
  position: absolute;
  top: 0;
  left: 0;
  overflow: hidden;
  white-space: nowrap;
  color: #F28C28;
}

.demo-rating-number {
  font-weight: bold;
  color: var(--text);
}

.demo-rating-tag {
  color: var(--muted);
  font-style: italic;
  font-size: 0.85em;
}

.price-purchase-group {
  margin-top: 0.5rem;
}

/* Hidden everywhere by default -- only the mobile override below shows
   it (and hides the real price in exchange). Desktop therefore always
   renders the real, unmodified price from renderPrice(), untouched. */
.price-demo-row {
  display: none;
}

.price-original-demo {
  color: #777777;
  text-decoration: line-through;
  font-size: 0.85rem;
  font-weight: normal;
}

.price-selling-demo {
  color: #1F1F1F;
  font-weight: bold;
}

.price-badge-demo {
  /* 2026-10-31: matches .offer-badge's new restrained red -- was purple #8E6BD9. */
  background: #C62828;
  color: #fff;
  font-size: 0.6rem;
  font-weight: bold;
  line-height: 1;
  padding: 0.2rem 0.4rem;
  border-radius: 999px;
  white-space: nowrap;
}

.discount-pending-note {
  margin: 0.15rem 0 0.75rem;
}

/* Hidden outside mobile by default -- desktop keeps the plain native
   number input exactly as it was before this change (no minus/plus
   buttons visible there). Without this, the two new <button> elements
   (markup now unconditional, same on every width) would pick up the
   generic sitewide .button,button rule's green pill styling, since the
   real segmented-control treatment for them is mobile-scoped further
   down -- confirmed via a real measurement before adding this rule: the
   buttons rendered as solid green pills next to a plain input on
   desktop, a visible regression this fixes. The mobile media query
   below turns display back to inline-block there. */
.qty-step {
  display: none;
}

/* Tighter vertical rhythm specifically for the title -> rating -> price ->
   quantity -> buttons group on mobile -- these are meant to read as one
   tightly-related block, not spaced like independent page sections. */
@media (max-width: 640px) {
  /* 1.15rem (was the base rule's 1.75rem) -- confirmed via a real
     measurement (a detached probe element, same font/weight, independent
     of any container clipping) before picking this value: "Ayurvedic
     Herbal Hair Oil" needs <=280px (324px panel width minus the 44px the
     h1 already reserves for the wishlist icon) and renders at 266.4px
     here, a genuine ~14px margin, not a knife-edge fit. white-space stays
     the default (normal/wrap), not forced nowrap+ellipsis: a longer
     product name should still wrap to 2 lines naturally rather than
     being truncated or overflowing -- "one line where it fits naturally"
     per the explicit instruction, not "always one line no matter what". */
  .product-purchase-panel h1 {
    font-size: 1.15rem;
    margin-bottom: 0.3rem;
  }

  /* Rating and price now share one row (see the new .rating-price-row
     wrapper in renderProductPage()/product-page.js) -- a thin divider
     line between them, matching the reference's "4.5 (reviews) | ₹99"
     look, implemented as a border rather than a markup element so
     nothing is added for assistive tech to announce. */
  .rating-price-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin: 0 0 0.3rem;
  }

  /* .rating-demo is display:flex by default everywhere now (its own base
     rule, further down this file) -- this mobile-only block just tightens
     homepage cards' identical demo rating.

     gap/flex-wrap/font-sizes below are ALL scoped through this same
     .rating-price-row ancestor -- never the bare .rating-demo/.demo-stars/
     .demo-rating-number/.demo-rating-tag classes, which the homepage
     cards' own demo rating also uses. Confirmed via a real measurement
     before picking these exact values: the stars+"4.5"+"Preview" needed
     to fit a 149.8px column (now narrower than before, since the price
     side grew to fit the new ₹299/₹99/20% OFF badge), and the base
     sizes wrapped "Preview" onto its own second line -- not "one
     baseline" as asked. This combination was the one that actually
     fit on one line at that exact width, tested directly against the
     live DOM, not guessed. */
  .rating-price-row .rating-demo {
    display: flex;
    gap: 0.12rem;
    flex-wrap: nowrap;
  }

  .rating-price-row .demo-stars {
    font-size: 0.8em;
  }

  .rating-price-row .demo-rating-number {
    font-size: 0.85rem;
  }

  .rating-price-row .demo-rating-tag {
    font-size: 0.7rem;
  }

  /* flex:1 1 auto + min-width:0 + flex-wrap:wrap (the rating-placeholder
     is itself a flex row, stars + the honest "Reviews are not yet
     available..." sentence) lets the longer honest text wrap onto its
     own second line WITHIN this column, instead of claiming the row's
     full width and pushing .price onto a whole separate line below --
     confirmed via a real measurement this was happening before this
     fix (rating measured 324px wide, full row width, with price's top
     52px lower, not actually sharing a row at all despite the flex
     container). */
  .rating-price-row .rating-placeholder {
    flex: 1 1 auto;
    min-width: 0;
    flex-wrap: wrap;
    margin: 0;
    padding-right: 0.6rem;
    border-right: 1px solid var(--border);
  }

  /* flex-shrink:0 + white-space:nowrap keeps the price itself from ever
     being the one that wraps or gets compressed -- it's the shorter,
     more important-to-read-at-a-glance value, so the rating text is what
     yields space to it, not the reverse. */
  .rating-price-row .price {
    flex-shrink: 0;
    white-space: nowrap;
    margin: 0;
  }

  /* Removed 2026-10-24: this used to hide the real <p class="price"> on
     mobile in favor of the static demo price+badge row below -- that row
     (renderDemoPriceRow() in product-page.js) has been removed, since
     renderPrice() now renders the real original price + offer badge
     directly. Found via the same investigation as the home-page cards'
     equivalent rule (see style.css's other removal note nearby): this
     was silently hiding the real price on mobile product pages, with
     nothing shown in its place. */

  .rating-price-row .price-demo-row {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.35rem;
    white-space: normal;
  }

  .product-purchase-panel .size,
  .product-purchase-panel .summary {
    margin: 0 0 0.3rem;
  }

  .price-purchase-group {
    margin-top: 0.3rem;
  }

  .discount-pending-note {
    margin: 0.1rem 0 0.5rem;
  }

  /* Quantity label + stepper on one line, not stacked -- matches the
     reference's compact "Quantity [- 1 +]" row. */
  .add-to-cart-form > label[for="quantity"] {
    display: inline-block;
    margin-right: 0.5rem;
    font-size: 0.85rem;
  }

  /* Segmented minus/quantity/plus control, replacing the bare native
     number input's own (browser-default, not fully stylable) spinner
     arrows. The input itself keeps its real id/name/min/max/value
     attributes and is still what cart.js reads at submit time -- only
     its visual chrome changes here, and the native spinner buttons are
     hidden via the vendor-prefixed rules below rather than removed from
     the DOM, so manual typing still works exactly as before. */
  .quantity-stepper {
    display: inline-flex;
    align-items: stretch;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    vertical-align: middle;
  }

  .qty-step {
    display: inline-block;
    background: var(--card-bg);
    border: none;
    width: 2.25rem;
    font-size: 1.1rem;
    font-weight: bold;
    line-height: 1;
    color: var(--deep-forest-green);
    cursor: pointer;
  }

  .qty-step:hover {
    background: var(--light-sage);
  }

  .quantity-stepper input {
    width: 2.5rem;
    text-align: center;
    border: none;
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
    font-size: 0.9rem;
    -moz-appearance: textfield;
  }

  .quantity-stepper input::-webkit-inner-spin-button,
  .quantity-stepper input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
  }

  /* Equal-width, side-by-side Add to Cart / Buy Now with a comfortable
     44px-plus tap target height -- scoped to the purchase panel
     specifically (not the bare .purchase-actions class, which
     renderCard() in home-page.js also uses for the homepage's own
     Add to Cart/Buy Now -- those stay display:none on mobile regardless,
     confirmed above, but this keeps the two completely independent). */
  .product-purchase-panel .purchase-actions {
    margin-top: 0.4rem;
    flex-wrap: nowrap;
  }

  .product-purchase-panel .purchase-actions button {
    flex: 1 1 0;
    min-width: 0;
    padding: 0.75rem 0.5rem;
  }
}

.rating-placeholder .stars {
  color: var(--muted-gold);
  font-size: 1.1rem;
  letter-spacing: 0.1rem;
}

/* Compact row directly under Add to Cart/Buy Now -- separate from, and
   unrelated to, the .affiliate-links/.affiliate-button system above
   (that one is currently unused, kept for a possible later "Also
   Available On" section; this is the new, explicitly-requested compact
   version). Brand background colours come for free via the existing
   .marketplace-flipkart/.marketplace-meesho/.marketplace-amazon classes
   (already unscoped/shared, same ones the homepage cards use for their
   own badges) -- only the compact layout/sizing/border is new here. */
.compact-marketplace-row {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.6rem;
}

/* 2026-10-26: white/cream card + brand-color text/border, same redesign
   as the homepage cards' .marketplace-link -- the border color/background
   tint itself comes from the shared .marketplace-amazon/-flipkart/-meesho
   classes (style.css, further down), this rule only owns layout/sizing. */
.compact-marketplace-link {
  flex: 1 1 0;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  text-align: center;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.75rem;
  line-height: 1;
  padding: 0.5rem 0.3rem;
  border-radius: 6px;
  box-shadow: 0 1px 2px rgba(20, 20, 20, 0.06);
  transition: transform 0.12s ease-out, box-shadow 0.12s ease-out;
}

a.compact-marketplace-link:hover,
a.compact-marketplace-link:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(20, 20, 20, 0.12);
}

.compact-marketplace-link.marketplace-link-pending {
  cursor: not-allowed;
}

.marketplace-accent-icon {
  flex-shrink: 0;
}

/* The accent icon is dropped on the homepage CARDS specifically (not the
   product page's own compact row, which is consistently spacious at
   every width tested) anywhere narrower than 1024px -- confirmed via
   real measurement across 6 real breakpoints (375/390/430/834/1280/1440)
   that .product-card's own available width per badge stays too tight for
   icon + a fully legible brand name below that, including tablet widths
   (834px measured 6px short even with no mobile-only padding shrink
   applied) -- not just the narrowest phones. Real brand-color border/text
   alone is still a clear badge at every width; this only decides whether
   the small extra icon also fits without truncating the text that
   actually identifies the platform. */
@media (max-width: 1023px) {
  .product-card .marketplace-accent-icon {
    display: none;
  }
}

.affiliate-links {
  margin-top: 1rem;
}

.affiliate-buttons {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

/* Equal width for all three (flex: 1, no wrap) -- previously each grew to
   fill its row via flex:1 1 auto with wrapping, which looked fine with 2
   per row but made a lone wrapped 3rd badge stretch across the full width
   on narrow screens. Fixed width share avoids that regardless of screen
   size, matching the card-level badges' identical treatment. */
.affiliate-button {
  flex: 1 1 0;
  text-align: center;
  min-width: 0;
}

/* Horizontal row at every width, including mobile -- labels were
   shortened at the source ("Buy on Amazon" -> "Amazon", see
   renderAffiliateLinks() in product-page.js) specifically so this fits;
   this used to stack to a full-width column below 480px because the
   longer "Buy on X" text wrapped mid-word at a 1/3 share. Font-size and
   padding tightened here too (0.75rem / 0.5rem 0.3rem, both confirmed via
   a real measurement before committing to these exact values: at the
   base rule's font-size this still wrapped to 2 lines even with the
   shorter label) so all three sit on a single line at 324px -- the
   .product-detail content width at 390px -- with comfortable room to
   spare (measured ~104px per button, no wrapping, no overflow).

   a.affiliate-button, span.affiliate-button -- not plain .affiliate-button
   -- same cascade-order trap documented elsewhere in this file: the base
   .button,button rule (equal specificity, 0,0,1,0) sits LATER in the
   file (its own section, much further down) and was silently winning
   regardless of this media query, confirmed via a real computed-style
   check (font-size stayed 16px, padding stayed the base rule's values,
   not these). Adding the element type -- matching both the real-link <a>
   and the "not configured yet" pending <span> variant -- raises this to
   0,0,1,1, enough to win regardless of source order, without touching
   the shared .button rule itself (used by other real buttons sitewide)
   or resorting to !important. */
@media (max-width: 640px) {
  a.affiliate-button,
  span.affiliate-button {
    font-size: 0.75rem;
    padding: 0.5rem 0.3rem;
    white-space: nowrap;
  }
}

/* Premium cream card -- warm cream background, antique-gold thin
   separators between rows instead of bullet points, deep herbal-green
   heading. Page-specific (.direct-benefits is only ever used on the
   product-detail page), so none of this touches the homepage.
   margin-top was 1.5rem when this sat directly below the purchase panel;
   now moved inside the Product Details tab panel as that panel's only
   content, where .tab-list's own margin-bottom (1.25rem) already
   separates it from the tab bar above -- keeping the old 1.5rem here too
   stacked an extra, redundant gap on top of that (measured and
   confirmed before making this change), against the explicit
   instruction to eliminate blank space left over from the move. */
/* 2026-10-29: compact, internally-scrollable card -- shared by the
   Product Details/Usage section (.direct-benefits), the Manufacturing
   section, and the Reviews section, so description/manufacturing/review
   content stays fully readable (via scroll) without growing the outer
   page height, consistently across all 8 products. Card chrome
   (background/border/radius/padding) moved here from .direct-benefits'
   own rule, which now only adds this class in markup -- the same visual
   card look, just shared instead of duplicated across the 3 sections.
   overscroll-behavior:contain stops a scroll/swipe that reaches this
   card's own top/bottom edge from "leaking" into the outer page scroll
   underneath it -- the Add to Cart button and the rest of the page layout
   stay exactly where they are while scrolling inside a card.
   -webkit-overflow-scrolling:touch keeps iOS's native momentum scrolling
   working inside the card (modern Safari already does this by default;
   kept for older versions). Native desktop mouse-wheel/scrollbar and
   mobile touch-swipe both work on any overflow-y:auto element with no
   extra JS needed. max-height is the one "compact" sizing knob -- same
   value on every one of the 3 sections, on every product, so section
   height stays visually consistent regardless of how much real content a
   given product actually has. */
.compact-scroll-card {
  background: var(--header-footer-bg);
  border: 1px solid #E7D5BB;
  border-radius: 12px;
  padding: 1.1rem 1.25rem;
  max-height: 230px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.direct-benefits {
  margin-top: 0;
}

.direct-benefits h2 {
  color: var(--deep-forest-green);
  font-size: 1.1rem;
  margin: 0 0 0.5rem;
}

.direct-benefits ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.direct-benefits li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.5rem 0;
  border-top: 1px solid #E7D5BB;
  font-size: 0.88rem;
  color: var(--text);
}

.direct-benefits li:first-child {
  padding-top: 0;
  border-top: none;
}

.direct-benefits li svg {
  flex-shrink: 0;
  margin-top: 0.15rem;
  color: #B58A4A;
}

/* Product Highlights tab (2026-11-01) -- a separate list, same visual
   language as .direct-benefits above (checklist row + icon + thin
   divider), kept as its own class rather than reusing .direct-benefits
   itself since the two are different sections ("Why Buy Directly" vs.
   this tab's real ingredient/feature highlights). */
.highlights-tab-content .highlights-list {
  list-style: none;
  margin: 0 0 0.75rem;
  padding: 0;
}

.highlights-tab-content .highlights-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.5rem 0;
  border-top: 1px solid #E7D5BB;
  font-size: 0.88rem;
  color: var(--text);
}

.highlights-tab-content .highlights-list li:first-child {
  padding-top: 0;
  border-top: none;
}

.highlights-tab-content .highlights-list li svg {
  flex-shrink: 0;
  margin-top: 0.15rem;
  color: #B58A4A;
}

/* 2026-10-29: real "How to Use" content (currently Face Boss Face Wash
   only -- every other product still falls through to the plain
   .pending-note, unstyled beyond its own existing rule, same as before
   this addition). A light divider from the benefits list above, same
   card/border tokens as .direct-benefits itself so it reads as one
   cohesive card, not a visually separate block. */
.usage-instructions {
  margin-top: 0.9rem;
  padding-top: 0.9rem;
  border-top: 1px solid #E7D5BB;
}

.usage-instructions h3 {
  color: var(--deep-forest-green);
  font-size: 0.95rem;
  margin: 0 0 0.5rem;
}

.usage-steps {
  margin: 0 0 0.6rem;
  padding-left: 1.25rem;
  font-size: 0.88rem;
  color: var(--text);
}

.usage-steps li {
  padding: 0.15rem 0;
}

.usage-note {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0 0 0.4rem;
}

.usage-caution {
  font-size: 0.85rem;
  color: var(--gold-text);
  font-style: italic;
  margin: 0;
}

/* 2026-10-29: Hair Spray's own "Results & Expectations" disclaimer --
   a distinct, clearly separate sub-block (own light divider + heading)
   from the plain numbered "How to Use" steps above it, so the
   no-guarantee language reads as its own real section, not buried
   inline with the application steps. */
.usage-results {
  margin-top: 0.7rem;
  padding-top: 0.7rem;
  border-top: 1px dashed #E7D5BB;
}

.usage-results h4 {
  color: var(--deep-forest-green);
  font-size: 0.88rem;
  margin: 0 0 0.4rem;
}

.usage-results p {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0 0 0.4rem;
}

/* 2026-10-29: Hair Oil's own "Important Instructions" safety list -- same
   divider/heading treatment as .usage-results, placed between the plain
   "How to Use" steps and the results disclaimer so each of the 3 real
   sections (steps, safety notes, results) reads as its own distinct
   block. */
.usage-important {
  margin-top: 0.7rem;
  padding-top: 0.7rem;
  border-top: 1px dashed #E7D5BB;
}

.usage-important h4 {
  color: var(--deep-forest-green);
  font-size: 0.88rem;
  margin: 0 0 0.4rem;
}

.usage-important-list {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.usage-important-list li {
  padding: 0.1rem 0;
}

.usage-results p:last-child {
  margin-bottom: 0;
  font-weight: 600;
  color: var(--text);
}

.purchase-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

/* 2026-10-30 exact-HEX request: Add to Cart gets its own selector (it
   previously had none and fell through to the generic ".button, button"
   rule, which View Product/Login/Search also use -- giving it a
   dedicated rule here, mirroring Buy Now's own rule just below, keeps
   those other buttons untouched). */
.purchase-actions button[data-intent="add"] {
  background: var(--add-to-cart-bg);
  color: var(--add-to-cart-text);
}

.purchase-actions button[data-intent="add"]:hover {
  background: var(--add-to-cart-bg-hover);
  color: var(--add-to-cart-text);
}

.purchase-actions button[data-intent="buy-now"] {
  background: var(--buy-now-bg-exact);
  color: var(--buy-now-text-exact);
}

.purchase-actions button[data-intent="buy-now"]:hover {
  background: var(--buy-now-bg-exact-hover);
  color: var(--buy-now-text-exact);
}

.product-tabs {
  margin-top: 1.5rem;
}

.tab-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  border-bottom: 2px solid var(--border);
  margin-bottom: 1.25rem;
}

/* Horizontal scroll strip instead of wrapping to 3 rows at mobile widths
   (measured: 5 tabs wrapped to 3 rows at 390px) -- a swipeable single row
   is the standard ecommerce-app pattern and doesn't eat vertical space.
   scroll-snap-type removed (was "x proximity"): that's what let the
   browser reposition this strip's own scroll offset on its own after a
   tab click/focus change, reading as the tab bar "shifting" even though
   nothing in product-tabs.js ever calls scrollTo/scrollIntoView itself --
   confirmed via a real measurement (scrollLeft before/after clicking
   different tabs) that removing just this one property stops it, with
   the horizontal swipe-to-see-more-tabs capability otherwise unchanged. */
@media (max-width: 640px) {
  .tab-list {
    flex-wrap: nowrap;
    overflow-x: auto;
    margin-left: -1rem;
    margin-right: -1rem;
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .tab-button {
    flex: 0 0 auto;
    scroll-snap-align: start;
    white-space: nowrap;
  }
}

.tab-button {
  background: transparent;
  color: var(--muted);
  border: none;
  border-radius: 0;
  padding: 0.6rem 1rem;
  font-weight: bold;
  margin-bottom: -2px;
  border-bottom: 2px solid transparent;
}

.tab-button:hover {
  background: var(--bg-secondary);
  color: var(--forest-green);
}

.tab-button.active {
  color: var(--forest-green);
  border-bottom-color: var(--forest-green);
}

.description-subsection {
  margin-bottom: 1rem;
}

.description-subsection h3 {
  color: var(--deep-forest-green);
  font-size: 1rem;
  margin: 0 0 0.25rem;
}

/* Two-column premium Product Details redesign (Herbal Ingredients,
   Product & Quality) -- was three columns; the Manufacturing Process
   column moved into its own "Manufacturing" tab (see
   renderManufacturingProcess() in product-page.js) and was removed from
   here to avoid showing it in two places. Desktop/tablet shows both side
   by side; mobile stacks them. Page-specific throughout: every selector
   here is scoped to classes only used inside the product-detail page's
   own Product Details tab, nothing shared with the homepage. */
.premium-details-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 0.75rem;
}

@media (max-width: 768px) {
  .premium-details-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
}

.details-column {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.85rem 0.9rem;
  min-width: 0;
}

.details-column h4 {
  color: var(--deep-forest-green);
  font-size: 0.9rem;
  margin: 0 0 0.6rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid #E7D5BB;
}

/* Herbal Ingredients tab: two fixed columns side by side (first 8 herbs
   left, last 8 right -- see renderIngredientsTabContent() in
   product-page.js), no internal scrolling. Stays 2 columns at every
   width, including mobile, per explicit instruction ("display... in two
   side-by-side columns" with no mobile-stack exception given, unlike the
   Product Details grid earlier). */
/* 2026-10-29: real, explicit "Formula Verified" status -- forest green
   (brand's own verified/success tone, not the muted gold used for
   pending notes elsewhere) with a checkmark, so a genuinely verified
   formula reads as confirmed at a glance rather than just the absence of
   a warning. */
.formula-verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin: 0 0 0.75rem;
  padding: 0.3rem 0.65rem;
  background: var(--bg-secondary);
  border: 1px solid #E5E5E5;
  border-radius: 999px;
  color: var(--forest-green);
  font-weight: 700;
  font-size: 0.8rem;
}

.herb-two-col {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0 1rem;
}

.herb-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.herb-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 1.75rem;
  padding: 0.2rem 0.35rem;
  border: 1px solid #E7D5BB;
  border-radius: 6px;
  background: #FFFDF8;
}

/* Uniform small slot, same dimensions for every herb -- see
   renderHerbImageSlot() in product-page.js for the data-herb wiring
   intended for a future admin panel; every slot shows the same generic
   leaf glyph (not a specific herb photo) until a real one exists. */
.herb-image-slot {
  flex-shrink: 0;
  width: 1.3rem;
  height: 1.3rem;
  border-radius: 5px;
  border: 1px solid #E7D5BB;
  background: var(--card-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #B58A4A;
}

.herb-image-slot svg {
  width: 10px;
  height: 10px;
}

.herb-name {
  font-size: 0.75rem;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Column 2: Manufacturing Process. */
.process-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.process-step {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid #E7D5BB;
}

.process-step:first-child {
  padding-top: 0;
  border-top: none;
}

.step-num {
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  background: var(--forest-green);
  color: #fff;
  font-size: 0.65rem;
  font-weight: bold;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-text {
  font-size: 0.8rem;
  color: var(--text);
  line-height: 1.35;
}

/* Column 3: Product, Shelf Life & Certification. */
.quality-facts {
  margin: 0;
}

.quality-fact {
  padding: 0.4rem 0;
  border-top: 1px solid #E7D5BB;
}

.quality-fact:first-child {
  padding-top: 0;
  border-top: none;
}

.quality-fact dt {
  font-size: 0.68rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin: 0 0 0.1rem;
}

.quality-fact dd {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text);
}

/* Product Media Manager (2026-10-26): replaces the old 2x2 media grid
   (hardcoded Shorts URL forced into a 1:1 square -- the exact cropping
   bug this redesign fixes) with ONE real, connected video (the Admin
   Panel's own product_videos data) in a correct, responsive 16:9 box,
   plus a separate below-video-images section underneath. Both rendered
   directly after the purchase panel, same position the old media grid
   occupied. */
.product-video-section {
  margin-top: 1.5rem;
}

.product-video-section h2 {
  margin: 0 0 0.6rem;
}

.product-video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
}

.product-video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* 2026-10-27, round 3 ("Option 3", explicit, final one-time test) was
   tried and rolled back here, per the test's own explicit instruction
   ("if the result does not look clearly better... immediately roll
   back"): widening this box from the exact-9:16-at-fixed-height value
   (236px/270px, zero crop) to 280px/300px, cropping the difference,
   was compared via real before/after screenshots against the real
   configured video's own real YouTube thumbnail. The "before" state
   was already a clean, fully-filled, edge-to-edge frame (236:420 is
   already almost exactly 9:16, so there was no blur-padding visible at
   all). The wider "after" state only modestly shrank the empty space
   beside the frame (~55px/side -> ~33px/side on mobile) while newly
   introducing visible blurred-padding strips along both edges (because
   YouTube's own thumbnail for vertical content is itself a 16:9 canvas
   with the true vertical frame centered and the sides filled with a
   blurred, zoomed copy -- cropping wider than 9:16 cuts into that
   blur-fill, which reads as less polished, not more) -- not a clear
   improvement, so round 2's exact values are restored below, unchanged.
   aspect-ratio:9/16 keeps width and height in lockstep at exactly zero
   crop (236*16/9≈420, 270*16/9=480). margin:0 auto centers it;
   display:block (not flex) means a real click anywhere on the frame
   reaches this <a> itself (the iframe is pointer-events:none, see
   below) rather than being captured by a flex layout box. */
.product-video-frame--shorts {
  display: block;
  position: relative;
  aspect-ratio: 9 / 16;
  max-width: 236px;
  max-height: 420px;
  margin: 0 auto;
  background-size: cover;
  background-position: center;
  cursor: pointer;
  text-decoration: none;
}

@media (min-width: 768px) {
  .product-video-frame--shorts {
    max-width: 270px;
    max-height: 480px;
  }
}

/* Autoplay-preview iframe -- position/size already come from the base
   .product-video-frame iframe rule above; pointer-events:none is the
   one thing specific to this variant: every click, whether or not
   autoplay actually started, is caught by the wrapping <a> and opens
   the real YouTube Shorts page, never swallowed by the embedded
   player's own UI. (The small video thumbnail row's own tiles,
   .video-thumb-tile, used this exact technique too until a later round
   removed autoplay from that row entirely -- this is the one place it
   still applies, for the larger Mobile/Desktop Product Video.) */
.product-video-iframe {
  pointer-events: none;
}

/* 2026-10-27, explicit instruction: desktop shows 3 videos in one row
   (product-page.js's renderVideoSection() always renders both this
   section and the original .product-video-section -- which one is
   actually visible is decided entirely here, by viewport width, never
   by which markup the server sent). Same 768px split this page's own
   gallery already uses (.gallery-thumbs' own min-width:768px rule) for
   consistency -- mobile shows ONLY the original single video section,
   unchanged in every way (markup, class name, sizing, placeholder text);
   desktop shows ONLY this new 3-video row instead. Never both, never
   neither. */
.product-video-desktop-section {
  display: none;
  margin-top: 1.5rem;
}

.product-video-desktop-section h2 {
  margin: 0 0 0.6rem;
}

@media (min-width: 768px) {
  .product-video-section {
    display: none;
  }

  .product-video-desktop-section {
    display: block;
  }
}

/* "Equal width, small and equal gap between them, never crop/stretch/
   overflow" (explicit instruction) -- flex:1 1 0 on each slot below
   divides the row's width evenly regardless of which slots are
   configured vs. pending; min-width:0 is the standard fix for a flex
   item's default min-width:auto otherwise flooring its shrink at its
   content's own natural width (the same fix .video-thumb-tile and
   .marketplace-link both already needed for the identical reason) --
   without it, 3 real video frames side by side could overflow this row
   and the page, on a narrower desktop/tablet width, exactly the
   "container से बाहर न जाए" failure mode this rule exists to prevent. */
.product-video-desktop-row {
  display: flex;
  gap: 12px;
}

.product-video-desktop-slot {
  flex: 1 1 0;
  min-width: 0;
}

/* Overrides .product-video-frame--shorts' own max-width/max-height
   (236px/420px mobile, 270px/480px desktop -- sized specifically for
   the ORIGINAL single mobile video, deliberately small and fixed) back
   to "fill whatever width this slot's own flex:1 1 0 share gives it" --
   a Shorts-sourced desktop video still keeps its real 9:16 shape
   (aspect-ratio:9/16 is untouched, inherited from the base
   --shorts rule), it just isn't capped at that other, unrelated
   context's fixed pixel size here. A non-Shorts desktop video needs no
   such override -- the base .product-video-frame rule (width:100%,
   aspect-ratio:16/9) already fills its slot responsively with no fixed
   cap of its own. */
.product-video-desktop-row .product-video-frame--shorts.product-video-desktop-frame {
  max-width: none;
  max-height: none;
  width: 100%;
  margin: 0;
}

/* One of the 3 desktop slots with no URL saved in its Admin Panel field
   yet -- an honest, small icon-based placeholder (same
   VIDEO_PENDING_ICON_SVG icon this page's video thumbnail row already
   uses for the same idea), in a plain 16:9 box so the row stays visually
   even even while some slots are configured and others aren't yet.
   Never a fake/invented thumbnail or video. */
.product-video-frame--pending {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-secondary);
  cursor: default;
}

.product-video-frame--pending .video-thumb-pending-icon {
  width: 28px;
  height: 28px;
}

.below-video-images-section {
  margin-top: 1rem;
}

.below-video-images-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
}

/* Same no-crop convention as .product-image on the homepage/detail
   gallery: contain, not cover, so neither image is ever cut off
   regardless of its own real aspect ratio. */
.below-video-image {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  background: #FFFDF8;
  border: 1px solid var(--border);
  border-radius: 10px;
}

/* Video thumbnail row -- deliberately separate from both .product-gallery
   (above) and .product-video-section (the Admin-Panel-connected single
   video, also above): own element, own styling, never merged with
   either, and no visible heading (reads as a continuation of the image
   gallery immediately above it). A horizontally-scrolling strip at every
   width (not just mobile) is the simplest single implementation that
   satisfies "must scroll on mobile when tight" -- on a wide enough
   desktop viewport all 5 tiles already fit inside the available width
   without the strip ever needing to actually scroll, so this one rule
   covers both stated cases without a separate desktop-only layout.
   position:absolute, anchored to .gallery-main-frame (its nearest
   position:relative ancestor -- NOT .gallery-main itself, which has its
   own overflow:hidden that would otherwise clip this, since it sits
   below .gallery-main's own bottom edge). top:calc(100% + 8px) is the
   exact-8px-gap requirement itself: 100% of the frame's height (which
   equals .gallery-main's own rendered height exactly, since this row is
   the only thing in the frame NOT contributing to its auto height) plus
   the required 8px. left:0/right:0 (not a fixed width) keeps it exactly
   as wide as .gallery-main itself, at any viewport width, matching "stay
   within the available gallery width" and "never overlap the left-hand
   image thumbnails" (which live in a completely separate flex column,
   so there's no shared horizontal space to overlap even before
   considering vertical position). */
/* 2026-10-27: horizontal scrolling removed entirely, explicit instruction
   -- with only 3 (down from 5) responsive-width tiles (see
   .video-thumb-tile below), they always fit in one row at every width
   tested, so there's nothing left to scroll. overflow left at the
   default (visible) rather than hidden -- nothing here is expected to
   exceed this row's own box, so there's no clipping need either. */
.video-thumb-row {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  box-sizing: border-box;
  display: flex;
  gap: 0.5rem;
}

/* 2026-10-27: flex:0 1 72px (was flex:0 0 72px, a fixed width that
   needed horizontal scrolling once there wasn't room for all of them) --
   72px is still the TARGET width (flex-grow:0, so a tile never grows
   past it just because there's spare room), but flex-shrink:1 now lets
   all 3 compress together, equally, to whatever actually fits in one row
   at the current width -- explicit instruction: exactly 3 tiles, always
   visible in a single row, no slider/scrolling/hidden slots. 3 tiles at
   72px (216px + 2 gaps = 232px) already fit without any shrinking on
   every real width this was tested at except the narrowest (320px,
   iPhone SE) where they compress slightly -- still never need to scroll.
   aspect-ratio:16/9 is YouTube's own standard video shape -- the real
   genuine thumbnail (set as this element's own background, see
   renderVideoThumbnailTile()'s comment in product-page.js for why) is
   never stretched or cropped into something unlike itself. */
.video-thumb-tile {
  position: relative;
  box-sizing: border-box;
  flex: 0 1 72px;
  min-width: 0;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  overflow: hidden;
  /* A soft sage-green tint (from the same --bg-secondary pale-sage family
     this tile's own background already uses), not the site's generic
     warm-grey --border -- explicit "light cream/green" spec, thin 1px,
     no shadow, no thick border. */
  border: 1px solid #E5E5E5;
  background-color: var(--bg-secondary);
  background-size: cover;
  background-position: center;
  display: block;
  text-decoration: none;
}

/* 2026-10-27: .video-thumb-iframe's own rule (position/size/
   pointer-events:none for the background-autoplay-preview iframe this
   tile used to embed) was removed here -- explicit instruction, this
   row no longer attempts any playback in place at all. Each configured
   tile is now just .video-thumb-tile with a background-image and a real
   href, no child markup needed. */

.video-thumb-tile-pending {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-secondary);
  cursor: default;
}

/* #B79A62 -- the same muted warm gold this project already uses for
   every other "placeholder" icon (e.g. .product-image-placeholder's own
   SVG), not a new color choice. */
.video-thumb-pending-icon {
  color: #B79A62;
}

.related-products {
  margin-top: 2rem;
}

/* 2026-10-24: display:flex + flex-wrap:wrap here (previously only on the
   card-scoped .product-card .price) so .offer-badge's flex-basis:100%
   "always start a new line" rule works consistently everywhere .price is
   used, not just on homepage cards -- found via a real screenshot: the
   product detail page's .price had no flex context at all (plain inline
   flow), so the badge never wrapped there regardless of price length,
   unlike the cards. */
.price {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem;
  color: var(--text);
  font-size: 1.25rem;
  font-weight: bold;
}

.product-purchase-panel .price {
  font-size: 1.75rem;
}

.price-note {
  font-size: 0.8125rem;
  color: var(--muted);
  font-weight: normal;
}

/* 2026-10-24: hidden on every card breakpoint (was mobile-only) -- a
   5-digit price ("₹12999 ₹9999") plus this note's text no longer fit one
   line at tablet/desktop card widths either, confirmed via a real stress
   test, wrapping the price row to 2 lines and pushing the card past its
   hard-maximum height. The full note still shows on the product detail
   page, which isn't width-constrained the same way (bare .price-note
   above, untouched there). */
.product-card .price .price-note {
  display: none;
}

.price-unconfirmed {
  color: var(--muted);
  font-style: italic;
}

/* Real original/MRP price, struck through beside the real selling price
   -- shown only when catalogue.js has a confirmed originalPrice for the
   product (see renderPrice() in home-page.js/product-page.js). */
.price-original {
  color: var(--muted);
  text-decoration: line-through;
  font-weight: normal;
  font-size: 0.85em;
}

/* Real purple "<percent>% OFF" offer badge (2026-10-24) -- computed from
   the product's own actual original/selling price (discount.js's
   computeOfferBadge()), never a hardcoded percentage. Reuses the same
   accent purple (#8E6BD9) as the earlier static demo badge this
   replaces, for visual continuity, but is a real inline HTML element
   now (not a CSS ::after pseudo-element), so its text is actually
   exposed to screen readers. Shared by product cards and the product
   detail page. */
/* 2026-10-24: ALWAYS starts its own row below the price line, regardless
   of how long the original/selling price text is -- not just when a long
   price happens to force a flex-wrap. Before this, a short price (e.g.
   today's temporary ₹299/₹1) kept the badge on the SAME line as the
   price, while a longer real price (e.g. ₹12,999/₹9,999) wrapped the
   badge onto a second line -- two visually different card heights in the
   very same grid row once real, varied prices are used, confirmed via a
   real screenshot stress test across ₹299-₹12,999 price pairs. flex-basis
   100% forces the wrap unconditionally (a standard flexbox technique);
   width: fit-content keeps the pill itself sized to its own text, not
   stretched across the full row. */
.offer-badge {
  display: inline-block;
  flex-basis: 100%;
  width: fit-content;
  margin-top: 0.3rem;
  /* 2026-10-31, Phase 1 color-theme audit: restrained red (was purple
     #8E6BD9), echoing the reference video's small red discount labels --
     an approximate, muted shade, not DeoDap's exact #E51E2A, and used
     ONLY here, not as a new sitewide accent. */
  background: #C62828;
  color: #fff;
  font-size: 0.7em;
  font-weight: bold;
  line-height: 1;
  padding: 0.2rem 0.4rem;
  border-radius: 999px;
  white-space: nowrap;
  vertical-align: middle;
}

/* 2026-10-27, product detail page only (.product-purchase-panel exists
   nowhere else -- the homepage cards' own badge sizing, .product-card
   .offer-badge above, is untouched) -- the badge actually rendered at
   100% of .price's own width, not content-width, on this page: .price is
   display:flex (see its own rule), and for a flex item, a flex-basis
   percentage like the base rule's flex-basis:100% overrides `width` for
   sizing on the main axis per the flex spec, so that "width:fit-content"
   never actually applied here (it did nothing) -- confirmed by inspecting
   the base rule in a real flex context. Most visible on mobile, where
   .price's own width is narrowest. flex-basis:auto + width:auto restores
   real content-based sizing (same technique the product-card override
   above already uses, for the same underlying reason); max-width:100%
   is the overflow guard the instruction asked for, in case a future,
   longer saved-amount string ever exceeds the panel's own width. */
.product-purchase-panel .offer-badge {
  flex-basis: auto;
  flex-shrink: 0;
  width: auto;
  max-width: 100%;
  box-sizing: border-box;
  padding: 0.25rem 14px;
}

/* 2026-10-25 "FINAL UI FIX" -- product cards only (the bare .offer-badge
   rule above, and the product detail page that still uses it unmodified,
   are untouched per explicit instruction not to touch the detail page).
   The badge moves off the image and back beside the price, as a real
   flex sibling -- never position:absolute, never a negative margin
   against the image. .product-price-row wraps the existing <p class="price">
   and the badge; justify-content:space-between pins the badge to the row's
   far right edge while the prices stay together on the left, exactly per
   the approved structural reference. */
.product-card .product-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  width: 100%;
  min-width: 0;
}

.product-card .product-price-row .price {
  margin: 0;
  gap: 5px;
  min-width: 0;
  flex-shrink: 1;
}

/* Same treatment for the rating row -- see the mobile fallback rule
   further down for why a second copy of the badge lives here too. */
.product-card .rating-badge-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  width: 100%;
  min-width: 0;
}

.product-card .rating-badge-row .rating-placeholder {
  margin: 0;
}

/* Margin moved into its own min-width media query (mirroring the
   .offer-badge--price/--rating fix above) rather than left as a plain
   unconditional rule -- a plain rule here sits, in source order, AFTER
   the early mobile @media block that also sets this margin, so at equal
   specificity it would silently win at every width, including mobile,
   regardless of which one the media query intends. Scoping both halves
   to non-overlapping widths removes the order dependency entirely. */
@media (min-width: 641px) {
  .product-card .rating-badge-row {
    /* Replaces .rating-placeholder's own default margin (now zeroed
       above), to match this element's previous, pre-wrapper spacing. */
    margin: 0.25rem 0 0.5rem;
  }

  .product-card .product-price-row {
    /* Same reasoning -- replaces .price's own default margin. */
    margin: 0.5em 0;
  }
}

/* Exact target dimensions per spec: 22px tall, max 76px wide, 11px/600
   text, 6px/2px padding, fully rounded, subtle shadow -- a small,
   secondary pill, never visually competing with the price. Overrides the
   base .offer-badge rule's flex-basis:100%/width:fit-content/margin-top
   (that rule forced the old "always its own row" behaviour, which this
   design explicitly replaces for cards). */
.product-card .offer-badge {
  align-items: center;
  justify-content: center;
  height: 22px;
  max-width: 76px;
  box-sizing: border-box;
  padding: 2px 6px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  color: #ffffff;
  /* 2026-10-31: this more-specific selector was silently overriding the
     base .offer-badge rule's red (#C62828) with its own leftover purple
     -- found via live verification (screenshot still showed purple on
     actual product cards even after the base rule was fixed). Matches
     the base rule now so every discount badge is consistently red. */
  background: #C62828;
  border-radius: 999px;
  white-space: nowrap;
  flex-basis: auto;
  flex-shrink: 0;
  width: auto;
  margin: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

/* Primary placement (beside the price) applies at tablet/desktop widths,
   where real measurement showed the price row has enough room for both
   prices and the badge on one line across the full ₹299-₹12,999 range.
   Wrapped in its own min-width media query (rather than an unscoped
   default) so it can never win a cascade tie against the mobile
   fallback override above purely by coming later in the file -- the two
   rules now apply to non-overlapping widths instead of competing on
   source order. */
@media (min-width: 641px) {
  .product-card .offer-badge--price {
    display: inline-flex;
  }

  .product-card .offer-badge--rating {
    display: none;
  }
}

/* TEMPORARY, PREVIEW-ONLY demo price row -- see
   DEMO_PRICING_PREVIEW/withDemoPrice() in home-page.js. display:none
   here, unscoped by any media query, is the actual default for every
   viewport -- a <p> is block-level by default with no CSS at all, so
   without this explicit override the demo price row would otherwise
   render visibly on desktop too (caught via a real measurement while
   verifying this change, not just by inspection: computed display was
   "block" on a 1280px check before this rule existed). Only the
   mobile-scoped rule further up this file
   (.product-card .price:not(.price-demo)/.price above) ever shows it,
   by virtue of .price-demo also carrying the plain "price" class that
   rule's display:flex applies to. Same pattern as .rating-demo and
   .product-card--preview-demo elsewhere in this file. */
.price-demo {
  display: none;
}

/* Both spans below live inside .price-demo -- which, once shown on
   mobile, shares .price's own green/bold styling via the plain "price"
   class also on that element (see .product-card .price above);
   .demo-price-selling just confirms that explicitly for clarity, while
   .demo-price-original overrides it back to a neutral grey strikethrough.
   A directly-matching rule on a child element (both of these) always
   wins over an inherited value from the parent .price rule regardless of
   that parent rule's own specificity -- inheritance is the
   lowest-priority source in the cascade -- so this doesn't risk the
   cascade-order trap hit elsewhere in this file.
   .demo-price-original uses a hardcoded #777777 rather than var(--muted):
   the approved cream-theme palette specifies them as two DIFFERENT
   colours ("Struck-through original price: Neutral grey #777777" vs.
   "Muted text: Grey-green #68736A", now --muted's value), not the same
   token reused. */
.demo-price-original {
  color: #777777;
  text-decoration: line-through;
  font-size: 0.75em;
  font-weight: normal;
}

.demo-price-selling {
  color: #1F1F1F;
  font-weight: bold;
}

.button,
button {
  display: inline-block;
  background: var(--button-bg);
  color: var(--button-text);
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: 6px;
  text-decoration: none;
  cursor: pointer;
  font-size: 1rem;
  font-family: inherit;
}

/* Root cause fix (2026-10-24), same bug class as .auth-form[hidden]: this
   unconditional "display: inline-block" is an AUTHOR rule, so it beats the
   browser's built-in "[hidden] { display: none }" rule regardless of
   specificity -- confirmed by real Playwright evidence: #auth-logout-btn
   (a bare <button>, directly toggled via element.hidden by auth-nav.js)
   stayed visible after a real, server-confirmed logout. Fixed generically
   for every button, not just this one, so the same class of bug can't
   recur the next time any button anywhere is hidden this way. */
.button[hidden],
button[hidden] {
  display: none;
}

.button:hover,
button:hover {
  background: var(--button-bg-hover);
}

/* 2026-10-26 redesign: white/cream card + the platform's real brand color
   as the TEXT/border color (was: solid brand-color block + white text) --
   matches how real marketplace badges actually look (a reference seller's
   site was checked directly), reads as a genuine badge rather than a
   plain colored button. Still just color + real wordmark casing, no
   traced logo artwork (see marketplace-config.js's own header comment).
   Placed after the generic .button rule above so it wins the cascade when
   both classes land on the same element (the detail page's affiliate
   buttons). */
/* 2026-10-26 follow-up: the resting state now carries the same light
   brand-colour tint that used to only appear on :hover -- a pure white
   background with just a thin colored border read as too faint/washed
   out to clearly register as "the real brand color" at a glance on a
   small mobile badge (reported after the first redesign pass). Border
   widened slightly (1.5px -> 1.75px) for the same reason. Hex values
   themselves are unchanged (already verified against each platform's own
   real site/assets) -- this is a visual-weight fix, not a color-value
   fix. */
.marketplace-amazon { background: #F5F6F8; border: 1.75px solid #131921; color: #131921; }
.marketplace-amazon:hover { border-color: #FF9900; background: #FFFBF2; }
.marketplace-flipkart { background: #EAF1FE; border: 1.75px solid #2874F0; color: #1E5FC9; }
.marketplace-flipkart:hover { background: #DCE9FD; }
.marketplace-meesho { background: #FDEAF4; border: 1.75px solid #E72E91; color: #C9277D; }
.marketplace-meesho:hover { background: #FBDCED; }

/* Same light, premium hover/tap feedback as the card-level badges --
   placed here (after .button/.button:hover above) so it isn't overridden
   by the generic button transform (there isn't one) or color. */
a.affiliate-button {
  transition: transform 0.12s ease-out, filter 0.12s ease-out;
}

a.affiliate-button:hover,
a.affiliate-button:focus-visible {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

a.affiliate-button:active {
  transform: translateY(0);
  filter: brightness(0.96);
}

form label {
  display: block;
  margin-bottom: 0.75rem;
}

form input {
  display: block;
  width: 100%;
  padding: 0.5rem;
  margin-top: 0.25rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: inherit;
  background: var(--card-bg);
  color: var(--text);
}

/* .checkout-section/fieldset/legend above are now unused (the new
   .checkout-card below replaces them in checkout-page.js's markup) --
   left in place rather than deleted, same as other superseded-but-
   harmless rules elsewhere in this file. */
.checkout-section {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem;
  margin: 1.25rem 0;
}

.checkout-section fieldset {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin: 0 0 1rem;
}

.checkout-section legend {
  color: var(--deep-forest-green);
  font-weight: bold;
  padding: 0 0.3rem;
}

/* Premium checkout cards -- page-specific (checkout-page.js only),
   reusing the same cream-and-gold visual language already established
   for the product-detail page's premium sections (antique-gold #E7D5BB
   border, deep-forest-green headings), with compact spacing throughout
   per explicit instruction to avoid unnecessary vertical gaps. */
.checkout-heading {
  font-size: 1.4rem;
  margin: 0 0 0.6rem;
}

.checkout-card {
  background: var(--card-bg);
  border: 1px solid #E7D5BB;
  border-radius: 12px;
  padding: 0.85rem 1rem;
  margin: 0.7rem 0;
}

.checkout-card h2 {
  color: var(--deep-forest-green);
  font-size: 1.05rem;
  margin: 0 0 0.6rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid #E7D5BB;
}

.checkout-card fieldset {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.6rem 0.75rem;
  margin: 0 0 0.75rem;
}

.checkout-card legend {
  color: var(--deep-forest-green);
  font-weight: bold;
  font-size: 0.85rem;
  padding: 0 0.3rem;
}

/* Tighter than the sitewide form label/input defaults (0.75rem bottom
   margin) -- compact spacing was an explicit instruction for this page. */
.checkout-form label {
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
}

.checkout-form input {
  margin-top: 0.2rem;
}

.checkout-form textarea {
  display: block;
  width: 100%;
  margin-top: 0.2rem;
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: inherit;
  font-size: 1rem;
  background: var(--card-bg);
  color: var(--text);
  resize: vertical;
}

.checkout-form-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.checkout-form-actions button[type="submit"] {
  flex: 1 1 0;
}

/* Used for Cancel and Resend code (modal-step-notfound/modal-step-otp,
   checkout-page.js) -- text/border now the real brand green
   (2026-11-07 request: "Resend code" explicitly), same --add-to-cart-bg
   token as every other price/button fixed in this same pass, not a new
   color. --forest-green had drifted golden (see its own header
   comment), which is why this looked golden before. */
.checkout-secondary-button {
  flex: 1 1 0;
  background: var(--card-bg);
  color: var(--add-to-cart-bg);
  border: 1px solid var(--add-to-cart-bg);
}

.checkout-secondary-button:hover {
  background: var(--light-sage);
}

/* Premium Order Summary -- product thumbnail + name/qty on the left, line
   total on the right, same cream/gold/green theme as the rest of
   checkout. Mobile-first, compact: the thumbnail is small and the row
   padding is tight on purpose. */
.order-summary-heading {
  color: var(--deep-forest-green);
  font-size: 1.05rem;
  margin: 0 0 0.5rem;
}

.order-summary-products {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
}

.order-summary-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.order-summary-thumb {
  flex-shrink: 0;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  object-fit: contain;
  background: var(--card-bg);
}

.order-summary-item-details {
  flex: 1 1 auto;
  min-width: 0;
}

.order-summary-item-name {
  font-size: 0.9rem;
  color: var(--text);
  overflow-wrap: break-word;
}

.order-summary-item-qty {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 0.1rem;
}

/* 2026-11-07: .order-summary-original-price/.order-summary-selling-price
   (a struck-through-original + green-selling-price pair) removed here --
   confirmed dead CSS, never referenced by checkout.js's real rendering
   (which only ever outputs .order-summary-item-total per line, below) or
   anywhere else in the project. This is exactly the kind of leftover,
   no-longer-applied rule the "fix old conflicting styles properly,
   don't just add new CSS on top" instruction called out -- removed
   rather than left to confuse a future reader into thinking it's live. */
.order-summary-item-total {
  flex-shrink: 0;
  font-size: 0.9rem;
  font-weight: bold;
  /* Product price -- brand green (2026-11-07 checkout color-correction
     request), reusing the SAME #2F7D32 already approved for Add to Cart
     elsewhere in this file, not a new color. */
  color: var(--add-to-cart-bg);
  text-align: right;
}

.order-summary-divider {
  border-top: 1px solid #E7D5BB;
  margin: 0.5rem 0;
}

.order-summary-final {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}

.order-summary-final-label {
  font-size: 0.95rem;
  font-weight: bold;
  color: var(--deep-forest-green);
}

/* Prominent green final total, right-aligned -- but only once it's a real
   computed figure (see checkout.js); while GST is unconfirmed this same
   element carries .order-summary-final-pending instead, deliberately
   toned down rather than styled as if it were a real payable amount.
   2026-11-07: this comment always said "green", but --forest-green's
   real VALUE had since become golden in an unrelated re-theme pass
   (see that variable's own header comment) -- this rule was never
   updated to compensate, which is exactly the reported bug ("Total
   Price is golden"). Fixed at the root by pointing this at the real
   brand green variable instead of the repurposed-golden one. */
.order-summary-final-amount {
  font-size: 1.25rem;
  font-weight: bold;
  color: var(--add-to-cart-bg);
  text-align: right;
}

.order-summary-final-pending {
  font-size: 0.85rem;
  font-weight: normal;
  font-style: italic;
  color: var(--muted);
}

/* Order Totals as a label/value list (same divider pattern as the
   product-detail page's .quality-facts) instead of a bare <table> --
   content unchanged (GST/Delivery/Total still explicit "not finalized"
   placeholders), just restyled. */
.checkout-totals {
  margin: 0;
}

.checkout-totals-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.5rem 0;
  border-top: 1px solid var(--border);
}

.checkout-totals-row:first-child {
  padding-top: 0;
  border-top: none;
}

.checkout-totals-row dt {
  font-size: 0.85rem;
  color: var(--muted);
}

.checkout-totals-row dd {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text);
  text-align: right;
}

/* Subtotal is always the first .checkout-totals-row (checkout.js's own
   render order: Subtotal, then GST, then Shipping) -- scoped to just
   this one row so GST/Shipping stay their existing neutral color,
   per the explicit request to color Subtotal green but not mention
   GST/Shipping at all. 2026-11-07 checkout color-correction request,
   same real brand green as the other prices on this page. */
.checkout-totals-row:first-child dd {
  color: var(--add-to-cart-bg);
  font-weight: bold;
}

/* 2026-11-07: .checkout-totals-final (a column-stacked "final row"
   variant) removed here -- confirmed dead CSS. The real final total is
   .order-summary-final/.order-summary-final-amount further up this
   file (checkout.js never outputs a "checkout-totals-final" class
   anywhere); this rule never actually applied to anything rendered on
   the real page. Same "fix properly, don't layer on top" cleanup as
   the .order-summary-selling-price removal above. */

/* Payment Method: a single informational row (Razorpay is the only
   option, per explicit instruction -- no Cash on Delivery, so no radio
   group is needed) plus the premium, currently-disabled CTA. */
.checkout-payment-method {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 0.75rem;
}

.checkout-payment-method strong {
  display: block;
  color: var(--deep-forest-green);
  font-size: 0.95rem;
}

.checkout-payment-icon {
  flex-shrink: 0;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  background: var(--light-sage);
  color: var(--forest-green);
  font-weight: bold;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Large, premium, full-width CTA, shared by all three primary modal/
   checkout buttons (Pay Securely, Sign Up Now, Verify & Continue) so
   they keep one visual language structurally (size/padding/weight/
   radius). 2026-11-07 checkout color-correction request: the base
   color below is now the real brand green (--add-to-cart-bg, #2F7D32 --
   same token as the other prices/buttons fixed in this pass) -- this
   previously read var(--forest-green), which had drifted golden in an
   unrelated re-theme (see that variable's own header comment), which is
   why Sign Up Now/Verify & Continue looked golden. The REAL
   "Pay Securely with Razorpay" button specifically gets its own color
   below instead (an #checkout-pay-button ID rule, higher specificity
   than this shared class, per this round's explicit request to use
   Razorpay's actual brand blue there and ONLY there) -- Sign Up
   Now/Verify & Continue are untouched by that override and stay green.
   Clicking the real Pay button validates the form and starts real,
   server-verified account checks -- see checkout-auth.js -- but can
   never actually charge anyone here: the payment step itself always
   reports "not configured" in this environment (payment-routes.js),
   since no Razorpay credentials exist anywhere in this project. */
.checkout-pay-button {
  display: block;
  width: 100%;
  padding: 0.85rem 1rem;
  font-size: 1rem;
  font-weight: bold;
  background: var(--add-to-cart-bg);
  color: var(--add-to-cart-text);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  margin-bottom: 0.5rem;
}

.checkout-pay-button:hover {
  background: var(--add-to-cart-bg-hover);
}

.checkout-pay-button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.checkout-pay-button:disabled:hover {
  background: var(--add-to-cart-bg);
}

/* The one real "Pay Securely with Razorpay" button -- Razorpay's own
   brand blue, explicitly NOT the shared green above (2026-11-07
   request). #checkout-pay-button (ID) beats .checkout-pay-button
   (class) on specificity, so this wins over the shared rule above for
   this one button only; Sign Up Now/Verify & Continue (no matching ID
   rule) keep the green. Only CSS changes here -- the real Razorpay
   checkout SDK/payment API call in checkout-auth.js is completely
   untouched. */
#checkout-pay-button {
  background: var(--razorpay-blue);
  color: var(--razorpay-blue-text);
}

#checkout-pay-button:hover {
  background: var(--razorpay-blue-hover);
}

#checkout-pay-button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

#checkout-pay-button:disabled:hover {
  background: var(--razorpay-blue);
}

.checkout-payment-card .pending-note {
  margin: 0.5rem 0 0;
  font-size: 0.8rem;
  text-align: center;
}

/* Real order confirmation after a server-verified Razorpay payment
   (2026-10-24) -- same element, just a stronger, success-colored style
   instead of the neutral pending-note look above. */
#checkout-payment-status.checkout-payment-success {
  color: var(--forest-green);
  font-weight: bold;
  font-size: 0.95rem;
}

.field-error {
  color: #b42318;
  font-size: 0.82rem;
  margin: 0.4rem 0 0;
  min-height: 0;
}

.field-error:empty {
  display: none;
}

/* Lowest Price / Fast Delivery cards (2026-10-28) -- two real, distinct
   delivery options once a live NimbusPost quote resolves. Lowest Price
   uses the existing brand green (already used throughout this page);
   Fast Delivery is deliberately a DIFFERENT accent (electric blue) so
   the two are never confused at a glance, per explicit instruction.
   Stacked full-width (not side-by-side) even on desktop -- this section
   sits inside the narrow .checkout-card column, and a cramped two-up
   layout would make the courier name/ETA text wrap awkwardly. */
.delivery-options {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 0.6rem;
}

.delivery-options:empty {
  margin-top: 0;
}

/* 2026-10-28 (clutter fix): a plain vertical flex stack, not a grid --
   the earlier grid layout packed badge/check/courier/ETA/price into a
   cramped 2-column block with little breathing room (explicit complaint:
   "congested", "empty space और text hierarchy सही नहीं"). Each row below
   is its own block with deliberate margin, so "Delivery in X days" can
   be the one visually loud line and everything else reads as secondary. */
.delivery-option-card {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  width: 100%;
  text-align: left;
  font-family: inherit;
  cursor: pointer;
  border-radius: 10px;
  border: 2px solid transparent;
  padding: 0.75rem 0.9rem;
  position: relative;
}

/* Specificity note: the sitewide `button:hover { background: ... }` rule
   (0,1,1) would otherwise beat a single class selector (0,1,0) and turn
   these cards the generic brand-green button color on hover/press --
   confirmed with a real Playwright screenshot showing exactly that
   regression before this was changed. Each selector below is repeated
   with `.delivery-option-card` to raise its specificity past that rule,
   including for :hover/:focus explicitly, so the real
   Lowest-Price-green vs Fast-Delivery-blue color-coding never flips. */
.delivery-option-card.delivery-option-lowest,
.delivery-option-card.delivery-option-lowest:hover,
.delivery-option-card.delivery-option-lowest:focus {
  background: #EAF6EC; /* light green */
  border-color: #BFE3C4;
}

.delivery-option-card.delivery-option-fast,
.delivery-option-card.delivery-option-fast:hover,
.delivery-option-card.delivery-option-fast:focus {
  background: #E8F0FE; /* light electric blue */
  border-color: #AFC9F8;
}

.delivery-option-card.delivery-option-selected.delivery-option-lowest,
.delivery-option-card.delivery-option-selected.delivery-option-lowest:hover {
  border-color: var(--forest-green);
}

.delivery-option-card.delivery-option-selected.delivery-option-fast,
.delivery-option-card.delivery-option-selected.delivery-option-fast:hover {
  border-color: #1458E8; /* electric blue */
}

/* Row 1: badge (left) + selected-state (right) -- never repeated anywhere
   else on the card. */
.delivery-option-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.delivery-option-badge {
  font-size: 0.7rem;
  font-weight: bold;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.delivery-option-lowest .delivery-option-badge {
  color: var(--primary-blue-dark); /* darker brand green, see :root comment -- not actually blue */
}

.delivery-option-fast .delivery-option-badge {
  color: #1458E8;
}

.delivery-option-check {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-weight: bold;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.delivery-option-lowest .delivery-option-check {
  color: var(--forest-green);
}

.delivery-option-fast .delivery-option-check {
  color: #1458E8;
}

/* Row 2: "Delivery in X days" -- the single most prominent line on the
   card, explicit instruction. Nothing else on the card is this large. */
.delivery-option-days {
  font-size: 1.15rem;
  font-weight: bold;
  color: var(--text);
  line-height: 1.2;
}

/* Row 3: the estimated date -- smaller, secondary, directly under the
   days line it belongs to (never shown again elsewhere on the card). */
.delivery-option-date {
  font-size: 0.8rem;
  color: var(--muted);
}

/* Row 4: courier name (left) + GST-inclusive price (right), the card's
   own natural closing line -- deliberate whitespace above it (margin-top)
   separates "when" (days/date) from "who/how much" (courier/price). */
.delivery-option-bottom {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.15rem;
}

.delivery-option-courier {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  overflow-wrap: break-word;
}

.delivery-option-price {
  flex-shrink: 0;
  font-weight: bold;
  color: var(--text);
  white-space: nowrap;
  text-align: right;
}

.delivery-option-price-note {
  display: block;
  font-size: 0.68rem;
  font-weight: normal;
  color: var(--muted);
  text-align: right;
}

/* Signup/verification popup -- a centered card over a dimmed backdrop,
   same cream-and-gold card language as the rest of checkout, sized for a
   390px viewport first.
   Root-cause note (found and fixed after the modal was reported opening
   on every checkout page load, immediately, with no way to close it):
   `display: flex` was previously set directly on `.modal-overlay` with no
   `[hidden]` exception. The native `hidden` attribute relies on the
   user-agent stylesheet's `[hidden] { display: none }` -- but an author
   stylesheet rule for the SAME property on an element always wins over
   that UA default, regardless of the `hidden` attribute/property being
   correctly set in the DOM (confirmed live: hiddenAttribute/hiddenProperty
   were both true, yet computedDisplay was still "flex"). So the modal was
   visually stuck open at all times, and Cancel/X were already working
   correctly in JS (they did set hidden = true) -- it just had zero visual
   effect. Fixed below by making `display: none` the actual default and
   only switching to flex via :not([hidden]), instead of relying on
   cascade/source-order luck against the UA stylesheet. */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(27, 23, 16, 0.55);
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 1000;
}

.modal-overlay:not([hidden]) {
  display: flex;
}

.modal-box {
  position: relative;
  background: var(--card-bg);
  border: 1px solid #E7D5BB;
  border-radius: 14px;
  padding: 1.25rem 1.1rem 1rem;
  width: 100%;
  max-width: 360px;
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
}

.modal-box h2 {
  color: var(--deep-forest-green);
  font-size: 1.1rem;
  margin: 0 0 0.5rem;
}

.modal-box p {
  font-size: 0.88rem;
  color: var(--text);
  margin: 0 0 0.75rem;
}

.modal-close {
  position: absolute;
  top: 0.5rem;
  right: 0.6rem;
  background: none;
  border: none;
  font-size: 1.4rem;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
  padding: 0.2rem 0.4rem;
}

.modal-step label {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
}

.modal-step input {
  display: block;
  width: 100%;
  margin-top: 0.3rem;
  padding: 0.6rem;
  font-size: 1.1rem;
  letter-spacing: 0.15em;
  text-align: center;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--card-bg);
  color: var(--text);
}

.modal-step .checkout-secondary-button {
  flex: unset;
  width: 100%;
  display: block;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  margin-top: 0.3rem;
}

.order-totals {
  width: 100%;
  border-collapse: collapse;
}

.order-totals th,
.order-totals td {
  text-align: left;
  padding: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.order-totals tr:last-child th,
.order-totals tr:last-child td {
  font-weight: bold;
}

.placeholder-banner {
  background: var(--bg-secondary);
  border: 1px solid var(--muted-gold);
  border-radius: 6px;
  padding: 0.75rem 1rem;
  color: var(--gold-text);
}

.cart-table {
  width: 100%;
  border-collapse: collapse;
}

.cart-table th,
.cart-table td {
  text-align: left;
  padding: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.qty-input {
  width: 4rem;
}

/* #cart-root's own cart-table (product/qty/unit price/line total/Remove --
   5 columns, vs. the checkout summary's read-only 3-column table that
   shares the .cart-table class) was overflowing 390px viewports by ~40px.
   The Remove button inherited the sitewide .button padding/font-size
   (sized for a primary CTA), which alone took 119px in a table cell.
   Scoped to #cart-root and to <=640px only, so neither the checkout page's
   table nor the desktop cart view are affected. */
@media (max-width: 640px) {
  #cart-root .cart-table th,
  #cart-root .cart-table td {
    padding: 0.35rem 0.3rem;
  }

  #cart-root .qty-input {
    width: 3rem;
    padding: 0.3rem;
  }

  #cart-root .remove-item {
    padding: 0.35rem 0.5rem;
    font-size: 0.8rem;
  }
}

/* Premium cart page -- replaces the old table layout with the same
   thumbnail/name/price card language already used for the checkout page's
   Order Summary (.order-summary-divider/.order-summary-final-* are
   literally shared with it, kept visually identical on purpose), plus a
   compact quantity stepper matching the product page's own
   .quantity-stepper look. Mobile-first, cream/gold/green theme throughout. */
.cart-empty-message {
  padding: 1rem 0;
}

.cart-item-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.cart-item-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--card-bg);
  border: 1px solid #E7D5BB;
  border-radius: 12px;
  padding: 0.75rem;
}

.cart-item-thumb {
  flex-shrink: 0;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  object-fit: contain;
  background: var(--card-bg);
}

.cart-item-info {
  flex: 1 1 auto;
  min-width: 0;
}

.cart-item-name {
  font-size: 0.95rem;
  color: var(--text);
  overflow-wrap: break-word;
}

.cart-item-price {
  font-size: 1rem;
  font-weight: bold;
  color: var(--forest-green);
  margin-top: 0.15rem;
}

.cart-item-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.cart-qty-stepper {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.cart-qty-btn {
  display: inline-block;
  background: var(--card-bg);
  border: none;
  width: 2rem;
  font-size: 1rem;
  font-weight: bold;
  line-height: 1.9rem;
  color: var(--deep-forest-green);
  cursor: pointer;
  padding: 0;
}

.cart-qty-btn:hover:not(:disabled) {
  background: var(--light-sage);
}

.cart-qty-btn:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.cart-qty-value {
  display: inline-block;
  min-width: 2rem;
  text-align: center;
  line-height: 1.9rem;
  font-size: 0.9rem;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
}

/* Small, unobtrusive text link -- deliberately not a button, and nowhere
   near the sitewide .button/button size this page used to inherit. */
.cart-remove-link {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.8rem;
  color: var(--muted);
  text-decoration: underline;
  cursor: pointer;
}

.cart-remove-link:hover:not(:disabled) {
  color: var(--forest-green);
}

.cart-remove-link:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.cart-order-summary {
  background: var(--card-bg);
  border: 1px solid #E7D5BB;
  border-radius: 12px;
  padding: 0.85rem 1rem;
}

.cart-checkout-link {
  margin-top: 0.75rem;
  margin-bottom: 0;
  text-decoration: none;
  text-align: center;
}

.pricing-note,
.muted {
  color: var(--muted);
  font-size: 0.875rem;
}

.site-footer {
  background: var(--header-footer-bg);
  color: var(--deep-forest-green);
  padding: 1.5rem 1rem 1rem;
  margin-top: 2rem;
  font-size: 0.875rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  max-width: 900px;
  margin: 0 auto;
}

@media (min-width: 640px) {
  .footer-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Overridden from --muted-gold to --forest-green: the approved cream-theme
   palette gives footer headings their own explicit colour ("Footer
   headings: #2E7D32"), distinct from footer body text/links
   (--deep-forest-green, #173F2B) below -- the old single yellow accent
   also read poorly as text directly on the new cream footer background,
   same issue as the header tagline/auth-note above. */
.footer-group h3 {
  color: var(--forest-green);
  font-size: 0.95rem;
  margin: 0 0 0.5rem;
}

.footer-group ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-group li {
  margin-bottom: 0.35rem;
}

.footer-group a {
  color: var(--deep-forest-green);
}

.footer-group .placeholder,
.site-footer .placeholder {
  color: var(--deep-forest-green);
  font-style: italic;
}

/* border-top added (was none) to give the approved palette's "Footer
   divider: #E8E0F0" swatch an actual use -- a single subtle rule
   separating the copyright line from the grid/policies above, not a
   change to the existing column or policy-row layout. */
.copyright {
  text-align: center;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid #E5E5E5;
  opacity: 0.85;
}

/* Background devotional audio toggle (2026-11-21). Deliberately the
   quietest control on the page: footer-sized text, no border, no
   background, no icon badge -- it must read as a footer link, never as a
   music player. It is rendered with the `hidden` attribute and only
   revealed by /static/bhajan.js once audio is really playing, so it
   occupies no space at all on a shop with no audio file. The 44px
   min-height keeps it a real, comfortable tap target on mobile, and the
   focus ring is left to the browser so keyboard users can find it.

   The wrapper carries NO margin on purpose: when the button is hidden
   the paragraph must collapse to nothing, leaving the footer pixel-for-
   pixel as it is today (measured: 276px at 390px wide, both before this
   change and with no audio file uploaded). The spacing lives on the
   button instead, so it disappears with it -- rather than relying on
   :has(), which older mobile browsers do not support. */
.footer-audio-toggle {
  text-align: center;
  margin: 0;
}

.footer-audio-toggle button {
  margin-top: 0.5rem;
  min-height: 44px;
  padding: 0 0.5rem;
  border: 0;
  background: none;
  font: inherit;
  font-size: 0.8125rem;
  color: inherit;
  opacity: 0.7;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-audio-toggle button:hover,
.footer-audio-toggle button:focus-visible {
  opacity: 1;
}

/* `hidden` must win over the paragraph's own display, or the toggle
   would be visible before any audio has started. */
.footer-audio-toggle button[hidden] {
  display: none;
}

/* Compact mobile footer -- explicit instruction, target at least 50%
   height reduction at 390px with the same content (measured before/after
   via a real DOM measurement, not estimated -- see the implementation
   report). Two levers do almost all of the work: the 2-column grid below
   (was 1 column -- 4 stacked groups became 2 rows of 2, roughly halving
   .footer-grid's own height on its own) and tighter padding/margins
   throughout. Font sizes are reduced only modestly (0.95rem/0.875rem
   down to 0.8rem/0.75rem) specifically to avoid "shrink text excessively"
   -- still comfortably readable, not the thing doing the height work.
   Desktop is completely untouched -- every rule here is inside this one
   mobile media query, and the existing @media(min-width:640px) 4-column
   override a few rules up still wins there regardless (media-query
   specificity ties go to whichever applies, and max-width:640/min-
   width:640 are mutually exclusive by construction). */
@media (max-width: 640px) {
  .site-footer {
    padding: 0.6rem 1rem 0.5rem;
    margin-top: 0.75rem;
    font-size: 0.8rem;
  }

  /* TRIAL three-column layout, per explicit instruction to compare
     against the two-column version above it in this file's history
     (kept in the git-free backup .bak file, not duplicated here) --
     Shop / My Ayurvedic / Customer Support side by side, Policies
     spanning the full width below as a compact wrapping row instead of a
     cramped third-column list, copyright unchanged (already centered).
     DOM order is unchanged (My Ayurvedic, Shop, Customer Support,
     Policies -- see renderFooter() in layout.js) -- order: below only
     reassigns VISUAL position via CSS grid order, so reading/tab order
     for assistive tech stays the original, more logical sequence. */
  .footer-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem 0.6rem;
  }

  .footer-group:nth-child(1) {
    order: 2;
  }

  .footer-group:nth-child(2) {
    order: 1;
  }

  .footer-group:nth-child(3) {
    order: 3;
  }

  .footer-group:nth-child(4) {
    order: 4;
    grid-column: 1 / -1;
  }

  /* Policies as a compact, labelled wrapping row instead of a narrow
     stacked column -- explicit instruction ("if this is more readable
     than squeezing them into a narrow column"). gap provides the visual
     separation between items in place of the vertical list's own
     margin-bottom. */
  .footer-group:nth-child(4) ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 0.9rem;
  }

  .footer-group:nth-child(4) li {
    margin-bottom: 0;
  }

  .footer-group h3 {
    font-size: 0.8rem;
    margin-bottom: 0.25rem;
  }

  .footer-group li {
    margin-bottom: 0.15rem;
  }

  .copyright {
    margin-top: 0.4rem;
    font-size: 0.75rem;
  }
}

/* Login / Signup -- premium, centered card, same design for both pages.
   Reuses the existing approved palette only (cream, forest green, sage,
   gold) -- no new colors introduced except a single, standard error-red
   for validation messages, which the palette doesn't define. Mobile-first:
   the card is full-width with side padding below ~480px and settles to a
   fixed max-width above it, so nothing overflows horizontally at any size
   including a ~390px viewport. */
.auth-page {
  display: flex;
  justify-content: center;
  padding: 1.5rem 1rem;
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 2px 16px rgba(48, 40, 58, 0.08);
  padding: 1.5rem 1.5rem;
}

.auth-title {
  margin: 0 0 0.2rem;
  color: var(--deep-forest-green);
  font-size: 1.3rem;
  text-align: center;
}

.auth-subtitle {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

/* Root cause fix (2026-10-24): .auth-form's unconditional "display: flex"
   above is an AUTHOR rule, and author rules always beat the browser's
   built-in "[hidden] { display: none }" rule regardless of selector
   specificity -- user-agent defaults are the lowest-priority cascade tier,
   below ANY author rule. So JS setting element.hidden = true was doing
   nothing visually here: the form stayed rendered the whole time,
   confirmed by production screenshot evidence (the "already signed in"
   message appeared directly above a fully rendered, fully interactive
   Signup form). This explicit, higher-specificity rule makes the hidden
   attribute win again. Loading/authenticated blocks get the equivalent
   treatment so none of account-auth.js's state toggles can silently fail
   the same way. */
.auth-form[hidden],
.auth-info[hidden],
.auth-authenticated[hidden] {
  display: none;
}

.auth-authenticated {
  text-align: center;
}

.auth-authenticated p {
  margin: 0 0 1rem;
  color: var(--deep-forest-green);
  font-size: 0.95rem;
}

.auth-authenticated .button {
  text-align: center;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 0.6rem;
}

.auth-field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}

.auth-field input,
.auth-otp-input {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem; /* 16px minimum avoids iOS Safari zoom-on-focus */
  font-family: inherit;
  color: var(--text);
  background: var(--bg-main);
  min-height: 44px; /* tap-target size preserved even with tighter padding */
}

.auth-field input:focus,
.auth-otp-input:focus {
  outline: none;
  border-color: var(--forest-green);
  box-shadow: 0 0 0 3px rgba(112, 74, 131, 0.15);
}

.auth-otp-input {
  text-align: center;
  font-size: 1.4rem;
  letter-spacing: 0.4em;
  font-weight: 600;
}

.auth-error {
  min-height: 1.1em;
  font-size: 0.82rem;
  color: #B3261E;
  margin: -0.15rem 0 0.4rem;
}

.auth-error a {
  color: #B3261E;
  text-decoration: underline;
}

.auth-info {
  margin: 0 0 0.6rem;
  font-size: 0.86rem;
  color: var(--deep-forest-green);
  background: var(--light-sage);
  border-radius: 8px;
  padding: 0.5rem 0.7rem;
}

.auth-primary-btn {
  width: 100%;
  padding: 0.7rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 8px;
  margin-top: 0.15rem;
  min-height: 44px;
}

button.auth-primary-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.auth-secondary-actions {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.6rem;
  flex-wrap: wrap;
}

.auth-link-btn {
  background: none;
  border: none;
  padding: 0.3rem 0;
  color: var(--forest-green);
  text-decoration: underline;
  font-size: 0.85rem;
}

.auth-link-btn:hover {
  background: none;
  color: var(--primary-blue-dark);
}

.auth-status {
  min-height: 1.1em;
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0.5rem 0 0;
}

.auth-switch {
  text-align: center;
  margin: 1rem 0 0;
  font-size: 0.87rem;
  color: var(--muted);
}

.auth-switch a {
  color: var(--forest-green);
  font-weight: 600;
}

@media (max-width: 480px) {
  .auth-page {
    padding: 0.85rem 0.75rem;
  }
  .auth-card {
    padding: 1.1rem 1rem;
    border-radius: 12px;
  }
  .auth-title {
    font-size: 1.2rem;
  }
}

/* My Orders / Order Tracking (2026-10-28). */

.my-orders-row {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  border-radius: 8px;
  padding: 0.3rem;
  margin: -0.3rem;
}

.my-orders-row:hover {
  background: var(--light-sage);
}

.delivery-timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
}

.delivery-timeline-step {
  position: relative;
  padding: 0.5rem 0 0.5rem 1.6rem;
  border-left: 2px solid var(--border);
  color: var(--muted);
  font-size: 0.9rem;
}

.delivery-timeline-step::before {
  content: "";
  position: absolute;
  left: -0.45rem;
  top: 0.65rem;
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 50%;
  background: var(--card-bg);
  border: 2px solid var(--border);
}

.delivery-timeline-step:last-child {
  border-left-color: transparent;
}

.delivery-timeline-step.delivery-timeline-reached {
  color: var(--text);
  border-left-color: var(--forest-green);
}

.delivery-timeline-step.delivery-timeline-reached::before {
  background: var(--forest-green);
  border-color: var(--forest-green);
}

.delivery-timeline-label {
  font-weight: 600;
  display: block;
}

.delivery-timeline-time {
  font-size: 0.78rem;
  color: var(--muted);
}

/* 2026-10-30: shared container for the 6 new info/legal pages (Privacy,
   Shipping, Return & Refund, Terms, About Us, Contact Us) -- plain,
   readable prose on a white card, matching the theme tokens everything
   else on the site already uses so this isn't a visually separate
   "unstyled" page. <main> (above) already caps/centers overall page
   width; this only styles the card itself. */
.policy-page {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 2px 16px rgba(48, 40, 58, 0.08);
  padding: 1.75rem 1.75rem 2.25rem;
  color: var(--text);
  line-height: 1.6;
}

.policy-page h1 {
  color: var(--deep-forest-green);
  margin: 0 0 0.3rem;
  font-size: 1.6rem;
}

.policy-updated {
  color: var(--muted);
  font-size: 0.85rem;
  margin: 0 0 1.5rem;
}

.policy-page h2 {
  color: var(--deep-forest-green);
  font-size: 1.1rem;
  margin: 1.5rem 0 0.5rem;
}

.policy-page p,
.policy-page li {
  font-size: 0.95rem;
}

.policy-page ul,
.policy-page ol {
  padding-left: 1.4rem;
  margin: 0.5rem 0;
}

.policy-page a {
  color: var(--forest-green);
}

@media (max-width: 640px) {
  .policy-page {
    padding: 1.25rem 1.1rem 1.75rem;
  }

  .policy-page h1 {
    font-size: 1.35rem;
  }
}

/* Legacy category anchors (2026-11-19). #hair-oil, #hair-spray and
   #face-mask no longer name a section of their own -- their content moved
   into the Hair Care / Face Care sections. These zero-size targets keep
   those old links landing on the right content instead of the top of the
   page. scroll-margin-top matches .category-section so an alias scrolls
   to exactly the same place the section itself does. */
.anchor-alias {
  display: block;
  height: 0;
  overflow: hidden;
}

/* Category landing pages (2026-11-19) -- /category/hair-care and
   /category/face-care. Mobile-first: one column on a phone, two from
   560px, three from 900px. minmax(0,1fr) rather than 1fr so a long
   product name can never push the grid wider than the screen. */
.category-page { max-width: 1100px; margin: 0 auto; padding: 1rem 1rem 2.5rem; }
.category-page .breadcrumb { font-size: 0.85rem; margin-bottom: 0.75rem; }
.category-page .breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0; padding: 0; }
.category-page .breadcrumb li + li::before { content: "/"; margin-right: 0.4rem; opacity: 0.55; }
.category-page-head { margin-bottom: 1.5rem; }
.category-page-head h1 { font-size: 1.6rem; line-height: 1.25; margin: 0 0 0.5rem; }
.category-page-lead { margin: 0 0 0.4rem; max-width: 62ch; line-height: 1.55; }
.category-page-count { margin: 0; font-size: 0.9rem; opacity: 0.75; }
.category-leaf { margin-bottom: 2rem; }
.category-leaf h2 { font-size: 1.15rem; margin: 0 0 0.75rem; }
.category-tiles {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 0.9rem;
  grid-template-columns: repeat(1, minmax(0, 1fr));
}
.category-tile-link {
  display: flex; gap: 0.9rem; align-items: center;
  padding: 0.75rem; border: 1px solid #e3e3e3; border-radius: 10px;
  text-decoration: none; color: inherit; background: #fff; height: 100%;
}
.category-tile-media { flex: 0 0 88px; }
.category-tile-media img { width: 88px; height: 88px; object-fit: contain; display: block; }
.category-tile-noimage { display: block; width: 88px; height: 88px; font-size: 0.7rem; opacity: 0.6; }
.category-tile-body { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }
.category-tile-name { font-weight: 600; line-height: 1.3; }
.category-tile-size, .category-tile-sub { font-size: 0.82rem; opacity: 0.7; }
.category-tile-price { font-weight: 700; margin-top: 0.2rem; }
.category-page-cross { border-top: 1px solid #e3e3e3; padding-top: 1rem; }
.category-page-cross h2 { font-size: 1rem; margin: 0 0 0.5rem; }
.category-page-cross ul { list-style: none; display: flex; flex-wrap: wrap; gap: 0.9rem; margin: 0; padding: 0; }
@media (min-width: 560px) {
  .category-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .category-page-head h1 { font-size: 1.9rem; }
}
@media (min-width: 900px) {
  .category-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Product FAQ (2026-11-24, organic-search phase). Deliberately built
   from the variables and shapes already used by .brand-info and the
   product cards -- same border, radius, card background and accent
   colour -- so this introduces no new visual concept. <details> is a
   native element, so it needs no JavaScript. */
.product-faq {
  margin: 1.5rem 0;
}

.product-faq-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card-bg);
  margin-bottom: 0.5rem;
  padding: 0.75rem 0.9rem;
}

.product-faq-item > summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
  list-style: none;
}

.product-faq-item > summary::-webkit-details-marker { display: none; }

.product-faq-item > summary::after {
  content: " +";
  color: var(--gold-text);
  font-weight: 700;
}

.product-faq-item[open] > summary::after { content: " \2013"; }

.product-faq-item > p {
  margin: 0.6rem 0 0;
  color: var(--text);
  line-height: 1.55;
}

/* Two-stage checkout (2026-11-27). Stage visibility is the plain HTML
   `hidden` attribute, so no rule is needed for it. The confirmation block
   reuses the existing .checkout-totals / .order-summary-* styles, so the
   only genuinely new pieces are the Stage 1 action card, the Stage 2
   confirmation card and its delivery-service strip. Every colour is an
   existing :root token. */
.checkout-continue-card,
.checkout-confirm-card {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.checkout-continue-card .pending-note {
  margin: 0;
  font-size: 0.8rem;
  text-align: center;
}

.checkout-confirm-service {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.7rem 0.8rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.checkout-confirm-service-label {
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.checkout-confirm-service-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--deep-forest-green);
}

.checkout-confirm-service-eta {
  font-size: 0.82rem;
  color: var(--text);
}

.checkout-confirm-card .checkout-secondary-button {
  align-self: flex-start;
}

@media (max-width: 620px) {
  .checkout-confirm-card .checkout-secondary-button {
    align-self: stretch;
    text-align: center;
  }
}

/* "What this pack contains" (2026-11-28). A short, factual block on the
   multi-unit pack pages only, stating what the pack gives that the single
   bottle does not. Reuses the existing card tokens and the same 1.5rem
   section rhythm as .product-video-section / .product-faq above. */
.product-pack-section {
  margin: 1.5rem 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card-bg);
  padding: 0.9rem 1rem;
}

.product-pack-section h2 {
  margin: 0 0 0.6rem;
  font-size: 1.05rem;
  color: var(--deep-forest-green);
}

.product-pack-facts {
  margin: 0;
  padding-left: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.product-pack-facts li {
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--text);
}

.product-pack-note {
  margin: 0.75rem 0 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.product-pack-note a {
  color: var(--gold-text);
}

@media (max-width: 560px) {
  .product-pack-section {
    padding: 0.8rem 0.85rem;
  }

  .product-pack-facts {
    padding-left: 1rem;
  }
}

/* Blue Dart serviceability refusal popup (2026-11-27). Red accent on the
   existing .modal-box, so the dialog reads as an error without any new
   layout: same overlay, same box geometry, same close button as the
   signup modal already uses. Placed BEFORE the Parcel Safety Guide
   section on purpose -- test/parcel-safety.test.js treats everything
   from that marker to the end of this file as that component's own CSS. */
.modal-box-error {
  border: 1px solid #D9534F;
  border-top: 4px solid #D9534F;
}

.modal-box-error .modal-title-error {
  color: #C9302C;
}

.modal-box-error p {
  color: var(--text);
}

/* ===================================================================
   Parcel Safety Guide (2026-11-25)
   -------------------------------------------------------------------
   A full-screen overlay on mobile, a centred premium panel on desktop,
   presenting four supplied artwork files. Scoped entirely under .psg-*
   so it cannot affect any existing rule.

   SECOND PASS: the slides used to be inline SVG with the Hindi copy set
   in HTML beside them. They are now the artwork itself, which already
   carries the branding, headings, body copy and warnings. So every rule
   for slide typography is GONE rather than left hidden -- the only type
   styled here is the acknowledgement button's own label.

   EVERY colour is one this stylesheet already owned:
     #2F7D32  --add-to-cart-bg      the site's approved brand green
     #255F27  --add-to-cart-bg-hover
     #FAF7F0  --header-footer-bg    warm cream
     #1F1F1F  --text                charcoal
     #E5E5E5  --border
   Nothing new was invented, and the var() fallbacks mean the overlay
   still renders correctly if a token is ever renamed.
   =================================================================== */
.psg-root {
  position: fixed;
  inset: 0;
  z-index: 2147483000; /* above the header, the cart drawer and any existing modal */
  display: flex;
  align-items: center;
  justify-content: center;
  /* dvh, with a vh fallback for browsers that lack it, so the mobile
     address bar collapsing cannot clip the acknowledgement button. */
  height: 100vh;
  height: 100dvh;
}

.psg-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(31, 31, 31, .62);
}

/* The panel is a flex column: stage (flexible) then controls then the
   acknowledgement (both fixed). The artwork can therefore never overlap
   or displace the controls, because the stage only ever gets the space
   they leave -- no --psg-chrome arithmetic to keep in step with the CSS.
   That hand-computed value was removed on 2026-11-25. */
.psg-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  /* The artwork, the nav row and the Continue button are centred as ONE
     group (2026-11-25). Previously the stage stretched to fill, which
     pinned the controls to the bottom edge and left the artwork floating
     in the middle with uneven space around it. Centring the group gives
     equal margins above and below the whole thing, which is what makes
     a smaller image read as deliberate rather than lost. */
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 100%;
  /* The horizontal gutter, as a token, so the artwork's size rule below
     can work from the real inner width. The short-viewport block
     redefines it to match its own tighter padding. */
  --psg-gutter: 24px;
  /* Safe-area insets: on a notched Android or iPhone the artwork must
     clear the status bar and the button must clear the home indicator. */
  padding: calc(env(safe-area-inset-top, 0px) + 12px)
           max(12px, env(safe-area-inset-right, 0px))
           calc(env(safe-area-inset-bottom, 0px) + 12px)
           max(12px, env(safe-area-inset-left, 0px));
  background: var(--header-footer-bg, #FAF7F0);
  box-sizing: border-box;
  overflow: hidden; /* the artwork is sized to fit, so nothing should scroll */
}

.psg-panel:focus { outline: none; }
.psg-panel:focus-visible { outline: 3px solid var(--add-to-cart-bg, #2F7D32); outline-offset: -3px; }

/* The stage takes whatever height is left once the chrome has had its
   share, so the controls below are always reachable. */
/* The stage takes whatever height is left once the controls have had
   theirs, and `min-height: 0` is what lets it actually shrink -- without
   it a flex item refuses to go below its content size and the artwork
   pushes the controls off the bottom of the screen.
   This is the measurement: the browser does it, so there is no
   hand-computed chrome height to drift out of date. */
/* `flex: 0 1 auto` -- size to the artwork, and shrink if the viewport is
   too short, but never grow into empty space. `min-height: 0` is what
   permits the shrink; without it a flex item refuses to go below its
   content size and the Continue button is pushed off the bottom, which
   is exactly what the Android screenshots showed. */
.psg-stage {
  flex: 0 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.psg-slide {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-height: 100%;
  min-height: 0;
}

.psg-slide[hidden] { display: none; }

/* The artwork. Portrait 1086x1448 (3:4).
   REWRITTEN 2026-11-25 after a real device showed a large blank white
   area. The previous rule forced `width: 100%` together with
   `aspect-ratio: 1086/1448` and a white `background`, which meant the
   ELEMENT always occupied the full panel width at full portrait height
   whatever the picture needed. Two consequences, both visible:
     - whenever max-height capped the height, the box stayed full width
       and `contain` letterboxed the picture inside it, painting white
       bars down each side;
     - when the file failed to load, that same full-size white box
       remained, with the alt text inside it.
   Letting the image size ITSELF removes both. max-width/max-height cap
   it against the space flexbox has measured, and width/height auto let
   it take exactly the smaller of the two constraints -- so the element
   is the picture, never a container around it.

   `contain` and `object-position` stay for the case where a future
   image has a different ratio; `cover` is still never used, because it
   would crop the embedded Hindi text. */
/* THE ONE SIZING RULE, and it is the same for all four slides.
   Rewritten 2026-11-25 after slide 1 looked larger than slide 4.

   The size is derived from the VIEWPORT, never from the image or its
   container. That matters for two reasons:
     - all four slides are 1086x1448, so one viewport-derived size means
       they are identical by construction and switching slides cannot
       resize anything or move the controls;
     - it does not depend on the picture having loaded, so a lazily
       loaded slide reserves exactly the right box and there is no jump
       when its file arrives.

   78% of the pre-reduction size, as asked. Pre-reduction filled the
   panel's inner width, so that height was innerWidth x 1448/1086; 78%
   of it is innerWidth x 1.04 -- which is the first term below.

   `height` drives and `width` follows from aspect-ratio, so the picture
   is never stretched and the element is exactly its own shape: there is
   nothing for `contain` to letterbox and no white box to show. 55dvh is
   the safety net for a short viewport (a landscape phone, the keyboard
   open, or Android's address bar), and it uses the REAL browser
   viewport rather than screen height. max-width is the last guard on a
   very wide-but-short screen.

   No transform: scale() anywhere -- this is real layout space, so the
   controls move up with the artwork instead of staying put. */
.psg-img {
  display: block;
  height: min(calc((100vw - var(--psg-gutter)) * 1.04), 55vh, 1448px);
  height: min(calc((100vw - var(--psg-gutter)) * 1.04), 55dvh, 1448px);
  width: auto;
  aspect-ratio: 1086 / 1448;
  max-width: calc(100vw - var(--psg-gutter));
  object-fit: contain;
  object-position: center;
  border-radius: 10px;
}

.psg-controls {
  display: flex;
  gap: .5rem;
  flex: 0 0 auto;
  width: 100%;
  max-width: 360px;
}

.psg-btn {
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
  border-radius: 10px;
  cursor: pointer;
  box-sizing: border-box;
}

.psg-btn:focus-visible {
  outline: 3px solid var(--add-to-cart-bg-hover, #255F27);
  outline-offset: 2px;
}

/* Icon-only navigation: the arrows and the pause glyph need no words,
   and words here would be more text competing with the artwork. The
   accessible name comes from aria-label instead. */
.psg-btn-ghost {
  flex: 1 1 0;
  height: 44px;   /* the standard minimum touch target, trimmed from 48 */
  padding: 0;
  font-size: 1.125rem;
  background: #FFFFFF;
  color: var(--add-to-cart-bg-hover, #255F27);
  border: 1.5px solid var(--add-to-cart-bg, #2F7D32);
}

.psg-btn-ghost:hover { background: #F2F8F2; }

/* The same primary treatment as the site's Add to Cart button, so the
   final action looks like a My Ayurvedic button and not a generic one.
   Kept BELOW the artwork with its own spacing, as specified. */
.psg-btn-primary {
  flex: 0 0 auto;
  width: 100%;
  max-width: 420px;
  height: 48px;   /* trimmed from 52; still a comfortable target */
  padding: 0 1rem;
  background: var(--add-to-cart-bg, #2F7D32);
  color: var(--add-to-cart-text, #FFFFFF);
  border: 1px solid var(--add-to-cart-bg-hover, #255F27);
  font-size: 1.0625rem;
}

.psg-btn-primary:hover { background: var(--add-to-cart-bg-hover, #255F27); }

.psg-btn-primary[disabled] {
  opacity: .6;
  cursor: default;
}

/* The My Orders entry point. Styled as a secondary action so it does not
   compete with the order list itself. */
.psg-launch {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  min-height: 48px;
  padding: .7rem 1rem;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  color: var(--add-to-cart-bg-hover, #255F27);
  background: #FFFFFF;
  border: 1.5px solid var(--add-to-cart-bg, #2F7D32);
  border-radius: 10px;
  cursor: pointer;
}

.psg-launch:hover { background: #F2F8F2; }
.psg-launch:focus-visible { outline: 3px solid var(--add-to-cart-bg-hover, #255F27); outline-offset: 2px; }

/* A restrained cross-fade. No movement, no scale, no flash -- the
   artwork is dense and a sliding transition makes it hard to read. */
@keyframes psg-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.psg-slide:not([hidden]) {
  animation: psg-fade-in .32s ease-out;
}

@media (prefers-reduced-motion: reduce) {
  .psg-slide:not([hidden]) { animation: none; }
}

/* --- Tablet and desktop: a centred premium panel ---------------------
   The artwork is portrait, so the panel is capped at a portrait-friendly
   width rather than stretched across the screen. */
@media (min-width: 700px) {
  .psg-root { padding: 2rem 1rem; }

  .psg-panel {
    width: min(520px, 100%);
    height: min(880px, calc(100dvh - 4rem));
    padding: 18px;
    border-radius: 18px;
    border: 1px solid var(--border, #E5E5E5);
    box-shadow: 0 24px 60px rgba(31, 31, 31, .3);
  }

  /* Desktop is NOT reduced. The mobile cap above exists because a phone
     screen is narrow and tall; a centred 520px panel has neither
     problem, so the artwork goes back to filling the space it is given. */
  /* Desktop is NOT reduced, and does not use the mobile viewport
     formula -- the panel is a fixed 520px column, so the artwork is
     sized from the available height instead. */
  .psg-img {
    height: min(70vh, 1448px);
    height: min(70dvh, 1448px);
    max-width: 100%;
  }
}

/* --- Short viewports (320x640, or any phone with the keyboard open) ---
   Tighten the chrome so the artwork keeps as much height as possible;
   the controls stay at their full touch-target size. */
@media (max-height: 700px) {
  .psg-panel { --psg-gutter: 16px; gap: 8px; padding-top: calc(env(safe-area-inset-top, 0px) + 8px); padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 8px); }
}
