/* Farmavet Services — Design System v3 ("Field Clinic"): warm sand paper, forest-green fills, slate-teal links, soil accents; Bricolage Grotesque + Instrument Sans; hairlines not shadows, 12–24px radii, 44px+ hit targets; plain CSS, no build step. Shared-component markup contract: docs/HANDOFF_NOTES.md ("Round 2 — v3 markup contract" entry). */

/* ----------  Design tokens (v3 "Field Clinic")  ---------- */
:root {
    /* Paper & surfaces */
    --paper:   #f5f2ea;
    --paper-2: #ece7da;
    --surface: #ffffff;
    --line:    #e3ddcf;
    --line-2:  #cfc7b3;
    --line-3:  #948b72; /* control borders (inputs, stepper, textarea) — 3.39:1 on white (D-013) */
    --ink:     #1a231c;
    --muted:   #5d6a60;
    --muted-2: #8b968d; /* decorative only — never text or placeholders */
    /* Legacy aliases — pages/checkout.css + pages/orders.css consume these directly (out of T-221's file scope); do not delete without migrating both to --line/--surface. */

    /* Forest (brand) */
    --forest-900: #1b2e1f;
    --forest-800: #2a422c; /* the brand fill: primary buttons, hero, WA band */
    --forest-700: #345439; /* links */
    --forest-600: #446d49;
    --forest-500: #5a8a5f;
    --forest-100: #dce9db;
    --forest-50:  #edf4ec;

    /* Teal (links / info / kicker) */
    --teal-700: #3d6670;
    --teal-600: #527a81; /* icons ≥19px only — text uses teal-700 */
    --teal-100: #d8e6e8;
    --teal-50:  #eef4f5;

    /* Soil (badges / accents) */
    --soil-800: #564222;
    --soil-600: #7d6236;
    --soil-100: #ece3d2;

    /* WhatsApp — the brand green keeps ink text/glyph; white on it fails AA */
    --wa:      #22c35e;
    --wa-ink:  #1a231c;
    --wa-dark: #1a9e4a;

    /* Status */
    --danger:    #b83a2c;
    --danger-50: #fbebe8;
    --success:    var(--forest-700);
    --success-50: var(--forest-50);
    --info:       var(--teal-700);
    --info-50:    var(--teal-50);
    --warn:    #85590c; /* 5.55:1 on --warn-50 (D-013) */
    --warn-50: #fdf3df;

    /* Shape */
    --r-sm: 12px;  --r: 14px;  --r-tile: 18px;  --r-card: 20px;  --r-hero: 24px;  --pill: 999px;

    /* Depth — hairline borders everywhere except these two bars */
    --shadow-bar:   0 -8px 24px rgba(27, 46, 31, .06);
    --shadow-float: 0 12px 32px rgba(27, 46, 31, .14);
    --ring: 0 0 0 3px rgba(68, 109, 73, .28);

    /* Sizes */
    --control-h:    48px;
    --cta-h:        56px;
    --hit-min:      44px;
    --header-h:     60px;
    --tabbar-h:     72px;
    --action-bar-h: 84px;
    --safe-b: env(safe-area-inset-bottom, 0px);
    --container: 1200px;

    /* z-scale */
    --z-header:        900;
    --z-tabbar:        900;
    --z-action-bar:    910;
    --z-sheet-overlay: 1000;
    --z-sheet:         1001;
    --z-toast:         1500;
    --z-fly:           2000;

    /* Type */
    --font-head: 'Bricolage Grotesque', 'Helvetica Neue', Arial, sans-serif;
    --font-body: 'Instrument Sans', 'Segoe UI', system-ui, sans-serif;
    --fs-11: .6875rem;
    --fs-12: .75rem;
    --fs-13: .8125rem;
    --fs-14: .875rem;
    --fs-15: .9375rem;
    --fs-16: 1rem;
    --fs-18: 1.125rem;
    --fs-22: 1.375rem;
    --fs-26: 1.625rem;
    --fs-30: 1.875rem;

    /* Motion */
    --ease-out:    cubic-bezier(.22, 1, .36, 1);
    --ease-spring: cubic-bezier(.34, 1.4, .64, 1);
    --t-fast: .16s var(--ease-out);
    --t-med:  .28s var(--ease-out);
}

@media (min-width: 900px) {
    :root { --header-h: 76px; }
}

/* Smooth cross-fade between pages (progressive enhancement) */
@view-transition { navigation: auto; }

/* ----------  Reset & base  ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

html, body { height: 100%; }

body {
    margin: 0;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: var(--fs-15);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }

a { color: var(--forest-700); text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--forest-800); }

h1, h2, h3 {
    font-family: var(--font-head);
    font-weight: 700;
    color: var(--ink);
    line-height: 1.08;
    letter-spacing: -.02em;
    margin: 0 0 .5em;
}
h4, h5 {
    font-family: var(--font-body);
    font-weight: 700;
    color: var(--ink);
    line-height: 1.25;
    margin: 0 0 .5em;
}
h1 { font-weight: 800; font-size: clamp(1.875rem, 1.2rem + 2.6vw, 3.75rem); }
h2 { font-size: clamp(1.375rem, 1.1rem + 1.1vw, 1.875rem); }
h3 { font-size: 1.25rem; }
h1 em, h2 em {
    font-style: italic;
    font-weight: 500;
    color: var(--forest-600);
}
p  { margin: 0 0 1rem; }

:focus-visible {
    outline: 2px solid var(--forest-600);
    outline-offset: 2px;
}

::selection { background: var(--forest-100); }

.visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* Skip link */
.skip-link {
    position: absolute;
    left: 12px;
    top: -60px;
    z-index: 2000;
    background: var(--forest-700);
    color: #fff;
    padding: 12px 18px;
    border-radius: var(--r-sm);
    font-weight: 700;
    transition: top var(--t-fast);
}
.skip-link:focus { top: 12px; color: #fff; }

/* Non-italic accent span (replaces italic <em> accents in copy) */
.accent { color: var(--forest-600); font-style: normal; }

/* Inline text button — no border/background, 44px hit height */
.link-btn {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0;
    background: none;
    border: 0;
    color: var(--forest-700);
    font-weight: 600;
    font-size: inherit;
    cursor: pointer;
}
.link-btn:hover { color: var(--forest-800); }

/* JS-only visibility helper (JS adds .js to <html>; a no-JS visitor still
   sees the element this hides — never use it to hide required content). */
.js .js-hide { display: none !important; }

/* ----------  Scroll-reveal (JS adds .js to <html>)  ---------- */
.js [data-reveal] {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .6s var(--ease-out), transform .6s var(--ease-out);
}
.js [data-reveal].is-visible {
    opacity: 1;
    transform: none;
}
.js [data-reveal="fade"] { transform: none; }

/* ----------  Layout helpers  ---------- */
.container {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: 16px;
}
@media (min-width: 900px) {
    .container { padding-inline: 24px; }
}

main {
    flex: 1 0 auto;
    padding: 30px 0 72px;
}
/* G3 fix: clearance for the fixed tab bar/action bar must NOT live here.
   <footer class="site-footer"> is a SIBLING of <main> that renders AFTER
   it (base.html), so padding reserved on `main` only opens blank space
   BEFORE the footer -- the footer itself still ends up flush against the
   true bottom of the document and gets hidden under the fixed bar. The
   real clearance lives on `.site-footer` below (R-5); this rule only
   trims the normal mobile top/bottom gap. */
@media (max-width: 899px) {
    main { padding: 22px 0 24px; }
}

.muted { color: var(--muted); }
.center { text-align: center; }
.section { margin-bottom: 56px; }
.mb-20 { margin-bottom: 20px; }
.mt-16 { margin-top: 16px; }
.mt-18 { margin-top: 18px; }

.section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 22px;
}
.section-head h2 { margin: 0; }
.section-head .lede { margin: 0; color: var(--muted); }

/* Small serif kicker above section titles */
.kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-body);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--teal-700);
    margin-bottom: 10px;
}
.kicker::before {
    content: "";
    width: 22px;
    height: 2px;
    border-radius: 2px;
    background: var(--soil-600);
}

