/* ==========================================================================
   Apple design language — buyer-facing storefront
   Implements .claude/apple-design.md. Layers on stock Bootstrap 5.3 (NOT the
   Phoenix theme, which the Apple layout deliberately does not load) so none of
   Phoenix's card shadows, radii or token set can leak in.

   Phoenix is the Admin area's design only; the two layouts never share a page.

   House rules from the brief, enforced throughout:
     · One accent (#0066cc). The one exception: the Delete button in a confirmation
       is red, as the last warning before something that cannot be undone.
     · Exactly one drop-shadow in the system, and it belongs to product imagery.
       Never cards, never buttons, never text.
     · Elevation comes from surface change and backdrop-filter, nothing else.
     · Radii grammar is sm / md / lg / pill. Nothing in between.
     · Weight ladder is 300 / 400 / 600 / 700. 500 is deliberately absent.
   ========================================================================== */

:root {
  /* Brand & accent — the single interactive colour, plus its two context variants. */
  --apple-primary: #0066cc;
  --apple-primary-dark: #0055aa;
  --apple-primary-focus: #0071e3;
  --apple-primary-on-dark: #2997ff;

  /* Surface */
  --apple-canvas: #ffffff;
  --apple-parchment: #f5f5f7;
  --apple-pearl: #fafafc;
  --apple-tile-1: #272729;
  --apple-tile-2: #2a2a2c;
  --apple-tile-3: #252527;
  --apple-black: #000000;
  --apple-chip-translucent: rgba(210, 210, 215, 0.64);
  --apple-chip-strong: rgba(210, 210, 215, 0.82);
  --apple-chip-solid: #d2d2d7;
  --apple-pearl-hover: #f2f2f5;
  --apple-frosted: rgba(245, 245, 247, 0.8);

  /* Text */
  --apple-ink: #1d1d1f;
  --apple-on-dark: #ffffff;
  --apple-muted-on-dark: #cccccc;
  /* Stock lines on the dark tiles: Bootstrap's green and our red are 3.3:1 and 2.3:1 there.
     These are 7.4:1 and 5.3:1 on --apple-tile-1. */
  --apple-success-on-dark: #30d158;
  --apple-danger-on-dark: #ff6961;
  --apple-ink-80: #333333;
  /* Apple's own secondary grey: 5.1:1 on white, 4.7:1 on parchment (WCAG AA).
     The earlier #7a7a7a was 4.3:1 / 3.9:1 and failed for small text. */
  --apple-ink-48: #6e6e73;

  /* Errors, and the Delete button in a confirmation: white on it is 6.5:1. */
  --apple-danger: #b3261e;
  --apple-danger-dark: #8f1e18;

  /* Time-running-out notes (a promotion ending soon): 5.5:1 on white, 5.0:1 on parchment.
     Orange, not red: red means an error or Delete here. */
  --apple-urgent: #b64400;

  /* Hairlines */
  --apple-divider-soft: rgba(0, 0, 0, 0.04);
  --apple-hairline: #e0e0e0;
  --apple-hairline-translucent: rgba(0, 0, 0, 0.08);
  --apple-hairline-strong: #c7c7cc;
  --apple-hairline-chip: #b0b0b6;

  /* Radii */
  --apple-radius-xs: 5px;
  --apple-radius-sm: 8px;
  --apple-radius-md: 11px;
  --apple-radius-lg: 18px;
  --apple-radius-pill: 9999px;

  /* The one shadow. Product renders only. */
  --apple-product-shadow: rgba(0, 0, 0, 0.22) 3px 5px 30px 0;

  /* Spacing */
  --apple-space-xxs: 4px;
  --apple-space-xs: 8px;
  --apple-space-sm: 12px;
  --apple-space-md: 17px;
  --apple-space-lg: 24px;
  --apple-space-xl: 32px;
  --apple-space-xxl: 48px;
  --apple-space-section: 80px;

  --apple-nav-height: 44px;
  --apple-subnav-height: 52px;

  /* Inter substitutes SF Pro per the brief's own substitution note: ss03 for the
     rounded 'a', tracking nudged tighter at display sizes, and body leading
     pulled from 1.47 to 1.44 because Inter's x-height is taller than SF Pro's. */
  --apple-font: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* ---------- Bootstrap token overrides -------------------------------------- */

:root,
[data-bs-theme="light"] {
  --bs-body-font-family: var(--apple-font);
  --bs-body-font-size: 17px;
  --bs-body-font-weight: 400;
  --bs-body-line-height: 1.44;
  --bs-body-color: var(--apple-ink);
  --bs-body-color-rgb: 29, 29, 31;
  --bs-body-bg: var(--apple-canvas);
  --bs-emphasis-color: var(--apple-ink);
  --bs-secondary-color: var(--apple-ink-80);
  --bs-tertiary-color: var(--apple-ink-48);
  /* Bootstrap's .text-body-* utilities read the -rgb variants, not the plain ones,
     so these must be set too or those classes fall back to Bootstrap's own greys —
     a colour from outside this system. Utility classes reach the page through
     shared scripts (favorites.js writes .text-body-tertiary), so they matter. */
  --bs-emphasis-color-rgb: 29, 29, 31;
  --bs-secondary-color-rgb: 51, 51, 51;
  --bs-tertiary-color-rgb: 110, 110, 115;
  --bs-secondary-bg: var(--apple-parchment);
  --bs-tertiary-bg: var(--apple-parchment);
  --bs-border-color: var(--apple-hairline);
  --bs-border-color-translucent: var(--apple-hairline-translucent);

  --bs-primary: var(--apple-primary);
  --bs-primary-rgb: 0, 102, 204;
  --bs-link-color: var(--apple-primary);
  --bs-link-color-rgb: 0, 102, 204;
  --bs-link-hover-color: var(--apple-primary-dark);
  --bs-link-hover-color-rgb: 0, 85, 170;

  --bs-border-radius: var(--apple-radius-sm);
  --bs-border-radius-sm: var(--apple-radius-xs);
  --bs-border-radius-lg: var(--apple-radius-md);
  --bs-border-radius-xl: var(--apple-radius-lg);
  --bs-border-radius-pill: var(--apple-radius-pill);

  /* Bootstrap's elevation scale is switched off wholesale. The system has one
     shadow and it is applied by hand, to product imagery only. */
  --bs-box-shadow: none;
  --bs-box-shadow-sm: none;
  --bs-box-shadow-lg: none;
  --bs-box-shadow-inset: none;
}

/* ---------- Base ----------------------------------------------------------- */

html {
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--apple-font);
  font-feature-settings: "ss03";
  font-size: 17px;
  font-weight: 400;
  line-height: 1.44;
  /* One value for 17px text, here and on every control that sets it. Looser than the brief's
     -0.022em, which is SF Pro's figure: Inter wants about this much at this size. */
  letter-spacing: -0.012em;
  color: var(--apple-ink);
  background-color: var(--apple-canvas);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Negative tracking at display sizes is the signature "Apple tight" cadence, and
   the brief is explicit that it never appears at 12px or below. */
h1, h2, h3, h4, h5, h6,
.apple-hero, .apple-display, .apple-display-sm {
  font-weight: 600;
  color: var(--apple-ink);
  letter-spacing: -0.01em;
  margin: 0;
}

.apple-hero {
  font-size: 56px;
  line-height: 1.07;
  /* Inter's display cut is already tight at this size, so less than the text cut needed. */
  letter-spacing: -0.02em;
}

.apple-display {
  font-size: 40px;
  line-height: 1.1;
}

.apple-display-sm {
  font-size: 34px;
  line-height: 1.2;
}

h1 { font-size: 40px; line-height: 1.1; }
h2 { font-size: 34px; line-height: 1.2; }
h3 { font-size: 28px; line-height: 1.25; }
h4 { font-size: 24px; line-height: 1.3; }
h5 { font-size: 21px; line-height: 1.19; }
h6 { font-size: 17px; line-height: 1.24; }

/* Lead copy under a tile headline. */
.apple-lead {
  font-size: 28px;
  font-weight: 400;
  /* 1.14 suits the one-line taglines the brief has in mind; these run to three or four lines. */
  line-height: 1.3;
  letter-spacing: 0.007em;
  color: var(--apple-ink);
}

/* The rare weight 300 — reserved for large, deliberately airy reads. */
.apple-lead-airy {
  font-size: 24px;
  font-weight: 300;
  line-height: 1.5;
  color: var(--apple-ink);
}

.apple-tagline {
  font-size: 21px;
  font-weight: 600;
  line-height: 1.19;
  letter-spacing: 0.011em;
}

.apple-body-strong { font-size: 17px; font-weight: 600; letter-spacing: -0.012em; }
.apple-caption     { font-size: 14px; font-weight: 400; line-height: 1.43; letter-spacing: -0.016em; }
.apple-caption-strong { font-size: 14px; font-weight: 600; line-height: 1.29; letter-spacing: -0.016em; }
.apple-fine-print  { font-size: 12px; font-weight: 400; line-height: 1.33; letter-spacing: 0; }
.apple-micro-legal { font-size: 10px; font-weight: 400; line-height: 1.3; letter-spacing: 0; }

/* An eyebrow above a headline — brand names, section kickers. Small caps sizing
   sits below the 12px tracking floor, so it takes positive tracking instead. */
.apple-eyebrow {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--apple-ink-48);
}

.apple-muted { color: var(--apple-ink-48); }
.apple-secondary { color: var(--apple-ink-80); }

/* "Ends today" / "Ends in N days" on promotion cards. */
.promo-countdown { color: var(--apple-urgent); font-weight: 600; }

a {
  color: var(--apple-primary);
  text-decoration: none;
}

@media (hover: hover) { a:hover { text-decoration: underline; } }

/* One focus ring for the whole system, in the focus blue the brief reserves for
   it. :focus-visible rather than :focus so pointer users never see it.
   Components that need a different offset override this, not replace it. */
:focus-visible {
  outline: 2px solid var(--apple-primary-focus);
  outline-offset: 2px;
}

/* ---------- Surfaces & tiles ---------------------------------------------- */

/* Full-bleed section. Tiles stack edge-to-edge with no gap and no radius — the
   colour change between them IS the divider, which is why no border or shadow
   appears here. */
.tile {
  padding-top: var(--apple-space-section);
  padding-bottom: var(--apple-space-section);
  border-radius: 0;
}

/* Doubled class deliberately: the responsive rules below re-set padding on plain
   `.tile`, and being later in the file they would otherwise beat these modifiers
   and give the flush hero tile padding on small screens. The extra class raises
   specificity so a modifier always wins over the breakpoint default. */
.tile.tile--flush { padding-top: 0; padding-bottom: 0; }
.tile.tile--tight { padding-top: var(--apple-space-xxl); padding-bottom: var(--apple-space-xxl); }

.tile--light { background-color: var(--apple-canvas); color: var(--apple-ink); }
.tile--parchment { background-color: var(--apple-parchment); color: var(--apple-ink); }

.tile--dark,
.tile--dark-2,
.tile--dark-3 {
  color: var(--apple-on-dark);
}

