/*
|--------------------------------------------------------------------------
| Aurora Health Essentials — structural layer
|--------------------------------------------------------------------------
|
| This file owns STRUCTURE: the reset, the layout primitives, and the
| components that exist on every storefront in this estate regardless of how
| it looks — header, nav panel, product grid, cart drawer, forms, checkout,
| product detail, prose pages, footer.
|
| It owns no brand decision. Every colour, radius, shadow and typeface it
| uses is read from a custom property that css/brand.css defines. Loading
| this file on its own gives you a working, unstyled-looking storefront
| rather than a broken one, because the :root block below carries neutral
| fallbacks.
|
| LOAD ORDER MATTERS: site.css first, brand.css second.
|
| Class prefixes:
|   ah-*   structural, defined here
|   au-*   brand components, defined in brand.css
|
*/

/* =========================================================================
   0. FALLBACK TOKENS
   brand.css overrides all of these. They exist so this file is never
   dependent on it.
   ====================================================================== */

:root {
  --ink: #0f1533;
  --ink-2: #3a4470;
  --ink-3: #5a6493;
  --ink-4: #9aa3c6;

  --canvas: #f5f7fd;
  --paper: #ffffff;
  --night: #0b1026;
  --night-2: #141b3d;

  --accent: #16c0ad;
  --accent-strong: #0a7a6e;
  --accent-2: #7c5cff;
  --accent-2-strong: #5b3ee0;
  --accent-2-lite: #a98cff;
  --mint: #b6f2e7;
  --mint-soft: #e6faf6;

  --line: #dde3f2;
  --line-night: rgba(255, 255, 255, 0.14);

  --font-display: Georgia, "Times New Roman", serif;
  --font-body: system-ui, -apple-system, "Segoe UI", sans-serif;

  --radius: 14px;
  --radius-lg: 22px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(15, 21, 51, 0.06), 0 2px 8px rgba(15, 21, 51, 0.04);
  --shadow: 0 2px 6px rgba(15, 21, 51, 0.06), 0 12px 32px rgba(15, 21, 51, 0.08);
  --shadow-lg: 0 8px 24px rgba(15, 21, 51, 0.1), 0 32px 64px rgba(15, 21, 51, 0.14);

  --wrap: 1200px;
  --gutter: 24px;
  --header-h: 68px;

  /*
  | Motion. The built-in CSS easings are too weak to read as intentional —
  | `ease-out` in particular barely curves. These are the stronger variants
  | everything on the site animates with.
  |
  | --ease-out    entering and exiting: starts fast, so the interface
  |               responds in the frame the user is watching most closely
  | --ease-in-out things moving or morphing on screen
  | --ease-drawer the iOS panel curve, for the nav and cart drawers
  |
  | `ease-in` appears nowhere. It starts slow, which reads as lag.
  */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
}

/* =========================================================================
   1. RESET
   ====================================================================== */

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 { margin: 0 0 0.5em; line-height: 1.15; font-weight: 600; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

img, svg, video { max-width: 100%; height: auto; display: block; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

ul, ol { margin: 0 0 1em; padding-left: 1.25em; }
li { margin: 0 0 0.35em; }

hr { border: 0; border-top: 1px solid var(--line); margin: 32px 0; }

/* Every interactive element gets a visible focus ring. Never remove this
   without replacing it — keyboard users have no other cursor. */
:focus-visible {
  outline: 3px solid var(--accent-2-strong);
  outline-offset: 2px;
  border-radius: 4px;
}

/* =========================================================================
   2. UTILITIES
   ====================================================================== */

.ah-wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.ah-wrap-narrow { max-width: 760px; }

.ah-sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%);
  white-space: nowrap; border: 0;
}

/* Skip link — visually hidden until it takes focus, then pinned top-left. */
.ah-skip {
  position: absolute;
  left: 12px; top: -60px;
  z-index: 200;
  background: var(--night);
  color: #fff;
  padding: 12px 18px;
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
  transition: top 0.16s ease;
}
.ah-skip:focus { top: 12px; }