.pagination { margin-top: 30px; display: flex; justify-content: center; align-items: center; gap: 12px; flex-wrap: wrap; }
.pagination__info { color: var(--muted); font-size: .92rem; }

/* ----------  Announcement bar  ---------- (≥900px only — the compact
   phone/tablet header + tab bar already carry the value below that) */
.announce {
    display: none;
    font-size: .82rem;
    font-weight: 600;
    letter-spacing: .02em;
    position: relative;
}
@media (min-width: 900px) {
    .announce { display: block; background: var(--forest-800); color: var(--forest-100); }
}
.announce__inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 36px;
    padding-block: 5px;
    text-align: center;
}
.announce svg { width: 15px; height: 15px; color: var(--forest-100); flex-shrink: 0; }
.announce a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.announce a:hover { color: var(--forest-50); }

/* ----------  Header  ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: var(--z-header);
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    transition: border-color var(--t-med);
}
.site-header.is-scrolled { border-bottom-color: var(--line-2); }

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: var(--header-h);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    flex-shrink: 0;
    line-height: 1.05;
    min-height: 44px;
}
.brand img {
    height: 36px;
    width: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--line);
    transition: transform .4s var(--ease-spring);
}
.brand:hover img { transform: rotate(-6deg) scale(1.05); }
.brand__name {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1.22rem;
    letter-spacing: -.01em;
    color: var(--forest-800);
    display: block;
}
.brand:hover .brand__name { color: var(--forest-700); }
.brand small {
    display: block;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: .64rem;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--muted); /* verifier fix: was --muted-2 (decorative-only token, 3.07:1 on the header surface) on real readable text; --muted clears 4.5:1 AA */
    margin-top: 2px;
}
@media (max-width: 899px) { .brand small { display: none; } }

/* Header search (desktop) */
.header-search {
    flex: 1 1 auto;
    max-width: 400px;
    display: none;
}
.header-search-field {
    position: relative;
    display: flex;
    align-items: center;
}
/* Search pill: shared 48px look for the desktop header field and the
   mobile search row's form — same markup pattern, one set of rules. */
.header-search-field input[type=search],
#mobile-search-row input[type=search] {
    width: 100%;
    height: 48px;
    min-height: 48px;
    padding: 0 50px 0 44px;
    border-radius: var(--pill);
    background: var(--surface);
    border: 1px solid var(--line-3);
    font-size: var(--fs-16);
    transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.header-search-field input[type=search]:focus,
#mobile-search-row input[type=search]:focus {
    border-color: var(--forest-600);
    box-shadow: var(--ring);
}
.header-search-field::before,
#mobile-search-row form::before {
    content: "";
    position: absolute;
    left: 17px;
    top: 50%;
    width: 17px;
    height: 17px;
    transform: translateY(-50%);
    pointer-events: none;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235d6a60' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E") no-repeat center / contain;
}
.header-search-submit {
    position: absolute;
    right: 4px;
    top: 4px;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--forest-700);
    color: #fff;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    transition: background var(--t-fast);
}
.header-search-submit:hover { background: var(--forest-800); }
.header-search-submit svg { width: 15px; height: 15px; }
/* The inline search bar needs real room — below this the icon toggle serves */
@media (min-width: 1150px) { .header-search { display: block; } }

/* Desktop nav */
.main-nav {
    display: none;
    align-items: center;
    gap: 2px;
}
.main-nav a.nav-link {
    position: relative;
    color: var(--ink);
    font-weight: 600;
    font-size: .93rem;
    padding: 9px 13px;
    border-radius: var(--pill);
    white-space: nowrap;
    transition: background var(--t-fast), color var(--t-fast);
}
.main-nav a.nav-link:hover { background: var(--forest-50); color: var(--forest-800); }
.main-nav a.nav-link.is-active { background: var(--forest-50); color: var(--forest-800); }

.nav-actions { display: flex; align-items: center; gap: 10px; }

/* Mobile toggles
   :not(.tab-bar__item) scopes this box model (44px square, border, surface
   background) to the STANDALONE header/tablet toggle buttons only. The tab
   bar's Search/Account items reuse these same two classes purely for their
   JS (`toggleMobileSearch`/`toggleDrawer` `querySelector`) and test
   contracts, and must stay sized only by `.tab-bar__item`'s own flex rules
   (`flex: 1`, no explicit height) so all five tab items render at identical
   width/height -- without this the explicit `height: 44px` here fought
   `.tab-bar__item`'s `min-height: 56px`, leaving Search/Account 3px shorter
   than their siblings -- G3 finding, 2026-09-06. */
.search-toggle:not(.tab-bar__item),
.menu-toggle:not(.tab-bar__item) {
    display: inline-flex;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    cursor: pointer;
    color: var(--ink);
    transition: background var(--t-fast), border-color var(--t-fast);
}
.search-toggle:not(.tab-bar__item):hover, .menu-toggle:not(.tab-bar__item):hover { background: var(--forest-50); border-color: var(--line-2); }
.search-toggle svg { width: 19px; height: 19px; }
.menu-toggle svg { width: 21px; height: 21px; }
/* Icon toggle only earns its keep in the 900–1149 "tablet" band: <900 the
   tab bar's Search item covers it, ≥1150 the inline header pill does. */
@media (max-width: 899px) { .search-toggle { display: none; } }
@media (min-width: 1150px) { .search-toggle { display: none; } }
/* Header Track icon: phones only (the desktop nav has the text link). */
.header-track-link { display: inline-flex; width: 44px; height: 44px; align-items: center; justify-content: center; border-radius: 12px; color: var(--forest-800); }
.header-track-link:hover { background: var(--forest-50); }
@media (min-width: 900px) { .header-track-link { display: none; } }
/* Header back link ({% block header_back %}): phones only; when a page fills
   the block the brand steps aside so the actions stay on screen. Allowed to
   shrink (min-width: 0, no flex-shrink: 0) so a long category name (T-207/
   T-220's product_detail.html filler is owner-editable Category.name, no
   length cap) truncates with an ellipsis instead of overflowing the header
   row and pushing .nav-actions off-screen -- G3 finding, 2026-09-06.
   Brand-hiding is driven by the `has-header-back` BODY class (set by every
   template that fills the header_back block: cart.html, checkout.html,
   product_detail.html, track_order.html -- see their `{% block body_class
   %}`), NOT by `:has()`. `:has()` support (Chrome 105/Safari 15.4/Firefox
   121) is strictly newer than the `@layer`/nesting floor this round already
   rejected for "blast radius on 2021 WebViews" (PLAN.md non-goals, D-013) --
   using it here for a load-bearing layout rule silently overflowed the
   header (brand + back link + Track icon + Cart button all laid out at
   once, pushing Cart off-screen) on any engine without it -- G3 finding,
   2026-09-06. The plain descendant selector below has no support floor at
   all, so it needs no `@supports` fallback. */
.header-back { display: none; }
@media (max-width: 699px) {
    .header-back { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding-right: 6px; color: var(--forest-800); font-weight: 600; font-size: .95rem; min-width: 0; overflow: hidden; }
    .header-back .icon { width: 20px; height: 20px; flex-shrink: 0; }
    .header-back span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
    body.has-header-back .header-content .brand { display: none; }
}
@media (min-width: 900px) {
    .main-nav { display: flex; }
    .menu-toggle { display: none; }
}

.mobile-search-row {
    display: none;
    padding: 0 0 14px;
}
.mobile-search-row.open { display: block; animation: slide-down .25s var(--ease-out); }
@keyframes slide-down {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: none; }
}
.mobile-search-row form { position: relative; }
/* Every product_list state keeps the search row on-screen below 1150px —
   no tap needed to find it (R-6). Other pages still toggle it with .open. */
@media (max-width: 1149px) {
    body.page--shop .mobile-search-row { display: block; }
}

/* Cart pill with badge
   :not(.tab-bar__item) keeps this pill's horizontal padding and dark hover
   fill off the tab bar's Cart item, which reuses `.cart-link` only for its
   JS (`updateCartBadge`/`flyToCart` `querySelectorAll('.cart-link')`) and
   test contracts and must stay sized purely by `.tab-bar__item`'s flex
   rules -- unscoped, the 17px+14px padding made Cart ~31px wider than its
   siblings, and `.cart-link:hover`'s forest-800 fill + lift turned a sticky
   touch :hover on the tab into a dark-green raised pill -- G3 finding,
   2026-09-06. */