.tile--dark { background-color: var(--apple-tile-1); }
.tile--dark-2 { background-color: var(--apple-tile-2); }
.tile--dark-3 { background-color: var(--apple-tile-3); }

.tile--dark :is(h1, h2, h3, h4, h5, h6),
.tile--dark-2 :is(h1, h2, h3, h4, h5, h6),
.tile--dark-3 :is(h1, h2, h3, h4, h5, h6),
.tile--dark .apple-lead,
.tile--dark-2 .apple-lead,
.tile--dark-3 .apple-lead {
  color: var(--apple-on-dark);
}

/* Action Blue disappears against a near-black tile, so in-copy links there take
   the brighter Sky Link Blue instead. Light surfaces never use it. */
.tile--dark a:not(.btn),
.tile--dark-2 a:not(.btn),
.tile--dark-3 a:not(.btn) {
  color: var(--apple-primary-on-dark);
}

/* !important because Bootstrap's text-* utilities carry it. */
:is(.tile--dark, .tile--dark-2, .tile--dark-3) .text-success { color: var(--apple-success-on-dark) !important; }
:is(.tile--dark, .tile--dark-2, .tile--dark-3) .text-danger { color: var(--apple-danger-on-dark) !important; }

.tile--dark .apple-muted,
.tile--dark-2 .apple-muted,
.tile--dark-3 .apple-muted {
  color: var(--apple-muted-on-dark);
}

/* The centred stack every tile hero uses: headline → tagline → CTAs. At least
   64px of air above the headline is part of the brief's whitespace philosophy. */
.tile-head {
  max-width: 720px;
  margin: 0 auto var(--apple-space-xxl);
  text-align: center;
}

.tile-head > * + * { margin-top: var(--apple-space-md); }

.tile-head .tile-cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--apple-space-md);
  justify-content: center;
}

/* Content widths: text-heavy sections read narrow, product grids run wide. */
.apple-container {
  width: 100%;
  max-width: 1440px;
  margin-inline: auto;
  padding-inline: var(--apple-space-lg);
}

.apple-container--narrow { max-width: 980px; }
.apple-container--form { max-width: 560px; }

/* ---------- Buttons -------------------------------------------------------- */

/* The full-pill radius IS the brand's action signal, so every primary CTA takes
   it. scale(0.95) on press is the system-wide micro-interaction. */
.btn {
  font-family: var(--apple-font);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.24;
  letter-spacing: -0.012em;
  border-radius: var(--apple-radius-pill);
  padding: 11px 22px;
  border: 1px solid var(--bs-btn-border-color);
  /* Bootstrap draws its own blue ring on a pressed, focused button. */
  --bs-btn-focus-box-shadow: none;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .1s ease;
}

/* The press colour lands at once; only the release fades. */
.btn:active {
  transform: scale(0.95);
  transition: transform .1s ease;
}

.btn:focus-visible {
  outline: 2px solid var(--apple-primary-focus);
  outline-offset: 2px;
  box-shadow: none;
}

/* Colours go through Bootstrap's --bs-btn-* variables, not background-color rules: its own
   .btn:hover, .btn:active and .btn:focus-visible read them and outrank a plain class, so
   any variable left unset shows Bootstrap's blue or a transparent button. */
.btn-primary {
  --bs-btn-color: var(--apple-on-dark);
  --bs-btn-bg: var(--apple-primary);
  --bs-btn-border-color: var(--apple-primary);
  --bs-btn-hover-color: var(--apple-on-dark);
  --bs-btn-hover-bg: var(--apple-primary-dark);
  --bs-btn-hover-border-color: var(--apple-primary-dark);
  --bs-btn-active-color: var(--apple-on-dark);
  --bs-btn-active-bg: var(--apple-primary-dark);
  --bs-btn-active-border-color: var(--apple-primary-dark);
  --bs-btn-disabled-color: var(--apple-on-dark);
  --bs-btn-disabled-bg: var(--apple-primary);
  --bs-btn-disabled-border-color: var(--apple-primary);
  --bs-btn-disabled-opacity: 0.42;
}

/* The ghost pill — the second CTA when two sit together. */
.btn-outline-primary {
  --bs-btn-color: var(--apple-primary);
  --bs-btn-bg: transparent;
  --bs-btn-border-color: var(--apple-primary);
  --bs-btn-hover-color: var(--apple-on-dark);
  --bs-btn-hover-bg: var(--apple-primary);
  --bs-btn-hover-border-color: var(--apple-primary);
  --bs-btn-active-color: var(--apple-on-dark);
  --bs-btn-active-bg: var(--apple-primary-dark);
  --bs-btn-active-border-color: var(--apple-primary-dark);
  --bs-btn-disabled-color: var(--apple-primary);
  --bs-btn-disabled-bg: transparent;
  --bs-btn-disabled-border-color: var(--apple-primary);
}

/* Larger hero CTA — note weight 300, one of the two places the brief uses it. */
.btn-hero {
  font-size: 18px;
  font-weight: 300;
  padding: 14px 28px;
}

/* Compact utility rect — the second button grammar. Nav actions, log out. */
.btn-utility {
  --bs-btn-color: var(--apple-on-dark);
  --bs-btn-bg: var(--apple-ink);
  --bs-btn-border-color: var(--apple-ink);
  --bs-btn-hover-color: var(--apple-on-dark);
  --bs-btn-hover-bg: var(--apple-black);
  --bs-btn-hover-border-color: var(--apple-black);
  --bs-btn-active-color: var(--apple-on-dark);
  --bs-btn-active-bg: var(--apple-black);
  --bs-btn-active-border-color: var(--apple-black);
  --bs-btn-disabled-color: var(--apple-on-dark);
  --bs-btn-disabled-bg: var(--apple-ink);
  --bs-btn-disabled-border-color: var(--apple-ink);
  font-size: 14px;
  letter-spacing: -0.016em;
  border-radius: var(--apple-radius-sm);
  padding: 8px 15px;
}

/* Pearl capsule — secondary action on a card. Its 3px border reads as a soft
   ring rather than a drawn line, which is how the system gets separation
   without spending its one shadow. The confirm modal's Cancel wears the same. */
.btn-pearl,
.modal-footer .btn-outline-secondary {
  --bs-btn-color: var(--apple-ink-80);
  --bs-btn-bg: var(--apple-pearl);
  --bs-btn-border-color: var(--apple-divider-soft);
  --bs-btn-hover-color: var(--apple-ink);
  --bs-btn-hover-bg: var(--apple-pearl-hover);
  --bs-btn-hover-border-color: var(--apple-divider-soft);
  --bs-btn-active-color: var(--apple-ink);
  --bs-btn-active-bg: var(--apple-pearl-hover);
  --bs-btn-active-border-color: var(--apple-divider-soft);
  --bs-btn-disabled-color: var(--apple-ink-80);
  --bs-btn-disabled-bg: var(--apple-pearl);
  --bs-btn-disabled-border-color: var(--apple-divider-soft);
  border-width: 3px;
  font-size: 14px;
  letter-spacing: -0.016em;
  border-radius: var(--apple-radius-md);
  padding: 8px 14px;
}

/* Circular control that floats over photography. Exactly 44×44. */
.btn-icon-circular {
  --bs-btn-color: var(--apple-ink);
  --bs-btn-bg: var(--apple-chip-translucent);
  --bs-btn-hover-color: var(--apple-ink);
  --bs-btn-hover-bg: var(--apple-chip-strong);
  --bs-btn-active-color: var(--apple-ink);
  --bs-btn-active-bg: var(--apple-chip-strong);
  --bs-btn-disabled-color: var(--apple-ink);
  --bs-btn-disabled-bg: var(--apple-chip-translucent);
  width: 44px;
  height: 44px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
}

.btn-link {
  --bs-btn-color: var(--apple-primary);
  --bs-btn-hover-color: var(--apple-primary);
  --bs-btn-active-color: var(--apple-primary-dark);
  padding: 0;
  border: 0;
  text-decoration: none;
}

@media (hover: hover) { .btn-link:hover { text-decoration: underline; } }

/* a:hover underlines text links; a link styled as a button must not pick that up. */
@media (hover: hover) { .btn:not(.btn-link):hover { text-decoration: none; } }

/* A touch screen keeps :hover on whatever was tapped last, which would leave a tapped
   button in its hover colours. There, hover simply means the button's normal colours. */
@media (hover: none) {
  .btn,
  .modal-footer .btn {
    --bs-btn-hover-color: var(--bs-btn-color);
    --bs-btn-hover-bg: var(--bs-btn-bg);
    --bs-btn-hover-border-color: var(--bs-btn-border-color);
  }
}

/* ---------- Global nav ----------------------------------------------------- */

/* True black, and the only place pure black appears on the page. */
.global-nav {
  background-color: var(--apple-black);
  height: var(--apple-nav-height);
  position: relative;
  z-index: 1040;
}

.global-nav__inner {
  display: flex;
  align-items: center;
  gap: var(--apple-space-lg);
  height: var(--apple-nav-height);
  max-width: 1440px;
  margin-inline: auto;
  padding-inline: var(--apple-space-lg);
}

/* The brand used to sit in this bar on a white gradient plate, because the
   supplied logo is a black wordmark that disappears on black. It now lives in
   the sub-nav, on parchment, where it needs no plate at all. These links hold
   the left in its place — the bar read as a stray band without something
   anchoring that end. 12px matches .global-nav__icon on the other side. */
.global-nav__links {
  display: flex;
  align-items: center;
  gap: var(--apple-space-lg);
}

.global-nav__link {
  color: var(--apple-on-dark);
  opacity: 0.88;
  font-size: 12px;
  letter-spacing: 0;
  text-decoration: none;
  white-space: nowrap;
}

@media (hover: hover) { .global-nav__link:hover { opacity: 1; color: var(--apple-on-dark); text-decoration: none; } }

.global-nav__actions {
  display: flex;
  align-items: center;
  gap: var(--apple-space-md);
  margin-left: auto;
}

/* align-items above only reaches direct children, and only the cart link is one.
   FavoriteBadge wraps its link in #favorite-badge and the account menu sits in a
   .dropdown; both wrappers centre correctly, but each blockifies into a 24.5px
   line box (inherited 17px font-size) and their inline-flex contents then sit on
   its baseline rather than its centre — which rode them 2px high. Centring the
   wrappers too puts the whole row on one line. */
.global-nav__actions > * {
  display: flex;
  align-items: center;
}

.global-nav__icon {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  position: relative;
  color: var(--apple-on-dark);
  opacity: 0.88;
  font-size: 12px;
  letter-spacing: 0;
  text-decoration: none;
  background: none;
  border: 0;
  padding: 0;
}

@media (hover: hover) { .global-nav__icon:hover { opacity: 1; color: var(--apple-on-dark); text-decoration: none; } }

/* A 24px hit area at least (WCAG 2.2 target size); the 16px glyph stays as it is. */
.global-nav__icon { min-width: 24px; min-height: 24px; justify-content: center; }

/* The icon is an inline svg, and Bootstrap gives svg vertical-align: middle, which rides
   the text baseline — it sat the bag glyph ~1px below the "RM0.00" next to it.
   Blocking it hands alignment back to the flex container. */