.ah-section { padding-block: clamp(48px, 7vw, 88px); }
.ah-section-tight { padding-block: clamp(32px, 4vw, 52px); }

.ah-eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-strong);
  margin-bottom: 14px;
}

.ah-section-head { max-width: 660px; margin-bottom: clamp(28px, 4vw, 44px); }
.ah-section-head h2 { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.9rem, 4vw, 2.9rem); letter-spacing: -0.01em; }
.ah-section-head p { color: var(--ink-3); font-size: 1.05rem; margin: 0; }

/* =========================================================================
   3. BUTTONS
   ====================================================================== */

.ah-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-size: 0.94rem;
  font-weight: 600;
  text-decoration: none;
  line-height: 1.2;
  transition: transform 0.16s var(--ease-out), background-color 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}

/*
| Hover is gated behind a real pointer. A touch device fires :hover on tap
| and then keeps it until you tap elsewhere, so an ungated lift leaves
| buttons stuck in the hovered state after every press.
*/
@media (hover: hover) and (pointer: fine) {
  .ah-btn:hover { transform: translateY(-1px); }
}

/*
| The press. scale() rather than returning to translateY(0), because the
| point is to confirm the interface heard the tap — the button should give
| under the finger. Subtle on purpose: below about 0.95 it reads as a
| glitch rather than a press.
*/
.ah-btn:active { transform: scale(0.97); }

/* accent-strong, not accent: white on the brand teal measures 2.29:1 and
   fails AA. The deeper tone clears it at 5.22:1. See brand.css. */
.ah-btn-primary { background: var(--accent-strong); color: #fff; }
.ah-btn-primary:hover { background: var(--ink); }

.ah-btn-quiet { background: transparent; color: var(--ink-2); border-color: var(--line); }
.ah-btn-quiet:hover { background: var(--paper); border-color: var(--ink-4); color: var(--ink); }

.ah-btn-invert { background: #fff; color: var(--night); }
.ah-btn-invert:hover { background: var(--mint); }

.ah-btn-ghost-night { background: transparent; color: #fff; border-color: var(--line-night); }
.ah-btn-ghost-night:hover { background: rgba(255, 255, 255, 0.1); }

.ah-btn-block { width: 100%; }
.ah-btn-lg { padding: 16px 30px; font-size: 1rem; }

.ah-btn[disabled] { opacity: 0.5; pointer-events: none; }

/* =========================================================================
   4. HEADER + NAV
   The IDs below are the contract js/site.js binds to: #header, #menuToggle,
   #navPanel, #navScrim, and the .cart-badge element. Restyle freely; do not
   rename them.
   ====================================================================== */

.ah-announce {
  background: var(--night);
  color: #fff;
  font-size: 0.82rem;
  text-align: center;
  padding: 9px 16px;
  letter-spacing: 0.01em;
}
.ah-announce strong { color: var(--mint); font-weight: 600; }

.ah-header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}

.ah-header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: var(--header-h);
}

.ah-menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px; height: 42px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
}
@media (min-width: 900px) { .ah-menu-btn { display: none; } }

.ah-nav { display: flex; align-items: center; gap: 6px; }

.ah-nav-link {
  padding: 9px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.93rem;
  font-weight: 500;
  color: var(--ink-2);
  text-decoration: none;
}
.ah-nav-link:hover { background: var(--mint-soft); color: var(--ink); }
.ah-nav-link[aria-current="page"] { color: var(--ink); font-weight: 600; background: var(--mint-soft); }

/* Below 900px the nav becomes a slide-in panel. js/site.js toggles the
   .is-open class and manages aria-expanded plus focus return. */