.cart-link:not(.tab-bar__item) {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 17px 10px 14px;
    border-radius: var(--pill);
    background: var(--forest-800);
    color: #fff;
    font-weight: 600;
    font-size: .93rem;
    transition: background var(--t-fast), transform .3s var(--ease-spring);
}
.cart-link:not(.tab-bar__item):hover { background: var(--forest-700); color: #fff; transform: translateY(-1px); }
.cart-link svg { width: 18px; height: 18px; }
.cart-badge {
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: var(--pill);
    background: var(--soil-800);
    color: #fff;
    font-size: var(--fs-11);
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.cart-badge.bump { animation: badge-bump .45s var(--ease-spring); }
@keyframes badge-bump {
    0%   { transform: scale(1); }
    40%  { transform: scale(1.45); }
    100% { transform: scale(1); }
}

.verify-flag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border-radius: var(--pill);
    background: var(--warn-50);
    color: var(--warn);
    border: 1px solid var(--line-2);
    font-size: .85rem;
    font-weight: 600;
}
.verify-flag:hover { border-color: var(--warn); }
@media (max-width: 899px) { .nav-actions .verify-flag span { display: none; } }

/* Fly-to-cart ghost (created by JS) */
.cart-fly {
    position: fixed;
    z-index: 2000;
    width: 64px;
    height: 64px;
    object-fit: contain;
    border-radius: 14px;
    background: #fff;
    border: 1px solid var(--line);
    padding: 6px;
    pointer-events: none;
    transition: transform .7s cubic-bezier(.5, -0.1, .75, .4), opacity .7s ease;
}

/* v3 shared-component MARKUP CONTRACT (tab bar/action bar/sheet/search pill/
   pill radios/stepper/steps/summary card/info card/field): docs/HANDOFF_NOTES.md, "Round 2 — v3 markup contract" entry. */

/* ----------  Bottom sheet (the existing #drawer, now phone-only)  ----------
   <900px: a sheet pinned to the bottom (translateY, not off-canvas right).
   ≥900px: no drawer at all — Account lives in the full header nav instead. */
.drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(27, 46, 31, .5);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .28s ease, visibility .28s ease;
    z-index: var(--z-sheet-overlay);
}
.drawer-overlay.open { opacity: 1; visibility: visible; }

.drawer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    max-height: 85vh;
    background: var(--surface);
    border-top: 1px solid var(--line);
    border-radius: var(--r-hero) var(--r-hero) 0 0;
    padding: 10px 18px calc(18px + var(--safe-b));
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow-y: auto;
    transform: translateY(100%);
    visibility: hidden;
    /* Closed: wait for the slide-down to finish before leaving the tab order
       (visibility has no transition of its own, so the 0s duration + .32s
       delay just defers the hidden switch). */
    transition: transform .32s var(--ease-out), visibility 0s .32s;
    z-index: var(--z-sheet);
}
.drawer.open {
    transform: none;
    visibility: visible;
    /* Open: become visible immediately (no delay) so focus can land inside
       right away, while the slide-up still animates over .32s. */
    transition: transform .32s var(--ease-out), visibility 0s;
}
.drawer__handle {
    width: 40px;
    height: 5px;
    border-radius: var(--pill);
    background: var(--line-2);
    margin: 2px auto 12px;
    flex-shrink: 0;
}
@media (min-width: 900px) {
    .drawer, .drawer-overlay { display: none; }
}
.drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 14px;
    margin-bottom: 10px;
    border-bottom: 1px solid var(--line);
}
.drawer-head span {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--forest-800);
}
.close-btn {
    width: 40px; height: 40px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--paper-2);
    border: 1px solid var(--line);
    border-radius: 10px;
    font-size: 22px; line-height: 1;
    color: var(--ink);
    cursor: pointer;
    transition: background var(--t-fast);
}
.close-btn:hover { background: var(--forest-100); }
.drawer a.drawer-link {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 48px;
    padding: 8px 14px;
    border-radius: 12px;
    color: var(--ink);
    font-weight: 600;
    transition: background var(--t-fast);
}
.drawer a.drawer-link:hover { background: var(--forest-50); color: var(--forest-800); }
.drawer .drawer-sep { height: 1px; background: var(--line); margin: 10px 2px; flex-shrink: 0; }
.drawer .mt-8 { margin-top: 8px; }

/* ----------  Bottom tab bar (primary phone/tablet navigation, <900px)  ---------- */
.tab-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: var(--z-tabbar);
    display: flex;
    height: calc(var(--tabbar-h) + var(--safe-b));
    padding-bottom: var(--safe-b);
    background: var(--surface);
    border-top: 1px solid var(--line);
}
@media (min-width: 900px) { .tab-bar { display: none; } }
.tab-bar__item {
    flex: 1;
    min-height: 56px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    margin: 6px 2px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: var(--muted);
    font-family: inherit;
    font-size: var(--fs-11);
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    position: relative;
}
.tab-bar__item .icon { width: 22px; height: 22px; }
.tab-bar__label { line-height: 1; }
.tab-bar__item.is-active {
    color: var(--forest-800);
    font-weight: 700;
    background: var(--forest-50);
}
.tab-bar__item .cart-badge { position: absolute; top: 2px; left: calc(50% + 8px); }

/* ----------  Fixed bottom action bar (product/cart/checkout, <700px)  ----------
   Aliases the pre-existing .buy-bar family (product_detail.html) so both
   markups share one look — buy-bar's class names are test-asserted. */
.action-bar, .buy-bar { display: none; }
.action-bar-spacer, .buy-bar-spacer { display: none; }
@media (max-width: 699px) {
    .action-bar, .buy-bar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 14px;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: var(--z-action-bar);
        background: var(--surface);
        border-top: 1px solid var(--line);
        box-shadow: var(--shadow-bar);
        padding: 12px 16px calc(14px + var(--safe-b));
    }
    .action-bar__info, .buy-bar__info { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
    .action-bar__label, .buy-bar__label { font-size: var(--fs-11); font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
    .action-bar__price, .buy-bar__price { margin: 0; }
    .action-bar > .btn, .buy-bar__btn { flex: 1; flex-shrink: 0; }
    .action-bar-spacer, .buy-bar-spacer { display: block; height: calc(var(--action-bar-h) + var(--safe-b)); }
    body.has-action-bar .tab-bar { display: none; }
    /* G3 fix: same relocation as the tab-bar clearance above -- the footer
       (a sibling AFTER </main>), not `main`, needs the reserved space. */
    body.has-action-bar .site-footer { padding-bottom: calc(var(--action-bar-h) + var(--safe-b) + 24px); }
}

/* ----------  Buttons  ---------- */
button { font-family: inherit; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: var(--control-h);
    padding: 0 22px;
    font-family: var(--font-body);
    font-size: var(--fs-15);
    font-weight: 600;
    line-height: 1.1;
    border-radius: var(--r);
    border: 1px solid transparent;
    background: var(--forest-800);
    color: #fff;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast);
}
.btn:hover {
    background: var(--forest-900);
    color: #fff;
}
.btn:active { transform: scale(.985); }
.btn:disabled, .btn[disabled] {
    background: var(--paper-2);
    color: var(--muted);
    cursor: not-allowed;
    transform: none;
}
.btn svg { flex-shrink: 0; }


.btn--outline {
    background: var(--surface);
    color: var(--forest-800);
    border-color: var(--line-3); /* D-013: border is the only boundary cue on white parents — line-2 was 1.68:1, line-3 is 3.39:1 */
}
.btn--outline:hover { background: var(--forest-50); color: var(--forest-900); }

.btn--ghost {
    background: transparent;
    color: var(--forest-800);
    border-color: transparent;
}
.btn--ghost:hover { background: var(--forest-50); color: var(--forest-900); }


.btn--wa { background: var(--wa); color: var(--wa-ink); }
.btn--wa:hover { background: var(--wa-dark); color: var(--wa-ink); }

.btn--light {
    background: #fff;
    color: var(--forest-800);
    border-color: var(--line);
}
.btn--light:hover { color: var(--forest-900); background: var(--forest-50); }

.btn--sm { min-height: 44px; padding: 0 16px; font-size: var(--fs-14); border-radius: var(--r-sm); } /* 44px hit target (R-11) — the design's 40px is below the floor */
.btn--lg { min-height: var(--cta-h); padding: 0 26px; font-size: var(--fs-16); border-radius: 16px; }
.btn--block { width: 100%; }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.btn-row--center { justify-content: center; }

.main-nav form, .nav-actions form { margin: 0; }
.drawer form { margin: 0; width: 100%; }
.drawer form .btn { width: 100%; }

/* ----------  Cards  ---------- */
.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-card);
    padding: 16px;
    margin-bottom: 24px;
}
@media (min-width: 700px) {
    .card { padding: 22px; }
}
.card h2:first-child,
.card h3:first-child { margin-top: 0; }