.global-nav__icon svg { display: block; }

/* Drawer trigger. Stays hidden until .global-nav__links is dropped at 833px, so
   the two are never on screen together. */
.global-nav__burger {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: var(--apple-nav-height);
  margin-left: calc(var(--apple-space-sm) * -1);
  padding: 0;
  border: 0;
  background: none;
  color: var(--apple-on-dark);
  opacity: 0.88;
}

@media (hover: hover) { .global-nav__burger:hover { opacity: 1; } }
.global-nav__burger span { display: block; width: 17px; height: 1px; background-color: currentColor; }
.global-nav__burger span + span { margin-top: 5px; }

/* ---------- Mobile drawer -------------------------------------------------- */

/* Everything the black bar drops below 833px lives here instead. Bootstrap's own
   offcanvas — no new dependency. Solid: at 96% white a blur showed nothing and
   still cost the phone the work of drawing it. */
.mobile-nav {
  --bs-offcanvas-width: min(320px, 86vw);
  --bs-offcanvas-padding-x: var(--apple-space-lg);
  --bs-offcanvas-padding-y: var(--apple-space-lg);
  --bs-offcanvas-border-width: 0;
  background-color: var(--apple-canvas);
}

.mobile-nav .offcanvas-header { border-bottom: 1px solid var(--apple-hairline); }

.mobile-nav .offcanvas-title {
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
}

/* 44px minimum row height is the whole point of the drawer — these are the
   primary navigation targets on a phone. */
.mobile-nav__link {
  display: flex;
  align-items: center;
  min-height: 44px;
  font-size: 17px;
  letter-spacing: -0.012em;
  color: var(--apple-ink);
  text-decoration: none;
  border-bottom: 1px solid var(--apple-divider-soft);
}

@media (hover: hover) { .mobile-nav__link:hover { color: var(--apple-primary); text-decoration: none; } }
.mobile-nav__link:last-child { border-bottom: 0; }

/* The Categories row opens a list in place, so it reads as a row with a chevron. */
.mobile-nav__toggle {
  justify-content: space-between;
  width: 100%;
  padding: 0;
  background: none;
  border-width: 0 0 1px;
  border-style: solid;
  border-color: var(--apple-divider-soft);
  text-align: left;
}

.mobile-nav__chevron {
  font-size: 12px;
  color: var(--apple-ink-48);
  transition: transform .2s ease;
}

.mobile-nav__toggle[aria-expanded="true"] .mobile-nav__chevron { transform: rotate(180deg); }

.mobile-nav__link--category {
  justify-content: space-between;
  padding-left: var(--apple-space-sm);
  font-weight: 600;
}

.mobile-nav__link--child {
  padding-left: var(--apple-space-lg);
  font-size: 14px;
}
.mobile-nav__section { margin-top: var(--apple-space-lg); }
.mobile-nav__section > .apple-eyebrow { margin-bottom: var(--apple-space-xs); }

/* ---------- Sub-nav (frosted) --------------------------------------------- */

/* Parchment at 80% with a backdrop blur — "floating over content" without a
   shadow, which is how the system does sticky elevation. */
.sub-nav {
  position: sticky;
  top: 0;
  z-index: 1030;
  height: var(--apple-subnav-height);
  background-color: var(--apple-frosted);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--apple-hairline-translucent);
}

.sub-nav__inner {
  display: flex;
  align-items: center;
  gap: var(--apple-space-lg);
  height: var(--apple-subnav-height);
  max-width: 1440px;
  margin-inline: auto;
  padding-inline: var(--apple-space-lg);
}

/* Holds the brand lockup, not a word — flex so the image centres in the 52px
   bar, flex:0 0 auto so it never gives ground to the search pill beside it. */
.sub-nav__title {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  color: var(--apple-ink);
  text-decoration: none;
}

@media (hover: hover) { .sub-nav__title:hover { color: var(--apple-ink); text-decoration: none; } }

/* ~2.48:1 lockup, so 50px tall lands near 124px wide. That fills the 52px bar
   with 1px to spare on each side; phones step down to 35px below. */
.sub-nav__logo {
  display: block;
  height: 50px;
  width: auto;
}

.sub-nav__links {
  display: flex;
  align-items: center;
  gap: var(--apple-space-lg);
  margin-left: auto;
}

/* The baseline trap again — "Categories" is a button inside a .dropdown wrapper,
   so it sat on that wrapper's 17px line box instead of its centre. Targeted at
   the wrapper rather than every child, because the other two don't want it: the
   search pill already centres itself, and the Brands link carries Bootstrap
   display utilities whose !important would beat this rule anyway. */
.sub-nav__links > .dropdown {
  display: flex;
  align-items: center;
}

.sub-nav__link {
  font-size: 14px;
  font-weight: 400;
  letter-spacing: -0.016em;
  color: var(--apple-ink);
  text-decoration: none;
  white-space: nowrap;
  background: none;
  border: 0;
  padding: 0;
}

@media (hover: hover) { .sub-nav__link:hover { color: var(--apple-primary); text-decoration: none; } }

/* Search is pill-shaped too — the brief extends the CTA grammar to it. Kept
   persistently visible rather than hidden behind a glyph as on apple.com,
   because buyers here search by SKU constantly. */
.search-pill {
  position: relative;
  display: flex;
  align-items: center;
}

.search-pill input {
  height: 36px;
  width: 280px;
  padding: 6px 16px 6px 38px;
  font-size: 14px;
  line-height: 1.29;
  letter-spacing: -0.016em;
  color: var(--apple-ink);
  background-color: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--apple-hairline-translucent);
  border-radius: var(--apple-radius-pill);
  transition: border-color .2s ease;
}

.search-pill input::placeholder { color: var(--apple-ink-48); }

.search-pill input:focus {
  outline: 2px solid var(--apple-primary-focus);
  outline-offset: 1px;
  background-color: var(--apple-canvas);
}

.search-pill__icon {
  position: absolute;
  left: 14px;
  font-size: 13px;
  color: var(--apple-ink-48);
  pointer-events: none;
}

/* Header search suggestions (site.js). The pill is narrow and sits at the right of the
   sub-nav, so the panel is wider than it and anchored to its right edge, capped to the
   viewport so it never runs off a phone screen. */
.search-suggest {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 1050;
  width: min(400px, calc(100vw - 32px));
  max-height: min(70vh, 480px);
  overflow-y: auto;
  padding: 6px;
  background-color: var(--apple-canvas);
  border: 1px solid var(--apple-hairline);
  border-radius: var(--apple-radius-lg);
}

.search-suggest__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: var(--apple-radius-sm);
  color: var(--apple-ink);
  text-decoration: none;
}

.search-suggest__item.is-active {
  background-color: var(--apple-parchment);
  color: var(--apple-ink);
  text-decoration: none;
}

@media (hover: hover) {
  .search-suggest__item:hover {
    background-color: var(--apple-parchment);
    color: var(--apple-ink);
    text-decoration: none;
  }
}

.search-suggest__thumb {
  flex: 0 0 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--apple-radius-sm);
  overflow: hidden;
  color: var(--apple-ink-48);
  background-color: var(--apple-parchment);
}

.search-suggest__thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.search-suggest__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.search-suggest__name {
  font-size: 14px;
  line-height: 1.29;
  letter-spacing: -0.016em;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.search-suggest__meta {
  font-size: 12px;
  letter-spacing: 0;
  color: var(--apple-ink-48);
}

.search-suggest__sku {
  font-family: SFMono-Regular, Menlo, Consolas, monospace;
}

.search-suggest__all {
  justify-content: center;
  margin-top: 4px;
  border-top: 1px solid var(--apple-hairline);
  border-radius: 0 0 var(--apple-radius-sm) var(--apple-radius-sm);
  font-size: 14px;
  color: var(--apple-primary);
}

.search-suggest__all.is-active { color: var(--apple-primary); }
@media (hover: hover) { .search-suggest__all:hover { color: var(--apple-primary); } }

.search-suggest__empty {
  padding: 12px;
  font-size: 14px;
  color: var(--apple-ink-48);
  text-align: center;
}

/* ---------- Dropdowns ------------------------------------------------------ */

.dropdown-menu {
  --bs-dropdown-border-color: var(--apple-hairline-translucent);
  --bs-dropdown-border-radius: var(--apple-radius-lg);
  --bs-dropdown-link-active-bg: var(--apple-primary);
  --bs-dropdown-font-size: 17px;
  --bs-dropdown-color: var(--apple-ink);
  --bs-dropdown-link-color: var(--apple-ink);
  --bs-dropdown-padding-y: 12px;
  /* Solid: a blur inside the already blurred sub-nav cannot reach the page behind it. */
  background-color: var(--apple-canvas);
  box-shadow: none;
}

.dropdown-item {
  font-size: 17px;
  letter-spacing: -0.012em;
  padding: 8px 20px;
  border-radius: 0;
}

/* Menu items are not text links: a:hover's underline stays off them. */
@media (hover: hover) { .dropdown-item:hover { text-decoration: none; } }

.mega-menu {
  width: min(920px, calc(100vw - 32px));
  padding: var(--apple-space-xl);
  max-height: 70vh;
  overflow-y: auto;
}

.mega-menu__group-link {
  display: block;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.012em;
  color: var(--apple-ink);
  padding: 4px 0;
  text-decoration: none;
}

@media (hover: hover) { .mega-menu__group-link:hover { color: var(--apple-primary); text-decoration: none; } }

.mega-menu__child-link {
  display: block;
  font-size: 14px;
  letter-spacing: -0.016em;
  color: var(--apple-ink-80);
  padding: 3px 0;
  text-decoration: none;
}

@media (hover: hover) { .mega-menu__child-link:hover { color: var(--apple-primary); text-decoration: none; } }

.mega-menu__count { color: var(--apple-ink-48); font-weight: 400; }

/* ---------- Utility card (store / accessories grid) ----------------------- */

/* White, 18px radius, one hairline, no shadow. The product render inside is the
   only thing allowed to carry elevation.

   Padding goes through custom properties so .utility-card__media can bleed back
   out through it by exactly the right amount. The two variants below and the
   phone breakpoint each change the padding, and the bleed has to track all of
   them — hardcoding -24px would leave the media short or overhanging in three
   of the four combinations. */
.utility-card {
  --card-pad-x: var(--apple-space-lg);
  --card-pad-y: var(--apple-space-lg);
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: var(--card-pad-y) var(--card-pad-x);
  background-color: var(--apple-canvas);
  border: 1px solid var(--apple-hairline);
  border-radius: var(--apple-radius-lg);
  transition: border-color .2s ease, transform .1s ease;
}

@media (hover: hover) { .utility-card:hover { border-color: var(--apple-hairline-strong); } }

/* The stretched link covers the whole card, so the global a:hover would underline
   the name wherever the pointer is; the border change is the hover cue instead. */
@media (hover: hover) { .utility-card .stretched-link:hover { text-decoration: none; } }

/* On a near-black tile a white card would punch a hole in the surface, so the
   card drops its fill and hairline and lets the product render carry it. */
.utility-card--on-dark {
  background-color: transparent;
  border-color: transparent;
  --card-pad-x: var(--apple-space-xs);
}

@media (hover: hover) { .utility-card--on-dark:hover { border-color: rgba(255, 255, 255, 0.24); } }

/* The brief assumes product renders are cut out on transparency. This catalog's
   photography is shot on white, so on a dark tile the images would punch ragged
   white shapes into the surface. Giving the media a full white plate turns that
   into a deliberate frame — the same light neutral tile Apple's own accessory
   grid uses — instead of an artefact of the source images. */
.utility-card--on-dark .utility-card__media {
  background-color: var(--apple-canvas);
  /* Stays a plate floating on the tile rather than meeting a card edge, so it
     keeps all four corners and doesn't bleed — the squared bottom corners the
     default card wants would read as a rendering fault out here. */
  margin: 0 0 var(--apple-space-md);
  border-radius: var(--apple-radius-md);
}
.utility-card--on-dark .utility-card__name { color: var(--apple-on-dark); }
.utility-card--on-dark .utility-card__price { color: var(--apple-on-dark); }
.utility-card--on-dark .apple-eyebrow { color: var(--apple-muted-on-dark); }
.utility-card--on-dark .apple-muted { color: var(--apple-muted-on-dark); }

/* Same shape as the Phoenix theme's product card (Views/Shared/_ProductCard.cshtml):
   a square well bled out through the card's padding, filled edge to edge, rounded
   only along the top. Radius is the card's inner corner — 18px less its 1px
   border — and squares off at the bottom, where the media runs into the card body
   rather than ending. The bottom margin keeps the gap to the copy.

   cover, not contain: the photography is portrait (746x1200), so contain would
   letterbox ~39px of dead gutter down each side of a square well. Filling instead
   means the tall images are cropped to the middle — see the note on the img. */
.utility-card__media {
  position: relative;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: calc(var(--card-pad-y) * -1) calc(var(--card-pad-x) * -1) var(--apple-space-md);
  border-radius: calc(var(--apple-radius-lg) - 1px) calc(var(--apple-radius-lg) - 1px) 0 0;
  overflow: hidden;
  background-color: var(--apple-canvas);
}

/* object-position is centred, so a 746x1200 shot loses ~19% off the top and the
   same off the bottom. On this catalog's images that trims the brand lockup above
   the product and the spec callouts below it. Shift the position here if a
   particular crop matters more than the centre. */
.utility-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* The system's one and only drop-shadow, giving a product render weight.
   Currently applied nowhere: it works by tracing the alpha edge of a cut-out
   render, and this catalog's photography is shot on opaque white, so it drew a
   grey halo around the image's rectangle instead of around the product. Kept
   defined — apply .product-render to an <img> the day transparent PNGs exist. */
.product-render { filter: drop-shadow(3px 5px 30px rgba(0, 0, 0, 0.22)); }

.utility-card__name {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.24;
  letter-spacing: -0.012em;
  color: var(--apple-ink);
  margin: 0 0 var(--apple-space-xxs);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 3.72em;
}

.utility-card__price {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.012em;
  color: var(--apple-ink);
  margin: 0;
}

/* The regular price a promotion beats, after the one to pay (cards, product page,
   usual items). Wraps to its own line on a narrow card rather than squeezing. */
.price-was {
  display: inline-block;
  font-size: 0.75em;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--apple-ink-48);
  white-space: nowrap;
}
.utility-card--on-dark .price-was { color: var(--apple-muted-on-dark); }