@media (max-width: 899px) {
  .ah-nav {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(320px, 86vw);
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 84px 20px 24px;
    background: var(--paper);
    box-shadow: var(--shadow-lg);
    transform: translateX(-102%);
    transition: transform 0.28s var(--ease-drawer);
    z-index: 120;
  }
  .ah-nav.is-open { transform: translateX(0); }
  .ah-nav-link { padding: 14px 16px; border-radius: var(--radius); font-size: 1.02rem; }
}

.ah-nav-scrim {
  position: fixed;
  inset: 0;
  background: rgba(11, 16, 38, 0.5);
  z-index: 110;
  border: 0;
  padding: 0;
}
.ah-nav-scrim[hidden] { display: none; }

.ah-header-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }

.ah-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px; height: 42px;
  border-radius: var(--radius-pill);
  color: var(--ink-2);
  text-decoration: none;
}
.ah-icon-btn:hover { background: var(--mint-soft); color: var(--ink); }

.ah-cart-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 16px;
  border-radius: var(--radius-pill);
  background: var(--night);
  color: #fff;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
}
.ah-cart-pill:hover { background: var(--accent-2-strong); }

.cart-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px; height: 22px;
  padding: 0 6px;
  border-radius: var(--radius-pill);
  background: var(--mint);
  color: var(--night);
  font-size: 0.76rem;
  font-weight: 700;
}

/* =========================================================================
   5. PRODUCT GRID + CARD
   One card, used by the shop grid and every homepage shelf. Emitted by
   wsProductCardHtml() in products.php.
   ====================================================================== */

.ah-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}
.ah-grid-4 { grid-template-columns: repeat(auto-fill, minmax(262px, 1fr)); }
.ah-grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.ah-grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

/*
| shop.php wraps each card in a <div data-category> so the filter has
| something to toggle. That wrapper becomes the grid item, so it — not the
| card — is what stretches to the row height. Without these two rules the
| card sizes to its own content and the price and button rows stop lining up
| across a row.
*/
.ah-grid > [data-category] { display: flex; }
.ah-grid > [data-category] > .ah-card { flex: 1; }

/*
| ...and this line is what keeps that display value from breaking the
| filter. `display: flex` above is more specific than the browser's own
| `[hidden] { display: none }`, so it wins: without this rule the wrapper
| stays laid out at full height whether or not shop.php marked it hidden,
| and BOTH filter paths silently stop working — the server-rendered
| ?category=… page and the JS chips, which do nothing but toggle the same
| attribute. The page still says "Bundles", the chip still reads as
| pressed, and the whole catalog renders underneath it.
|
| Same guard .ah-nav-scrim[hidden] and .ah-cart-scrim[hidden] already
| carry, for the same reason: any rule that sets `display` on an element
| that can be hidden has to say what happens when it is.
*/
.ah-grid > [data-category][hidden] { display: none; }

.ah-card {
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.22s var(--ease-out), box-shadow 0.22s var(--ease-out), border-color 0.22s ease;
}

@media (hover: hover) and (pointer: fine) {
  .ah-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }

  /*
  | The image drifts slower than the card lifts — 450ms against 220ms. The
  | mismatch is the point: the card answers the cursor immediately while the
  | picture keeps moving after it settles, which reads as depth rather than
  | as one flat thing scaling.
  */
  .ah-card:hover .ah-media-img,
  .ah-card:hover .ah-media-fallback { transform: scale(1.045); }
}

.ah-media-img,
.ah-media-fallback { transition: transform 0.45s var(--ease-out); }

.ah-card-media {
  display: block;
  aspect-ratio: 4 / 3;
  background: var(--mint-soft);
  overflow: hidden;
  color: inherit;
  text-decoration: none;
}

.ah-media-img { width: 100%; height: 100%; object-fit: cover; }