/* ----------  Page heading  ---------- */
.page-head { margin-bottom: 30px; }
.page-head h1 { margin-bottom: 8px; }
.page-head .lede { color: var(--muted); font-size: 1.05rem; max-width: 62ch; margin: 0; }
.page-head--accent { border-left: 3px solid var(--forest-100); padding-left: 20px; }
.page-head--center { text-align: center; padding: 14px 20px 0; }
.page-head--center .lede { margin-inline: auto; }

/* ----------  Trust chips  ---------- */
.trust-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
    list-style: none;
    padding: 0;
}
.trust-chips li {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: .84rem;
    font-weight: 600;
    color: var(--forest-800);
    background: var(--forest-50);
    border: 1px solid var(--forest-100);
    padding: 7px 14px;
    border-radius: var(--pill);
}
.trust-chips svg { width: 15px; height: 15px; color: var(--forest-600); flex-shrink: 0; }

/* On dark hero */
.hero .trust-chips li {
    color: var(--forest-50);
    background: rgba(255,255,255,.07);
    border-color: rgba(255,255,255,.16);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.hero .trust-chips svg { color: var(--soil-100); }

/* ----------  Hero (shop landing) — dark forest, floating decor ---------- */
.hero {
    position: relative;
    border-radius: var(--r-hero);
    overflow: hidden;
    background:
        radial-gradient(900px 500px at 85% 115%, rgba(68,109,73,.4), transparent 60%),
        radial-gradient(700px 380px at 8% -30%, rgba(125,98,54,.14), transparent 55%),
        linear-gradient(135deg, var(--forest-900) 0%, var(--forest-800) 100%);
    box-shadow: 0 0 0 1px var(--line-2);
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    align-items: stretch;
    isolation: isolate;
}
.hero__content {
    position: relative;
    z-index: 1;
    padding: 60px 26px 60px 52px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    align-self: flex-start;
    font-size: .76rem;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--soil-100);
    background: rgba(125,98,54,.18);
    border: 1px solid rgba(125,98,54,.35);
    padding: 7px 15px;
    border-radius: var(--pill);
    margin-bottom: 22px;
}
.hero__eyebrow svg { width: 14px; height: 14px; color: var(--soil-100); }
.hero h1 {
    color: #fff;
    font-size: clamp(2.2rem, 1.5rem + 3.2vw, 3.6rem);
    margin-bottom: 16px;
    text-wrap: balance;
}
.hero h1 em {
    font-style: italic;
    font-weight: 480;
    color: var(--forest-100);
}
.hero .lede {
    color: rgba(233, 244, 237, .82);
    font-size: 1.08rem;
    max-width: 46ch;
    margin: 0 0 26px;
}
.hero .btn-row { gap: 14px; }

/* Floating glass chips on the hero panel — kept for T-212's desktop chips */
.hero__chip {
    position: absolute;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 11px 16px;
    border-radius: 14px;
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.2);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #fff;
    font-size: .82rem;
    font-weight: 600;
    box-shadow: 0 10px 30px rgba(0,0,0,.25);
    white-space: nowrap;
}
.hero__chip svg { width: 17px; height: 17px; color: var(--soil-100); flex-shrink: 0; }
.hero__chip--1 { top: 15%; left: 8%; }
.hero__chip--2 { bottom: 14%; right: 9%; }

/* ----------  Category tiles + horizontal scroller: .cat-tile is a 104px vertical card in .hscroll (phones), a horizontal 4-up row in .tile-grid (≥900px)  ---------- */
.hscroll {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
    padding-bottom: 4px;
}
.hscroll::-webkit-scrollbar { display: none; }

.cat-tile {
    position: relative;
    display: flex;
    color: var(--ink);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-tile);
    transition: border-color var(--t-med);
}
.cat-tile:hover { border-color: var(--forest-600); }
.cat-tile__icon {
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--forest-50);
    color: var(--forest-800);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.cat-tile__icon svg, .cat-tile__icon .icon { width: 26px; height: 26px; }
.cat-tile__name { display: block; font-family: var(--font-body); font-weight: 700; font-size: .95rem; color: var(--ink); line-height: 1.25; }
.cat-tile__count { display: block; font-size: .8rem; color: var(--muted); }

.hscroll .cat-tile {
    flex: 0 0 auto;
    width: 104px;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
    padding: 14px 8px 12px;
    scroll-snap-align: start;
}
.hscroll .cat-tile__icon { width: 52px; height: 52px; }

/* .hscroll.tile-grid: phones scroll (the .hscroll rules above); from 900px the
   same element becomes a 4-up grid of horizontal tiles. */
@media (min-width: 900px) {
    .tile-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; overflow: visible; }
    .tile-grid .cat-tile { width: auto; flex-direction: row; align-items: center; text-align: left; gap: 16px; padding: 18px 20px; }
    .tile-grid .cat-tile__icon { width: 56px; height: 56px; }
}

/* ----------  Steps (checkout 3-step indicator)  ---------- */
.steps { display: flex; align-items: flex-start; gap: 4px; list-style: none; margin: 0; padding: 0; position: relative; }
.steps::before { content: ""; position: absolute; left: 16%; right: 16%; top: 13px; height: 2px; background: var(--line-2); }
.steps__item { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; position: relative; }
.steps__num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: .8rem;
    background: var(--surface);
    color: var(--muted);
    border: 2px solid var(--line-3);
}
.steps__label { font-size: var(--fs-12); font-weight: 500; color: var(--muted); line-height: 1.2; }
.steps__item.is-done .steps__num { background: var(--forest-600); border-color: var(--forest-600); color: #fff; }
.steps__item.is-current .steps__num { background: var(--forest-800); border-color: var(--forest-800); color: #fff; }
.steps__item.is-current .steps__label,
.steps__item.is-done .steps__label { color: var(--ink); font-weight: 700; }

/* ----------  Summary card (checkout collapsible <details> totals)  ---------- */
.summary-card { padding: 0; overflow: hidden; }
.summary-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 56px;
    padding: 14px 16px;
    cursor: pointer;
    list-style: none;
}
.summary-card__head::-webkit-details-marker { display: none; }
.summary-card__thumbs { display: inline-flex; }
.summary-card__thumbs img { width: 36px; height: 36px; border-radius: 10px; border: 2px solid #fff; object-fit: cover; margin-left: -12px; }
.summary-card__thumbs img:first-child { margin-left: 0; }
.summary-card__title { font-weight: 600; font-size: .93rem; margin-left: 10px; }
.summary-card__total { font-size: 1.1rem; }
.summary-card__head .icon { transition: transform var(--t-fast); }
.summary-card[open] .summary-card__head .icon { transform: rotate(180deg); }
.summary-card__body { padding: 0 16px 16px; }

/* ----------  Info card (delivery/COD info rows)  ---------- */
.info-card { background: var(--forest-50); border: 1px solid var(--forest-100); border-radius: var(--r-tile); padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; }
.info-card__row { display: flex; align-items: center; gap: 10px; font-size: var(--fs-14); }
.info-card__icon { color: var(--forest-800); flex-shrink: 0; width: 22px; height: 22px; }

/* ----------  Field (generic labeled form group)  ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field + .field { margin-top: 16px; }
.field__hint { font-size: 12.5px; color: var(--muted); }
.field__error { font-size: 12.5px; color: var(--danger); font-weight: 600; }

/* ----------  Featured strip  ---------- */
.featured-scroll {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 4px 4px 14px;
    margin: -4px -4px 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--line-2) transparent;
}
.featured-scroll .product-card {
    flex: 0 0 236px;
    scroll-snap-align: start;
}
.scroll-nav { display: none; gap: 8px; }
.scroll-nav button {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid var(--line-2);
    background: var(--surface);
    color: var(--forest-700);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background var(--t-fast), border-color var(--t-fast), transform var(--t-fast);
}
.scroll-nav button:hover { background: var(--forest-50); border-color: var(--forest-600); }
.scroll-nav button:active { transform: scale(.92); }
.scroll-nav svg { width: 17px; height: 17px; }
@media (min-width: 700px) { .js .scroll-nav { display: inline-flex; } }

/* ----------  Toolbar / filters  ---------- */
.toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin-bottom: 22px;
}
.toolbar .field-inline { display: flex; align-items: center; gap: 10px; }
.toolbar label { font-weight: 600; color: var(--muted); margin: 0; font-size: .9rem; white-space: nowrap; }