.utility-card__foot { margin-top: auto; padding-top: var(--apple-space-sm); }

.utility-card__link {
  font-size: 14px;
  letter-spacing: -0.016em;
  color: var(--apple-primary);
}

/* Overlay for a discontinued product — surface change, not chrome. */
/* Promotion badge on a product card: a corner tab flush in the top-left, opposite
   the favorite heart. The media's overflow clips its outer corner to the card's
   radius, so only the inner corner is rounded here. Takes the accent rather than
   the parchment the status pills use — this is the one thing on a card of
   otherwise uniform tiles that is meant to break the scan. Wraps to two lines on
   a long label instead of truncating: half an offer name is worse than a taller
   tab, and a diagonal ribbon would fit only ~10 characters of these free-text labels. */
.utility-card__promo {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  max-width: calc(100% - var(--apple-space-xxl));
  padding: 6px 12px;
  border-radius: 0 0 var(--apple-radius-md) 0;
  background-color: var(--apple-primary);
  color: var(--apple-on-dark);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0;
}

.utility-card__veil {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(245, 245, 247, 0.82);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  /* Follows whatever corners the media has — top-only on a default card, all
     four on a dark tile. */
  border-radius: inherit;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--apple-ink-48);
}

/* A sentence rather than a label (the Favorites "Removed…" note): centred, kept off the
   edges, and in darker ink, since the photo shows through the veil behind it. */
.utility-card__veil--note {
  padding: 0 var(--apple-space-lg);
  text-align: center;
  line-height: 1.5;
  color: var(--apple-ink-80);
}

/* Category tile — a square photo with the name laid over its foot. */
.category-tile {
  position: relative;
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  background-color: var(--apple-canvas);
  border: 1px solid var(--apple-hairline);
  border-radius: var(--apple-radius-lg);
  text-align: center;
  text-decoration: none;
  transition: border-color .2s ease, transform .1s ease;
}

@media (hover: hover) { .category-tile:hover { border-color: var(--apple-primary); text-decoration: none; } }

.category-tile__media {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.category-tile__media img { width: 100%; height: 100%; object-fit: cover; }

/* Gradient scrim keeps the white label readable on any photo. */
.category-tile__name {
  position: absolute;
  inset: auto 0 0 0;
  padding: var(--apple-space-lg) var(--apple-space-sm) var(--apple-space-sm);
  background: linear-gradient(to top, rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0));
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.016em;
  color: var(--apple-on-dark);
}

/* Offer teaser on the home page — a panel that links through to the full offer list.
   The ink colour is set here rather than left to inherit: the whole card is an anchor,
   so every line inside it would otherwise come out in link blue. Borrows the category
   tile's hover, since it is the same gesture. */
.offer-tile {
  color: var(--apple-ink);
  text-decoration: none;
  transition: border-color .2s ease, transform .1s ease;
}

@media (hover: hover) { .offer-tile:hover { border-color: var(--apple-primary); text-decoration: none; } }

/* Brand tile — logo only, so it stays square and quiet. */
.brand-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1;
  padding: var(--apple-space-md);
  background-color: var(--apple-canvas);
  border: 1px solid var(--apple-hairline);
  border-radius: var(--apple-radius-lg);
  text-decoration: none;
  transition: border-color .2s ease, transform .1s ease;
}

@media (hover: hover) { .brand-tile:hover { border-color: var(--apple-primary); text-decoration: none; } }

.brand-tile img { max-width: 100%; max-height: 100%; object-fit: contain; }

.brand-tile__fallback {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.016em;
  color: var(--apple-ink);
  text-align: center;
}

/* ---------- Panel (transactional surfaces) --------------------------------- */

/* Cart, checkout, orders, addresses all sit on parchment with white panels —
   the same 18px/hairline/no-shadow grammar as the utility card. */
.panel {
  background-color: var(--apple-canvas);
  border: 1px solid var(--apple-hairline);
  border-radius: var(--apple-radius-lg);
  padding: var(--apple-space-lg);
}

.panel--flush { padding: 0; overflow: hidden; }

.panel__head {
  padding: var(--apple-space-lg);
  border-bottom: 1px solid var(--apple-hairline);
}

.panel__body { padding: var(--apple-space-lg); }

.panel__foot {
  padding: var(--apple-space-lg);
  border-top: 1px solid var(--apple-hairline);
}

.panel__title {
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
}

/* Selectable address at checkout. Same hairline/18px grammar as a panel; the
   accent appears only on the selected ring, never as a fill. */
.address-option {
  display: flex;
  align-items: flex-start;
  gap: var(--apple-space-sm);
  padding: var(--apple-space-md);
  border: 1px solid var(--apple-hairline);
  border-radius: var(--apple-radius-lg);
  cursor: pointer;
  transition: border-color .15s ease, transform .1s ease;
}

@media (hover: hover) { .address-option:hover { border-color: var(--apple-hairline-strong); } }
.address-option:has(input:checked) { border: 2px solid var(--apple-primary-focus); padding: 16px; }
.address-option:has(input:focus-visible) { outline: 2px solid var(--apple-primary-focus); outline-offset: 2px; }

/* ---------- AFFORDA principles (About) ------------------------------------- */

/* The acronym read as a definition list: the letter is the term, the value is
   the definition. Hairline rules between rows, nothing else — on a dark tile the
   surface is already doing the emphasis. */
.principles { margin: 0; }

.principles__row {
  display: flex;
  align-items: baseline;
  gap: var(--apple-space-lg);
  padding: var(--apple-space-md) 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.principles__row:last-child { border-bottom: 0; }

.principles__letter {
  flex: 0 0 1.4em;
  margin: 0;
  font-size: 40px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--apple-on-dark);
}

.principles__word {
  margin: 0;
  font-size: 24px;
  font-weight: 300;
  line-height: 1.3;
  color: var(--apple-muted-on-dark);
}

@media (max-width: 640px) {
  .principles__letter { font-size: 28px; }
  .principles__word { font-size: 19px; }
}

/* ---------- Configurator chips (the signature) ----------------------------- */

/* Pill cells for product options. Built on Bootstrap's .btn-check plumbing so
   the existing catalog-details.js availability logic works untouched — it keys
   off .variant-pill-input, which the markup keeps. */
.config-chip {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 96px;
  text-align: center;
  padding: 12px 16px;
  background-color: var(--apple-canvas);
  border: 1px solid var(--apple-hairline);
  border-radius: var(--apple-radius-pill);
  color: var(--apple-ink);
  font-size: 14px;
  letter-spacing: -0.016em;
  cursor: pointer;
  user-select: none;
  transition: border-color .15s ease, box-shadow .15s ease, transform .1s ease;
}

@media (hover: hover) { .config-chip:hover { border-color: var(--apple-hairline-chip); } }
.config-chip:active { transform: scale(0.95); }

.config-chip__label { font-weight: 600; }
.config-chip__meta { font-size: 12px; letter-spacing: 0; color: var(--apple-ink-48); }

/* Selected simply thickens to the focus blue — same shape, same content. */
.btn-check:checked + .config-chip {
  border: 2px solid var(--apple-primary-focus);
  padding: 11px 15px;
}

.btn-check:focus-visible + .config-chip {
  outline: 2px solid var(--apple-primary-focus);
  outline-offset: 2px;
}

.btn-check:disabled + .config-chip {
  cursor: not-allowed;
  opacity: 0.4;
  border-color: var(--apple-hairline-translucent);
}

.btn-check:disabled + .config-chip .config-chip__meta { color: var(--apple-ink-48); }

/* ---------- Floating sticky bar -------------------------------------------- */