/*
| Placeholder tile. Stands in wherever images/catalog/<slug>.webp does not
| exist yet, so a catalog with no photography renders as a deliberate blank
| rather than a row of broken-image icons. products.php decides which of the
| two is emitted; nothing here needs changing when the real files land.
*/
.ah-media-fallback {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%; height: 100%;
  background:
    radial-gradient(120% 120% at 25% 15%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 62%),
    radial-gradient(120% 120% at 78% 82%, color-mix(in srgb, var(--accent-2) 24%, transparent), transparent 60%),
    var(--mint-soft);
}
.ah-media-initials {
  font-family: var(--font-display);
  font-size: 2.3rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--ink-2);
}
.ah-media-sku {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.ah-card-body { display: flex; flex-direction: column; flex: 1; padding: 18px 18px 20px; }

.ah-chip {
  align-self: flex-start;
  padding: 4px 10px;
  margin-bottom: 10px;
  border-radius: var(--radius-pill);
  background: var(--mint-soft);
  color: var(--accent-strong);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ah-card-name { font-size: 1.02rem; font-weight: 600; margin: 0 0 4px; line-height: 1.3; }
.ah-card-name a { text-decoration: none; }
.ah-card-name a:hover { text-decoration: underline; }

.ah-card-sub { font-size: 0.88rem; color: var(--ink-3); margin: 0 0 8px; }
.ah-card-size { font-size: 0.8rem; color: var(--ink-3); margin: 0 0 14px; }

.ah-card-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; margin: auto 0 16px; }
.ah-price { font-size: 1.22rem; font-weight: 700; letter-spacing: -0.01em; }
.ah-price-was { color: var(--ink-3); font-size: 0.92rem; }
.ah-price-save {
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: var(--mint);
  color: var(--night);
  font-size: 0.74rem;
  font-weight: 700;
}

/*
| Two buttons share the width of a card that can be as narrow as 250px, so
| the label has to be sized to fit on one line at that width — a wrapped
| "Add to / bag" reads as a layout fault. nowrap makes the failure visible
| in testing rather than silent in production.
*/
.ah-card-actions { display: flex; gap: 8px; }
.ah-card-actions .ah-btn {
  flex: 1;
  padding: 11px 10px;
  font-size: 0.86rem;
  white-space: nowrap;
}

/* =========================================================================
   6. CART DRAWER
   js/site.js owns #cartDrawer, #cartScrim, #cartLines, #cartSubtotal and
   the data-cart-action buttons inside it.
   ====================================================================== */

.ah-cart-scrim { position: fixed; inset: 0; background: rgba(11, 16, 38, 0.55); z-index: 140; border: 0; padding: 0; }
.ah-cart-scrim[hidden] { display: none; }

.ah-cart {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(420px, 100vw);
  display: flex;
  flex-direction: column;
  background: var(--paper);
  box-shadow: var(--shadow-lg);
  transform: translateX(102%);
  transition: transform 0.3s var(--ease-drawer);
  z-index: 150;
}
.ah-cart.is-open { transform: translateX(0); }

.ah-cart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px var(--gutter);
  border-bottom: 1px solid var(--line);
}
.ah-cart-head h2 { margin: 0; font-size: 1.1rem; }

.ah-cart-close {
  width: 38px; height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--ink-2);
}
.ah-cart-close:hover { background: var(--canvas); color: var(--ink); }

.ah-cart-body { flex: 1; overflow-y: auto; padding: 16px var(--gutter); }

.ah-cart-empty { text-align: center; color: var(--ink-3); padding: 48px 12px; }