select.select {
    appearance: none;
    -webkit-appearance: none;
    background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2317603f' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") no-repeat right 14px center;
    border: 1px solid var(--line-2);
    color: var(--ink);
    padding: 11px 40px 11px 16px;
    border-radius: 12px;
    font-size: .93rem;
    font-family: inherit;
    cursor: pointer;
    min-width: 190px;
    transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
select.select:focus {
    outline: none;
    border-color: var(--forest-600);
    box-shadow: var(--ring);
}

/* ----------  Chips (category filter pills)  ---------- */
.chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}
.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    padding: 0 16px;
    border-radius: var(--pill);
    background: var(--surface);
    border: 1px solid var(--line-3); /* verifier fix: line-2 on white was 1.68:1 on --paper, below the 3:1 boundary floor; line-3 clears 3:1 against both --surface (3.39:1) and --paper (3.03:1) */
    color: var(--ink);
    font-size: .88rem;
    font-weight: 600;
    transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}
.chip:hover { border-color: var(--forest-600); color: var(--forest-800); }
.chip.is-active {
    background: var(--forest-800);
    border-color: var(--forest-800);
    color: #fff;
}
.chip.is-active:hover { background: var(--forest-700); color: #fff; }
.chip-row--sub { margin-top: -4px; }
.chip--sm { min-height: 0; height: 34px; padding: 0 14px; font-size: .82rem; }

/* ----------  Product grid & cards  ---------- */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(225px, 1fr));
    gap: 22px;
}

.product-card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-card);
    overflow: hidden;
    box-shadow: 0 0 0 1px var(--line);
    transition: box-shadow var(--t-med), border-color var(--t-med);
    position: relative;
}
.product-card:hover {
    box-shadow: 0 0 0 1px var(--line);
    border-color: var(--forest-100);
}
.product-card__media {
    aspect-ratio: 1 / 1;
    background:
        radial-gradient(120% 90% at 50% 0%, #fff 30%, var(--surface) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    border-bottom: 1px solid var(--line);
    position: relative;
    overflow: hidden;
}
.product-card__media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform .5s var(--ease-out);
}
.product-card:hover .product-card__media img { transform: scale(1.07) rotate(.6deg); }
.product-card__body {
    display: flex;
    flex-direction: column;
    gap: 7px;
    padding: 16px 16px 16px;
    flex: 1;
}
.product-card__title {
    font-family: var(--font-body);
    font-size: .98rem;
    font-weight: 650;
    color: var(--ink);
    margin: 0;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.product-card__title a { color: inherit; }
.product-card__title a:hover { color: var(--forest-700); }
/* Stretch the title link over the whole card; buttons re-raise above it */
.product-card__title a::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
}
.product-card__cat {
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .09em;
    color: var(--muted);
    font-weight: 700;
}
.price {
    font-family: var(--font-head);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    font-size: 1.22rem;
    color: var(--forest-700);
    letter-spacing: -.01em;
}
.product-card .price { margin-top: auto; }
.product-card__actions { display: flex; gap: 8px; margin-top: 9px; position: relative; z-index: 2; }
.product-card__actions .btn { flex: 1; }
.product-card__actions form { flex: 1; margin: 0; }

/* Success flash on the add-to-cart button (JS toggles .is-added) */
.btn.is-added {
    background: var(--forest-700); /* 8.49:1 vs white text (D-013 correction — forest-500 was 4.01:1, below AA) */
    pointer-events: none;
}

/* ----------  Badges / status  ---------- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 24px;
    padding: 0 10px;
    border-radius: var(--pill);
    font-size: var(--fs-12);
    font-weight: 600;
    background: var(--forest-50);
    color: var(--forest-700);
}
.badge--new { background: var(--info-50); color: var(--info); }
.badge--processing { background: var(--warn-50); color: var(--warn); }
.badge--out_for_delivery { background: var(--info-50); color: var(--info); }
.badge--delivered { background: var(--success-50); color: var(--success); }
.badge--cancelled { background: var(--danger-50); color: var(--danger); }
.badge--featured { background: var(--teal-50); color: var(--teal-700); }
.badge--stock-out { background: var(--paper-2); color: var(--muted); }
.badge--low-stock { background: var(--warn-50); color: var(--warn); }
.badge--cod { background: var(--forest-50); color: var(--forest-700); }

.badge--featured-tile,
.badge--stock-out-tile,
.badge--low-stock-tile {
    position: absolute;
    top: 12px;
    z-index: 2;
    box-shadow: 0 0 0 1px var(--line);
}
.badge--featured-tile { left: 12px; }
.badge--stock-out-tile,
.badge--low-stock-tile { right: 12px; }

/* Inline "Only N left" badge next to the product-detail stock line */
.stock-line .badge--low-stock { margin-left: 2px; }

/* ----------  Order tracking timeline (markup frozen — CSS only, T-206b)  ----------
   <700px: vertical rail, dot + label side by side. ≥700px: today's
   horizontal layout, recoloured. */
.order-timeline {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 22px 0 8px;
}
.order-timeline__step {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    text-align: left;
    position: relative;
}
.order-timeline__step::before {
    content: "";
    position: absolute;
    left: 13px;
    top: 28px;
    bottom: -16px;
    width: 2px;
    background: var(--line);
}
.order-timeline__step:last-child::before { display: none; }
.order-timeline__dot {
    position: relative;
    z-index: 1;
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-body);
    font-weight: 800;
    font-size: .8rem;
    background: var(--surface);
    color: var(--muted);
    border: 2px solid var(--line-3); /* D-013: todo ring needs 3:1 against --surface */
    transition: transform .3s var(--ease-spring);
}
.order-timeline__label {
    padding-top: 3px;
    font-size: .85rem;
    font-weight: 600;
    color: var(--muted);
}
.order-timeline__step.is-done .order-timeline__dot {
    background: var(--forest-600);
    color: transparent; /* the step number is swapped for a check mark below */
    border-color: var(--forest-600);
}
.order-timeline__step.is-done .order-timeline__dot::after {
    content: "";
    position: absolute;
    left: 50%; top: 46%;
    width: 6px; height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: translate(-50%, -50%) rotate(45deg);
}
.order-timeline__step.is-done::before { background: var(--forest-600); }
.order-timeline__step.is-current .order-timeline__dot {
    background: var(--forest-800);
    color: #fff;
    border-color: var(--forest-800);
    box-shadow: 0 0 0 4px var(--forest-100);
    animation: pulse-ring 2.2s ease-out infinite;
}
@keyframes pulse-ring {
    0%   { box-shadow: 0 0 0 4px var(--forest-100); }
    50%  { box-shadow: 0 0 0 8px rgba(201, 232, 214, .45); }
    100% { box-shadow: 0 0 0 4px var(--forest-100); }
}
.order-timeline__step.is-done .order-timeline__label,
.order-timeline__step.is-current .order-timeline__label { color: var(--ink); }