/* Follows the buyer down a long product page carrying the running total. Same
   frosted treatment as the sub-nav — functional elevation, not decoration. */
.sticky-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1035;
  min-height: 64px;
  padding: 12px 32px;
  background-color: var(--apple-frosted);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-top: 1px solid var(--apple-hairline-translucent);
  transform: translateY(100%);
  opacity: 0;
  visibility: hidden;
  transition: transform .3s ease, opacity .3s ease, visibility .3s;
}

.sticky-bar.is-visible {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

.sticky-bar__inner {
  display: flex;
  align-items: center;
  gap: var(--apple-space-md);
  max-width: 1440px;
  margin-inline: auto;
}

/* The name gives way, never the button: a long one squeezed "Add to cart" onto three lines.
   Two lines at most, so the bar stays small. The full name is at the top of the page. */
.sticky-bar__text { flex: 1 1 0; min-width: 0; }

.sticky-bar__name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sticky-bar__actions .btn { white-space: nowrap; }

.sticky-bar__total {
  font-size: 17px;
  letter-spacing: -0.012em;
  color: var(--apple-ink);
}

.sticky-bar__total strong { font-weight: 600; }
.sticky-bar__actions { margin-left: auto; display: flex; align-items: center; gap: var(--apple-space-sm); }

/* The message after Add to cart: fixed, because the buyer may be far down the page and the page
   no longer reloads. apple-storefront.js sets its top, just under the sub-nav. */
.add-notice {
  position: fixed;
  left: var(--apple-space-md);
  right: var(--apple-space-md);
  z-index: 1036;
  max-width: 480px;
  margin-inline: auto;
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s ease, visibility .2s;
}

.add-notice.is-visible {
  opacity: 1;
  visibility: visible;
}

.add-notice .notice { background-color: var(--apple-canvas); }

.btn.is-adding { opacity: 0.7; }

/* ---------- Forms ---------------------------------------------------------- */

.form-label {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.016em;
  color: var(--apple-ink);
  margin-bottom: var(--apple-space-xs);
}

.form-control,
.form-select {
  font-size: 17px;
  line-height: 1.44;
  letter-spacing: -0.012em;
  color: var(--apple-ink);
  background-color: var(--apple-canvas);
  border: 1px solid var(--apple-hairline);
  border-radius: var(--apple-radius-md);
  padding: 11px 16px;
  box-shadow: none;
}

/* The shared padding above would take away Bootstrap's room for the arrow, so text ran under it. */
.form-select { padding-right: 40px; }

.form-control:focus,
.form-select:focus {
  border-color: var(--apple-primary-focus);
  outline: 2px solid var(--apple-primary-focus);
  outline-offset: -1px;
  box-shadow: none;
}

.form-control::placeholder { color: var(--apple-ink-48); }

.form-check-input {
  border-color: var(--apple-hairline-strong);
  border-radius: var(--apple-radius-xs);
}

/* Bootstrap's pale blue border and ring would show on a mouse click as well. The ring for
   keyboard users is the :focus-visible rule below. */
.form-check-input:focus {
  border-color: var(--apple-hairline-strong);
  box-shadow: none;
}

.form-check-input:checked {
  background-color: var(--apple-primary);
  border-color: var(--apple-primary);
}

.form-check-input:focus-visible {
  outline: 2px solid var(--apple-primary-focus);
  outline-offset: 2px;
  box-shadow: none;
}

.form-check-label { font-size: 17px; letter-spacing: -0.012em; color: var(--apple-ink); }

.form-text { font-size: 14px; color: var(--apple-ink-48); }

/* Same for the close X. Bootstrap's :focus also removes the outline, so it is put back. */
.btn-close { --bs-btn-close-focus-shadow: none; }
.btn-close:focus-visible { outline: 2px solid var(--apple-primary-focus); outline-offset: 2px; }

.text-danger,
.field-validation-error,
.validation-summary-errors {
  color: var(--apple-danger) !important;
  font-size: 14px;
  letter-spacing: -0.016em;
}

.validation-summary-errors ul { margin: 0; padding-left: 20px; }

/* Quantity stepper — grouped into one pill so the three controls read as a
   single unit. Keeps .qty-stepper/.qty-step so site.js drives it unchanged. */
.qty-stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--apple-hairline);
  border-radius: var(--apple-radius-pill);
  overflow: hidden;
  background-color: var(--apple-canvas);
}

.qty-stepper .qty-step {
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--apple-ink);
  padding: 8px 14px;
  font-size: 14px;
  line-height: 1;
}

@media (hover: hover) { .qty-stepper .qty-step:hover { background-color: var(--apple-parchment); } }

.qty-stepper input[type="number"] {
  width: 3.25rem;
  border: 0;
  border-radius: 0;
  padding: 8px 0;
  text-align: center;
  font-size: 17px;
  letter-spacing: -0.012em;
  background: none;
  box-shadow: none;
  -moz-appearance: textfield;
}

.qty-stepper input[type="number"]:focus { outline: 0; box-shadow: none; border: 0; }

/* The box has no ring of its own, so the whole pill shows where the typing goes. */
.qty-stepper:has(input:focus-visible) { outline: 2px solid var(--apple-primary-focus); outline-offset: 2px; }

.qty-stepper input[type="number"]::-webkit-outer-spin-button,
.qty-stepper input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* ---------- Tables --------------------------------------------------------- */

/* Hairline rules only — no striping, no borders around the block, no shadow. */
.apple-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 17px;
  letter-spacing: -0.012em;
}

.apple-table th {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--apple-ink-48);
  text-align: left;
  padding: var(--apple-space-sm) var(--apple-space-md);
  border-bottom: 1px solid var(--apple-hairline);
  white-space: nowrap;
}

.apple-table td {
  padding: var(--apple-space-md);
  border-bottom: 1px solid var(--apple-hairline);
  vertical-align: middle;
}

.apple-table tbody tr:last-child td { border-bottom: 0; }
.apple-table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }

.apple-table__thumb {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--apple-hairline);
  border-radius: var(--apple-radius-sm);
  overflow: hidden;
  background-color: var(--apple-canvas);
}

.apple-table__thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }

/* A free gift or offer line sits directly beneath the purchase that earned it. Once it is no
   longer in a block of its own at the bottom of the table, the inset is the only thing saying
   the row belongs to the one above it. Both the thumbnail and the name move: table columns are
   shared, so insetting only the first cell shifts the image and leaves the product name lined
   up with every other row, which reads as nothing at all. */
.apple-table__row--reward > td:first-child,
.apple-table__row--reward > .cell-title { padding-left: calc(var(--apple-space-md) + 24px); }

/* ---------- Rich text (admin-authored) ------------------------------------- */

/* Product descriptions come out of the admin editor as raw HTML, so nothing
   constrains what lands here. Bootstrap's reboot does not cap image width (that
   is .img-fluid, opt-in), which means one pasted full-size image or wide table
   would scroll the entire page sideways on a phone. Contain it at the block. */
.apple-richtext { overflow-x: auto; }

.apple-richtext img,
.apple-richtext video,
.apple-richtext iframe,
.apple-richtext embed {
  max-width: 100%;
  height: auto;
}

.apple-richtext table { max-width: 100%; }
.apple-richtext pre { overflow-x: auto; }

/* ---------- Status pills --------------------------------------------------- */

/* Order status. Deliberately monochrome except the single accent — the brief
   permits no second colour, so state is carried by weight and surface. */
.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: var(--apple-radius-pill);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  background-color: var(--apple-parchment);
  color: var(--apple-ink-80);
  border: 1px solid var(--apple-hairline);
  white-space: nowrap;
}

/* Promotion chips carry a SKU code *and* a full product name, and Lenovo-style
   names run past 100 characters. nowrap sent them straight out of the panel and
   put a horizontal scrollbar on the whole page. Order status pills keep nowrap —
   they are one or two words and want to stay on a line — so this is a modifier
   rather than a change to the base.

   anywhere rather than break-word so a single unbroken token longer than the
   panel (a long SKU code with no spaces) breaks too instead of overflowing on
   its own. */
.status-pill--wrap {
  /* Half a one-line chip's height: still a pill on one line, but a wrapped
     chip becomes a rounded box instead of a circle. */
  border-radius: 14px;
  white-space: normal;
  max-width: 100%;
  text-align: left;
  overflow-wrap: anywhere;
}

.status-pill--active { background-color: var(--apple-primary); border-color: var(--apple-primary); color: var(--apple-on-dark); }
.status-pill--done { background-color: var(--apple-ink); border-color: var(--apple-ink); color: var(--apple-on-dark); }
.status-pill--quiet { background-color: transparent; color: var(--apple-ink-48); }

/* ---------- Confirm modal -------------------------------------------------- */

/* _ConfirmModal.cshtml is shared with the Admin area, so its markup stays on
   Bootstrap's own classes and is restyled here instead — this stylesheet only
   ever loads on the storefront, so Admin keeps the Phoenix treatment. */
.modal-content {
  border: 1px solid var(--apple-hairline);
  border-radius: var(--apple-radius-lg);
  background-color: var(--apple-canvas);
  box-shadow: none;
}

.modal-body { padding: var(--apple-space-xl) var(--apple-space-lg) var(--apple-space-md); }
.modal-body p { font-size: 17px; letter-spacing: -0.012em; }

.modal-footer {
  border-top: 0;
  padding: 0 var(--apple-space-lg) var(--apple-space-lg);
  gap: var(--apple-space-xs);
}

/* The Delete button: the system's one red button (see the house rules at the top). */
.modal-footer .btn-danger {
  --bs-btn-color: var(--apple-on-dark);
  --bs-btn-bg: var(--apple-danger);
  --bs-btn-border-color: var(--apple-danger);
  --bs-btn-hover-color: var(--apple-on-dark);
  --bs-btn-hover-bg: var(--apple-danger-dark);
  --bs-btn-hover-border-color: var(--apple-danger-dark);
  --bs-btn-active-color: var(--apple-on-dark);
  --bs-btn-active-bg: var(--apple-danger-dark);
  --bs-btn-active-border-color: var(--apple-danger-dark);
}

/* One button that changes colour per question: a fade would show the last question's colour.
   The press shrink stays. */
#confirmActionConfirmBtn { transition: transform .1s ease; }

/* ---------- Notices -------------------------------------------------------- */

.notice {
  padding: var(--apple-space-md) var(--apple-space-lg);
  border-radius: var(--apple-radius-lg);
  border: 1px solid var(--apple-hairline);
  background-color: var(--apple-parchment);
  font-size: 17px;
  letter-spacing: -0.012em;
  color: var(--apple-ink);
}

.notice--accent { border-color: var(--apple-primary); }
.notice--error { border-color: var(--apple-danger); color: var(--apple-danger); }

.empty-state {
  text-align: center;
  padding: var(--apple-space-section) var(--apple-space-lg);
}

/* Muted grey is 4.4:1 on a tinted alert box; inside one it takes the box's own text colour. */
.alert .apple-muted { color: inherit; }

.empty-state__title { font-size: 28px; font-weight: 600; letter-spacing: -0.01em; margin-bottom: var(--apple-space-sm); }
.empty-state__body { font-size: 17px; color: var(--apple-ink-48); margin-bottom: var(--apple-space-lg); }