.ah-cart-line { display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.ah-cart-line:last-child { border-bottom: 0; }

/* Price above Remove, both right-aligned. Without this the two run together
   as "$89.99Remove", which reads as one string. */
.ah-cart-line-end { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }

.ah-cart-thumb { width: 64px; height: 64px; border-radius: 10px; overflow: hidden; background: var(--mint-soft); }
.ah-cart-thumb img { width: 100%; height: 100%; object-fit: cover; }

.ah-cart-line-name { font-size: 0.92rem; font-weight: 600; margin: 0 0 2px; }
.ah-cart-line-sub { font-size: 0.8rem; color: var(--ink-3); margin: 0 0 8px; }

.ah-qty { display: inline-flex; align-items: center; gap: 2px; border: 1px solid var(--line); border-radius: var(--radius-pill); padding: 2px; }
.ah-qty button { width: 28px; height: 28px; border: 0; border-radius: var(--radius-pill); background: transparent; color: var(--ink-2); font-size: 1rem; line-height: 1; }
.ah-qty button:hover { background: var(--canvas); color: var(--ink); }
.ah-qty span { min-width: 26px; text-align: center; font-size: 0.88rem; font-weight: 600; }

.ah-cart-line-price { font-size: 0.95rem; font-weight: 600; white-space: nowrap; }

.ah-cart-remove { border: 0; background: transparent; padding: 0; margin-top: 6px; color: var(--ink-3); font-size: 0.78rem; text-decoration: underline; }
.ah-cart-remove:hover { color: var(--ink); }

.ah-cart-foot { padding: 18px var(--gutter) 24px; border-top: 1px solid var(--line); background: var(--canvas); }
.ah-cart-row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; font-size: 0.92rem; }
.ah-cart-row strong { font-size: 1.16rem; }
.ah-cart-note { font-size: 0.8rem; color: var(--ink-3); margin: 10px 0 14px; }

/* Live-region toast confirming an add. Announced politely so it does not
   interrupt a screen reader mid-sentence. */
.ah-toast {
  position: fixed;
  left: 50%; bottom: 24px;
  transform: translate(-50%, 18px) scale(0.96);
  z-index: 160;
  padding: 12px 20px;
  border-radius: var(--radius-pill);
  background: var(--night);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s var(--ease-out), transform 0.24s var(--ease-out);
}
/* scale(0.96), never scale(0) — nothing in the real world appears from
   nothing, and an element with no size at all reads as a pop, not an entry. */
.ah-toast.is-visible { opacity: 1; transform: translate(-50%, 0) scale(1); }

/* =========================================================================
   7. FORMS + CHECKOUT
   ====================================================================== */

.ah-checkout { display: grid; gap: 32px; align-items: start; }
@media (min-width: 960px) { .ah-checkout { grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.85fr); gap: 48px; } }

.ah-panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(20px, 3vw, 32px); }
.ah-panel + .ah-panel { margin-top: 20px; }
.ah-panel h2 { font-size: 1.15rem; margin: 0 0 4px; }
.ah-panel-note { color: var(--ink-3); font-size: 0.88rem; margin: 0 0 20px; }

.ah-summary { position: sticky; top: calc(var(--header-h) + 16px); }

.ah-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.ah-field label { font-size: 0.84rem; font-weight: 600; color: var(--ink-2); }
.ah-field-hint { font-size: 0.78rem; color: var(--ink-3); }

.ah-input,
.ah-select {
  width: 100%;
  padding: 12px 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 0.98rem;
  transition: border-color 0.14s ease, box-shadow 0.14s ease;
}
.ah-input:hover, .ah-select:hover { border-color: var(--ink-4); }
.ah-input:focus, .ah-select:focus {
  outline: none;
  border-color: var(--accent-2-strong);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-2) 22%, transparent);
}
.ah-input[aria-invalid="true"], .ah-select[aria-invalid="true"] { border-color: #c02b3f; }

.ah-error { color: #a3132a; font-size: 0.8rem; margin-top: 4px; min-height: 1em; }

.ah-row { display: grid; gap: 16px; }
@media (min-width: 620px) {
  .ah-row-2 { grid-template-columns: 1fr 1fr; }
  .ah-row-3 { grid-template-columns: 1fr 1fr 1fr; }
}

.ah-choice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.14s ease, background-color 0.14s ease;
}
.ah-choice:hover { border-color: var(--ink-4); }
.ah-choice:has(input:checked) { border-color: var(--accent-strong); background: var(--mint-soft); }
.ah-choice input { margin-top: 4px; accent-color: var(--accent-strong); }
.ah-choice-label { font-weight: 600; font-size: 0.94rem; }
.ah-choice-note { font-size: 0.82rem; color: var(--ink-3); }
.ah-choice-price { margin-left: auto; font-weight: 600; white-space: nowrap; }

.ah-summary-line { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; font-size: 0.92rem; border-bottom: 1px solid var(--line); }
.ah-summary-line:last-of-type { border-bottom: 0; }
.ah-summary-total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 14px; margin-top: 8px; border-top: 2px solid var(--ink); }
.ah-summary-total strong { font-size: 1.35rem; }