@media (min-width: 700px) {
    .order-timeline { flex-direction: row; flex-wrap: wrap; gap: 6px; }
    .order-timeline__step { flex: 1 1 90px; flex-direction: column; align-items: center; text-align: center; }
    .order-timeline__step::before { left: -50%; top: 17px; bottom: auto; width: 100%; height: 2px; }
    .order-timeline__step:first-child::before { display: none; }
    .order-timeline__step:last-child::before { display: block; }
    .order-timeline__dot { width: 36px; height: 36px; font-size: .85rem; }
    .order-timeline__label { margin-top: 9px; padding-top: 0; text-align: center; }
}

.order-cancelled-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    background: var(--danger-50);
    border: 1px solid #eecac5;
    border-radius: var(--r);
    color: var(--danger);
    font-weight: 600;
    margin: 18px 0;
}
/* .order-track-head/.order-number/.order-address p are fully re-tokened by
   pages/orders.css now; .order-address (bare, phone/address block margin)
   has no page-CSS equivalent yet and stays — see below. */
.order-address { margin-top: 18px; }

/* ----------  Breadcrumb  ---------- */
.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    font-size: .9rem;
    color: var(--muted);
    margin-bottom: 20px;
}
.breadcrumb a { color: var(--muted); font-weight: 600; }
.breadcrumb a:hover { color: var(--forest-700); }
.breadcrumb span.sep { color: var(--line-2); }

/* ----------  Product detail  ---------- */
.product-detail {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    gap: 40px;
    align-items: start;
}
.product-detail__media {
    position: sticky;
    top: calc(var(--header-h) + 22px);
    background:
        radial-gradient(120% 100% at 50% 0%, #fff 40%, var(--surface) 100%);
    border: 1px solid var(--line);
    border-radius: var(--r-hero);
    padding: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 340px;
    overflow: hidden;
    box-shadow: 0 0 0 1px var(--line);
}
.product-detail__media > img {
    max-height: 460px;
    width: auto;
    object-fit: contain;
    transition: transform .5s var(--ease-out);
}
.product-detail__media:hover > img { transform: scale(1.04); }

/* Multi-image gallery: when a product has extra images, the media panel stacks
   the main image above a horizontally scrollable thumbnail strip. Guarded by
   the --gallery modifier so single-image products render unchanged. */
.product-detail__media--gallery {
    flex-direction: column;
    gap: 18px;
}
.gallery-strip {
    display: flex;
    gap: 10px;
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
    scrollbar-color: var(--line-2) transparent;
}
.gallery-thumb {
    flex: 0 0 auto;
    width: 66px;
    height: 66px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    background: var(--surface);
    cursor: pointer;
    overflow: hidden;
    transition: border-color .2s var(--ease-out), box-shadow .2s var(--ease-out);
}
.gallery-thumb > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.gallery-thumb:hover { border-color: var(--line-2); }
.gallery-thumb:focus-visible {
    outline: none;
    border-color: var(--forest-600);
    box-shadow: var(--ring);
}
.gallery-thumb.is-active {
    border-color: var(--forest-600);
    box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--forest-600);
}
.product-detail__info h1 { margin: 10px 0 6px; }
.product-detail__info .price { font-size: 2.1rem; display: inline-block; margin: 4px 0 10px; }
.stock-line {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: .92rem;
    font-weight: 600;
    margin: 0 0 18px;
}
.stock-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--success);
    flex-shrink: 0;
    box-shadow: 0 0 0 3px var(--success-50);
}
.stock-line.out .stock-dot { background: var(--danger); box-shadow: 0 0 0 3px var(--danger-50); }
.stock-line.ok { color: var(--success); }
.stock-line.out { color: var(--danger); }
.product-detail__desc { color: var(--ink); margin-bottom: 26px; white-space: pre-line; }
.qty-row {
    display: flex;
    align-items: flex-end;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
.qty-field { width: 110px; }

/* Product option selectors (describers: color, length, size, ...) */
.option-row {
    display: flex;
    align-items: flex-end;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}
.option-field { min-width: 150px; }
.option-field .select { width: 100%; }

/* Color-swatch picker — shown for an option whose values all carry a swatch_hex.
   A visually-hidden radio drives each dot; the sibling .swatch-dot is the paint. */
.option-swatch, .option-pills {
    border: 0;
    padding: 0;
    margin: 0;
    min-inline-size: 0; /* let the fieldset shrink inside the .option-row flex */
}
.option-swatch__legend, .option-pills__legend {
    padding: 0;
    display: flex;
    align-items: baseline;
    gap: 8px;
    font-weight: 600;
    color: var(--ink);
    font-size: .93rem;
    margin-bottom: 8px;
}
.option-swatch__selected, .option-pills__selected { color: var(--muted); font-weight: 600; }
.option-swatch__name, .option-pills__name { font-weight: 600; color: var(--ink); }
.swatch-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 2px; /* headroom so the :checked ring isn't clipped by the legend */
}
.swatch-choice {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin: 0;
    cursor: pointer;
}
/* Visually hidden but focusable (mirrors .visually-hidden); shared by the
   swatch AND pill pickers — the focus ring lands on the sibling dot/label. */
.swatch-radio, .pill-radio {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.swatch-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--swatch, var(--paper-2));
    /* Translucent dark edge keeps white / pale swatches visible on any surface */
    border: 1px solid rgba(18, 32, 25, .2);
    cursor: pointer;
    transition: transform .2s var(--ease-spring), box-shadow var(--t-fast);
}
.swatch-choice:hover .swatch-dot { transform: translateY(-2px); }
.swatch-radio:checked + .swatch-dot {
    box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--forest-800);
}
.swatch-radio:focus-visible + .swatch-dot {
    outline: 2px solid var(--forest-700);
    outline-offset: 3px;
}

/* Pill radios — non-swatch option values (Size, etc); shares .pill-radio
   and the legend rules above with the swatch picker. */
.pill-group { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 2px; }
.pill-choice { position: relative; display: inline-flex; margin: 0; cursor: pointer; }
.pill-choice__label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    min-width: 56px;
    padding: 0 16px;
    border-radius: var(--pill);
    border: 1px solid var(--line-2);
    background: var(--surface);
    color: var(--ink);
    font-weight: 600;
    font-size: .9rem;
    transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast);
}
.pill-radio:checked + .pill-choice__label { background: var(--forest-800); border-color: var(--forest-800); color: #fff; }
.pill-radio:focus-visible + .pill-choice__label { outline: 2px solid var(--forest-600); outline-offset: 2px; }
.pill-radio:disabled + .pill-choice__label { background: var(--paper-2); color: var(--muted); border-color: var(--line); cursor: not-allowed; }

/* Read-only swatch previews reused elsewhere (product cards, cart/checkout lines).
   Set the colour per dot with an inline `--swatch: #rrggbb`. */
.swatch-dots {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}
.swatch-dots__dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--swatch, var(--paper-2));
    border: 1px solid rgba(18, 32, 25, .2);
    flex-shrink: 0;
}
.swatch-dots__more { font-size: .72rem; font-weight: 700; color: var(--muted); margin-left: 2px; }
.swatch-inline {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--swatch, var(--paper-2));
    border: 1px solid rgba(18, 32, 25, .2);
    vertical-align: middle;
    margin-right: 5px;
    flex-shrink: 0;
}

.product-detail__secondary { margin-top: 8px; margin-bottom: 22px; }

/* Sticky mobile buy bar (T-125, in-stock only): aliases .action-bar; its price span shares .js-detail-price with #detail-price so the preview script updates both. */

/* Quantity stepper */
.stepper {
    display: inline-flex;
    align-items: stretch;
    height: 44px;
    border: 1px solid var(--line-3);
    border-radius: 12px;
    overflow: hidden;
    background: var(--surface);
}
.stepper button {
    width: 44px;
    border: 0;
    background: var(--paper-2);
    color: var(--forest-800);
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background var(--t-fast);
}
.stepper button:hover { background: var(--forest-50); }
.stepper input {
    width: 54px;
    border: 0;
    border-left: 1px solid var(--line-3);
    border-right: 1px solid var(--line-3);
    text-align: center;
    padding: 8px 0;
    border-radius: 0;
}
.stepper input:focus { box-shadow: none; }
.stepper--sm { height: 40px; }
.stepper--sm button { width: 40px; font-size: 1rem; }
.stepper--sm input { width: 46px; }