/* ---------- Breadcrumb ----------------------------------------------------- */

.apple-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  margin: 0 0 var(--apple-space-lg);
  padding: 0;
  font-size: 12px;
  letter-spacing: 0;
  color: var(--apple-ink-48);
}

.apple-breadcrumb li::after { content: "›"; margin-left: 6px; color: var(--apple-ink-48); }
.apple-breadcrumb li:last-child::after { content: ""; }
.apple-breadcrumb a { color: var(--apple-ink-48); }
@media (hover: hover) { .apple-breadcrumb a:hover { color: var(--apple-primary); } }

/* ---------- Favorites heart ------------------------------------------------ */

/* Kept on the same DOM contract favorites.js expects. */
.btn-favorite-toggle {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  width: 32px;
  height: 32px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  /* No blur: a catalog page has 40 of these. A firmer fill keeps it visible on a photo. */
  background-color: var(--apple-chip-strong);
  font-size: 13px;
  transition: opacity .2s ease, transform .1s ease;
}

.btn-favorite-toggle:active { transform: scale(0.95); }
.btn-favorite-toggle:disabled { opacity: 0.5; }

/* Static position when it isn't floating over a card image. */
.btn-favorite-toggle--inline { position: static; }

/* Phoenix's badge classes, reimplemented — favorites.js writes these class names
   directly when it updates the count after an AJAX toggle, so providing them
   here keeps that script working unchanged. */
.icon-indicator { position: relative; }

.icon-indicator-number {
  position: absolute;
  top: -6px;
  right: -8px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--apple-radius-pill);
  background-color: var(--apple-primary);
  color: var(--apple-on-dark);
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
}

/* The cart's number sits on a span the size of its 16px glyph, but favorites.js puts this one
   directly on the link, whose tap area is 24px or 44px. Measured from the link's centre, so it
   lands on the same spot beside the glyph at any tap-area size. */
a.global-nav__icon.icon-indicator > .icon-indicator-number {
  top: calc(50% - 14px);
  right: calc(50% - 16px);
}

/* ---------- Carousels ------------------------------------------------------ */

.apple-slider { position: relative; }

.apple-slider .swiper { padding-bottom: 4px; }

.apple-slider__nav {
  position: absolute;
  top: 50%;
  width: 100%;
  left: 0;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
  transform: translateY(-50%);
  z-index: 3;
}

.apple-slider__nav > * { pointer-events: auto; }
.apple-slider__nav [data-slider-prev] { margin-left: -18px; }
.apple-slider__nav [data-slider-next] { margin-right: -18px; }

/* On a phone the container's side padding is 17px, so the 18px overhang put each arrow 1px
   past the screen edge and let the page scroll sideways. Pull them in there. */
@media (max-width: 640px) {
  .apple-slider__nav [data-slider-prev] { margin-left: -8px; }
  .apple-slider__nav [data-slider-next] { margin-right: -8px; }
}

/* Swiper adds this class to the elements it was handed once a rail hits its end. */
.apple-slider__nav .swiper-button-disabled { opacity: 0.28; pointer-events: none; }

/* Hero runs full-bleed and rectangular — the brief forbids rounding a hero tile. */
.hero-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-color: var(--apple-canvas);
}

.hero-frame img { width: 100%; height: 100%; object-fit: cover; }

/* The banner runs full-bleed, so its controls sit inside the image, not overhanging it as a
   product rail's do. */
.hero-slider .swiper { padding-bottom: 0; }
.hero-slider .apple-slider__nav { padding-inline: var(--apple-space-lg); }
.hero-slider .apple-slider__nav [data-slider-prev],
.hero-slider .apple-slider__nav [data-slider-next] { margin: 0; }

.hero-slider__pause {
  position: absolute;
  right: var(--apple-space-lg);
  bottom: var(--apple-space-lg);
  z-index: 3;
}

/* ---------- Product gallery ------------------------------------------------ */

.product-gallery { display: flex; gap: var(--apple-space-md); }

.product-gallery-thumbs { width: 76px; flex: 0 0 auto; }

.product-gallery-thumbs .swiper-slide { height: auto; cursor: pointer; }

.product-gallery-thumb {
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  background-color: var(--apple-canvas);
  border: 1px solid var(--apple-hairline);
  border-radius: var(--apple-radius-sm);
  transition: border-color .15s ease;
}

.product-gallery-thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }

.product-gallery-thumbs .swiper-slide-thumb-active .product-gallery-thumb {
  border-color: var(--apple-primary-focus);
  border-width: 2px;
}

/* No plate behind the main image — it sits directly on the tile. Transparent
   rather than white so the gallery still works if it's ever placed on a
   parchment or dark section. */
.product-gallery-main {
  flex: 1 1 auto;
  min-width: 0;
  border-radius: var(--apple-radius-lg);
  overflow: hidden;
  background-color: transparent;
}

.product-gallery-main .swiper-slide {
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--apple-space-xl);
}

.product-gallery-main img { max-width: 100%; max-height: 100%; object-fit: contain; }

/* From 735px the rail is a column beside the main image. Without a height,
   Swiper grows it to fit every thumb and stretches the main image with it;
   pinned to the main image's height, the rail scrolls instead. */
@media (min-width: 735px) {
  .product-gallery { position: relative; padding-left: calc(76px + var(--apple-space-md)); }
  .product-gallery-thumbs { position: absolute; top: 0; bottom: 0; left: 0; }
}

/* ---------- Filters -------------------------------------------------------- */

/* Apple's store has no faceted sidebar, so this is built within the language
   rather than copied from it: hairline groups, no card. Each group is a
   <details>, but it keeps no accordion chrome — no fill, no border box, no
   radius. The hairline that already separated the groups doubles as the row
   rule, and a chevron is the only added mark. */
.filter-group { padding: var(--apple-space-lg) 0; border-bottom: 1px solid var(--apple-hairline); }
.filter-group:first-child { padding-top: 0; }

/* Pinned to the viewport bottom (or the drawer's) so a long, expanded filter
   list never pushes Apply out of reach. Deliberately unfilled: the list shows
   through behind the buttons rather than sitting under a visible box. */
.catalog-filter-actions {
  position: sticky;
  bottom: 0;
  z-index: 1;
  padding: var(--apple-space-lg) 0 var(--apple-space-md);
}

@media (max-width: 991.98px) {
  /* In the drawer, sticky stops at the body's bottom padding; pull it flush
     with the drawer's bottom edge. */
  .catalog-filter-actions {
    bottom: calc(-1 * var(--bs-offcanvas-padding-y));
    padding-bottom: calc(var(--apple-space-md) + var(--bs-offcanvas-padding-y));
  }
}

/* Below lg the whole sidebar becomes a drawer (Bootstrap's responsive
   .offcanvas-lg), so the results are the first thing on screen instead of
   sitting ~700px below a fully expanded filter panel. At lg and up Bootstrap
   neutralises the offcanvas entirely and this contributes nothing. */
.catalog-filters {
  --bs-offcanvas-width: min(340px, 88vw);
  --bs-offcanvas-padding-x: var(--apple-space-lg);
  --bs-offcanvas-padding-y: var(--apple-space-lg);
  --bs-offcanvas-border-width: 0;
  background-color: var(--apple-canvas);
}

.catalog-filters .offcanvas-header { border-bottom: 1px solid var(--apple-hairline); }

/* Heading on the left, sort on the right; the sort drops under the heading on a
   phone rather than squeezing a long "Results for …" heading. */
.catalog-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: var(--apple-space-sm) var(--apple-space-lg);
}
.catalog-head h1 { overflow-wrap: anywhere; }
.catalog-head__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--apple-space-xs) var(--apple-space-sm);
}

/* The Filters button only exists below lg: there it takes its own row, with Sort at the far end. */
@media (max-width: 991.98px) {
  .catalog-head__actions {
    flex: 1 1 100%;
    justify-content: space-between;
  }
}

.catalog-sort { display: flex; align-items: center; gap: var(--apple-space-xs); }
.catalog-sort label { white-space: nowrap; }
.catalog-sort .form-select { width: auto; font-size: 13px; padding: 5px 32px 5px 12px; }

.catalog-pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: var(--apple-space-xs) var(--apple-space-sm);
  margin-top: var(--apple-space-xxl);
}
.catalog-pager__pages {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.catalog-pager__page,
.catalog-pager__step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 40px;
  height: 40px;
  padding: 0 var(--apple-space-sm);
  border-radius: var(--apple-radius-pill);
  font-size: 14px;
  color: var(--apple-ink);
  text-decoration: none;
}
@media (hover: hover) {
  .catalog-pager__page:hover,
  .catalog-pager__step:hover { background-color: var(--apple-hairline); text-decoration: none; }
}
.catalog-pager__page.is-current { background-color: var(--apple-ink); color: var(--apple-on-dark); font-weight: 600; }
.catalog-pager__step { color: var(--apple-primary); }
.catalog-pager__gap { display: inline-flex; align-items: center; height: 40px; padding: 0 4px; color: var(--apple-ink-48); }

/* Catalog results run five to a row beside the sidebar, so each card is ~190px
   wide. The default card type (17px name and price, 24px padding) is sized for
   the wider home-page grids and left the name ~140px to wrap in, so the catalog
   gets a smaller set. Scoped here so the home page and Favorites keep theirs. */
.catalog-grid .utility-card { --card-pad-x: var(--apple-space-md); --card-pad-y: var(--apple-space-md); }
.catalog-grid .utility-card__name { font-size: 14px; letter-spacing: -0.016em; }
.catalog-grid .utility-card__price { font-size: 16px; font-weight: 700; letter-spacing: -0.016em; }
.catalog-grid .utility-card .apple-caption { font-size: 13px; }
/* "BRAND · SKU" at the default 12px with tracking fit only ~10 in 100 cards; without the
   tracking 12px is still readable and the full text stays in the title tooltip. */
.catalog-grid .utility-card .apple-eyebrow { font-size: 12px; letter-spacing: 0; }

/* Two cards per row on a 360px phone leave ~121px, and "From RM295.00" at 16px
   needs 123px, so the smallest phones keep the old 15px. */
@media (max-width: 374.98px) {
  .catalog-grid .utility-card__price { font-size: 15px; }
}

/* The sidebar takes a quarter of the width from lg up, so the catalog steps
   down sooner than other 5-up grids: five cards at 1200px were ~150px wide, and
   four at 1000px ~160px. Below lg the sidebar is a drawer and the shared
   steps (4 → 3 → 2) apply again. */
@media (min-width: 1068.02px) and (max-width: 1279.98px) {
  .apple-grid--5.catalog-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (min-width: 992px) and (max-width: 1068px) {
  .apple-grid--5.catalog-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.catalog-filters .offcanvas-title {
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
}

/* The summary is the toggle. list-style/::-webkit-details-marker suppress the
   native disclosure triangle, which no browser lets us restyle into a chevron. */
.filter-group__title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--apple-space-xs);
  margin-bottom: var(--apple-space-sm);
  cursor: pointer;
  list-style: none;
}