.ah-trust { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 18px; font-size: 0.8rem; color: var(--ink-3); }
.ah-trust span { display: inline-flex; align-items: center; gap: 6px; }

/* =========================================================================
   8. PRODUCT DETAIL
   ====================================================================== */

.ah-pdp { display: grid; gap: 32px; align-items: start; }
@media (min-width: 900px) { .ah-pdp { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; } }

.ah-pdp-media { border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 1 / 1; background: var(--mint-soft); border: 1px solid var(--line); }
.ah-pdp-media .ah-media-img { width: 100%; height: 100%; object-fit: cover; }

.ah-pdp h1 { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 10px 0 8px; letter-spacing: -0.01em; }
.ah-pdp-sub { color: var(--ink-3); font-size: 1.05rem; margin: 0 0 18px; }

.ah-pdp-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px; margin-bottom: 6px; }
.ah-pdp-price .ah-price { font-size: 1.9rem; }

.ah-pdp-meta { font-size: 0.86rem; color: var(--ink-3); margin-bottom: 22px; }

.ah-pdp-buy { display: flex; gap: 10px; align-items: stretch; margin-bottom: 24px; }
.ah-pdp-buy .ah-btn { flex: 1; }

.ah-facts { width: 100%; border-collapse: collapse; margin: 8px 0 24px; font-size: 0.9rem; }
.ah-facts th, .ah-facts td { text-align: left; padding: 11px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.ah-facts th { width: 42%; font-weight: 600; color: var(--ink-2); }
.ah-facts td { color: var(--ink-3); }

.ah-highlights { list-style: none; padding: 0; margin: 0 0 24px; }
.ah-highlights li { position: relative; padding-left: 26px; margin-bottom: 9px; font-size: 0.94rem; color: var(--ink-2); }
.ah-highlights li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.55em;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--accent);
}

.ah-contents { list-style: none; padding: 0; margin: 0; }
.ah-contents li { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 0.92rem; }
.ah-contents li:last-child { border-bottom: 0; }
.ah-contents a { color: var(--ink); }
.ah-contents .ah-contents-price { color: var(--ink-3); white-space: nowrap; }
.ah-contents-total { display: flex; justify-content: space-between; gap: 16px; padding-top: 12px; margin-top: 6px; border-top: 2px solid var(--ink); font-weight: 700; }

.ah-note {
  padding: 16px 18px;
  border-radius: var(--radius);
  background: var(--mint-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  font-size: 0.88rem;
  color: var(--ink-2);
}

/* =========================================================================
   9. PROSE PAGES (faq, privacy, thank you)
   ====================================================================== */

.ah-prose { max-width: 760px; }
.ah-prose h1 { font-family: var(--font-display); font-weight: 400; font-size: clamp(2rem, 5vw, 3rem); margin-bottom: 16px; }
.ah-prose h2 { font-size: 1.25rem; margin-top: 36px; }
.ah-prose h3 { font-size: 1.02rem; margin-top: 26px; }
.ah-prose p, .ah-prose li { color: var(--ink-2); }
.ah-prose a { color: var(--accent-2-strong); }

.ah-accordion { border-top: 1px solid var(--line); }
.ah-accordion details { border-bottom: 1px solid var(--line); }
.ah-accordion summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 0;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}
.ah-accordion summary::-webkit-details-marker { display: none; }
.ah-accordion summary::after { content: "+"; font-size: 1.3rem; color: var(--ink-3); line-height: 1; }
.ah-accordion details[open] summary::after { content: "\2212"; }
.ah-accordion details > *:not(summary) { padding-bottom: 18px; color: var(--ink-2); }