/* ----------  Forms  ---------- */
label { display: block; font-weight: 600; color: var(--ink); margin-bottom: 6px; font-size: var(--fs-14); }

input[type=text],
input[type=email],
input[type=password],
input[type=number],
input[type=tel],
input[type=search],
input[type=url],
input:not([type]),
select:not(.btn),
textarea {
    width: 100%;
    min-height: 52px;
    padding: 13px 16px;
    font-family: inherit;
    font-size: var(--fs-16);
    color: var(--ink);
    background: var(--surface);
    border: 1px solid var(--line-3);
    border-radius: var(--r);
    transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
input::placeholder, textarea::placeholder { color: var(--muted); }
input:focus,
select:not(.btn):focus,
textarea:focus {
    outline: none;
    border-color: var(--forest-600);
    box-shadow: var(--ring);
}
input[aria-invalid="true"],
select[aria-invalid="true"],
textarea[aria-invalid="true"] {
    border-color: var(--danger);
    box-shadow: 0 0 0 3px var(--danger-50);
}
textarea { min-height: 120px; resize: vertical; }
input[type=file] {
    width: 100%;
    padding: 12px;
    background: var(--paper-2);
    border: 1.5px dashed var(--line-3);
    border-radius: var(--r);
    font-size: var(--fs-14);
    color: var(--muted);
    cursor: pointer;
}
input[type=file]:hover { border-color: var(--forest-600); }
input[type=search] { border-radius: var(--pill); }

form p { margin: 0 0 18px; }
form p label { margin-bottom: 6px; }

.helptext,
.helptext li { color: var(--muted); font-size: .82rem; line-height: 1.45; }
ul.helptext, .helptext ul { margin: 6px 0 0; padding-left: 18px; }

.errorlist {
    list-style: none;
    margin: 8px 0 0;
    padding: 10px 14px;
    background: var(--danger-50);
    border: 1px solid #eecac5;
    border-left: 3px solid var(--danger);
    border-radius: 10px;
    color: var(--danger);
    font-size: .88rem;
    font-weight: 600;
}
.errorlist li { margin: 0; }

/* Form-level error summary (shown above a re-rendered, errored form so
   keyboard/screen-reader users get one place that lists every problem). */
.error-summary {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0 0 20px;
    padding: 14px 18px;
    background: var(--danger-50);
    border: 1px solid #eecac5;
    border-left: 3px solid var(--danger);
    border-radius: 13px;
    color: var(--danger);
}
.error-summary__title { margin: 0; font-weight: 700; font-size: .95rem; }
.error-summary ul { margin: 0; padding-left: 18px; font-size: .9rem; }
.error-summary li { margin: 2px 0; }
.error-summary a { color: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }

/* Loading state for a submit button while a POST is in flight (e.g. checkout's
   double-submit guard). `.btn:disabled` already mutes the button; this just
   swaps the cursor so "loading" reads differently from "unavailable". */
.btn.is-loading,
.btn.is-loading:disabled {
    cursor: wait;
}

/* Auth card: only .auth-wrap is still shared (order_success.html); the rest
   of the v2 auth-card family is fully re-tokened by pages/auth.css now. */
.auth-wrap { max-width: 460px; margin: 14px auto; }

/* Circular status icon (order success / verification screens) */
.status-icon {
    width: 78px;
    height: 78px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}
.status-icon--success { background: var(--success-50); box-shadow: 0 0 0 10px rgba(229, 243, 234, .55); }
.status-icon--warning { background: var(--warn-50); box-shadow: 0 0 0 10px rgba(253, 243, 223, .6); }

/* Animated checkmark (order success) */
.check-draw path {
    stroke-dasharray: 40;
    stroke-dashoffset: 40;
    animation: check-draw .55s var(--ease-out) .25s forwards;
}
@keyframes check-draw { to { stroke-dashoffset: 0; } }

/* Confetti (order success, particles created by JS) */
.confetti {
    position: fixed;
    top: -12px;
    z-index: 1600;
    width: 9px;
    height: 14px;
    border-radius: 2px;
    pointer-events: none;
    animation: confetti-fall linear forwards;
}
@keyframes confetti-fall {
    to { transform: translateY(105vh) rotate(660deg); opacity: .2; }
}

/* ----------  Alerts / messages  ---------- */
.messages { list-style: none; margin: 0 0 24px; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.alert {
    padding: 14px 18px;
    border-radius: 13px;
    border: 1px solid var(--line);
    background: var(--paper-2);
    color: var(--ink);
    font-size: .95rem;
    display: flex;
    gap: 10px;
    align-items: flex-start;
    animation: alert-in .35s var(--ease-out);
}
@keyframes alert-in {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: none; }
}
.alert svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px; }
.alert a { font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.alert.success { background: var(--success-50); border-color: #bcdab1; color: var(--success); }
.alert.error { background: var(--danger-50); border-color: #eecac5; color: var(--danger); }
.alert.info { background: var(--info-50); border-color: #bcd7e0; color: var(--info); }
.alert--warning, .alert.warning { background: var(--warn-50); border-color: #ecd9a6; color: var(--warn); }

/* ----------  Tables  ---------- */
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: .94rem;
}
.table th, .table td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}
.table th {
    font-family: var(--font-body);
    font-size: .74rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--muted);
    font-weight: 700;
}
.table tbody tr { transition: background var(--t-fast); }
.table tbody tr:hover { background: var(--forest-50); }
.table .num { text-align: right; }

/* ---------- Cart: old .cart-line and .cart-thumb rules are fully re-tokened under new names by pages/cart.css now — deleted here, T-221 ---------- */
.order-summary { position: sticky; top: calc(var(--header-h) + 20px); }
.summary-row { display: flex; justify-content: space-between; padding: 8px 0; color: var(--muted); font-size: .95rem; }
.summary-row--first { margin-top: 14px; }
.summary-row.total {
    border-top: 1px solid var(--line);
    margin-top: 10px;
    padding-top: 16px;
    color: var(--ink);
    font-family: var(--font-head);
    font-weight: 620;
    font-size: 1.3rem;
}
.summary-row.total .price { font-size: 1.3rem; }
.summary-actions { margin-top: 20px; display: flex; flex-direction: column; gap: 10px; }
.summary-note {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px dashed var(--line);
    color: var(--muted);
    font-size: .84rem;
}
.summary-note svg { width: 16px; height: 16px; color: var(--forest-600); flex-shrink: 0; }

/* .cart-layout/.checkout-layout/.checkout-items/.checkout-item* are fully
   re-tokened by pages/cart.css and pages/checkout.css now — deleted here
   (T-221). */

.empty-state { text-align: center; padding: 54px 20px; color: var(--muted); }
.empty-state svg { width: 60px; height: 60px; color: var(--forest-100); margin-bottom: 16px; }
.empty-state h3 { color: var(--ink); }
.empty-state .btn-row { justify-content: center; margin-top: 16px; }

/* COD notice */
.notice {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 14px 16px;
    background: var(--warn-50);
    border: 1px solid var(--line-2);
    border-radius: 13px;
    color: var(--warn);
    font-size: .92rem;
    margin-bottom: 20px;
}
.notice svg { width: 22px; height: 22px; flex-shrink: 0; color: var(--warn); }
.notice--green {
    background: var(--forest-50);
    border-color: var(--forest-100);
    color: var(--forest-900);
}
.notice--green svg { color: var(--forest-700); }

/* Orders-history (.order-card*) and profile (.profile-grid, .form-check)
   rules are fully re-tokened by pages/orders.css and pages/auth.css now —
   deleted here (T-221); see .order-address above (kept, no page-CSS home). */

/* Admin dashboard rules moved to dashboard.css (T-206b) — linked only by
   admin_dashboard.html (T-218 wires it; temporarily unstyled until then). */

/* About page (.steps-grid, .step-card family, .contact-grid, .contact-tile family) is fully re-tokened by pages/content.css now — deleted here (T-221). */

/* ----------  WA band (pre-footer WhatsApp CTA)  ---------- */
.wa-band {
    position: relative;
    border-radius: var(--r-hero);
    overflow: hidden;
    background:
        radial-gradient(420px 180px at 90% -20%, rgba(255,255,255,.12), transparent 70%),
        var(--forest-800);
    color: #fff;
    padding: 32px 26px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    margin-bottom: 56px;
    isolation: isolate;
}
.wa-band h2 { color: #fff; margin: 0 0 6px; font-size: clamp(1.4rem, 1.2rem + 1vw, 1.9rem); }
.wa-band .accent { color: var(--forest-100); font-style: normal; font-weight: 700; }
.wa-band p { color: rgba(255,255,255,.82); margin: 0; max-width: 52ch; }
@media (min-width: 700px) {
    .wa-band { padding: 44px 42px; }
}

/* ----------  Footer (light, per the redesign)  ---------- */
.site-footer {
    flex-shrink: 0;
    background: var(--paper-2);
    border-top: 1px solid var(--line);
    color: var(--muted);
    margin-top: auto;
}
/* Below 900px the fixed tab bar needs room reserved at the foot of every
   page, and below 700px a page with a fixed action bar needs more (R-5).
   This lives on `.site-footer` -- the last element in the document flow --
   rather than on `main`, because `<footer>` renders AFTER `</main>` as a
   sibling; padding on `main` would only open space before the footer and
   leave the footer itself uncovered by any reserved clearance (G3 fix). */
@media (max-width: 899px) {
    .site-footer { padding-bottom: calc(var(--tabbar-h) + var(--safe-b) + 24px); }
}
.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 40px 0 24px;
}
@media (min-width: 900px) {
    .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; gap: 36px; padding: 54px 0 34px; }
}
/* 2-up link grid on phones; a plain stack once T-207 uses it ≥900px */
.footer-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 16px; }
@media (min-width: 900px) { .footer-links { display: block; } }
.footer-brand { display: flex; align-items: center; gap: 13px; margin-bottom: 16px; }
.footer-brand img { height: 44px; width: 44px; object-fit: contain; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 5px; }
.footer-brand strong { font-family: var(--font-head); font-weight: 700; font-size: 1.25rem; color: var(--ink); letter-spacing: -.01em; }
.site-footer p { color: var(--muted); margin: 0 0 8px; max-width: 42ch; }
.footer-col h4 {
    font-family: var(--font-body);
    color: var(--ink);
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .1em;
    margin: 0 0 14px;
}
.footer-col a { color: var(--muted); display: inline-flex; align-items: center; gap: 8px; margin-bottom: 8px; transition: color var(--t-fast); }
@media (max-width: 899px) { .footer-col a { min-height: 44px; margin-bottom: 0; } } /* R-11 hit targets on touch layouts */
.footer-col a:hover { color: var(--forest-700); }
.footer-contact { display: flex; flex-direction: column; gap: 10px; }
.footer-contact .row { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.footer-contact svg { width: 17px; height: 17px; color: var(--forest-600); flex-shrink: 0; }
.footer-bottom {
    border-top: 1px solid var(--line);
    padding: 16px 0;
    font-size: .85rem;
    color: var(--muted);
}
.footer-bottom .container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.footer-bottom span { display: inline-flex; align-items: center; gap: 7px; }
.footer-bottom svg { width: 14px; height: 14px; color: var(--forest-600); }

/* ----------  Floating WhatsApp button  ---------- (≥900px only — the tab
   bar's Cart/Track items and the fixed action bars cover it below that) */
.wa-float { display: none; }
@media (min-width: 900px) {
    .wa-float {
        display: inline-flex;
        position: fixed;
        right: 20px;
        bottom: 20px;
        z-index: 800;
        width: 58px;
        height: 58px;
        border-radius: 50%;
        background: var(--wa);
        color: var(--wa-ink);
        align-items: center;
        justify-content: center;
        box-shadow: var(--shadow-float);
        transition: transform .3s var(--ease-spring), background var(--t-fast);
    }
    /* Pulse ring — decorative motion, always plays (D-011/CLAUDE.md §3 rule 11:
       never gate this behind prefers-reduced-motion). */
    .wa-float::before {
        content: "";
        position: absolute;
        inset: 0;
        border-radius: 50%;
        box-shadow: 0 0 0 0 rgba(34, 195, 94, .5);
        animation: wa-pulse 2.6s ease-out infinite;
    }
    .wa-float:hover { transform: scale(1.1) rotate(6deg); background: var(--wa-dark); color: var(--wa-ink); }
    .wa-float svg { width: 29px; height: 29px; }
}
@keyframes wa-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(34, 195, 94, .45); }
    70%  { box-shadow: 0 0 0 14px rgba(34, 195, 94, 0); }
    100% { box-shadow: 0 0 0 0 rgba(34, 195, 94, 0); }
}