.filter-group__title::-webkit-details-marker { display: none; }

/* A collapsed group has no content below it, so the title's bottom margin would
   read as a stray gap above the hairline. */
.filter-group:not([open]) .filter-group__title { margin-bottom: 0; }

.filter-group__label {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.016em;
  color: var(--apple-ink);
  margin: 0;
}

/* The one disclosure mark in the sidebar, shared by the group headers and the
   category branches. A Font Awesome glyph, sized here. */
.filter-chevron {
  flex: none;
  width: 16px;
  height: 16px;
  font-size: 12px;
  line-height: 16px;
  text-align: center;
  color: var(--apple-ink-48);
  transition: transform .2s ease, color .2s ease;
}

/* Scoped to the summary's own chevron: as a descendant selector this would also
   rotate every branch chevron inside the open group. */
.filter-group[open] > .filter-group__title .filter-chevron { transform: rotate(180deg); }
@media (hover: hover) { .filter-group__title:hover .filter-chevron { color: var(--apple-ink); } }

/* Branch toggle. Sits at the end of the checkbox row, so it is a bare glyph —
   the negative margin buys a usable hit target without changing row height, and
   Bootstrap's collapse writes aria-expanded, which is what the rotation reads. */
.filter-branch-toggle {
  display: inline-flex;
  align-items: center;
  margin-left: auto;
  margin-block: -6px;
  padding: 6px;
  border: 0;
  border-radius: var(--apple-radius-xs);
  background: none;
  cursor: pointer;
}

.filter-branch-toggle .filter-chevron { width: 14px; height: 14px; font-size: 11px; line-height: 14px; }
.filter-branch-toggle[aria-expanded="true"] .filter-chevron { transform: rotate(180deg); }
@media (hover: hover) { .filter-branch-toggle:hover .filter-chevron { color: var(--apple-ink); } }

.filter-option {
  display: flex;
  align-items: center;
  gap: var(--apple-space-xs);
  padding: 3px 0;
}

.filter-option label {
  font-size: 14px;
  letter-spacing: -0.016em;
  color: var(--apple-ink-80);
  margin: 0;
  cursor: pointer;
}

.filter-option input:checked + label { color: var(--apple-ink); font-weight: 600; }

.filter-tree { list-style: none; margin: 0; padding: 0; }
.filter-tree .filter-tree { padding-left: var(--apple-space-md); }

/* ---------- Footer --------------------------------------------------------- */

.apple-footer {
  background-color: var(--apple-parchment);
  color: var(--apple-ink-80);
  padding-block: 64px;
}

.apple-footer__heading {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.29;
  letter-spacing: -0.016em;
  color: var(--apple-ink);
  margin-bottom: var(--apple-space-xs);
}

/* The unusually relaxed 2.41 leading is what makes the footer's dense link
   columns scannable — it is the one place the brief goes deliberately dense. */
.apple-footer__link {
  display: block;
  font-size: 14px;
  font-weight: 400;
  line-height: 2.41;
  color: var(--apple-ink-80);
  text-decoration: none;
}

@media (hover: hover) { .apple-footer__link:hover { color: var(--apple-primary); text-decoration: underline; } }

.apple-footer__legal {
  margin-top: var(--apple-space-xl);
  padding-top: var(--apple-space-md);
  border-top: 1px solid var(--apple-hairline);
  font-size: 12px;
  line-height: 1.4;
  letter-spacing: 0;
  color: var(--apple-ink-48);
}

.apple-footer__logo { height: 50px; width: auto; }

/* ---------- Utilities ------------------------------------------------------ */

.apple-grid { display: grid; gap: var(--apple-space-md); }
.apple-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.apple-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.apple-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.apple-grid--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }

.apple-stack > * + * { margin-top: var(--apple-space-md); }
.apple-stack-lg > * + * { margin-top: var(--apple-space-lg); }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 1100;
  padding: 12px 20px;
  background: var(--apple-canvas);
  color: var(--apple-primary);
  border-radius: 0 0 var(--apple-radius-sm) 0;
}

.skip-link:focus { left: 0; }

/* ---------- Cart saving ------------------------------------------------------ */

/* While a quantity is saving, the money on the page is about to change, so it should not read
   as settled. The figures themselves come back from the server (site.js). */
.is-saving [data-auto-update-figure] {
  opacity: 0.45;
  transition: opacity .15s ease;
}

/* ---------- Current page ----------------------------------------------------- */

/* aria-current marks the link for screen readers, and the same attribute draws it, so the
   two cannot disagree. Weight, not colour: blue would read as a link about to be pressed. */
.global-nav__link[aria-current],
.sub-nav__link[aria-current],
.mobile-nav__link[aria-current] { font-weight: 600; }

.global-nav__link[aria-current] { opacity: 1; }

/* ---------- Press feedback --------------------------------------------------- */

/* Bootstrap removes the browser's own tap flash, so without these a tap on a phone shows
   nothing until the next page arrives. No transition on the colours: feedback is instant.
   Buttons, chips and the heart have their own :active rules.

   A product card reacts to its link rather than to :active on the card, so pressing the
   heart does not move the card, and a discontinued card (no link) does nothing. */
.utility-card:has(.stretched-link:active),
.category-tile:active,
.brand-tile:active,
.offer-tile:active,
.address-option:active { transform: scale(0.98); }

a:not(.btn, .stretched-link, .category-tile, .brand-tile, .offer-tile, .dropdown-item, .search-suggest__item, .catalog-pager__page, .catalog-pager__step):active,
button.global-nav__icon:active,
.global-nav__burger:active,
button.sub-nav__link:active,
.filter-group__title:active,
.filter-branch-toggle:active,
.mobile-nav__toggle:active { opacity: 0.6; }

.qty-stepper .qty-step:active,
.search-suggest__item:active { background-color: var(--apple-hairline); }

.catalog-pager__page:not(.is-current):active,
.catalog-pager__step:active { background-color: var(--apple-chip-solid); }

/* ---------- Touch targets ---------------------------------------------------- */

/* 44px on touch screens only: a mouse is precise, and the desktop layout stays as it is. */
@media (pointer: coarse) {
  .qty-stepper .qty-step {
    min-width: 44px;
    min-height: 44px;
    padding: 0;
  }

  /* An invisible larger hit area, so the 32px heart looks the same on the photo. */
  .btn-favorite-toggle::after {
    content: "";
    position: absolute;
    inset: -6px;
  }

  .btn-favorite-toggle--inline { position: relative; }

  /* The same for the popup's close X. */
  .promo-popup-close::after {
    content: "";
    position: absolute;
    inset: -6px;
  }

  .filter-group__title { min-height: 44px; }

  /* The label also lies over the checkbox, so a tap anywhere on the row counts: the
     17px box itself is too small to aim at. */
  .filter-option { padding: 0; }

  .filter-option label {
    position: relative;
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    min-height: 44px;
    margin-left: -25px;
    padding-left: 25px;
  }

  .filter-branch-toggle {
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-block: 0;
    margin-right: -15px;
    padding: 0;
  }

  /* 16px as well as taller: iOS Safari zooms the page on an input with smaller text. */
  .search-pill input {
    height: 44px;
    font-size: 16px;
  }

  .catalog-pager__page,
  .catalog-pager__step {
    min-width: 44px;
    height: 44px;
  }

  .catalog-head__actions .btn { min-height: 44px; }

  .apple-footer__link {
    display: flex;
    align-items: center;
    min-height: 44px;
  }

  /* Centred, or the padded links sit lower than the last crumb, which is plain text. */
  .apple-breadcrumb { align-items: center; }

  .apple-breadcrumb a {
    display: inline-block;
    padding-block: 5px;
  }

  .mega-menu__group-link,
  .mega-menu__child-link { padding-block: 12px; }

  .dropdown-item { padding-block: 10px; }
}

/* ---------- Responsive ------------------------------------------------------
   Breakpoints follow the brief's structural set: 1440 content lock, 1068 small
   desktop, 833 tablet-landscape switch, 734 tablet portrait, 640 phone, 480. */

@media (max-width: 1068px) {
  .apple-hero { font-size: 40px; }
  .apple-display { font-size: 34px; }
  .apple-grid--5 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 833px) {
  .tile { padding-block: 64px; }

  /* .apple-display carries the hero headlines and was already stepped here;
     .apple-display-sm never was, so page titles ("Catalog", "The details.")
     held 34px all the way down to a 320px phone. */
  .apple-display-sm { font-size: 28px; }
  .apple-grid--5,
  .apple-grid--4 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .apple-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  /* The drawer takes over here: the bar's own two links go, the burger arrives,
     and the drawer becomes the route to About and Contact below this width. */
  .global-nav__links { display: none; }
  .global-nav__burger { display: flex; }
  .global-nav__actions { gap: var(--apple-space-xs); }

  /* The glyphs stay 16px; the hit area grows around them to the 44×44 the HIG
     asks for. These are the primary controls on a touch screen. */
  .global-nav__icon {
    min-width: 44px;
    min-height: 44px;
    justify-content: center;
  }

  /* These were fixed pixel widths, which ran the pill past the viewport edge on
     a 320px phone once the brand and "Categories" had taken their share. It
     flexes into whatever the row has left instead. */
  .sub-nav__links { gap: var(--apple-space-md); flex: 1 1 auto; min-width: 0; }

  /* Measured from the sub-nav rather than from the "Categories" button. Otherwise the menu's
     box starts part-way along the bar, runs past the screen edge and widens the whole page
     when it opens, even though Bootstrap then shifts it back into view. */
  .sub-nav__links > .dropdown { position: static; }

  /* The menu is nearly as wide as the screen, so Bootstrap's positioning pushed it against the
     right edge. !important because Bootstrap writes its position onto the element itself. */
  .sub-nav__links > .dropdown > .mega-menu {
    inset: 100% 16px auto 16px !important;
    width: auto;
    transform: none !important;
  }

  /* "Categories" was a 20px-high tap target; the bar is 52px, so it can take 44. */
  .sub-nav__link { min-height: 44px; display: inline-flex; align-items: center; }
  .search-pill { flex: 1 1 auto; min-width: 0; }
  .search-pill input { width: 100%; }
}

@media (max-width: 734px) {
  .sub-nav__logo { height: 35px; }
  .apple-lead { font-size: 21px; }
  .product-gallery { flex-direction: column-reverse; }

  /* The rail runs under the main image here, so it takes the full width and its
     own height back from the 76px desktop column. Slides need an explicit width
     once the Swiper is horizontal — slidesPerView:"auto" reads it off the slide,
     and without one they inherit the rail's full width and each "thumbnail"
     renders as another copy of the main image. */
  .product-gallery-thumbs { width: 100%; height: auto; flex: 0 0 auto; }
  .product-gallery-thumbs .swiper-slide { width: 64px; }

  /* The gallery stacks here, so .product-gallery-main's width becomes the flex
     cross-size. Its min-width:0 — needed in the desktop row layout so the column
     can shrink — leaves that cross-size indeterminate when Swiper measures at
     init, and Swiper then writes a runaway slide width (2^25px) that scrolls the
     whole page sideways. Pinning the width gives it something definite to read. */
  .product-gallery-main { width: 100%; }
  /* 3:1 is a desktop letterbox: at 390px wide it renders the banner 130px tall
     and object-fit: cover throws away a third of the artwork, usually the promo
     copy with it. 2:1 is the ratio the banner assets are actually authored at
     (1200×600), so the frame matches the source and cover crops nothing. Any
     other mobile ratio just moves the crop from the top and bottom to the sides. */
  .hero-frame { aspect-ratio: 2 / 1; }
}