/* =========================================================================
   10. FOOTER
   ====================================================================== */

.ah-footer { background: var(--night); color: #fff; padding-block: clamp(44px, 6vw, 72px) 28px; margin-top: clamp(48px, 7vw, 88px); }
.ah-footer a { color: var(--ink-4); text-decoration: none; }
.ah-footer a:hover { color: #fff; text-decoration: underline; }

.ah-footer-grid { display: grid; gap: 32px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); margin-bottom: 40px; }
.ah-footer h3 { font-size: 0.74rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--mint); margin-bottom: 14px; }
.ah-footer ul { list-style: none; padding: 0; margin: 0; }
.ah-footer li { margin-bottom: 9px; font-size: 0.92rem; }

.ah-footer-legal { padding-top: 24px; border-top: 1px solid var(--line-night); color: var(--ink-4); font-size: 0.8rem; }
.ah-footer-legal p { margin-bottom: 10px; max-width: 76ch; }

/* =========================================================================
   10b. VISIBILITY UTILITIES

   These live at the end of the file on purpose. A utility that sets
   `display` has to beat the component rules that also set it, and every
   selector here is a single class — same specificity as .ah-icon-btn and
   friends, so source order is the only thing deciding the winner.

   This was a real bug: .ah-hide-sm sat up in the utilities block above
   .ah-icon-btn, lost the tie, and the contact icon it was supposed to hide
   rendered on every mobile header regardless. Moving the rule down fixes it
   without reaching for !important.
   ====================================================================== */

.ah-hide-sm { display: none; }
@media (min-width: 720px) { .ah-hide-sm { display: inline-flex; } }

/* =========================================================================
   11. MOTION
   ====================================================================== */

/*
|--------------------------------------------------------------------------
| 11a. Scroll reveal
|--------------------------------------------------------------------------
|
| Elements fade and rise the first time they enter the viewport. js/site.js
| assigns .au-reveal and toggles .is-in; the stagger delay is written to the
| element's own inline style rather than to a custom property on the parent,
| because changing a variable on a container recalculates styles for every
| child under it.
|
| THE HIDDEN STATE IS GATED ON `.js`, WHICH IS NOT DECORATIVE. An inline
| script in <head> puts that class on <html> before first paint. If the
| script never runs — JS disabled, a parse error, a blocked file — the class
| is absent, this rule never matches, and every element renders normally.
| Hiding content behind JS that might not arrive is how a storefront ends up
| blank; that failure mode is designed out rather than tested for.
|
| Transitions rather than keyframes: a reveal can be interrupted by a fast
| scroll, and transitions retarget from wherever they are while keyframes
| restart from zero.
*/
.js .au-reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.52s var(--ease-out), transform 0.52s var(--ease-out);
}
.js .au-reveal.is-in { opacity: 1; transform: none; }

/*
|--------------------------------------------------------------------------
| 11b. Header
|--------------------------------------------------------------------------
|
| The bar earns a shadow once the page is scrolled and loses it at the top,
| so a sticky header does not sit under a shadow it has not earned.
*/
.ah-header { transition: box-shadow 0.24s ease, border-color 0.24s ease; }
.ah-header.is-stuck {
  border-bottom-color: transparent;
  box-shadow: 0 1px 0 var(--line), 0 10px 28px rgba(15, 21, 51, 0.07);
}