/* ----------  Toasts  ---------- */
#toast-root {
    position: fixed;
    z-index: var(--z-toast);
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    left: 50%;
    transform: translateX(-50%);
    bottom: calc(var(--tabbar-h) + var(--safe-b) + 12px);
    width: calc(100% - 28px);
    max-width: 390px;
    align-items: center;
}
@media (max-width: 699px) {
    body.has-action-bar #toast-root { bottom: calc(var(--action-bar-h) + var(--safe-b) + 12px); }
}
.toast {
    position: relative;
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 14px 16px;
    background: var(--forest-900);
    color: #fff;
    border-radius: var(--r);
    box-shadow: 0 0 0 1px var(--line-2);
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    overflow: hidden;
    animation: toast-in .35s var(--ease-spring);
}
.toast::after {
    content: "";
    position: absolute;
    left: 0; bottom: 0;
    height: 3px;
    width: 100%;
    background: var(--soil-100);
    transform-origin: left;
    animation: toast-life 3.5s linear forwards;
}
@keyframes toast-life { to { transform: scaleX(0); } }
.toast__icon {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(255,255,255,.12);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.toast__icon svg { width: 14px; height: 14px; }
.toast__msg { flex: 1; }
.toast__action {
    flex-shrink: 0;
    color: var(--soil-100);
    font-weight: 700;
    white-space: nowrap;
}
.toast__action:hover { color: #fff; }
.toast--danger { background: var(--danger); }
.toast--danger::after { background: rgba(255,255,255,.55); }
.toast--danger .toast__action { color: #fff; text-decoration: underline; }

@keyframes toast-in {
    from { opacity: 0; transform: translateY(14px) scale(.97); }
    to   { opacity: 1; transform: none; }
}

@media (min-width: 900px) {
    #toast-root {
        left: auto;
        right: 20px;
        bottom: 94px;
        transform: none;
        align-items: flex-end;
        width: 100%;
    }
}

/* ----------  Responsive: four canonical breakpoints (T-206b) — <700 phone/action-bars, <900 tab-bar/sheet vs ≥900 header nav, ≥960 two-column pages, ≥1150 inline search+4-up; <380 is the one documented single-column exception  ---------- */
@media (max-width: 959px) {
    .order-summary { position: static; }
    .product-detail { grid-template-columns: 1fr; gap: 24px; }
    .product-detail__media { position: static; }
}

@media (max-width: 699px) {
    .header-content { gap: 8px; }
    .brand { gap: 8px; }
    .brand__name { font-size: 1rem; }
    .site-header .cart-link { padding: 0; width: 44px; height: 44px; justify-content: center; gap: 0; } /* 44px hit target */
    .site-header .cart-link .cart-badge { top: -2px; right: -2px; }
    .cart-link__label { display: none; }
    /* Folded from the old 620 breakpoint — R-11 wants the 2-up product grid
       across the whole <700 phone tier, not a narrower sub-range. */
    .product-grid { grid-template-columns: repeat(2, 1fr); gap: 13px; }
    .product-card__media { padding: 12px; }
    .product-card__body { padding: 12px 12px 14px; }
    .product-card__title { font-size: .9rem; }
    .price { font-size: 1.08rem; }
    .toolbar { flex-direction: column; align-items: stretch; }
    select.select { min-width: 0; width: 100%; }
    .featured-scroll .product-card { flex-basis: 200px; }
    .footer-bottom .container { justify-content: center; text-align: center; }
}

/* Documented exception (see the section comment above): sub-380px devices
   still need a single product-grid column even inside the <700 phone tier. */
@media (max-width: 380px) {
    .product-grid { grid-template-columns: 1fr; }
}