@media (max-width: 640px) {
  .apple-hero { font-size: 34px; }
  .apple-display { font-size: 28px; }
  .tile { padding-block: var(--apple-space-xxl); }
  /* Two-up, and it stays two-up all the way down — there is no single-column
     step below this. A single column gave 356px-wide cards with a 356px square
     image, which is what ran the catalog to ~101,000px of page on a phone. */
  .apple-grid--5,
  .apple-grid--4,
  .apple-grid--3,
  .apple-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* Except offer panels: they are text, not pictures, and two-up squeezed their
     headlines to a word a line and pushed the type badge off the screen. */
  .apple-grid--offers { grid-template-columns: minmax(0, 1fr); }
  .apple-container { padding-inline: var(--apple-space-md); }

  /* Tighter spacing, so the logo and the search box both keep their room on a phone. */
  .sub-nav__inner { padding-inline: var(--apple-space-sm); gap: var(--apple-space-xs); }
  .sub-nav__links { gap: var(--apple-space-xs); }
  .search-pill input { padding-left: 32px; padding-right: var(--apple-space-xs); }
  .search-pill__icon { left: 10px; }

  /* Bootstrap rows pull negative horizontal margins of half their gutter, so a
     g-5 row (48px gutter → -24px each side) breaks out of the container once its
     padding drops to 17px here, and the page scrolls sideways. Cap the gutter so
     it can never exceed the padding containing it. */
  .apple-container .row { --bs-gutter-x: 1.5rem; }

  /* Two cards share ~356px here, so both the gutter between them and the card's
     own padding come off the same tight budget. At 24px each the card was 29%
     padding and every product name hit its 3-line clamp; at 12/17 the name has
     ~30px more to work with. --on-dark's inline padding is re-asserted because
     this rule is later in the file and would otherwise outrank it. Set through
     the same custom properties as the base rule so the media's bleed follows. */
  .apple-grid { gap: var(--apple-space-sm); }
  .utility-card { --card-pad-x: var(--apple-space-md); --card-pad-y: var(--apple-space-md); }
  .utility-card--on-dark { --card-pad-x: var(--apple-space-xs); }
  .utility-card__name { font-size: 14px; }
  .sticky-bar { padding: 12px var(--apple-space-md); }
  .sticky-bar__inner { gap: var(--apple-space-xs); }
  .hero-slider .apple-slider__nav { padding-inline: var(--apple-space-xs); }
  .hero-slider__pause { right: var(--apple-space-xs); bottom: var(--apple-space-xs); }

  /* ---- Stacked tables ----
     A six-column cart is ~810px wide; inside a 354px phone well .table-responsive
     turns that into a sideways scroll, hiding the price, the stepper and Remove
     behind a swipe. Below this width the rows become cards instead: the header
     row goes to screen-reader-only and each cell carries its own label from
     data-label. Opt-in via .apple-table--stack, so no table gets this by
     accident, and the markup is identical at both sizes. */
  .apple-table--stack,
  .apple-table--stack tbody { display: block; }

  .apple-table--stack thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .apple-table--stack tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--apple-space-xs);
    padding: var(--apple-space-md);
    border-bottom: 1px solid var(--apple-hairline);
  }

  .apple-table--stack tbody tr:last-child { border-bottom: 0; }

  /* Wrapping matters on the narrowest phones: the cart's quantity cell carries a
     label, a stepper and an Update button, which together need ~310px and only
     have ~284px at 320. Without this the row scrolls sideways again, which is
     the exact thing the stacked layout exists to remove. */
  .apple-table--stack td {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--apple-space-xs) var(--apple-space-md);
    min-width: 0;
    min-height: 32px;
    padding: 0;
    border: 0;
  }

  /* The label the hidden <th> would have carried. */
  .apple-table--stack td[data-label]::before {
    content: attr(data-label);
    flex: 0 0 auto;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--apple-ink-48);
  }

  /* The product cell is a block of its own — brand, name, SKU — not a
     label/value pair, and the trailing action cell needs no label at all. */
  .apple-table--stack .cell-title { display: block; }
  .apple-table--stack .cell-actions { justify-content: flex-end; }

  /* Cart only: keeps the thumbnail beside the product name and drops every other
     cell to full width beneath them. */
  /* 72px matches the inline width the media cell carries for the desktop table —
     an inline style outranks anything here, so the track is sized to it rather
     than fighting it. */
  .apple-table--stack-media tr { grid-template-columns: 72px minmax(0, 1fr); }
  .apple-table--stack-media td { grid-column: 1 / -1; }
  .apple-table--stack-media .cell-media { grid-column: 1; grid-row: 1; }
  .apple-table--stack-media .cell-title { grid-column: 2; grid-row: 1; }

  /* Stacked, the row is the card — so the inset that marks a reward line moves off the cells
     and onto the row itself. */
  .apple-table--stack .apple-table__row--reward { padding-left: calc(var(--apple-space-md) + 24px); }
  .apple-table--stack .apple-table__row--reward > td:first-child,
  .apple-table--stack .apple-table__row--reward > .cell-title { padding-left: 0; }
}

@media (max-width: 480px) {
  .apple-hero { font-size: 28px; }
  .apple-display-sm { font-size: 24px; }
  .tile-head .tile-cta { flex-direction: column; align-items: stretch; }
}

/* Home page promotion popup.

   Bootstrap's .modal-content is a
   white card, and a promo image wants to be the card, so the content box is
   stripped back and only the image is styled. Square, like every other image
   edge in this theme. */
/* Bootstrap only centres a dialog from 576px up, and below that this narrower one sat to the
   left. Auto margins need a set width, and the 8px screen margins stay. */
.promo-popup-dialog {
  width: min(420px, calc(100% - 16px));
  max-width: 420px;
  margin-inline: auto;
}

.promo-popup-image {
  display: block;
  width: 100%;
  height: auto;
  max-height: 78vh;
  object-fit: contain;
  border-radius: 0;
}

/* Sits on the image's top-right corner rather than inside a header bar, which the
   stripped-back .modal-content no longer has. */
.promo-popup-close {
  position: absolute;
  top: -14px;
  right: -14px;
  z-index: 2;
  padding: var(--apple-space-xs);
  border-radius: var(--apple-radius-pill);
  background-color: var(--apple-canvas);
  opacity: 1;
}

/* The 14px overhang needs clear space beside the 420px popup. Below that it stays on the
   image's corner, away from the screen edge. */
@media (max-width: 480px) {
  .promo-popup-close { right: -4px; }
}

/* The slides sit inside the box, so the arrows do not overhang as a product rail's do. */
.promo-slider .swiper { padding-bottom: 0; }
.promo-slider .apple-slider__nav { padding-inline: var(--apple-space-xs); }
.promo-slider .apple-slider__nav [data-slider-prev],
.promo-slider .apple-slider__nav [data-slider-next] { margin: 0; }

/* Dark dots: a promo image is usually light. */
.promo-slider {
  --swiper-pagination-color: var(--apple-black);
  --swiper-pagination-bullet-inactive-color: var(--apple-black);
  --swiper-pagination-bullet-inactive-opacity: 0.35;
}

/* A larger hit area than the 8px dot. */
.promo-slider .swiper-pagination-bullet { position: relative; }

.promo-slider .swiper-pagination-bullet::after {
  content: "";
  position: absolute;
  inset: -12px -6px;
}

/* ---------- Image skeleton --------------------------------------------------- */

/* Put .img-skeleton on the box that holds an <img>. Until the image loads, the box
   shows the company logo, greyed and faded, under a moving shimmer; site.js then
   adds .is-loaded and the image fades in. .is-empty (no image, or it failed to
   load) keeps the faded logo as the placeholder and stops the shimmer.
   The box must already be positioned — this rule does not set position, so it
   can't override a box that is absolutely positioned on purpose. */
.img-skeleton::before,
.img-skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
}

.img-skeleton::before {
  background: url("../img/affordans_logo.png") center / 60% auto no-repeat;
  filter: grayscale(1);
  opacity: 0.15;
}

.img-skeleton::after {
  background: linear-gradient(100deg, transparent 40%, rgba(255, 255, 255, 0.6) 50%, transparent 60%)
              0 0 / 300% 100% no-repeat,
              rgba(0, 0, 0, 0.04);
  animation: img-skeleton-shimmer 1.5s linear infinite;
}

@keyframes img-skeleton-shimmer {
  from { background-position: 100% 0, 0 0; }
  to   { background-position: 0 0, 0 0; }
}

/* position: relative paints the image above the logo layer. */
.img-skeleton img {
  position: relative;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.img-skeleton.is-loaded img { opacity: 1; }
.img-skeleton.is-loaded::before,
.img-skeleton.is-loaded::after,
.img-skeleton.is-empty::after { display: none; }
.img-skeleton.is-empty img { visibility: hidden; }

/* The site ignores the device's Reduce Motion setting on purpose (the owner's decision,
   2026-11-05). Bootstrap's stylesheet still switches these off under that setting, and it is
   managed by LibMan, so its normal values are restated here. This file loads after it, so
   these win. Buttons and the other controls above already set their own transitions. */
:root { scroll-behavior: smooth; }
.fade { transition: opacity .15s linear; }
.collapsing { transition: height .35s ease; }
.collapsing.collapse-horizontal { transition: width .35s ease; }
.modal.fade .modal-dialog { transition: transform .3s ease-out; }
.offcanvas { transition: var(--bs-offcanvas-transition); }
.form-control,
.form-select { transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out; }
.nav-link { transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out; }

@media (max-width: 991.98px) {
  .offcanvas-lg { transition: var(--bs-offcanvas-transition); }
}

/* People who ask for less transparency or more contrast get solid surfaces. */
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
  .sub-nav,
  .sticky-bar {
    background-color: var(--apple-parchment);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .btn-icon-circular {
    --bs-btn-bg: var(--apple-chip-solid);
    --bs-btn-hover-bg: var(--apple-chip-solid);
    --bs-btn-active-bg: var(--apple-chip-solid);
    --bs-btn-disabled-bg: var(--apple-chip-solid);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .btn-favorite-toggle {
    background-color: var(--apple-chip-solid);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .utility-card__veil {
    background-color: var(--apple-parchment);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .search-pill input { background-color: var(--apple-canvas); }
}

@media (prefers-contrast: more) {
  :root {
    --apple-hairline: #86868b;
    --apple-hairline-translucent: #86868b;
    --apple-divider-soft: #86868b;
    --apple-ink-48: #424245;
    --bs-tertiary-color-rgb: 66, 66, 69;
  }
}