/*
|--------------------------------------------------------------------------
| 11c. Cart badge
|--------------------------------------------------------------------------
|
| The badge bumps when the count changes. This is the only confirmation
| that an add landed if the drawer did not open, so it is worth the frame.
| js/site.js restarts the animation by removing the class and forcing a
| reflow — without that, a second add inside the animation window does
| nothing visible at all.
*/
@keyframes ah-bump {
  0% { transform: scale(1); }
  35% { transform: scale(1.32); }
  100% { transform: scale(1); }
}
.cart-badge.is-bumped { animation: ah-bump 0.36s var(--ease-out); }

/*
|--------------------------------------------------------------------------
| 11d. Scrims
|--------------------------------------------------------------------------
|
| The scrim fades rather than appearing at full strength under a panel that
| is still sliding. It keeps the `hidden` attribute for the no-JS and
| assistive-tech semantics; opacity is driven by the class on top of it.
*/
.ah-nav-scrim,
.ah-cart-scrim {
  opacity: 0;
  transition: opacity 0.24s var(--ease-out);
}
.ah-nav-scrim.is-visible,
.ah-cart-scrim.is-visible { opacity: 1; }

/*
|--------------------------------------------------------------------------
| 11e. Accordion
|--------------------------------------------------------------------------
|
| An FAQ answer is opened occasionally, not dozens of times, so a one-shot
| keyframe is fine here — there is no rapid re-trigger to retarget.
*/
@keyframes ah-accordion-open {
  from { opacity: 0; transform: translateY(-4px); }
}
.ah-accordion details[open] > *:not(summary) {
  animation: ah-accordion-open 0.24s var(--ease-out) both;
}
.ah-accordion summary { transition: color 0.16s ease; }
.ah-accordion summary::after { transition: transform 0.2s var(--ease-out); }
.ah-accordion details[open] summary::after { transform: rotate(180deg); }

/* Shared by the reduced-motion fallbacks below. */
@keyframes ah-fade-in {
  from { opacity: 0; }
}

/*
|--------------------------------------------------------------------------
| 11f. prefers-reduced-motion
|--------------------------------------------------------------------------
|
| Reduced motion means less movement, not no feedback. Fades stay — they
| carry meaning and cause nobody any trouble. Travel, lift, scale and drift
| all go.
|
| This block is deliberately surgical rather than a blanket
| `* { transform: none }`. Two elements would break outright under that:
|
|   .ah-cart / .ah-nav  are held off-screen BY a transform. Cancelling it
|                       leaves the drawer and the nav panel permanently
|                       open over the page.
|   .ah-toast           is centred with translate(-50%). Cancelling it
|                       parks the toast off to one side of the screen.
|
| Both keep their transform and lose only the duration or the travel.
| Brand-layer components are handled at the end of brand.css, because that
| file loads second and would otherwise win the override.
*/
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .js .au-reveal { transform: none; transition: opacity 0.2s ease; }

  .ah-btn:hover,
  .ah-btn:active,
  .ah-card:hover { transform: none; }

  .ah-card:hover .ah-media-img,
  .ah-card:hover .ah-media-fallback { transform: none; }

  .cart-badge.is-bumped { animation: none; }

  .ah-accordion details[open] > *:not(summary) { animation: ah-fade-in 0.2s ease both; }
  .ah-accordion details[open] summary::after { transform: none; }

  /* Structural transforms kept; the movement between states is not. */
  .ah-cart,
  .ah-nav,
  .ah-skip { transition-duration: 0.001ms; }

  .ah-toast {
    transform: translate(-50%, 0) scale(1);
    transition: opacity 0.2s ease;
  }
}

/* =========================================================================
   12. PRINT
   ====================================================================== */

@media print {
  .ah-header, .ah-announce, .ah-footer, .ah-cart, .ah-cart-scrim, .ah-nav-scrim, .ah-skip, .ah-toast { display: none !important; }
  body { background: #fff; color: #000; }
  .ah-panel, .ah-card { border-color: #999; box-shadow: none; }
}
