/* ══════════════════════════════════════════════════════════════
   SELF-HOSTED FONTS (2026-08-20)
   Replaces the render-blocking Google Fonts stylesheet. The faces here are
   EXACTLY the ones Google actually served — same families, same weights, same
   unicode-ranges — so rendering and weight-substitution behaviour are
   unchanged. This is a performance change with zero intended visual change.

   Deliberately NOT shipped, because the browser never downloaded them:
   Almarai 300, Cairo latin-ext, Cormorant latin-ext / italic / 400 / 600.
   A latin-ext character would now fall back to a system face; the catalogue is
   Arabic + ASCII, so nothing on the site uses that range.

   Cairo and Cormorant are VARIABLE fonts: one file serves every weight, which
   is why 600/700/900 all point at the same Cairo file.

   Cormorant is subset to Basic Latin and instanced at 700 (34.5 KB -> 10.4 KB).
   It renders exactly one element site-wide (.promo-card__ghost, "COLD BREW").
   Subset to the RANGE, not to that literal string, so merchant-edited text
   cannot silently break into a fallback.

   Font files are NOT cache-busted by ASSET_BUILD (that only decorates
   main.css/main.js). They carry the CDN's 31-day TTL and are re-fetched only
   when the FILENAME changes — so a build bump costs no font re-download, but
   changing a font's bytes requires renaming the file.

   Licensing: all three families are SIL Open Font License 1.1 and none
   declares a Reserved Font Name, so the family names are kept and subsetting
   is permitted. OFL requires the licence to travel WITH the fonts, so
   OFL-Cairo.txt / OFL-Almarai.txt / OFL-Cormorant.txt ship as theme assets.

   Proven rather than assumed, 2026-08-20:
   - latin-ext is not shipped because a scan of every codepoint the site
     renders (77 pages, 131 distinct codepoints) found ZERO in the latin-ext
     range. The only four outside the shipped ranges are ← → ● and U+FE0F,
     which fall back to a system face today as well — unchanged.
   - Almarai 300 is not shipped because every `font-weight: 300` rule uses
     --font-numeric, which resolves to Cairo first; Almarai 300 is unreachable.
   - Cormorant italic is not shipped because the one italic rule
     (.product-desc-placeholder) inherits Almarai, which has no italic either —
     synthetic before and after.
   - Cormorant is instanced at 700. Weight 400/600 declarations that remain
     render at 700; the brand eyebrow that would have shown the difference was
     removed with the rest of the branding surface (2026-09-07). Keeping the
     variable axis instead costs +7.2 KB and can be reinstated if needed.
   ══════════════════════════════════════════════════════════════ */
@font-face { font-family: 'Cairo'; font-style: normal; font-weight: 600; font-display: swap;
  src: url('cairo-arabic.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC4, U+10EFC-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1; }
@font-face { font-family: 'Cairo'; font-style: normal; font-weight: 600; font-display: swap;
  src: url('cairo-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Cairo'; font-style: normal; font-weight: 700; font-display: swap;
  src: url('cairo-arabic.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC4, U+10EFC-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1; }
@font-face { font-family: 'Cairo'; font-style: normal; font-weight: 700; font-display: swap;
  src: url('cairo-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Cairo'; font-style: normal; font-weight: 900; font-display: swap;
  src: url('cairo-arabic.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC4, U+10EFC-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1; }
@font-face { font-family: 'Cairo'; font-style: normal; font-weight: 900; font-display: swap;
  src: url('cairo-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Almarai'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('almarai400-arabic.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC4, U+10EFC-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1; }
@font-face { font-family: 'Almarai'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('almarai400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Almarai'; font-style: normal; font-weight: 700; font-display: swap;
  src: url('almarai700-arabic.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC4, U+10EFC-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1; }
@font-face { font-family: 'Almarai'; font-style: normal; font-weight: 700; font-display: swap;
  src: url('almarai700-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Cormorant'; font-style: normal; font-weight: 700; font-display: swap;
  src: url('cormorant700-latin.woff2') format('woff2');
  unicode-range: U+0020-007E, U+00A0, U+2013-2014, U+2018-201A, U+201C-201E; }

/* =====================================================
   DROPLET دروبلت — Theme v2.0
   Editorial Minimalism · Wabi-Sabi Luxury
   RTL Arabic-first · No backdrop-filter · No blur
   ===================================================== */

/* ===== 1. DESIGN TOKENS ===== */
:root {
  /* Brand Palette */
  --espresso:      #2d1c1c;
  --espresso-mid:  #3d2424;
  --copper:        #b5622a;
  --copper-light:  #cc7a3d;
  --caramel:       #c9956c;
  --mint:          #6b8f71;
  --mint-soft:     #eef3ef;
  --foam:          #faf6f0;
  --foam-mid:      #f0e8de;
  --foam-dark:     #e3d7c8;
  --stone:         #8a7464;
  --stone-light:   #c4b6a4;
  --ink:           #1a1208;
  --linen:         #ddd5c6;
  --success:       #4f8a6b;
  --danger:        #c0533f;
  --white:         #ffffff;

  /* Typography */
  --font-head:    'Cairo', 'Almarai', 'Tajawal', system-ui, sans-serif;
  --font-body:    'Almarai', 'Tajawal', system-ui, sans-serif;
  --font-accent:  'Cormorant', Georgia, serif;
  --font-numeric: 'Cairo', 'Almarai', system-ui, sans-serif;

  /* Geometry */
  --radius-sm:   8px;
  --radius-md:   14px;
  --radius-lg:   20px;
  --radius-xl:   28px;
  --radius-pill: 999px;

  /* Shadows — espresso-tinted, no blue */
  --shadow-sm: 0 4px 16px rgba(45,28,28,.10);
  --shadow-md: 0 10px 32px rgba(45,28,28,.14);
  --shadow-lg: 0 20px 60px rgba(45,28,28,.18);

  /* Transitions */
  --t-fast: 150ms ease;
  --t-base: 250ms cubic-bezier(.4,0,.2,1);
  --t-slow: 400ms cubic-bezier(.4,0,.2,1);

  /* Z-index */
  --z-overlay: 90;
  --z-nav:     100;
  --z-toast:   150;

  /* Layout */
  --container:  1280px;
  /* Vertical rhythm. --section-gap is the TOTAL space between two adjacent
     sections; each section pays half of it, so any pair of neighbours lands on
     the same gap regardless of which sections they are. Full-bleed colour bands
     (brand story, marketing banner, features) keep their own larger padding —
     that is internal breathing room, not separation. */
  --section-gap: clamp(44px, 4.5vw, 72px);
  --section-v:   calc(var(--section-gap) / 2);
  --gap:        20px;
}

/* ===== 2. RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

/* Sitewide press-feedback rule: every interactive element's :active state may
   change color/background/opacity/shadow freely, but any scale/translate
   motion is suppressed under reduced-motion — one rule covers every
   component rather than repeating the guard per element. */
@media (prefers-reduced-motion: reduce) {
  *:active { transform: none !important; }
}

body {
  background: var(--foam);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.app.rtl  { direction: rtl; }
.app:not(.rtl) { direction: ltr; }

/* ===== 3. TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
  color: var(--espresso);
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(30px, 5vw, 56px); font-weight: 900; }
h2 { font-size: clamp(24px, 4vw, 42px); font-weight: 900; }
h3 { font-size: clamp(18px, 3vw, 26px); font-weight: 700; }
h4 { font-size: 17px; font-weight: 700; }

a { color: var(--copper); text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--espresso); }
a:active { opacity: 0.75; }
p { line-height: 1.75; }
img { max-width: 100%; display: block; }

/* ===== 4. LAYOUT ===== */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 32px);
}

/* ===== 5. BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  cursor: pointer;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 15px;
  padding: 13px 28px;
  border-radius: var(--radius-pill);
  transition: transform var(--t-fast), box-shadow var(--t-base),
              background var(--t-fast), color var(--t-fast),
              border-color var(--t-fast);
  white-space: nowrap;
  text-decoration: none;
}
@media (hover: hover) { .btn:hover  { transform: translateY(-1px); } }
/* Press feedback fires on every device, hover only on pointer devices that have it —
   a tap must always feel acknowledged, not just a desktop mouse-over. */
.btn:active { transform: translateY(0) scale(0.92); filter: brightness(0.93); transition-duration: 80ms; }
/* .is-pressed mirrors :active exactly — the JS-driven guaranteed-minimum-press
   acknowledgment (main.js, PRESS_ACK_SELECTOR) needs a visible effect on
   buttons whose handler can run before :active ever paints on a fast tap.
   See docs/MOTION-LANGUAGE.md §7 (Intent Acknowledgment) / IB-001. */
.btn.is-pressed { transform: translateY(0) scale(0.92); filter: brightness(0.93); transition-duration: 80ms; }

.btn-primary  { background: var(--espresso); color: var(--white); }
/* Hover only on real pointer devices — prevents the dark pressed colour
   sticking after a tap on touch screens. */
@media (hover: hover) {
  .btn-primary:hover { background: var(--espresso-mid); color: var(--white); box-shadow: var(--shadow-sm); }
}
.btn-primary:active,
.btn-primary.is-pressed { background: var(--espresso-mid); }

/* Add-to-cart button feedback states */
.btn.is-loading { position: relative; color: transparent !important; pointer-events: none; }
.btn.is-loading::after {
  content: "";
  position: absolute; top: 50%; left: 50%;
  width: 18px; height: 18px; margin: -9px 0 0 -9px;
  border: 2px solid rgba(255, 255, 255, .45);
  border-top-color: #fff;
  border-radius: 50%;
  animation: btn-spin 0.6s linear infinite;
}
@keyframes btn-spin { to { transform: rotate(360deg); } }
/* Warm sage success — calmer than a clinical green, on-brand with Droplet */
.btn.is-success { background: #5f8463 !important; color: #fff !important; }
/* The brand mark, briefly, at the moment of success — small and calm,
   not a flourish. Fixed height only; the image's own aspect ratio sets
   width, so it never distorts. */
.success-droplet {
  height: 16px;
  width: auto;
  vertical-align: middle;
  filter: brightness(0) invert(1); /* white, to match the success state's white text */
}
@media (prefers-reduced-motion: no-preference) {
  .success-droplet {
    animation: success-droplet-in 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  }
}
@keyframes success-droplet-in {
  from { opacity: 0; transform: translateY(-6px) scale(0.6); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Cart badge pop when the count changes */
@keyframes badge-pop {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.35); }
  100% { transform: scale(1); }
}
@media (prefers-reduced-motion: no-preference) {
  .cart-badge.badge-pop { animation: badge-pop 280ms cubic-bezier(.34, 1.56, .64, 1); }
}

/* Add-to-cart "fly to cart" dot — purely decorative, created and removed by
   flyToCart() in main.js. The JS never creates this element at all under
   prefers-reduced-motion, so no separate CSS media guard is needed here
   (matches the rail-glide precedent elsewhere in this file). */
.atc-fly-dot {
  position: fixed;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--copper);
  z-index: var(--z-toast);
  pointer-events: none;
  transform: translate(0, 0) scale(1);
  opacity: 1;
  transition: transform 900ms cubic-bezier(.3, .7, .4, 1), opacity 320ms ease 620ms;
}

.btn-copper  { background: var(--copper); color: var(--white); }
.btn-copper:hover { background: var(--copper-light); color: var(--white); box-shadow: var(--shadow-sm); }
.btn-copper:active,
.btn-copper.is-pressed { background: #9c5224; }

.btn-ghost   { background: transparent; color: var(--espresso); border: 1.5px solid var(--linen); }
@media (hover: hover) {
  .btn-ghost:hover { border-color: var(--copper); color: var(--copper); }
}
.btn-ghost:active,
.btn-ghost.is-pressed { border-color: var(--copper); color: var(--copper); background: rgba(181,98,42,.06); }

.btn-mint    { background: var(--mint); color: var(--white); }
.btn-mint:hover { background: #5a7d61; color: var(--white); }
.btn-mint:active,
.btn-mint.is-pressed { background: #4d6c52; }

.btn-outline-white {
  background: transparent;
  color: var(--white);
  border: 1.5px solid rgba(255,255,255,.5);
}
.btn-outline-white:hover {
  background: rgba(255,255,255,.1);
  border-color: rgba(255,255,255,.8);
  color: var(--white);
}
.btn-outline-white:active,
.btn-outline-white.is-pressed { background: rgba(255,255,255,.18); border-color: rgba(255,255,255,.9); }

.btn-block { width: 100%; }

/* ===== 7. HEADER ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-nav);
  background: var(--foam);
  border-bottom: 1px solid var(--linen);
  transition: box-shadow 280ms ease, background 280ms ease;
}
/* Merchant opted out of the sticky header (header.schema.json → general.sticky).
   The scroll-driven .header-scrolled shadow/pour JS stays harmless when static. */
.site-header--static { position: static; }

/* ── Pour Progress ──
   Slim copper→caramel fill at the header's bottom edge that "pours" across
   as the page scrolls. Decorative ::after, scaleX driven by --scroll-progress
   (set by JS, 0→1). Absolutely positioned and out of flow, so it never
   affects header height — no reflow, no jitter. Fills from the inline-start
   edge (right in RTL, left in LTR). */
.site-header::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--copper), var(--caramel));
  transform: scaleX(var(--scroll-progress, 0));
  transform-origin: left center;
  pointer-events: none;
  z-index: 3;
}
.app.rtl .site-header::after {
  transform-origin: right center;
  background: linear-gradient(270deg, var(--copper), var(--caramel));
}
@media (prefers-reduced-motion: no-preference) {
  .site-header::after { transition: transform 120ms ease-out; }
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-block: 14px;
  direction: ltr;
}

/* Scrolled state — neutral stable baseline (shadow + background only).
   No glass, no blur, no decorative line. Paint-only, no reflow.
   Placeholder pending a Droplet-aligned scroll concept. */
.site-header.header-scrolled {
  background: var(--foam-soft, var(--foam));
  box-shadow: 0 4px 20px rgba(45, 28, 28, .07);
  border-bottom-color: transparent;
}

/* ===== 8. LOGO ===== */
.logo { display: inline-flex; align-items: center; flex: 0 0 auto; }
.logo img { height: 38px; width: auto; object-fit: contain; }
@media (max-width: 480px) { .logo img { height: 32px; } }

/* Only present when a merchant sets a distinct mobile logo (logo.jinja);
   otherwise a single <img> renders and these rules are inert. */
.logo-mobile { display: none; }
@media (max-width: 480px) {
  .logo-desktop { display: none; }
  .logo-mobile { display: block; }
}

/* ===== 9. DESKTOP NAV ===== */
.nav {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
  flex: 1;
  justify-content: center;
}
.nav .navlink {
  display: inline-block;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  color: var(--stone);
  font-weight: 600;
  font-size: 15px;
  font-family: var(--font-body);
  background: none;
  border: none;
  cursor: pointer;
  transition: color var(--t-fast), background var(--t-fast), transform var(--t-fast);
}
.nav .navlink:hover { color: var(--espresso); background: var(--foam-mid); }
.nav .navlink:active,
.nav .navlink.is-pressed { color: var(--espresso); background: var(--foam-dark); transform: scale(0.92); transition-duration: 80ms; }

/* ===== 9b. CATEGORY NAVIGATION — desktop hover panel / mobile accordion =====
   Text-first, two-pane on desktop: a list of categories plus a detail pane
   for whichever one is hovered/focused (subcategories + a CTA, no images,
   no product counts). Click on the trigger or any category row always
   navigates; hover/focus only ever previews — never intercepted on desktop. */
.nav-cats-item { position: relative; }

/* A <button>, not a link — it discloses the panel and never navigates (see
   navigation.jinja). A button's UA line-height is `normal`, which measured
   40px against the 42px of the sibling <a> nav items; that 2px would break
   the flush seam between the open trigger and the panel below it. */
.nav-cats-trigger {
  display: inline-flex !important;
  align-items: center;
  gap: 5px;
  line-height: inherit;
  /* A <button> does not inherit text-align, it defaults to center. Every
     sibling in the mobile drawer is a link resolving to `start`, so this one
     row sat centred among left-aligned items in English and right-aligned ones
     in Arabic. Inheriting puts it back in line in both. */
  text-align: inherit;
}
/* Shared chevron for every disclosure trigger (Categories + generic submenus).
   Rotation is keyed on the aria-expanded state of whatever trigger contains it,
   so one rule serves all consumers and the glyph never drifts between them. */
.nav-chevron {
  flex-shrink: 0;
  color: var(--stone-light, var(--stone));
}
@media (prefers-reduced-motion: no-preference) {
  .nav-chevron { transition: transform .2s ease; }
}
[aria-expanded="true"] .nav-chevron { transform: rotate(180deg); }

/* Anchored, not floating: the trigger's open state shares the panel's
   background and flush bottom corners, so the panel reads as an
   extension of the trigger rather than an independent floating box. */
.nav-cats-trigger[aria-expanded="true"] {
  background: var(--foam);
  color: var(--espresso);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}
.nav-cats-panel {
  position: absolute;
  inset-inline-start: 0;
  top: 100%;
  z-index: var(--z-nav);
  background: var(--foam);
  border: 1px solid var(--linen);
  border-top: none;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 20px 24px;
  grid-template-columns: 160px 1fr;
  min-width: 420px;
  opacity: 0;
  transform: translateY(-4px);
}
.nav-cats-panel[hidden] { display: none; }
.nav-cats-panel:not([hidden]) { display: grid; }
.nav-cats-panel.open { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: no-preference) {
  .nav-cats-panel { transition: opacity 120ms ease, transform 120ms ease; }
}

/* ── Alignment inside this panel is PHYSICAL, on purpose ──────────────────
   Everything below uses `right` / `padding-right` / `text-align: right`
   rather than the logical equivalents used everywhere else in this file.

   Rationale: the panel element itself hardcodes dir="rtl" (navigation.jinja),
   so "start" inside it is ALWAYS the right-hand edge — there is no LTR case
   to serve, and therefore nothing for a logical value to buy us here.

   What it costs: every part of this panel previously aligned via a different
   logical mechanism — `align-items: flex-start` (cross-start), inherited
   `text-align: start`, `padding-inline-start`, `border-inline-start`. All four
   agree in Chrome (measured identical to the pixel). On iPad Safari they did
   not: the sub-links sat right, the label and the "عرض كل …" link sat left,
   and the category rows rendered centred — three different answers to the same
   question, in one small panel (photographed 2026-07-31). Switching them all
   to one logical mechanism did not fix it either.

   `right` cannot be resolved two ways. That is the entire point of using it
   here, and it is the reason this block deliberately reads differently from
   the rest of the stylesheet. Do not "modernise" these back to logical
   properties without re-testing on a real iPad. */
.nav-cats-list {
  display: block;
  padding-left: 20px;
  text-align: right;
}
/* Rows are full-width blocks aligned by text-align rather than shrink-to-fit
   flex items. Side effect, and a welcome one: the tap target spans the column
   instead of hugging the glyphs. */
.nav-cats-list > .nav-cats-row { display: block; }
.nav-cats-list > .nav-cats-row + .nav-cats-row { margin-top: 12px; }
.nav-cats-row {
  font-size: 13px;
  color: var(--stone);
  text-decoration: none;
  white-space: nowrap;
}
.nav-cats-row.is-active,
.nav-cats-row:hover,
.nav-cats-row:focus-visible {
  color: var(--espresso);
  font-weight: 600;
}
.nav-cats-row:active { color: var(--copper); opacity: 0.8; }

/* Physical, for the reason documented on .nav-cats-list above. text-align on
   the pane governs the label (a block), the CTA (inline-level, so its whole
   box is positioned by it), and the sub-links below. */
.nav-cats-detail {
  display: block;
  text-align: right;
  border-right: 1px solid var(--linen);
  padding-right: 24px;
  min-width: 200px;
}
.nav-cats-detail-label {
  font-size: 11px;
  color: var(--stone-light, var(--stone));
  margin-bottom: 10px;
}
.nav-cats-sublist {
  display: block;
  margin-bottom: 16px;
}
.nav-cats-sub {
  display: block;
  font-size: 13px;
  color: var(--espresso);
  text-decoration: none;
}
.nav-cats-sub + .nav-cats-sub,
.nav-cats-subsublist + .nav-cats-sub { margin-top: 10px; }
.nav-cats-sub:hover { color: var(--copper); }
.nav-cats-sub:active { color: var(--copper); opacity: 0.7; }
.nav-cats-sub--parent { font-weight: 700; }
.nav-cats-subsublist {
  display: block;
  margin-top: 6px;
  margin-bottom: 4px;
  padding-right: 14px;
  border-right: 1px solid var(--linen);
}
.nav-cats-subsub { display: block; font-size: 12.5px; color: var(--stone); text-decoration: none; }
.nav-cats-subsub + .nav-cats-subsub { margin-top: 6px; }
.nav-cats-subsub:hover { color: var(--copper); }
.nav-cats-subsub:active { color: var(--copper); opacity: 0.7; }
.nav-cats-cta {
  font-size: 13px;
  color: var(--copper);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
/* The arrow is a literal glyph, so it points one way whatever the direction.
   Mirroring it in CSS keeps ONE glyph in the markup and lets direction decide
   which way it points - emitting a different character per language would put
   a layout decision inside a translated string. */
[dir=ltr] .nav-cats-cta__arrow { display: inline-block; transform: scaleX(-1); }
.nav-cats-cta:hover { text-decoration: underline; }
.nav-cats-cta:active { opacity: 0.7; }

/* ---- Generic nav submenu (menu items with children, other than Categories) ----
   Same visual language as .nav-cats-panel (foam surface, linen border,
   radius-md) but a plain single-column link list — no live category data,
   no two-pane preview. Driven by the shared HeaderDisclosure foundation.

   Two shapes, per the parent-nav contract:
     • .nav-has-sub--split — item has a URL: a navigating label link + a
       separate chevron toggle button sit side by side.
     • .nav-has-sub (plain) — no URL: a single toggle button is the whole item.
   The chevron rotation is handled by the shared [aria-expanded] .nav-chevron
   rule above. */
.nav-has-sub { position: relative; }
.nav-has-sub--split { display: inline-flex; align-items: center; }
.nav-has-sub--split .nav-item-label { padding-inline-end: 4px; }
.nav-sub-toggle {
  display: inline-flex !important;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  font: inherit;
  color: var(--stone);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  transition: color var(--t-fast), background var(--t-fast), transform var(--t-fast);
}
.nav-has-sub--split .nav-sub-toggle { padding: 8px 6px; }
.nav-sub-toggle:hover { color: var(--espresso); background: var(--foam-mid); }
.nav-sub-toggle:active,
.nav-sub-toggle.is-pressed { color: var(--espresso); background: var(--foam-dark); transform: scale(0.92); transition-duration: 80ms; }
.nav-sub-panel {
  position: absolute;
  inset-inline-start: 0;
  top: 100%;
  z-index: var(--z-nav);
  background: var(--foam);
  border: 1px solid var(--linen);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  min-width: 180px;
  list-style: none;
  margin: 4px 0 0;
}
.nav-sub-panel[hidden] { display: none; }
.nav-sub-link {
  display: block;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--espresso);
  text-decoration: none;
  white-space: nowrap;
}
.nav-sub-link:hover { background: var(--linen); color: var(--copper); }
.nav-sub-link:active,
.nav-sub-link.is-pressed { color: var(--copper); background: var(--linen); opacity: 0.85; }

@media (max-width: 768px) {
  /* Inside the mobile drawer the item stacks and the panel is part of the
     flow, not a floating popover — same pattern as the drawer's nav list.
     The split row (label + chevron) keeps its inline-flex layout but wraps so
     the now-static panel drops onto its own full-width line below the row. */
  .nav-has-sub--split { width: 100%; justify-content: space-between; flex-wrap: wrap; }
  .nav-has-sub--split .nav-item-label { flex: 1; }
  .nav-sub-panel {
    position: static;
    box-shadow: none;
    border: none;
    background: none;
    padding-inline-start: 16px;
    min-width: 0;
  }
  .nav-has-sub--split .nav-sub-panel { flex-basis: 100%; }
}

/* ===== 10. HEADER ACTIONS ===== */
.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}
.icon-btn {
  position: relative;
  width: 40px; height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--foam-mid);
  color: var(--espresso);
  border: 0;
  cursor: pointer;
  transition: background var(--t-fast), transform var(--t-fast);
}
.icon-btn:hover { background: var(--foam-dark); }
.icon-btn:active,
.icon-btn.is-pressed { background: var(--linen); transform: scale(0.92); transition-duration: 80ms; }

/* ---- Account / auth UI (client-toggled) ----
   Zid's server-side `customer` is unreliable on this platform (renders
   logged-out for authenticated sessions — see header.jinja), so the logged-in
   account UI is revealed by main.js adding .is-authed to [data-auth-root] once
   a session is confirmed (on load AND on bfcache restore). The default — no
   .is-authed — hides the logged-in block, so a logged-out visitor sees nothing
   in the account slot (the intended state), correct even if JS never runs.
   !important beats the inline display:flex on the mobile drawer links. */
[data-auth-root]:not(.is-authed) [data-auth-in]  { display: none !important; }
[data-auth-root].is-authed       [data-auth-out] { display: none !important; }
/* Resolving: neither state is shown, because at this point neither is known to
   be true. visibility (not display) so the header keeps its shape and nothing
   around it moves when the answer arrives. See the inline script in
   header.jinja for how this is applied and why it cannot get stuck on. */
[data-auth-root].is-resolving [data-auth-out],
[data-auth-root].is-resolving [data-auth-in] { visibility: hidden !important; }
.header-auth { display: contents; }

/* Logged-out: a quiet text link, no icon/border */
.header-login {
  display: inline-flex; align-items: center; height: 40px;
  padding: 0 10px;
  font-family: var(--font-head);
  font-size: 14px; font-weight: 700;
  color: var(--espresso);
  transition: color var(--t-fast);
}
.header-login:hover { color: var(--copper); }

.header-account {
  display: inline-flex;
  direction: rtl;              /* avatar leads on the RIGHT, name flows RTL to its left */
  align-items: center;
  gap: 9px;
  height: 40px;
  padding: 0 8px;
  border-radius: var(--radius-pill);
  color: var(--espresso);
  transition: background var(--t-fast);
}
.header-account { transition: background var(--t-fast), transform var(--t-fast); }
.header-account:hover { background: var(--foam-mid); }
.header-account:active,
.header-account.is-pressed { background: var(--foam-dark); transform: scale(0.98); transition-duration: 80ms; }
.header-greeting { text-align: right; }
/* Initial-letter avatar (first letter of the customer's name) */
.header-account__ic {
  width: 34px; height: 34px; flex-shrink: 0;
  border-radius: 50%;
  background: var(--espresso);
  color: var(--foam);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-head); font-weight: 700; font-size: 15px;
  line-height: 1;
}
.header-greeting {
  display: inline-flex;        /* column — never a horizontal row, so the RTL
                                  greeting text is one run and is not reversed */
  flex-direction: column;
  justify-content: center;
  line-height: 1.12;
}
.header-greeting__hi   { font-size: 11px; font-weight: 700; color: var(--copper); }
.header-greeting__name {
  font-family: var(--font-head);
  font-size: 14px; font-weight: 700; color: var(--espresso);
  max-width: 18ch; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  /* Arabic needs a taller line box than the parent's tight 1.12: Cairo's
     descenders (ب ن ي ...) sink below it, and the overflow:hidden required for
     the ellipsis then shaves them off — the "name looks cut from the bottom"
     bug. Depends on which letters a name contains, hence intermittent.
     Applies to the drawer's .nav-account name too (same class). */
  line-height: 1.45;
}

/* Mobile drawer account card */
/* The whole card is the link to /account — tapped like the desktop chip, with
   the same hover + press feedback (js-press-ack drives .is-pressed on touch). */
.nav-account {
  display: flex; direction: rtl; align-items: center; gap: 10px;
  padding: 9px 12px;
  background: var(--foam); border-radius: var(--radius-sm);
  color: var(--espresso);
  transition: background var(--t-fast), transform var(--t-fast);
}
.nav-account:hover { background: var(--foam-mid); }
.nav-account:active,
.nav-account.is-pressed { background: var(--foam-dark); transform: scale(0.98); transition-duration: 80ms; }
.nav-account__ic {
  width: 34px; height: 34px; flex-shrink: 0;
  border-radius: 50%;
  background: var(--espresso); color: var(--foam);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head); font-weight: 700; font-size: 15px; line-height: 1;
}
.nav-account .nav-greeting { display: inline-flex; flex-direction: column; line-height: 1.15; text-align: right; }
.nav-account .header-greeting__hi   { font-size: 11px; }
.nav-account .header-greeting__name { font-size: 14px; }

.cart-badge {
  position: absolute;
  top: -3px; inset-inline-end: -3px;
  min-width: 18px; height: 18px;
  padding: 0 4px;
  background: var(--copper);
  color: var(--white);
  font-size: 10px; font-weight: 700;
  border-radius: var(--radius-pill);
  display: flex; align-items: center; justify-content: center;
}

/* Account items — sidebar only */
.nav-account-item { display: none; }

/* ===== 11. MOBILE SIDEBAR ===== */
/* Overlay */
.nav-overlay {
  display: block;
  position: fixed;
  inset: 0;
  background: rgba(26,18,8,.55);
  z-index: var(--z-overlay);
  opacity: 0;
  pointer-events: none;
  transition: opacity .28s ease;
  /* NO backdrop-filter — causes iOS freeze */
}
.nav-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

/* Toggle button — hidden on desktop */
.nav-toggle { display: none; }

/* ===== 12. HERO ===== */
.hero {
  padding-block: clamp(48px, 8vw, 96px);
  background: var(--foam);
  position: relative;
  overflow: hidden;
}
/* Subtle tinted half — right side warm wash */
.hero::after {
  content: "";
  position: absolute;
  inset-inline-end: 0;
  top: 0;
  width: 42%;
  height: 100%;
  background: var(--foam-mid);
  clip-path: ellipse(100% 100% at 100% 50%);
  pointer-events: none;
  z-index: 0;
}
.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 48px;
}
.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--foam-mid);
  border: 1px solid var(--linen);
  border-radius: var(--radius-pill);
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 700;
  color: var(--stone);
  margin-bottom: 20px;
}
.hero-tag::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--copper);
  flex-shrink: 0;
}
.hero h1 {
  font-size: clamp(44px, 7vw, 84px);
  line-height: 1.05;
  color: var(--espresso);
  margin-bottom: 16px;
  letter-spacing: -.02em;
}
.hero-sub {
  font-size: 17px;
  color: var(--stone);
  margin-bottom: 28px;
  max-width: 40ch;
  line-height: 1.65;
}
.hero-brands {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
}
.hero-brand-tag {
  font-family: var(--font-accent);
  font-size: 12px;
  color: var(--stone);
  border: 1px solid var(--linen);
  border-radius: var(--radius-pill);
  padding: 4px 14px;
  text-transform: uppercase;
}
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }

/* Hero image side — portrait 3:4 */
.hero-media { position: relative; }
.hero-img-frame {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--foam-dark);
  box-shadow: var(--shadow-lg);
  max-height: 520px;
}
.hero-img-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-img-frame .img-placeholder {
  object-fit: contain;
  padding: 20%;
  opacity: .5;
}
/* Thin copper border accent */
.hero-img-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 2px solid rgba(181,98,42,.25);
  border-radius: var(--radius-xl);
  pointer-events: none;
  z-index: 2;
}
/* Floating stat card */
.hero-stat {
  position: absolute;
  inset-inline-start: -24px;
  bottom: 48px;
  background: var(--white);
  border: 1px solid var(--linen);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  box-shadow: var(--shadow-sm);
  min-width: 130px;
  z-index: 3;
}
.hero-stat-num {
  font-family: var(--font-accent);
  font-size: 30px;
  font-weight: 700;
  color: var(--copper);
  line-height: 1;
  display: block;
}
.hero-stat-label {
  font-size: 12px;
  color: var(--stone);
  font-weight: 600;
  margin-top: 4px;
  display: block;
}

/* ===== 13. MARQUEE STRIP ===== */
.marquee-strip {
  background: var(--espresso);
  padding-block: 14px;
  overflow: hidden;
  white-space: nowrap;
}
.marquee-inner {
  display: inline-flex;
  animation: marquee-scroll 28s linear infinite;
}
.marquee-strip:hover .marquee-inner { animation-play-state: paused; }
.marquee-item {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  padding-inline-end: 32px;
  font-family: var(--font-accent);
  font-size: 13px;
  color: rgba(255,255,255,.65);
  text-transform: uppercase;
}
.marquee-dot {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--copper);
  flex-shrink: 0;
}

@keyframes marquee-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ===== 14. SECTIONS ===== */
.section { padding-block: var(--section-v); }

/* Heading-to-content distance. Kept clearly tighter than --section-gap so a
   section reads as one block rather than two. */
.section-head { margin-bottom: clamp(20px, 2.4vw, 34px); }
.section-head.centered { text-align: center; }

.eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--copper);
  margin-bottom: 12px;
}

.section-head h2 { margin-bottom: 8px; }
.section-head p {
  color: var(--stone);
  font-size: 17px;
  max-width: 48ch;
  margin-top: 4px;
}
.section-head.centered p { margin-inline: auto; }

/* ===== 15. CATEGORY GRID — editorial discovery ===== */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.cat-tile {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  text-decoration: none;
  cursor: pointer;
  /* Unified warm treatment — espresso deepening into copper.
     Also the fallback backdrop for categories without an image. */
  background: linear-gradient(160deg, var(--espresso) 0%, #5c3010 60%, var(--copper) 100%);
  transition: transform var(--t-base), box-shadow var(--t-base);
}
.cat-tile:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.cat-tile:active,
.cat-tile.is-pressed { transform: translateY(-1px) scale(0.98); box-shadow: var(--shadow-sm); transition-duration: 80ms; }

.cat-tile img {
  position: absolute;
  inset: 0; width: 100%; height: 100%;
  object-fit: cover;
  transition: transform var(--t-slow);
  z-index: 0;
}
.cat-tile:hover img { transform: scale(1.06); }

/* Fallback glyph for image-less categories */
.cat-tile-glyph {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 0;
  color: rgba(255, 255, 255, .22);
}
.cat-tile-glyph svg { width: 42%; height: 42%; }

.cat-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(26,18,8,.78) 0%, rgba(26,18,8,.18) 45%, transparent 75%);
  z-index: 1;
}
.cat-tile-label {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 18px 18px 20px;
  color: var(--white);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cat-tile-name {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 18px;
  line-height: 1.2;
}
.cat-tile-meta {
  font-family: var(--font-body);
  font-size: 12.5px;
  color: rgba(255, 255, 255, .75);
}
.cat-tile-cue {
  margin-top: 6px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--caramel);
}
.cat-tile-cue span { display: inline-block; }
@media (hover: hover) {
  .cat-tile-cue {
    opacity: 0;
    transform: translateX(4px);
    transition: opacity var(--t-base), transform var(--t-base);
  }
  .cat-tile:hover .cat-tile-cue {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ===== 16. PRODUCT GRID ===== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--gap);
}

/* ===== 17. PRODUCT CARD ─ Direction B: object on warm surface ===== */
.product-card {
  background: var(--foam-mid);
  border: none;
  border-radius: 12px 22px 12px 12px; /* v1.0 directional-bias law: leading (top-right) corner always larger */
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 10px rgba(45,28,28,.06);
  transition: transform var(--t-base), box-shadow var(--t-base);
  cursor: pointer;
}
.product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 18px rgba(45,28,28,.09);
}
/* Excludes the moment the Quick Buy circle itself is pressed — without this,
   pressing the small trigger also visibly shrinks the whole card around it,
   two motions answering one tap. */
.product-card:active:not(:has(.product-quick-trigger:active)) { transform: scale(0.98); box-shadow: 0 1px 6px rgba(45,28,28,.08); transition-duration: 80ms; }
/* .is-pressed mirror: main.js's press-ack delegation already resolves the
   same trigger-vs-card exclusion structurally (closest() stops at the
   trigger before ever reaching .product-card), so no :has() guard is
   needed here — .is-pressed is only ever added to one or the other. */
.product-card.is-pressed { transform: scale(0.98); box-shadow: 0 1px 6px rgba(45,28,28,.08); transition-duration: 80ms; }

/* Whole card is a single link — fills the card, stacks thumb + body */
.product-card-link {
  display: flex;
  flex-direction: column;
  flex: 1;
  color: inherit;
  text-decoration: none;
}

/* SQUARE, matching the photography. Measured across the live catalogue:
   37 of 40 product images are exactly 770x770 — Zid's own square thumbnails.
   The tile was 4/5 portrait, so `cover` was cutting 20% off the top and bottom
   of every one of them, which is the "photo is cut" the merchant reported.
   A square frame and a square photo agree exactly: `cover` crops nothing, the
   photo fills the tile edge to edge on any background, and the card now shows
   what the lightbox shows. Fixing the FRAME rather than the fit is what makes
   both true at once — `contain` in a portrait frame solved the crop but
   letterboxed every dark or lifestyle shot into a floating rectangle. */
.product-thumb {
  position: relative;
  aspect-ratio: 1 / 1;
  margin: 8px 8px 0;
  border-radius: 14px 26px 14px 14px; /* v1.0: same leading-corner bias as .product-card, offset +4px per corner */
  background: var(--foam);
  box-shadow: inset 0 0 0 1px rgba(45,28,28,.04);
  overflow: hidden;
  flex-shrink: 0;
}
.product-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform var(--t-slow);
}
/* Lazy-load fade: image fades in once decoded instead of popping.
   .img-loaded is added by JS (and immediately for cached images); first-row
   .img-eager images carry it from the server so they need no JS at all.
   Gated on html.js (set inline in layout.jinja's head) so the hide can never
   outlive a JS failure.

   SPECIFICITY IS LOAD-BEARING HERE — four rules form one ladder, and each
   rung must stay below the next:
     1. hide          .js .product-thumb img:not(.img-placeholder)      (0,3,1)
     2. reveal        .js .product-thumb img.img-loaded                 (0,3,1) - later in source, so it wins over 1
     3. cycle idle    .product-thumb.is-cycling img.pt-layer            (0,3,1) - later still, hides the idle cross-fade layer
     4. cycle active  ...img.pt-layer.pt-layer-active                   (0,4,1) - wins outright
   Adding a class to rule 1 breaks the ladder silently. Exempting eager images
   with :not(.img-eager) did exactly that (2026-08-20): it pushed the hide to
   (0,4,1), above the reveal, so EVERY lazy card image loaded fine and then
   stayed at opacity 0 forever - 153 of 209 card instances rendered blank
   across the whole site. Eager images are therefore exempted in the TEMPLATE
   (product-card.jinja ships img-loaded on them), never by a selector here. */
@media (prefers-reduced-motion: no-preference) {
  .js .product-thumb img:not(.img-placeholder) {
    opacity: 0;
    transition: transform var(--t-slow), opacity 550ms ease;
  }
  .js .product-thumb img.img-loaded { opacity: 1; }
}
.product-card:hover .product-thumb img { transform: scale(1.04); }

/* ── Variant photo cycle (options products only) ──────────────
   An options product's card rotates through its VARIANT photos rather than
   showing the catalogue cover, so the colours/finishes on offer are legible
   from the grid without opening anything.

   The cover is not suppressed up front: it paints immediately as normal, and
   is only dropped once the variant photos have actually been fetched and
   decoded. A card that never gets usable variant photos therefore just stays
   a normal card — it never blanks and never flashes an empty frame.

   Two stacked layers cross-fade, rather than swapping one src: swapping src
   in place shows the browser's decode gap as a blank frame. Both layers are
   absolutely positioned ONLY while cycling, so a non-cycling card keeps its
   single in-flow image and its existing sizing untouched.

   The opacity here has to beat the lazy-load fade rule above
   (.product-thumb img:not(.img-placeholder) { opacity: 0 }), which is why the
   active/idle layers are stated explicitly rather than relying on .img-loaded. */
/* Physical longhands rather than `inset: 0` — `inset` needs iOS Safari 14.5+,
   and this frame has to land identically on older phones or the two layers
   stop overlapping and the cross-fade tears. Same reasoning as the RTL note:
   prefer the value that resolves the same everywhere over the tidier one. */
.product-thumb.is-cycling img.pt-layer {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  opacity: 0;
}
@media (prefers-reduced-motion: no-preference) {
  .product-thumb.is-cycling img.pt-layer {
    transition: transform var(--t-slow), opacity 620ms ease;
  }
}
.product-thumb.is-cycling img.pt-layer.pt-layer-active { opacity: 1; }
.img-placeholder {
  object-fit: contain !important;
  padding: 22%;
  opacity: .5;
  transform: none !important;
  transition: none !important;
}

/* ── Product badge ─────────────────────────────── */
.product-badge {
  position: absolute;
  inset-block-start: 12px;
  inset-inline-start: 12px;
  background: rgba(255,255,255,0.95);
  color: #6b3b18;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  padding: 6px 13px;
  border-radius: 20px;
  border: 1px solid rgba(181,98,42,0.28);
  pointer-events: none;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
/* Copper dot — for editorial badge types */
.product-badge--special_product::before,
.product-badge--staff_pick::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--copper);
  flex-shrink: 0;
}
.product-oos-label {
  position: absolute;
  bottom: 10px;
  inset-inline-start: 10px;
  background: rgba(245, 240, 232, 0.93);
  color: var(--stone);
  font-family: 'Almarai', 'Tajawal', sans-serif;
  font-size: 10px;
  font-weight: 400;
  padding: 4px 9px;
  border-radius: 20px;
  border: 1px solid rgba(120, 100, 80, 0.18);
  pointer-events: none;
  z-index: 2;
}

/* ── Product card footer action row (v3) ──
   A real in-flow row at the bottom of the card: price block at the start,
   Quick Buy trigger at the end. NOT absolutely positioned — it cannot float
   over or overlap the price/text on any screen size. */
.product-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 2px 12px 12px;
}
.product-foot .price-row { margin: 0; }
.product-foot-spacer { flex: 1; }

/* Quick Buy trigger (v5) — flat, no background/border/shadow/circle. Reads as
   part of the card's own quiet typographic language (same family as the
   .product-cue arrow) rather than an attached UI control glued onto the row.
   Calm stone color at rest, copper only on interaction — integration over
   decoration. Box is a comfortable 42px tap target even though only the
   20px glyph is visually drawn — the hit area grows without the icon
   itself getting louder. */
.product-quick-trigger {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: rgba(181,98,42,0.05); /* soft circular tint at rest — present but almost disappears into the card */
  border: none;
  border-radius: 50%;
  color: var(--stone);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent; /* no native blue/grey tap flash on touch */
  outline: none;
  transition: background var(--t-base);
}
.product-quick-trigger svg { width: 20px; height: 20px; position: relative; z-index: 1; }
.qb-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid var(--copper);
  opacity: 0;
  transform: scale(0.7);
  pointer-events: none;
}
/* Hover strengthens the same tint only — no color change on the icon itself,
   keeping the calm, editorial feel rather than a marketplace-CTA color swap. */
@media (hover: hover) {
  .product-quick-trigger:hover { background: rgba(181,98,42,0.09); }
  .product-quick-trigger:hover .qb-ring { animation: qb-ring-pulse 0.6s ease-out; }
}
/* Soft, brand-colored focus ring — distinct from hover, not a thick browser
   default outline. */
.product-quick-trigger:focus-visible {
  background: rgba(181,98,42,0.09);
  box-shadow: 0 0 0 3px rgba(181,98,42,0.18);
}
.product-quick-trigger:focus-visible .qb-ring { animation: qb-ring-pulse 0.6s ease-out; }
/* Press feedback — same scale/timing as before; only the tint strengthens
   further rather than shifting to a darker, heavier fill. */
.product-quick-trigger:active,
.product-quick-trigger.is-pressed {
  background: rgba(181,98,42,0.12);
  transform: scale(0.92);
  transition-duration: 80ms;
}
.product-quick-trigger:active svg,
.product-quick-trigger.is-pressed svg { transform: scale(0.92); }
@media (prefers-reduced-motion: reduce) {
  .product-quick-trigger.is-pressed,
  .product-quick-trigger.is-pressed svg { transform: none; }
}
@keyframes qb-ring-pulse {
  0%   { opacity: 0.55; transform: scale(0.7); }
  100% { opacity: 0; transform: scale(1.35); }
}
@media (prefers-reduced-motion: reduce) {
  .qb-ring { animation: none !important; }
}

/* ── Quick Buy modal ── */
.qb-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
}
.qb-modal.open { display: block; }
.qb-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(45,28,28,0.32);
  opacity: 0;
  transition: opacity var(--t-base);
}
.qb-modal.open .qb-backdrop { opacity: 1; }

.qb-sheet {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  max-height: 88vh;
  overflow-y: auto;
  background: var(--foam-mid);
  border-radius: 22px 22px 0 0;
  box-shadow: 0 -8px 30px rgba(45,28,28,.18);
  padding: 0;
  transform: translateY(100%);
  transition: transform var(--t-base);
}
.qb-modal.open .qb-sheet { transform: translateY(0); }

/* Desktop: a true centered card — not a side drawer. The .open rule below must
   match the specificity of `.qb-modal.open { display:block }` above (both 0,2,0)
   so that, being later in source, it wins and the flex centering actually applies.
   Earlier this was `.qb-modal { display:flex }` (0,1,0) which lost to the block
   rule, leaving the sheet pinned to the bottom/edge like a drawer. */
@media (min-width: 769px) {
  .qb-modal.open { display: flex; align-items: center; justify-content: center; padding: 24px; }
  .qb-sheet {
    position: relative;
    left: auto; right: auto; bottom: auto;
    width: 100%;
    max-width: 500px;
    max-height: 86vh;
    border-radius: 20px;
    box-shadow: 0 24px 70px rgba(45,28,28,.24);
    transform: translateY(8px) scale(0.98);
    opacity: 0;
    transition: transform var(--t-base), opacity var(--t-base);
  }
  .qb-modal.open .qb-sheet { transform: translateY(0) scale(1); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .qb-backdrop, .qb-sheet { transition: none !important; }
}

/* The visible bar stays a thin 4px pill (unchanged look), but the actual
   drag/tap target is a full-width 30px-tall zone around it — comfortable to
   grab without making the handle itself look bigger or louder. touch-action:
   none stops the browser's own scroll/refresh gestures from fighting the
   drag-to-close gesture while a finger is on the handle. */
.qb-handle {
  width: 100%;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  touch-action: none;
}
.qb-handle::before {
  content: '';
  width: 36px;
  height: 4px;
  border-radius: 4px;
  background: rgba(120,100,80,0.22);
}
@media (min-width: 769px) { .qb-handle { display: none; } }

.qb-content { padding: 16px 18px 20px; }

/* Small calm heading so the sheet reads as an intentional purchase surface,
   not a bare popup — sits on its own row with the close button, aligned. */
.qb-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.qb-title {
  font-family: var(--font-head);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--stone);
}
.qb-close {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: var(--foam);
  color: var(--stone);
  font-size: 17px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
.qb-close:hover { color: var(--copper); }
.qb-close:active,
.qb-close.is-pressed { color: var(--copper); background: var(--foam-mid); transform: scale(0.9); transition-duration: 80ms; }

/* Mini-cart style header row — small framed image beside name + price, the
   same compact "image | info" pattern as .cart-product-row on the cart page.
   Not a large hero image stacked above everything else. */
.qb-row {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  column-gap: 14px;
  align-items: center;
}
.qb-media {
  width: 84px;
  height: 84px;
  border-radius: var(--radius-md);
  background: var(--foam);
  overflow: hidden;
  flex-shrink: 0;
}
.qb-media img { width: 100%; height: 100%; object-fit: cover; }
.qb-row-info { min-width: 0; }

.qb-name {
  font-family: var(--font-head);
  font-size: 15.5px;
  font-weight: 700;
  color: var(--espresso);
  line-height: 1.3;
  margin: 0 0 5px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.qb-row-info .price-row { margin: 0; }
.qb-options { margin-top: 18px; }
.qb-option-group + .qb-option-group { margin-top: 12px; }
.qb-option-label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--espresso);
  margin-bottom: 7px;
  display: block;
}
.qb-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.qb-pill {
  padding: 7px 14px;
  border-radius: 20px;
  border: 1.5px solid var(--linen);
  background: transparent;
  color: var(--espresso);
  font-size: 13px;
  font-family: var(--font-body);
  cursor: pointer;
  transition: border-color var(--t-base), background var(--t-base), color var(--t-base);
}
@media (hover: hover) { .qb-pill:hover:not(.qb-pill--oos):not(.qb-pill--selected) { border-color: var(--stone-light); } }
/* Excludes --selected so pressing an already-chosen option doesn't flash
   its copper text/border back to neutral — selected pills get scale-only
   feedback below, keeping their own color intact. */
.qb-pill:active:not(.qb-pill--oos):not(.qb-pill--selected),
.qb-pill.is-pressed:not(.qb-pill--oos):not(.qb-pill--selected) { border-color: var(--copper); background: rgba(181,98,42,0.1); transform: scale(0.92); transition-duration: 80ms; }
/* Mirrors .option-pill--media, but the modal's pill is a smaller control (13px
   text, 31.33px tall vs 36.26px), so the swatches are scaled down to stay
   under its line box and keep the media pill the same height as the text pills
   next to it. Symmetric padding for the same RTL reason as the product page. */
.qb-pill--media { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; }
.qb-pill--media .option-swatch--color { width: 14px; height: 14px; }
.qb-pill--media .option-swatch--image { width: 14px; height: 14px; border-radius: 3px; }
.qb-pill--selected { border-color: var(--copper); background: rgba(181,98,42,0.08); color: var(--copper); font-weight: 600; }
.qb-pill--selected:active,
.qb-pill--selected.is-pressed { transform: scale(0.92); transition-duration: 80ms; }
/* Same rule as .option-pill--oos: sold out here, but still clickable, because
   it is the way through to the in-stock combinations. Only a pill that is sold
   out everywhere gets `disabled` (and with it the not-allowed cursor). */
.qb-pill--oos { color: var(--stone-light); border-color: var(--linen); text-decoration: line-through; opacity: 0.6; }
.qb-pill:disabled { cursor: not-allowed; opacity: 0.45; }
.qb-prompt {
  margin-top: 10px;
  font-size: 12.5px;
  color: var(--stone);
}
.qb-oos-msg {
  margin-top: 14px;
  font-size: 13px;
  color: var(--stone);
  background: var(--foam);
  border-radius: 10px;
  padding: 10px 12px;
}
.qb-qty-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  margin-bottom: 16px;
}
.qb-qty-label { font-weight: 700; font-size: 13px; color: var(--espresso); }

/* Clear separation between the option/quantity controls and the purchase
   actions, so the two action buttons read as their own decisive group. */
.qb-actions-divider {
  height: 1px;
  background: var(--linen);
  margin: 18px 0 16px;
}
.qb-actions { display: flex; flex-direction: column; gap: 10px; }
.qb-actions .btn:disabled { opacity: 0.45; cursor: not-allowed; }
/* أضف إلى السلة is now primary (stronger weight); اشترِ الآن is secondary/calmer */
.qb-actions .btn-primary { font-size: 16px; padding: 14px 28px; }
.qb-actions .btn-ghost { font-size: 14.5px; }

/* Inline feedback near the actions — replaces the global top-page flash for
   everything that happens inside this modal (add/buy success, stock limits,
   SDK errors). Calm, small, never a popup of its own. */
.qb-feedback {
  margin: 12px 0 0;
  font-size: 13px;
  text-align: center;
  border-radius: 10px;
  padding: 9px 12px;
}
.qb-feedback--success { background: rgba(95,132,99,0.12); color: #4a6b4e; }
.qb-feedback--error { background: rgba(185,64,64,0.1); color: #b94040; }

/* ── Product detail page badge (inline, not absolute) ── */
.product-info-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--foam);
  color: #6b3b18;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid rgba(181, 98, 42, 0.28);
  margin-block-end: 10px;
}

/* ── Out-of-stock notify-me form ── */
.notify-toggle-btn { margin-block-start: 16px; }
/* [hidden] must win. See the .newsletter[hidden] note: an author `display`
   rule outranks the user-agent's `[hidden] { display: none }`, so this block
   shipped with the hidden attribute AND rendered anyway — the notify form sat
   permanently open on every out-of-stock product (measured live on
   /products/Fellow-Ode2: hidden=true, display:flex, height 278px, all three
   inputs tabbable) and its «نبهني عند التوفر» toggle did nothing. */
.notify-form-wrap[hidden] { display: none; }
.notify-form-wrap {
  margin-block-start: 14px;
  padding: 16px;
  background: var(--foam);
  border: 1px solid var(--linen);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.notify-intro {
  font-size: 13px;
  color: var(--stone);
  margin: 0;
  line-height: 1.55;
}
.notify-input {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--linen);
  border-radius: var(--radius-sm);
  background: var(--white);
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--ink);
  box-sizing: border-box;
  outline: none;
  transition: border-color var(--t-fast);
}
.notify-input:focus { border-color: var(--copper); }
.notify-result {
  font-size: 13px;
  text-align: center;
  margin: 0;
  color: var(--stone);
}
.notify-result--ok  { color: var(--success); font-weight: 600; }
.notify-result--err { color: var(--danger); }


/* Badges */
.badge {
  position: absolute;
  top: 10px; inset-inline-start: 10px;
  background: var(--copper);
  color: var(--white);
  font-size: 11px; font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  z-index: 2;
}
.badge.soldout { background: var(--stone); }

/* Card body — caption sits on the warm card surface, gently inset */
.product-body {
  padding: 12px 12px 7px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.product-name {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 14px;
  color: var(--espresso);
  line-height: 1.4;
  letter-spacing: -0.01em;
  flex: 1;
}

/* Hover cue — replaces the per-card button.
   Always visible on touch devices (no hover); on devices that support
   hover it stays subtle and sharpens when the card is hovered. */
.product-cue {
  margin-top: 7px;
  font-size: 13px;
  font-weight: 400;
  font-family: var(--font-body);
  color: var(--stone);
  opacity: 0.7;
}
.product-cue span { display: inline-block; }
@media (hover: hover) {
  .product-cue {
    opacity: 0;
    transform: translateX(-4px);
    transition: opacity var(--t-base), transform var(--t-base), color var(--t-base);
  }
  .product-card:hover .product-cue {
    opacity: 1;
    transform: translateX(0);
    color: var(--copper);
    font-weight: 600;
  }
}

.product-excerpt {
  font-size: 12.5px;
  color: var(--stone);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid rgba(45,28,28,.07);
}
/* nowrap is load-bearing on every price, not just the set-contents rows:
   formatted_price is "digits + inline currency SVG", so with normal wrapping
   the OMR mark is a separate breakable token. In a narrow column the pair sits
   right at the break point, and any sub-pixel change in available width (font
   swap, image reflow, the phone address bar resizing the viewport mid-scroll)
   flips the mark between the digits' line and its own line. Reading down a
   grid that renders as the currency mark drifting up/down and side to side.
   Keeping each figure atomic lets .price-row--sale wrap BETWEEN the two
   figures instead, which is where the break belongs. */
.price {
  font-family: var(--font-numeric);
  font-weight: 700;
  color: var(--espresso);
  font-size: 17px;
  white-space: nowrap;
}
/* One font for every price in the store, --font-numeric, chosen 2026-08-06.
   Prices previously ran in three faces: Cairo on the card, cart page, sticky
   bar and suggestions; Cormorant on the product page and the cart drawer; and
   Almarai on every struck "before" price, which nobody chose - it was just
   the inherited body font. A single row could show a Cormorant sale price
   beside an Almarai original. Cormorant remains the accent face everywhere
   else (hero stat, marquee, badges, watermark); it is only prices that
   converge. */
.price-old {
  font-family: var(--font-numeric);
  font-weight: 300;
  color: var(--stone-light);
  text-decoration: line-through;
  text-decoration-color: var(--stone-light);
  font-size: 13px;
  white-space: nowrap;
}
/* Sale price — copper and prominent. Discount treatment is now ONE LINE on
   every surface: the new copper price leads, the struck original sits beside
   it at the baseline, no label (the strikethrough already says "old price").
   The product page used to stack the two vertically; see .product-info
   .price-row--sale below for why that was dropped. */
.price--sale {
  color: var(--copper);
  font-weight: 700;
}

/* CARD (and Quick Buy): the discount stays on ONE line so every card is the
   same height — a two-line stack here left non-sale cards with an ugly empty
   gap in the grid. New copper price leads, struck original beside it, no label
   (the strikethrough already says "old price"). Inline is inherited from
   .price-row (flex row, baseline). */
.product-card .price-row--sale { flex-wrap: wrap; }
.product-card .price-row--sale .price--sale { font-size: 20px; }
.product-card .price-row--sale .price-old { font-size: 12px; }

/* PRODUCT PAGE: ONE line, same as the card — new copper price leads, struck
   original beside it at the baseline. This used to be a column-reverse stack;
   at the product page's 32px/19px sizes the currency SVG inside
   formatted_price scales with the font and inflates each line box, so the two
   figures ended up separated by a band of dead space on mobile and desktop
   alike. Inline is inherited from .price-row; nothing to declare but the
   baseline gap, kept here so the sale row reads as one unit. */
.product-info .price-row--sale {
  flex-wrap: wrap;
  gap: 12px;
}
.product-card .btn { margin-top: 10px; font-size: 14px; padding: 10px 18px; }

/* ===== 18. PRODUCT PAGE ===== */
.product-detail {
  display: grid;
  grid-template-columns: minmax(0, 520px) minmax(300px, 400px);
  gap: 64px;
  padding-block: 56px;
  align-items: start;
  justify-content: center;
}

/* Desktop: purchase column stays in view while the gallery scrolls. */
@media (min-width: 769px) {
  .product-info {
    position: sticky;
    top: 88px;
    align-self: start;
  }
}

/* Gallery container for single image */
.gallery-main {
  position: relative;          /* anchors the pending-swap shimmer */
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--foam-mid);
  /* Square for the same reason as .product-thumb — the catalogue is shot
     770x770, so a 4/5 frame was cropping every photo top and bottom. */
  aspect-ratio: 1 / 1;
  max-height: 620px;
}

/* ── Pending image swap ──
   While a newly selected photo is still decoding, the <img> is transparent, so
   the frame — not the image — has to say "loading". A slow shimmer over the
   frame's own foam, not a spinner: the wait is short and bounded, and a
   spinner would overstate it. Only ever applied after a threshold, so a cached
   photo never flashes one (see galleryShowImage). */
.gallery-main.is-loading::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg,
    rgba(255,255,255,0) 20%,
    rgba(255,255,255,0.55) 50%,
    rgba(255,255,255,0) 80%);
  transform: translateX(-100%);
  animation: gallery-shimmer 1100ms ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
}
@keyframes gallery-shimmer {
  to { transform: translateX(100%); }
}
@media (prefers-reduced-motion: reduce) {
  /* Still disclose the wait — just hold it still rather than sweeping. */
  .gallery-main.is-loading::after {
    animation: none;
    transform: none;
    background: rgba(255,255,255,0.35);
  }
}
.gallery-main img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: opacity var(--t-fast);
}
/* Crossfade target for gallerySelect()/galleryNav() — fade out before the
   src swap, fade back in after, instead of an instant hard cut. */
.gallery-main img.is-fading { opacity: 0; }
@media (prefers-reduced-motion: reduce) {
  .gallery-main img { transition: none; }
}

/* Gallery nav: arrows physically beside the image */
.gallery-with-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  direction: ltr;          /* ← always LTR so ← stays left, → stays right */
}
.gallery-with-nav .gallery-main {
  flex: 1;
  min-width: 0;            /* prevent flex overflow */
}

/* ── Gallery arrow controls (beside-image layout) ── */
.gallery-arrow {
  flex-shrink: 0;
  background: var(--foam-mid);
  border: 1.5px solid var(--linen);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  color: var(--espresso);
  padding: 0;
  transition: background var(--t-fast), border-color var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast);
}
.gallery-arrow:hover {
  background: white;
  border-color: var(--copper);
  box-shadow: var(--shadow-sm);
}
.gallery-arrow:active,
.gallery-arrow.is-pressed { transform: scale(0.92); transition-duration: 80ms; }

/* ── Thumbnail rail ──
   One line that scrolls, never a wrapping grid. A wrapping strip grows a row
   per 6-7 images and pushes the whole buy box down; a rail keeps the gallery a
   fixed height whatever the image count. The rail is the scroll container and
   owns the edge fades; .gallery-thumbs is just the track inside it. */
/* A grid item's automatic minimum size is its CONTENT size, so the mobile
   `grid-template-columns: 1fr` column would size itself to the full unwrapped
   thumbnail track (10 thumbs = 712px) and push the whole page into horizontal
   overflow instead of letting the rail scroll. min-width:0 on the item — and on
   the rail itself — is what makes the overflow land where it belongs. */
/* Both product-page columns must be allowed to shrink below their min-content
   width. Without this a single long unbreakable string (a brand name, a URL in
   the description) blows the mobile 1fr track past the viewport. */
.gallery, .product-info { min-width: 0; }
.gallery-thumb-rail {
  position: relative;
  min-width: 0;
  margin-top: 10px;
}
/* Edge fades signal "there is more this way". Only painted while the rail can
   actually scroll that way (JS toggles .can-start / .can-end), so a short strip
   that fits entirely shows no misleading fade. */
.gallery-thumb-rail::before,
.gallery-thumb-rail::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  width: 40px;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--t-fast);
  z-index: 1;
}
.gallery-thumb-rail::before {
  inset-inline-start: 0;
  background: linear-gradient(to right, var(--foam), rgba(255,255,255,0));
}
.gallery-thumb-rail::after {
  inset-inline-end: 0;
  background: linear-gradient(to left, var(--foam), rgba(255,255,255,0));
}
.app.rtl .gallery-thumb-rail::before { background: linear-gradient(to left,  var(--foam), rgba(255,255,255,0)); }
.app.rtl .gallery-thumb-rail::after  { background: linear-gradient(to right, var(--foam), rgba(255,255,255,0)); }
.gallery-thumb-rail.can-start::before { opacity: 1; }
.gallery-thumb-rail.can-end::after    { opacity: 1; }

.gallery-thumbs {
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;            /* the rail's own fades are the affordance */
  /* Room for the 2px active border + 0.92 press scale so neither is clipped
     by the scroll container's edges. */
  padding-block: 2px;
}
.gallery-thumbs::-webkit-scrollbar { display: none; }
.gallery-thumbs img {
  flex: 0 0 auto;
  scroll-snap-align: center;
  width: 64px; height: 64px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color var(--t-fast), opacity var(--t-fast);
}
.gallery-thumbs img:hover          { border-color: var(--copper); }
.gallery-thumbs img:active,
.gallery-thumbs img.is-pressed     { border-color: var(--copper); transform: scale(0.92); transition-duration: 80ms; }
.gallery-thumbs img.active         { border-color: var(--copper); opacity: 1; }
.gallery-thumbs img:not(.active)   { opacity: 0.65; }

/* ── One-slot gallery ──
   The arrows and the rail are the chrome for traversing MORE than one photo,
   so a single-photo product hides them rather than showing a rail of one and
   arrows that only ever return to the same image. The markup is still there
   because choosing an option can add a variant photo as a second slot, at
   which point galleryReadSlots() drops this class and the chrome appears. */
.gallery--solo .gallery-arrow,
.gallery--solo .gallery-thumb-rail { display: none; }

/* ── Zoom trigger ──
   The main image is a button (see product.jinja). Reset the button chrome so it
   still reads as the plain framed image it was, and add the one thing that
   marks it as openable: a zoom cue + zoom-in cursor. */
.gallery-zoom {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  font: inherit;
  cursor: zoom-in;
  -webkit-tap-highlight-color: transparent;
}
.gallery-zoom img { display: block; }
/* The image itself lifts very slightly on hover — the same "this responds"
   language the cards use, at a scale small enough not to read as a transition. */
@media (hover: hover) {
  .gallery-zoom:hover img { transform: scale(1.02); }
}
.gallery-zoom img { transition: opacity var(--t-fast), transform var(--t-base); }

.gallery-zoom-cue {
  position: absolute;
  inset-block-end: 12px;
  inset-inline-end: 12px;
  width: 36px; height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255,255,255,0.86);
  color: var(--espresso);
  box-shadow: var(--shadow-sm);
  opacity: 0.85;
  transition: opacity var(--t-fast), transform var(--t-fast);
}
.gallery-zoom-cue svg { width: 17px; height: 17px; }
@media (hover: hover) {
  .gallery-zoom:hover .gallery-zoom-cue { opacity: 1; transform: scale(1.06); }
}
.gallery-zoom:active .gallery-zoom-cue,
.gallery-zoom.is-pressed .gallery-zoom-cue { transform: scale(0.92); transition-duration: 80ms; }
@media (prefers-reduced-motion: reduce) {
  .gallery-zoom img, .gallery-zoom-cue { transition: none; }
  .gallery-zoom:hover img { transform: none; }
}

/* ══ Gallery lightbox ══
   Full-bleed view of the current image. The inline gallery is a fixed square
   frame that matches the catalogue's square photography, so it no longer crops
   either; this surface exists to give the photo the whole viewport.
   Above the Quick Buy modal's 200 because it can be opened over nothing else. */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 240;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox[hidden] { display: none; }
/* The dialog itself takes focus on open (see lightboxOpen). It is the surface,
   not a control, so it must not draw a ring — the overlay appearing IS the
   feedback that focus moved. */
.lightbox:focus,
.lightbox:focus-visible { outline: none; }

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(28,18,18,0.82);
  opacity: 0;
  transition: opacity var(--t-base);
}
.lightbox.open .lightbox-backdrop { opacity: 1; }

.lightbox-stage {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 72px 64px;
  pointer-events: none;          /* clicks fall through to the backdrop = dismiss */
}
/* The box is the STAGE, not the photo. Sizing it to the image (max-width /
   max-height on an auto box) meant the element's own dimensions changed every
   time the next photo had a different shape — a visible reflow mid-swap, with
   the outgoing photo's area still painted around the incoming smaller one.
   A constant box removes the reflow entirely: `contain` centres each photo
   inside it at whatever size it needs, and nothing moves but the picture.
   lightboxPhotoRect() recovers the photo's real rect for the FLIP. */
.lightbox-img {
  width: 100%;
  height: 100%;
  object-fit: contain;           /* the whole photo, never cropped */
  pointer-events: auto;
  /* transform is driven by the open/close zoom-from-origin animation in JS;
     no CSS transition here, or it would fight the explicit FLIP timing. */
}
.lightbox-img.is-fading { opacity: 0; transition: opacity var(--t-fast); }

/* Chrome (close, counter, arrows) fades in a beat after the image has landed,
   so the opening reads as "the photo grew", not "a dialog appeared". */
.lightbox-close,
.lightbox-counter,
.lightbox-arrow {
  position: absolute;
  pointer-events: auto;
  opacity: 0;
  transition: opacity var(--t-base) 120ms, background var(--t-fast), transform var(--t-fast);
}
.lightbox.open .lightbox-close,
.lightbox.open .lightbox-counter,
.lightbox.open .lightbox-arrow { opacity: 1; }

.lightbox-close,
.lightbox-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.22);
  background: rgba(255,255,255,0.12);
  color: var(--white);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  /* These two were missed when the rest of the site's controls got them (see
     .qb-close, .gallery-zoom, .option-pill): without them a tap on the close X
     paints the platform's native blue/grey circle over the button, and the
     focus ring left by that tap persists after the finger lifts. The press is
     already acknowledged by the shared scale(0.92). */
  -webkit-tap-highlight-color: transparent;
  outline: none;
}
/* outline:none above is only safe paired with this — keyboard users keep a
   visible ring, touch users don't get a stuck one. */
.lightbox-close:focus-visible,
.lightbox-arrow:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 2px;
}
@media (hover: hover) {
  .lightbox-close:hover,
  .lightbox-arrow:hover { background: rgba(255,255,255,0.24); border-color: rgba(255,255,255,0.5); }
}
.lightbox-close:active, .lightbox-close.is-pressed,
.lightbox-arrow:active, .lightbox-arrow.is-pressed { transform: scale(0.92); transition-duration: 80ms; }

.lightbox-close { top: 16px; inset-inline-end: 16px; }
/* Forced LTR arrow placement, matching the inline gallery: the left arrow is
   always physically left. galleryNav()'s deltas already encode the RTL reading
   order, so these reuse the same swapped mapping. */
.lightbox-prev { inset-inline-start: auto; left: 16px; }
.lightbox-next { inset-inline-end: auto; right: 16px; }

.lightbox-counter {
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.18);
  color: var(--white);
  font-family: var(--font-accent);
  font-size: 12px;
  letter-spacing: .08em;
  font-variant-numeric: tabular-nums;
  /* "5 / 10" is a position-in-set ratio, not prose. Under the RTL paragraph
     direction the bidi algorithm reorders the two numeric runs and renders it
     as "10 / 5" — i.e. image 10 of 5. Isolate it as an LTR run so current
     always stays on the left of the total. */
  direction: ltr;
  unicode-bidi: isolate;
}

@media (max-width: 768px) {
  .lightbox-stage { padding: 64px 12px; }
  /* Touch has swipe + thumbnails for traversal; the arrows would sit on top of
     the photo on a small screen for no added reach. */
  .lightbox-arrow { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .lightbox-backdrop,
  .lightbox-close, .lightbox-counter, .lightbox-arrow { transition-duration: 0.01ms !important; transition-delay: 0s !important; }
}

/* Pending swap inside the lightbox. A ring rather than the inline gallery's
   shimmer: here the image is the whole surface over a dark scrim, so there is
   no frame to shimmer, and the wait is genuinely longer (the large original,
   not the already-cached inline size). */
.lightbox.is-loading::after {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: 34px; height: 34px;
  margin: -17px 0 0 -17px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.25);
  border-top-color: rgba(255,255,255,0.9);
  animation: lightbox-spin 700ms linear infinite;
  pointer-events: none;
}
@keyframes lightbox-spin {
  to { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
  .lightbox.is-loading::after { animation: none; border-top-color: rgba(255,255,255,0.55); }
}

/* The page behind a full-screen surface must not scroll under it. */
body.lightbox-open { overflow: hidden; }

.product-info h1 {
  font-size: clamp(24px, 4vw, 34px);
  line-height: 1.2;
  margin-bottom: 16px;
}
.product-info .price-row { display: flex; align-items: baseline; gap: 10px; border-top: none; padding-top: 0; margin-top: 0; }
/* Editorial numeral treatment, matching the homepage's .hero-stat-num
   precedent (Cormorant, 700) — the brand's own documented intent for
   "distinctive prices and numbers," not yet honored on the product page
   itself. Color is left untouched: copper already means "you touched
   something" elsewhere (sale price already inherits it via .price--sale)
   — this changes the typeface only, not the material-contact signal. */
.product-info .price { font-size: 32px; font-family: var(--font-numeric); }
.product-info .price-old { font-size: 19px; font-family: var(--font-numeric); }
.product-info .price-old .omr-svg { opacity: .7; }

/* Quieter stock chip — warm neutral pill, colour carried by the dot */
.stock-row { margin-block: 16px 0; }
.stock {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 600;
  font-size: 12.5px;
  padding: 5px 13px;
  border-radius: var(--radius-pill);
  background: var(--foam-mid);
}
.stock.in  { color: var(--success); }
.stock.out { color: var(--danger); }

/* One-line trust cue under the stock chip */
.product-trust {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--linen);
  font-size: 13px;
  color: var(--stone);
}
.product-trust svg { width: 17px; height: 17px; stroke: var(--copper); flex-shrink: 0; }

/* Brand line under the trust cue (product.jinja). Values are the ones the
   owner approved from real-page previews on 2026-11-16. The mark sits in a
   white frame because six of the nine uploaded logos carry their own white
   background, which would read as a stray box on --foam; framing every logo
   the same way makes that look deliberate. Height-capped, never stretched:
   the logos arrive at very different aspect ratios. No letter-spacing:
   brand names are Arabic-first and tracking breaks Arabic joining. */
.product-brand-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  min-width: 0;
  font-size: 13px;
  color: var(--stone);
  text-decoration: none;
}
.product-brand-line:hover { color: var(--stone); }
.product-brand-mark {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  padding: 0 7px;
  border-radius: 7px;
  background: #fff;
  border: 1px solid var(--linen);
}
.product-brand-mark img {
  display: block;
  height: 18px;
  width: auto;
  max-width: 72px;
  object-fit: contain;
}
.product-brand-text { min-width: 0; overflow-wrap: anywhere; }
.product-brand-text b { color: var(--espresso); font-weight: 700; }
.product-brand-cue {
  color: var(--copper);
  font-weight: 700;
  white-space: nowrap;
  transition: color var(--t-fast);
}
.product-brand-line:hover .product-brand-cue { color: var(--espresso); }

.product-desc { color: var(--stone); margin-block: 22px; line-height: 1.85; font-size: 14.5px; }
.product-desc-placeholder { font-style: italic; opacity: 0.55; font-size: 14px; }

/* Merchant HTML from the Zid editor. The global `* { margin: 0; padding: 0 }`
   reset flattens every paragraph and list the merchant writes, so descriptions
   authored as bare <p>/<ul>/<li> lost their spacing and bullet indent while
   ones the editor happened to stamp with inline styles kept theirs — two
   different-looking product pages from the same content. These restore the
   editor's own values, so both author styles land on one house format.
   Inline styles still win where present; they carry these same numbers. */
.product-desc p  { margin-block: 6px; }
.product-desc ul,
.product-desc ol { margin-block: 4px; padding-inline-start: 40px; }
.product-desc li { margin-block: 4px; }
/* Some descriptions wrap each bullet's text in its own <p>. The li already
   carries the spacing, so the inner paragraph must not add more. */
.product-desc li > p { margin-block: 0; }
.product-desc > :first-child { margin-block-start: 0; }
.product-desc > :last-child  { margin-block-end: 0; }

/* ---- Set contents (grouped products) ----
   Renders only on grouped-product pages. Sits below the buy actions inside
   .product-info, so the set's own price and CTA come first and the breakdown
   reads as supporting detail. Deliberately quieter than the buy box: cards
   carry a text cue, never a button, so the page keeps one primary CTA. */
.set-contents {
  margin-block: 26px;
  padding-block-start: 22px;
  border-block-start: 1px solid var(--foam-dark);
}
.set-contents-title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 16px;
  color: var(--espresso);
  margin: 0 0 4px;
}
.set-contents-sub {
  font-size: 12.5px;
  color: var(--stone);
  line-height: 1.6;
  margin: 0 0 14px;
}
/* Saving line sits ABOVE the cards on purpose: it frames each child price as a
   fraction of the set rather than an alternative to it. */
.set-contents-saving {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  background: var(--mint-soft);
  font-size: 12.5px;
  color: var(--stone);
}
.set-contents-saving-parts { text-decoration: line-through; color: var(--stone-light); }
.set-contents-saving-arrow { color: var(--stone-light); }
.set-contents-saving-set { color: var(--success); font-weight: 700; }

/* auto-FILL, not auto-fit. auto-fit collapses the unused tracks and lets three
   children stretch across the whole container, which made these cards visibly
   larger than the Recently Viewed cards directly below them. auto-fill keeps
   the empty tracks, so a card is always one column of the same 4-up rhythm
   .rv-grid uses, however many children the set has. The 240px floor is what
   yields 4 tracks at container width — matching .rv-grid's repeat(4, 1fr). */
.set-contents-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--gap);
  list-style: none;
  margin: 0;
  padding: 0;
}
.set-contents-item { min-width: 0; }
.set-contents-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 10px;
  border: 1px solid var(--foam-mid);
  border-radius: var(--radius-md);
  background: var(--white);
  text-decoration: none;
  transition: border-color var(--t-fast), transform var(--t-fast);
}
.set-contents-card:hover { border-color: var(--foam-dark); }
.set-contents-card:active { transform: scale(0.985); }
.set-contents-thumb {
  position: relative;
  display: block;
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--foam-mid);
}
.set-contents-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.set-contents-thumb .img-placeholder { object-fit: contain; padding: 22%; opacity: 0.5; }
/* Logical inset-inline-start would be the idiomatic choice here, but iPad Safari has
   resolved logical properties inconsistently inside hardcoded-dir containers
   on this theme before, so the marker is pinned with physical values. */
.set-contents-qty {
  position: absolute;
  top: 6px;
  left: 6px;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  background: var(--espresso);
  color: var(--foam);
  font-size: 11px;
  font-weight: 700;
  direction: ltr;
}
.set-contents-name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 13px;
  line-height: 1.4;
  color: var(--espresso);
  margin-block-start: 9px;
}
/* Column, not a space-between row. formatted_price carries an inline currency
   SVG, so the price is a wrapping inline unit — sharing a line with the cue
   left the symbol orphaned on its own line at narrow widths. Price above, cue
   below, wraps at no width.
   margin-block-start:auto keeps the foot flush to the card bottom so every
   card's price sits on the same line regardless of name length. */
.set-contents-foot {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  margin-block-start: auto;
  padding-block-start: 8px;
}
/* The theme's .price-row carries margin-top, padding-top AND a border-top
   hairline for its use inside a card body. All three have to be cleared here,
   not just the margin — the inherited rule was drawing a stray line across
   each card. */
.set-contents-foot .price-row {
  margin: 0;
  padding-top: 0;
  border-top: 0;
  flex-wrap: wrap;
  gap: 8px;
}
/* nowrap now lives on .price / .price-old themselves — this block only sizes. */
.set-contents-foot .price { font-size: 15px; }
.set-contents-foot .price-old { font-size: 12px; }
.set-contents-cue { font-size: 11px; color: var(--copper); white-space: nowrap; }
.set-contents-card:hover .set-contents-cue { text-decoration: underline; }
/* Out of stock dims but stays a live link — the child is still a real page,
   and it is still part of what the set contains. */
.set-contents-item--oos { opacity: 0.55; }

/* Two-up on phones, not three. At 360px a three-column grid gave ~110px cards,
   which is where the price row and its currency SVG started breaking apart.
   A 140px floor caps it at two columns and roughly doubles the card width. */
/* 768px, matching .rv-grid's breakpoint exactly. At 600px these cards went
   two-up while Recently Viewed directly below was still two-up from 768px, so
   between those widths this section showed three cramped cards against RV's
   two comfortable ones. Type is NOT shrunk here — it stays at the RV scale;
   shrinking it was what made the phone cards read as undersized. */
@media (max-width: 768px) {
  .set-contents-grid { grid-template-columns: repeat(2, 1fr); }
  .set-contents-foot .price-row { gap: 6px; }
}

.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 700; margin-bottom: 6px; color: var(--espresso); font-size: 14px; }
.field select,
.field input[type="number"],
.field input[type="text"],
.field textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--linen);
  border-radius: var(--radius-sm);
  background: var(--white);
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--ink);
  transition: border-color var(--t-fast);
}
.field select:focus,
.field input:focus,
.field textarea:focus { outline: none; border-color: var(--copper); }

/* ── Product variant options (vitrin:v2/products/options/variant_options.jinja) ── */
.product-options { margin-block: 18px 4px; }
.product-options__group { display: flex; flex-direction: column; gap: 7px; }
.product-options__group + .product-options__group { margin-top: 14px; }
.product-options__label {
  font-size: 13px;
  font-weight: 700;
  color: var(--espresso);
}
.product-options__select {
  width: 100%;
  padding: 10px 14px;
  /* Chevron sits on the trailing edge in BOTH directions. This was
     padding-left + background-position:left, correct only while the store was
     Arabic-only; in English it put the arrow on the leading edge, ahead of the
     value, which is why the control looked wrong rather than merely mirrored.
     Same LTR-base + [dir=rtl]-override shape .sort-select already uses. */
  padding-right: 36px;
  border: 1.5px solid var(--linen);
  border-radius: var(--radius-sm);
  background-color: var(--white);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' stroke='%238a7464' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  -webkit-appearance: none;
  appearance: none;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--ink);
  cursor: pointer;
  outline: none;
  box-sizing: border-box;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
[dir=rtl] .product-options__select {
  padding-right: 14px;
  padding-left: 36px;
  background-position: left 10px center;
}
.product-options__select:hover { border-color: var(--stone-light); }
.product-options__select:focus {
  border-color: var(--copper);
  box-shadow: 0 0 0 3px rgba(181, 98, 42, .12);
}

/* Option value pills replace native select dropdowns */
.option-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}
.option-pill {
  padding: 7px 18px;
  border: 1.5px solid var(--linen);
  border-radius: 20px;
  background: var(--white);
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--espresso);
  cursor: pointer;
  transition: border-color var(--t-fast), background var(--t-fast), color var(--t-fast), transform var(--t-fast);
  white-space: nowrap;
  user-select: none;
  line-height: 1.4;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  outline: none;
}
/* Colour / image option types: swatch or thumbnail alongside the label.
   Padding is symmetric so it holds in both LTR and RTL without logical
   properties, which resolve inconsistently on iPad Safari. */
/* A media pill must be the same height as the text pill beside it, or the row
   looks broken. Rather than pin a height, the vertical padding is left at the
   text pill's 7px and every swatch is kept at or under the 19.6px text
   line-height — so the label still drives the box and the two match exactly.
   Horizontal padding is symmetric: the swatch sits at the inline start, so
   asymmetric physical padding would flip sides in RTL, and logical padding
   resolves inconsistently on iPad Safari. The gap does the separating. */
.option-pill--media {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
}
.option-swatch {
  flex: 0 0 auto;
  display: block;
}
.option-swatch--color {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  /* Inset ring keeps a white or very pale swatch visible on the white pill. */
  box-shadow: inset 0 0 0 1px rgba(43, 32, 26, 0.18);
}
.option-swatch--image {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  object-fit: cover;
  /* Reserve the box so the row doesn't reflow as thumbnails decode. */
  background: var(--foam);
}
.option-pill:focus-visible {
  outline: 2px solid var(--copper);
  outline-offset: 2px;
}
@media (hover: hover) {
  .option-pill:hover:not(.option-pill--oos):not(.option-pill--selected) {
    border-color: var(--copper);
    color: var(--copper);
  }
}
.option-pill:active:not(.option-pill--oos):not(.option-pill--selected),
.option-pill.is-pressed:not(.option-pill--oos):not(.option-pill--selected) {
  border-color: var(--copper);
  color: var(--copper);
  background: rgba(181,98,42,0.06);
  transform: scale(0.92);
  transition-duration: 80ms;
}
.option-pill--selected {
  background: var(--espresso);
  color: var(--white);
  border-color: var(--espresso);
}
.option-pill--selected:active,
.option-pill--selected.is-pressed { transform: scale(0.92); transition-duration: 80ms; }
/* On the dark selected pill the dark inset ring disappears, so flip it light. */
.option-pill--selected .option-swatch--color {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.55);
}
/* Sold out, but still the route to the combinations that aren't — so it keeps
   a pointer. Only --dead (sold out in every combination it appears in) is
   genuinely unclickable. */
.option-pill--oos {
  color: var(--stone);
  border-color: var(--linen);
  background: var(--foam);
}
.option-pill--dead {
  cursor: not-allowed;
  opacity: 0.55;
}
.option-pill--oos.option-pill--selected {
  background: var(--foam);
  color: var(--stone);
  border-color: var(--stone);
}

/* Options prompt and highlight (sticky ATC gate) */
.options-prompt {
  margin-top: 10px;
  padding: 9px 14px;
  background: var(--foam);
  border: 1px solid var(--copper);
  border-radius: var(--radius-sm);
  color: var(--espresso);
  font-size: 13px;
  text-align: center;
}
.options-highlight {
  animation: optionsFlash 1.6s ease-out forwards;
}

/* Flexible bundle («حزمة مرنة»). The picking UI is Zid's own widget mounted in
   #bundle_widget; we only frame it and dim the add buttons until every group
   is filled (same 0.45 the options product uses for its choose-options
   button, so one incomplete state reads the same on both product kinds). */
.kit-builder { margin-block: 18px 6px; }
.kit-builder .zid-kit-bundle-selection { font-family: var(--font-body); }
.btn.is-incomplete { opacity: 0.45; }
/* Card CTA for a bundle: no Quick Buy (the platform refuses an add without
   the widget's payload), so the footer carries a quiet text link instead. */
.product-kit-cta {
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--copper);
  text-decoration: none;
  padding: 10px 2px;
}
.product-kit-cta:hover, .product-kit-cta:focus-visible { text-decoration: underline; }
/* Cart drawer: a bundle line lists what was picked. Names only - that is all
   the cart payload carries for sub-items (verified 2026-09-21). */
.cart-drawer-subitems {
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
  color: var(--stone);
  font-size: 12.5px;
  line-height: 1.5;
}
.cart-drawer-subitems li::before { content: '\2022\00a0'; }

/* ════════════════════════════════════════════════════════════
   KIT BUILDER — the flexible-bundle product page (IB-008, MOTION-LANGUAGE §16)
   Every colour, radius, shadow, font and timing is an existing token; the
   buttons, pills, swatches, prices, badge, error, sheet and lightbox are the
   theme's own classes. Breakpoint 768/769 = the sticky bar's and the sheet's.
════════════════════════════════════════════════════════════ */
.kit-page { padding-block: 32px 40px; }

/* Title block: h1 + price + compatibility badge (the badge reuses .stock.in) */
.kit-head { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.kit-head h1 { margin: 0; font-size: clamp(24px, 4vw, 34px); line-height: 1.2; } /* = .product-info h1 */
.kit-head .price-row { border-top: 0; padding-top: 0; margin-top: 0; }
.kit-head .price { font-size: 32px; } /* = .product-info .price */
.kit-head .kit-sub { color: var(--stone); font-size: 14px; margin: 0; }
.kit-head .kit-badges { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }

/* Numbers: lining + tabular everywhere in the builder so columns align */
.kit-num, .kit-invoice .price, .kit-invoice .price-old, .kit-row-price, .kit-count { font-variant-numeric: lining-nums tabular-nums; font-family: var(--font-numeric); }
.kit-page .nb, .kit-sheet .nb { white-space: nowrap; }
.kit-ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }
.kit-page .cur, .kit-sheet .cur, .sticky-atc .cur { font-size: .72em; opacity: .75; margin-inline-start: 3px; }

/* Layout */
.kit-layout { display: grid; grid-template-columns: minmax(0,1fr) 340px; gap: 24px; align-items: start; }
.kit-layout > * { min-width: 0; }

/* Steps: six always-visible, tappable cells. Photo when done, icon when pending.
   No horizontal scroll (IB-005 unresolved): a 6-col grid, 3×2 on phones. */
.kit-steps { display: grid; grid-template-columns: repeat(6, minmax(0,1fr)); gap: 8px; margin-bottom: 18px; }
.kit-step {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 10px 6px 8px; border-radius: var(--radius-md);
  background: var(--white); border: 1.5px solid var(--linen); color: var(--stone);
  cursor: pointer; font-family: var(--font-body); text-align: center;
  transition: border-color var(--t-fast), background var(--t-fast), color var(--t-fast), transform var(--t-fast);
  -webkit-tap-highlight-color: transparent; outline: none;
}
.kit-step:focus-visible { outline: 2px solid var(--copper); outline-offset: 2px; }
.kit-step:active, .kit-step.is-pressed { transform: scale(0.92); transition-duration: 80ms; }
.kit-step .thumb { width: 44px; height: 44px; border-radius: 50%; background: var(--foam-mid); display: grid; place-items: center; overflow: hidden; }
.kit-step .thumb svg { width: 20px; height: 20px; }
.kit-step .thumb img { width: 100%; height: 100%; object-fit: contain; padding: 4px; mix-blend-mode: multiply; }
.kit-step .lbl { font-size: 12.5px; font-weight: 700; color: var(--espresso); line-height: 1.25; }
.kit-step .sub { font-size: 11px; color: var(--stone); line-height: 1.25; white-space: nowrap; }
.kit-step .txt { display: contents; }
.kit-step.is-done { border-color: var(--mint); }
.kit-step.is-done .thumb { background: var(--mint-soft); }
.kit-step.is-done .sub { color: var(--mint); }
.kit-step.is-current { border-color: var(--espresso); background: var(--foam-mid); }

/* Stage */
.kit-stage-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.kit-stage-head h2 { margin: 0; font-size: 22px; }
.kit-count { color: var(--stone); font-size: 14px; }
.kit-help { color: var(--stone); font-size: 14px; margin: 0 0 14px; }
.kit-help[hidden] { display: none; }

/* Cards: the product-card language (white, radius-lg, shadow-sm).
   chosen (item picked, values pending) = espresso border; in kit = mint + check */
.kit-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.kit-card {
  position: relative; background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
  border: 1.5px solid transparent; padding: 14px; display: flex; flex-direction: column; gap: 10px;
  cursor: pointer; outline: none; -webkit-tap-highlight-color: transparent;
  transition: border-color var(--t-fast), box-shadow var(--t-base), transform var(--t-fast);
}
.kit-card:focus-visible { outline: 2px solid var(--copper); outline-offset: 2px; }
.kit-card:active, .kit-card.is-pressed { transform: scale(0.98); transition-duration: 80ms; }
.kit-card.is-chosen { border-color: var(--espresso); }
.kit-card.is-selected { border-color: var(--mint); }
.kit-card.is-oos { opacity: .55; cursor: not-allowed; }
.kit-card .kit-check { position: absolute; top: 12px; inset-inline-start: 12px; width: 26px; height: 26px; border-radius: 50%; background: var(--mint); color: var(--white); display: none; place-items: center; }
.kit-card.is-selected .kit-check { display: grid; }
.kit-card .kit-check svg { width: 14px; height: 14px; }
.kit-photo { display: block; width: 100%; aspect-ratio: 1; border-radius: var(--radius-md); background: var(--foam-mid); border: 0; padding: 0; cursor: zoom-in; overflow: hidden; outline: none; -webkit-tap-highlight-color: transparent; }
.kit-photo:focus-visible { outline: 2px solid var(--copper); outline-offset: 2px; }
.kit-photo img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.kit-photo img.img-placeholder { padding: 28%; opacity: .5; }
.kit-card .kit-name { font-weight: 700; font-size: 15px; line-height: 1.4; margin: 0; }
.kit-card .price-row { margin-top: 0; padding-top: 0; border-top: 0; }
.kit-card .option-pills { margin: 0; }
.kit-card .kit-opt-label { font-size: 12px; color: var(--stone); margin: 0 0 4px; }
.kit-card .kit-state { font-size: 12.5px; font-weight: 700; margin-top: auto; min-height: 18px; color: var(--stone); }
.kit-card.is-chosen .kit-state { color: var(--espresso); }
.kit-card.is-selected .kit-state { color: var(--mint); }

.kit-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 18px; }
.btn[hidden] { display: none; }
#kit-error-host:empty { display: none; }
#kit-error-host { margin: 0 0 14px; }

/* Invoice (desktop aside; phones: inside the sheet) */
.kit-invoice { position: sticky; top: 20px; background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); padding: 18px; }
.kit-invoice h3 { margin: 0 0 10px; font-size: 16px; display: flex; justify-content: space-between; align-items: baseline; }
.kit-invoice .kit-done { margin-bottom: 10px; }
.kit-invoice .kit-done[hidden] { display: none; }
.kit-rows { list-style: none; margin: 0; padding: 0; }
.kit-rows li { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px solid rgba(45,28,28,.07); font-size: 13px; }
.kit-rows li.is-empty { color: var(--stone-light); }
.kit-rows .kit-row-name { min-width: 0; }
.kit-rows .kit-row-name small { display: block; color: var(--stone); font-size: 11.5px; }
.kit-row-price { flex-shrink: 0; }
.kit-totals { margin-top: 12px; }
.kit-totals .row { display: flex; justify-content: space-between; align-items: baseline; padding: 4px 0; font-size: 13px; color: var(--stone); }
.kit-totals .row.kit-price-row .price { font-size: 28px; }
.kit-save { margin-top: 8px; }
.kit-save .stock { width: 100%; justify-content: center; font-size: 14px; padding: 9px 13px; background: var(--mint-soft); }
.kit-cta { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.kit-cta #out-of-stock-actions { text-align: center; }
/* The error is the product page's own #atc-inline-error; here it carries two
   lines (message, then "remaining: …") and the jump link. */
.kit-page #atc-inline-error, .kit-sheet #atc-inline-error { margin-top: 10px; flex-wrap: wrap; }
.kit-page #atc-inline-error .atc-error-text, .kit-sheet #atc-inline-error .atc-error-text { flex-basis: 100%; }
.kit-err-l1, .kit-err-l2 { display: block; }
.kit-err-l2 { unicode-bidi: plaintext; }
.atc-error-jump { background: none; border: 0; padding: 0; color: #b91c1c; font-family: var(--font-body); font-weight: 700; font-size: 14px; text-decoration: underline; cursor: pointer; }
.kit-desc { margin-top: 28px; max-width: 760px; }

/* Fallback (selection-groups fetch failed): the platform widget picks, the
   invoice keeps only the buttons. */
.kit-page.is-fallback .kit-stage, .kit-page.is-fallback .kit-rows, .kit-page.is-fallback .kit-totals,
.kit-page.is-fallback .kit-save, .kit-page.is-fallback .kit-invoice h3 { display: none; }
.kit-page.is-fallback .kit-layout { grid-template-columns: minmax(0, 1fr); }
.kit-page.is-fallback .kit-invoice { display: block; position: static; }
.kit-page.is-fallback #kit-vitrin-fallback { margin-block: 0 18px; }

/* Sheet entry and the sheet itself exist only on phones */
.kit-sheet-open { display: none; }
.kit-sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 18px 8px; }
.kit-sheet-title { font-family: var(--font-head); font-size: 15px; font-weight: 700; }
.kit-sheet-head .qb-close { width: 44px; height: 44px; font-size: 20px; }
.kit-sheet-body .kit-invoice h3 { display: none; }
@media (max-width: 900px) {
  .kit-layout { grid-template-columns: minmax(0,1fr); }
  .kit-invoice { position: static; }
}
@media (max-width: 768px) {
  .kit-page { padding-top: 14px; padding-bottom: 96px; }
  .kit-invoice { display: none; }
  .kit-steps { grid-template-columns: repeat(3, minmax(0,1fr)); gap: 6px; margin-bottom: 12px; }
  .kit-step { padding: 6px 4px 6px; gap: 3px; flex-direction: row; justify-content: flex-start; text-align: start; }
  .kit-step .thumb { width: 34px; height: 34px; flex: 0 0 34px; }
  .kit-step .thumb svg { width: 16px; height: 16px; }
  .kit-step .txt { min-width: 0; display: flex; flex-direction: column; }
  .kit-step .lbl { font-size: 11.5px; }
  .kit-step .sub { font-size: 10px; white-space: normal; line-height: 1.2; overflow-wrap: anywhere; }
  .kit-head { gap: 4px; margin-bottom: 12px; }
  .kit-head h1 { font-size: 22px; }
  .kit-head .price { font-size: 22px; }
  .kit-head .kit-sub { display: none; }
  .kit-head .kit-badges { margin-top: 2px; }
  .kit-head .kit-badges .stock { font-size: 11.5px; padding: 4px 10px; }
  .kit-stage-head h2 { font-size: 18px; }
  .kit-help { font-size: 13px; margin-bottom: 10px; }
  .kit-cards { grid-template-columns: minmax(0,1fr); }
  .kit-card { flex-direction: row; flex-wrap: wrap; align-items: flex-start; padding: 12px; }
  .kit-card .kit-photo { width: 128px; height: 128px; aspect-ratio: auto; flex: 0 0 128px; }
  .kit-card .kit-body { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
  .kit-card .kit-check { top: 8px; inset-inline-start: 8px; }
  /* Sticky bar: progress + review link in the info column */
  /* The kit price is not a sale price: same espresso as the page price, not the copper the bar uses for sales. */
  .sticky-atc--kit .sticky-price-sale { color: var(--espresso); }
  .sticky-atc #kit-mcount { font-size: 12px; }
  .sticky-atc .kit-mdone { color: var(--mint); font-weight: 700; }
  .sticky-atc .kit-sheet-open { display: inline; background: none; border: 0; padding: 0; color: var(--mint); font-weight: 700; font-size: 12.5px; font-family: var(--font-body); text-align: start; cursor: pointer; }
  .kit-page.is-fallback ~ .sticky-atc .kit-sheet-open { display: none; }
  /* Sheet body: the invoice moves in here as-is */
  .kit-sheet-body { padding: 4px 18px 22px; }
  .kit-sheet-body .kit-invoice { display: block; position: static; box-shadow: none; padding: 0; background: transparent; }
}
@keyframes optionsFlash {
  0%   { box-shadow: 0 0 0 0 rgba(181, 98, 42, 0); }
  25%  { box-shadow: 0 0 0 5px rgba(181, 98, 42, 0.22); }
  75%  { box-shadow: 0 0 0 5px rgba(181, 98, 42, 0.22); }
  100% { box-shadow: 0 0 0 0 rgba(181, 98, 42, 0); }
}

.qty-row { display: flex; gap: 14px; align-items: center; margin-block: 20px; }
.qty-control {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid var(--linen);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.qty-control button {
  width: 40px; height: 44px;
  border: 0;
  background: var(--foam-mid);
  font-size: 20px;
  cursor: pointer;
  color: var(--espresso);
  transition: background var(--t-fast), transform var(--t-fast);
}
.qty-control button:hover { background: var(--foam-dark); }
.qty-control button:focus-visible {
  outline: 2px solid var(--copper);
  outline-offset: 2px;
}
.qty-control button:active:not(:disabled),
.qty-control-btn.is-pressed:not(:disabled) { background: var(--copper); color: #fff; transform: scale(0.92); transition-duration: 80ms; }
/* Matches the cart page's identical .qty-btn:disabled treatment — same
   control, same role, same disabled signal, on a different surface. */
.qty-control button:disabled { color: var(--stone-light); cursor: default; }
.qty-control input {
  width: 52px; height: 44px;
  border: 0;
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  background: var(--white);
  color: var(--ink);
}
/* The field is typed into now, not just read, so it needs to say where focus
   is. Inset so the ring stays inside the control's own border instead of
   drawing over the − and + that sit flush against it. */
.qty-control input:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: -2px;
  border-radius: 2px;
}

/* ===== 19. CART ===== */
.cart-wrap {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 28px;
  padding-block: 48px 32px;
  align-items: start;
}
.cart-items {
  background: var(--white);
  border: 1px solid var(--linen);
  border-radius: var(--radius-lg);
  padding: 0 20px;
}
.cart-item {
  display: grid;
  grid-template-columns: 88px 1fr auto;
  gap: 16px;
  padding-block: 20px;
  border-bottom: 1px solid var(--linen);
  align-items: center;
}
.cart-item:last-child { border-bottom: 0; }
.cart-item img {
  width: 88px; height: 88px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: var(--foam-mid);
}
.cart-item-name { font-weight: 700; color: var(--espresso); font-size: 15px; }
.cart-item-price {
  font-family: var(--font-numeric);
  font-weight: 700;
  font-size: 16px;
  color: var(--copper);
}
.cart-summary {
  background: var(--foam-mid);
  border: 1px solid var(--foam-dark);
  border-radius: var(--radius-lg);
  padding: 24px 24px 26px;
  position: sticky;
  top: 88px;
  box-shadow: 0 2px 10px rgba(45,28,28,.06);
}
.cart-summary h3 {
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(45,28,28,.10);
  font-size: 18px;
  color: var(--espresso);
}
.totals { list-style: none; margin-bottom: 2px; transition: opacity var(--t-base); }
/* Ambient Status (Level B): dimmed while a quantity or coupon change is in
   flight and the shown numbers may not match what's about to be true.
   Reuses the same .4 opacity already used for temporarily-unavailable
   controls (.pagination .is-disabled) rather than inventing a new value. */
.totals.is-stale { opacity: .4; }
.totals li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-block: 9px;
  font-size: 14px;
  color: var(--stone);
}
.totals li span:last-child {
  font-family: var(--font-numeric);
  font-weight: 600;
  color: var(--espresso);
  display: inline-flex;
  align-items: center;
  direction: ltr;
  gap: 5px;
}
.totals li.total-row {
  margin-top: 14px;
  padding-top: 18px;
  border-top: 1.5px solid rgba(45,28,28,.10);
  font-size: 22px;
  color: var(--espresso);
}
.totals li.total-row span:last-child {
  font-family: var(--font-numeric);
  font-weight: 700;
  color: var(--copper);
  gap: 6px;
}
/* Coupon row — connected input+button control */
.coupon-row {
  display: flex;
  gap: 0;
  margin: 18px 0 14px;
}
.coupon-row input {
  flex: 1;
  min-width: 0;
  padding: 10px 13px;
  border: 1.5px solid rgba(45,28,28,.12);
  /* Rounded on the OUTER edge, square on the join, in both directions.
     PHYSICAL values driven off [dir] on purpose. Logical radii were tried
     here and were wrong: they resolve against the ELEMENT's own direction,
     and cart.jinja sets dir on this input directly, so the input resolved
     RTL while the button beside it resolved LTR - both ended up rounded on
     the facing edges and the join looked worse than before the fix.
     [dir] on an ancestor cannot be overridden by the input's own attribute,
     so the pair below is stable whatever cart.jinja does to it. */
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  border-inline-end: none;                              /* remove join edge */
  background: var(--foam);
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--ink);
  letter-spacing: 0.04em;
  transition: border-color var(--t-fast), background var(--t-fast);
}
[dir=rtl] .coupon-row input { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
[dir=rtl] .coupon-row .btn { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.coupon-row input:focus {
  outline: none;
  border-color: var(--copper);
  background: var(--white);
  position: relative;
  z-index: 1;
}
/* Coupon apply button — part of the connected control, clearly secondary.
   min-width is sized to its longest label ("تم التطبيق", measured 90px live) —
   without it the button (and the connected input beside it, which is flex:1)
   visibly resize across تطبيق → ... → تم التطبيق, a real measured layout
   shift (67px → 41px → 90px) live-verified 2026-07-04, not a guess. */
.coupon-row .btn {
  padding: 10px 15px;
  min-width: 96px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--stone);
  background: var(--foam-dark);
  border: 1.5px solid rgba(45,28,28,.12);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  border-inline-start: none;                            /* remove join edge */
  white-space: nowrap;
  flex-shrink: 0;
  transition: color var(--t-fast), background var(--t-fast), border-color var(--t-fast);
}
@media (hover: hover) {
  .coupon-row .btn:hover:not(:disabled) { color: var(--copper); border-color: var(--copper); background: var(--foam-mid); }
}
/* Matches .qb-actions .btn:disabled — same role (a CTA button currently
   blocked/in-flight), no reason found for the two to differ. The
   confirmed/applied sub-case below is a separate, deliberate override and
   takes precedence regardless of this base value. */
.coupon-row .btn:disabled { opacity: 0.45; cursor: not-allowed; }
/* Applied-coupon confirmed state — calm tick colour, not greyed-out */
#coupon-btn:disabled[aria-label] {
  opacity: 1;
  color: var(--copper);
  border-color: rgba(139,90,43,.35);
  background: rgba(139,90,43,.06);
  cursor: default;
}
/* Checkout CTA — sized via class, not inline style */
.btn-checkout { padding: 16px; font-size: 17px; }
/* Continue-shopping — demoted to a quiet text link */
.cart-continue {
  display: block;
  text-align: center;
  margin-top: 14px;
  font-size: 13px;
  color: var(--stone);
  text-decoration: none;
  transition: color var(--t-fast);
}
.cart-continue:hover { color: var(--copper); }
.cart-continue:active { color: var(--copper); opacity: 0.75; }
/* Coupon status — quiet inline row, not an alert card */
.coupon-status {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 8px;
  margin-bottom: 18px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-family: var(--font-body);
  line-height: 1.4;
}
.coupon-status--success {
  background: transparent;
  border: 1px dashed rgba(45,28,28,.14);
}
.coupon-status--error {
  background: rgba(192,98,79,.06);
  border: 1px solid rgba(192,98,79,.22);
}
/* Expiry is not a failure - the customer did nothing wrong and the coupon is
   still valid to re-enter. It reads in the muted register of the applied
   state (same dashed hairline), not the error one. */
.coupon-status--expired {
  background: transparent;
  border: 1px dashed rgba(45,28,28,.14);
}
.coupon-status--expired .coupon-status__icon { color: var(--stone); }
/* Success/error status appears via a quiet fade+settle rather than an
   instant innerHTML pop-in — no new keyframe needed, a plain transition on
   entrance is enough for a small inline row (unlike qty-bump/optionsFlash,
   which exist for a value that changes in place, not an element that's
   freshly inserted). Runs on every appearance (success or error alike) since
   both are "a message just arrived" moments, not distinct in register. */
@media (prefers-reduced-motion: no-preference) {
  .coupon-status { animation: coupon-status-in var(--t-base) both; }
}
@keyframes coupon-status-in {
  from { opacity: 0; transform: translateY(-3px); }
  to   { opacity: 1; transform: translateY(0); }
}
.coupon-status__icon {
  font-size: 10px;
  flex-shrink: 0;
  line-height: 1;
  opacity: 0.75;
}
.coupon-status--success .coupon-status__icon { color: var(--copper); }
.coupon-status--error   .coupon-status__icon { color: #b94040; }
.coupon-status__text {
  flex: 1;
  color: var(--stone);
  font-size: 12px;
}
.coupon-status--error .coupon-status__text { color: #7a2a2a; }
/* Coupon chip — [tag icon] code × — always LTR internally, quiet by default */
.coupon-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  direction: ltr;
  font-family: 'Courier New', monospace;
  font-size: 9.5px;
  font-weight: 600;
  color: var(--stone);
  background: rgba(45,28,28,.04);
  border: 1px solid rgba(45,28,28,.13);
  border-radius: 20px;
  padding: 2px 4px 2px 6px;
  flex-shrink: 0;
  line-height: 1;
  transition: border-color var(--t-fast);
}
.coupon-chip__icon {
  display: block;
  flex-shrink: 0;
  opacity: 0.55;
}
.coupon-chip__code {
  display: inline;
  opacity: 1;
  color: var(--espresso);
}
.coupon-chip__remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 13px;
  height: 13px;
  padding: 0;
  margin: 0;
  background: none;
  border: none;
  color: var(--stone);
  opacity: 0.7;
  cursor: pointer;
  transition: opacity var(--t-fast), color var(--t-fast);
  flex-shrink: 0;
}
@media (hover: hover) {
  .coupon-chip:has(.coupon-chip__remove:hover) { border-color: rgba(139,90,43,.3); }
  .coupon-chip__remove:hover:not(:disabled) { opacity: 1; color: #b94040; }
}
.coupon-chip__remove:active:not(:disabled),
.coupon-chip__remove.is-pressed:not(:disabled) { opacity: 1; color: #b94040; transform: scale(0.85); transition-duration: 80ms; }
.coupon-chip__remove:disabled { opacity: 0.25; cursor: default; }

/* Same small-dismiss-control language as .coupon-chip__remove, sized for a
   standalone control rather than nested in a chip (IB-002). */
.atc-error-dismiss {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  padding: 0;
  background: none;
  border: none;
  color: inherit;
  opacity: 0.7;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  flex-shrink: 0;
  transition: opacity var(--t-fast), transform var(--t-fast);
}
@media (hover: hover) {
  .atc-error-dismiss:hover { opacity: 1; }
}
.atc-error-dismiss:active,
.atc-error-dismiss.is-pressed { opacity: 1; transform: scale(0.92); transition-duration: 80ms; }
/* legacy standalone code span — kept as fallback, hidden when chip is used */
.coupon-status__code {
  font-family: 'Courier New', monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.09em;
  color: var(--copper);
  background: var(--foam-mid);
  border: 1px solid rgba(45,28,28,.12);
  border-radius: 20px;
  padding: 2px 8px;
  flex-shrink: 0;
}
.empty-state { text-align: center; padding: 80px 20px; }
.empty-state svg { margin: 0 auto 16px; opacity: .3; }
/* ── No-results empty state — editorial, no card frame ── */
.empty-state--results {
  padding: 36px 24px 0;
  text-align: center;
}
.empty-results-title {
  font-family: var(--font-head);
  font-size: clamp(22px, 4.5vw, 28px);
  font-weight: 600;
  color: var(--espresso);
  line-height: 1.45;
  margin: 0 0 14px;
  letter-spacing: 0;
}
.empty-results-body {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 400;
  color: var(--stone);
  line-height: 1.85;
  max-width: 340px;
  margin: 0 auto 0;
}
.empty-results-fallback-cta {
  margin-top: 20px;
}
/* Converter card: a grinder or grind-guide query is answered by the
   grinder converter page, not a product. */
.grind-guide-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 420px;
  margin: 20px auto 0;
  padding: 14px 18px;
  border-radius: 14px;
  background: var(--mint-soft);
  border: 1px solid var(--mint);
  color: var(--espresso);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.6;
  text-align: start;
  text-decoration: none;
}
.grind-guide-card:hover { background: #e2ece4; }
.grind-guide-card:focus-visible { outline: 2px solid var(--copper); outline-offset: 2px; }
.grind-guide-card__go { color: var(--copper); flex-shrink: 0; display: inline-flex; }
.grind-guide-card + .empty-results-fallback-cta { margin-top: 14px; }
/* ── Recommendations section — connected continuation ── */
#fallback-rec-section {
  margin-top: 28px;
  padding-top: 28px;
  border-top: 1px solid var(--linen);
  padding-bottom: 32px;
  scroll-margin-top: 80px;
}
.fallback-rec-title {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--stone);
  text-align: center;
  margin: 0 0 20px;
}
.fallback-rec-cta {
  text-align: center;
  margin-top: 28px;
}
.empty-state--cart {
  padding: 48px 16px 80px;
}
.empty-cart-card {
  max-width: 480px;
  margin: 0 auto;
  background: var(--foam);
  border: 1px solid var(--linen);
  border-radius: 16px;
  padding: 52px 40px 48px;
  text-align: center;
}
.empty-cart-icon {
  color: var(--copper);
  margin: 0 auto 28px;
  line-height: 1;
}
.empty-cart-icon svg { display: block; margin: 0 auto; }
.empty-state__title {
  font-family: var(--font-body);
  font-size: clamp(22px, 5vw, 26px);
  font-weight: 700;
  color: var(--espresso);
  margin: 0 0 14px;
}
.empty-state__body {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--stone);
  line-height: 1.85;
  margin: 0 auto 36px;
  max-width: 300px;
}
.empty-state__cta {
  padding: 14px 40px;
  font-size: 15px;
}
@media (max-width: 480px) {
  .empty-cart-card { padding: 40px 24px 36px; }
}

/* ===== 404 page ===== */
.not-found-wrap {
  max-width: 520px;
  margin: 0 auto;
  padding: clamp(64px, 10vw, 120px) 24px clamp(80px, 12vw, 140px);
  text-align: center;
}
.not-found-code {
  display: block;
  font-family: var(--font-head);
  font-size: clamp(48px, 10vw, 72px);
  font-weight: 700;
  color: var(--linen);
  line-height: 1;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}
.not-found-title {
  font-family: var(--font-head);
  font-size: clamp(22px, 4.5vw, 28px);
  font-weight: 600;
  color: var(--espresso);
  line-height: 1.45;
  margin: 0 0 16px;
}
.not-found-body {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 400;
  color: var(--stone);
  line-height: 1.85;
  margin: 0 0 32px;
}
.not-found-cta { display: inline-flex; }

/* ===== CMS page (page.jinja) =====
   Content is merchant-authored HTML from the dashboard, so this styles
   descendants generically rather than a known structure. Measure is capped
   for readability — legal/policy copy is the primary use. */
.page-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(48px, 8vw, 88px) 0 clamp(64px, 10vw, 112px);
}
.page-title {
  font-family: var(--font-head);
  font-size: clamp(24px, 5vw, 34px);
  font-weight: 600;
  color: var(--espresso);
  line-height: 1.4;
  margin: 0 0 clamp(24px, 4vw, 40px);
}
.page-content {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 400;
  color: var(--stone);
  line-height: 1.9;
}
/* Slate nests everything under a single `.slate-editor` wrapper, so the
   first/last-child reset has to reach inside it too or it only ever trims
   that wrapper. */
.page-content > :first-child,
.page-content .slate-editor > :first-child { margin-top: 0 !important; }
.page-content > :last-child,
.page-content .slate-editor > :last-child { margin-bottom: 0 !important; }
/* Zid stores page content as its editor's own serialized markup, not clean
   HTML: paragraphs arrive as `div.slate-p`, never `<p>`, so tag selectors
   alone match almost nothing. Every selector below is paired with its
   `.slate-*` equivalent. Verified live on /pages/privacy-policy: slate-p,
   slate-ul, slate-li, slate-lic, slate-bold, slate-underline, slate-a,
   slate-align-right. Heading classes follow the same convention but that
   page has no headings, so `.slate-h*` is covered defensively alongside the
   real tags. */
.page-content h2,
.page-content h3,
.page-content h4,
.page-content .slate-h2,
.page-content .slate-h3,
.page-content .slate-h4 {
  font-family: var(--font-head);
  font-weight: 600;
  color: var(--espresso);
  line-height: 1.5;
  margin: 2em 0 0.75em !important;
}
.page-content h2, .page-content .slate-h2 { font-size: 19px; }
.page-content h3, .page-content .slate-h3 { font-size: 17px; }
.page-content h4, .page-content .slate-h4 { font-size: 15px; }

/* The editor writes `style="position:relative;margin:6px 0"` onto each block.
   An inline style beats any stylesheet rule regardless of specificity, so
   restoring our vertical rhythm needs !important — the one place in this file
   where it's the mechanism rather than a shortcut. */
.page-content p,
.page-content .slate-p { margin: 0 0 1.25em !important; }

.page-content ul,
.page-content ol,
.page-content .slate-ul,
.page-content .slate-ol { margin: 0 0 1.25em !important; padding-inline-start: 1.5em; }
.page-content li,
.page-content .slate-li { margin-bottom: 0.5em; }
/* Slate wraps each list item's text in an inner `.slate-lic` block that would
   otherwise inherit the paragraph margin and double the list's spacing. */
.page-content .slate-lic { margin: 0 !important; }

.page-content .slate-bold { font-weight: 700; color: var(--espresso); }
.page-content .slate-underline { text-decoration: underline; text-underline-offset: 3px; }
/* Deliberately not styled: `.slate-align-right`, and any inline font-size the
   editor writes onto a run. Both are the merchant's own formatting choices
   made in the dashboard — the theme sets the page's defaults and leaves
   author intent alone. */
.page-content a {
  color: var(--espresso);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.page-content img { max-width: 100%; height: auto; }
.page-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.25em;
}
.page-content th,
.page-content td {
  border: 1px solid var(--linen);
  padding: 10px 12px;
  text-align: start;
}

/* ===== Cart line items — Zid platform markup (vitrin:cart/products_list.jinja) =====
   REAL per-item structure (direct children of .cart-product-row):
     .cart-product-delete   → remove link (a[onclick=cartProductRemove])
     .cart-product-col-img  → image (a.cart-product-image-link > img.cart-product-image)
     .cart-product-col-details → .product-title-row > h1 > a  (product name)
     .cart-products-action  → .cart-product-quantity-dropdown > div > select
     .cart-product-prices   → .totals > .cart-product-total-price (+ .cart-product-price-each.d-none)
   NOTE: the name link ALSO carries .cart-product-image-link, so image-link
   styling must be scoped to .cart-product-col-img. */

.cart-items { background: transparent; border: 0; border-radius: 0; padding: 0; }
.section-cart-products-row { display: none; }   /* hide platform column header if present */

/* Item card: image one side, name → price → quantity stacked beside it;
   remove is a corner trash button (absolutely positioned). */
.cart-product-row {
  position: relative;
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr);
  grid-template-areas:
    "img name"
    "img price"
    "img qty";
  column-gap: 14px;
  row-gap: 4px;
  align-items: center;
  padding: 10px 12px;
  background: var(--white);
  border: 1px solid var(--linen);
  border-radius: var(--radius-md);
  margin-bottom: 10px;
  transition: box-shadow var(--t-base), border-color var(--t-base), background-color 220ms ease;
}
.cart-product-row:last-child { margin-bottom: 0; }
.cart-product-row:hover { box-shadow: var(--shadow-sm); border-color: var(--foam-dark); }

/* Image */
.cart-product-col-img { grid-area: img; align-self: center; }
.cart-product-col-img .cart-product-image-link { display: block; line-height: 0; }
img.cart-product-image {
  width: 80px; height: 80px;
  object-fit: cover;
  border-radius: var(--radius-md);
  background: var(--foam-mid);
  display: block;
}

/* Product name — neutralise the platform <h1> size */
.cart-product-col-details { grid-area: name; min-width: 0; align-self: center; padding-inline-end: 32px; }
.cart-product-col-details .product-title-row { margin: 0; }
.cart-product-col-details h1 { margin: 0; font-size: 14.5px; line-height: 1.3; }
.cart-product-col-details h1 a {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 14.5px;
  line-height: 1.3;
  color: var(--espresso);
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.cart-product-col-details h1 a:hover { color: var(--copper); }
.cart-product-col-details h1 a:active { color: var(--copper); opacity: 0.75; }

/* Total price */
.cart-product-prices { grid-area: price; align-self: center; min-width: 0; }
.cart-product-prices .totals { display: block; margin: 0; }
.cart-product-prices .cart-product-total-price {
  font-family: var(--font-numeric);
  font-weight: 700;
  font-size: 17px;
  color: var(--copper);
  display: inline-flex;
  align-items: center;
  direction: rtl;
  gap: 5px;
}
.cart-product-prices .cart-product-total-price .riyal-svg { width: 14px; height: 16px; }
/* Old/before price in cart items */
.cart-product-prices .cart-product-total-before-price {
  font-family: var(--font-numeric);
  font-weight: 300;
  font-size: 12px;
  color: var(--stone-light);
  display: inline-flex;
  align-items: center;
  direction: rtl;
  gap: 4px;
}
.cart-product-prices .cart-product-total-before-price .riyal-svg { width: 11px; height: 13px; opacity: 0.7; }
.cart-product-prices .prefix,
.cart-product-prices .postfix { display: none; }
/* Unit price — subtle secondary line beneath the total (overrides platform .d-none) */
.cart-product-prices .cart-product-price-each {
  display: flex !important;
  align-items: baseline;
  gap: 4px;
  margin-top: 1px;
  font-family: var(--font-numeric);
  font-size: 11.5px;
  font-weight: 400;
  color: var(--stone);
}
.cart-product-prices .cart-product-price-each .prefix,
.cart-product-prices .cart-product-price-each .postfix { display: none; }
.cart-product-prices .cart-product-price-each .riyal-svg { width: 11px; height: 13px; }

/* Quantity — native select hidden (kept in DOM, driven by the JS stepper) */
.cart-products-action { grid-area: qty; justify-self: start; align-self: center; }
.cart-product-quantity-dropdown.form-group { margin: 0; }
.cart-product-quantity-dropdown select { display: none; }

/* − / number / + stepper (built by JS in templates/cart.jinja) */
.qty-stepper {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid var(--linen);
  border-radius: var(--radius-pill);
  background: var(--foam);
  overflow: hidden;
  transition: border-color 200ms ease, box-shadow 200ms ease;
}
/* Subtle control-only highlight when quantity updates (no row background change) */
@media (prefers-reduced-motion: no-preference) {
  .qty-stepper.qty-flash {
    border-color: var(--copper);
    box-shadow: 0 0 0 3px rgba(181, 98, 42, .12);
  }
}
.qty-btn {
  width: 28px; height: 28px;
  border: 0;
  background: transparent;
  color: var(--espresso);
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background var(--t-fast), color var(--t-fast), transform var(--t-fast);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  outline: none;
}
/* Hover fill only on real pointer devices — prevents the sticky "pressed"
   look on touch where :hover persists after a tap. */
@media (hover: hover) {
  .qty-btn:hover:not(:disabled) { background: var(--copper); color: #fff; }
}
.qty-btn:focus-visible {
  outline: 2px solid var(--copper);
  outline-offset: 2px;
}
/* Immediate, self-releasing feedback for touch — same scale+timing as the
   product page / Quick Buy modal stepper (.qty-control button), so both
   quantity steppers on the site feel identical, not just visually similar. */
.qty-btn:active:not(:disabled),
.qty-btn.is-pressed:not(:disabled) { background: var(--copper); color: #fff; transform: scale(0.92); transition-duration: 80ms; }
.qty-btn:disabled { color: var(--stone-light); cursor: default; }
/* IB-006 rollback message — absolutely positioned so it never shifts
   surrounding layout (no CLS); the dropdown container becomes the
   positioning context. */
.cart-product-quantity-dropdown { position: relative; }
.qty-error {
  position: absolute;
  top: 100%;
  inset-inline-start: 0;
  margin-top: 4px;
  font-size: 12px;
  color: var(--danger);
  /* The per-order-limit message is a full sentence, not a two-word rollback
     notice, so it wraps instead of running off the row. Still absolutely
     positioned, so a two-line message costs no layout shift. */
  width: max-content;
  max-width: min(260px, 60vw);
  line-height: 1.4;
}
.qty-value {
  display: inline-block;
  min-width: 30px;
  text-align: center;
  font-family: var(--font-accent);
  font-weight: 700;
  font-size: 14px;
  color: var(--espresso);
  /* It became a real <input>; strip the UA chrome so it still reads as the
     stepper's number rather than a field bolted between the two buttons. */
  width: 34px;
  padding: 0;
  border: 0;
  background: transparent;
  -moz-appearance: textfield;
}
.qty-value:focus-visible {
  outline: 2px solid var(--copper);
  outline-offset: -2px;
  border-radius: 2px;
}
@media (prefers-reduced-motion: no-preference) {
  @keyframes qty-bump {
    0%   { transform: scale(1); }
    45%  { transform: scale(1.18); }
    100% { transform: scale(1); }
  }
  .qty-value.qty-bump { animation: qty-bump 200ms ease; }
  /* Same treatment, applied to the product page's price when a variant
     change updates it — reused deliberately rather than a new keyframe,
     since both are "a real commerce number just changed" moments. */
  .product-info .price.price-updated { animation: qty-bump 200ms ease; }
}

/* ---- Out-of-stock line item -------------------------------------------
   Zid's products_list prints its "نفدت الكمية / احذف المنتج لإتمام عملية
   الشراء" notice loose in the list, detached from the card it describes.
   cart.jinja's applyStockGuard() moves those exact nodes in here; this is
   the surface they land on.

   It reads as part of the card, not a second card: the row itself takes the
   alert tint so the whole item is visibly the problem, and the banner is a
   quiet strip along its bottom edge — the same alert language already used
   by .flash-error, not a new one. Icon + text + tint, so colour is never the
   only carrier of the state. */
.cart-product-row.has-oos {
  grid-template-areas:
    "img name"
    "img price"
    "img qty"
    "oos oos";
  background: #fdf7f5;
  border-color: #ecc5bb;
}
.cart-product-row.has-oos:hover { border-color: #e3ad9f; }

/* The image and price of an item that cannot be bought recede — present for
   identification, no longer offered. */
.cart-product-row.has-oos img.cart-product-image { opacity: .55; }
.cart-product-row.has-oos .cart-product-prices { opacity: .6; }

.cart-oos {
  grid-area: oos;
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin-top: 8px;
  padding: 7px 9px;
  border-radius: var(--radius-sm);
  background: #f8e7e3;
  /* Not var(--danger): measured 3.85:1 on this tint, which fails WCAG AA for
     12px text. #a8402c is the same hue, darkened until it measures 5.10:1. */
  color: #a8402c;
  font-size: 12px;
  line-height: 1.45;
}
.cart-oos__icon { flex-shrink: 0; margin-top: 1px; }
/* The platform's own nodes are moved in here — they arrive with whatever
   display/margins their original context gave them, so this normalises them
   into two stacked lines regardless of what they were. */
.cart-oos__text { min-width: 0; }
.cart-oos__text > * {
  display: block;
  margin: 0;
  padding: 0;
  font-size: inherit;
  line-height: inherit;
  color: inherit;
}
.cart-oos__text > *:first-child { font-weight: 700; }
.cart-oos__text > * + * { color: #8a4335; font-weight: 400; margin-top: 1px; }

/* First-paint gap only (see cart.jinja): the platform's loose notices are
   hidden between the moment the list renders and the moment the guard moves
   them into their cards, so the raw un-owned version is never seen. Product
   cards are never affected, and the class is only ever present while JS is
   actively working — it is added by script and removed by the guard or by a
   bounded timeout. display, not visibility: the notice is about to be MOVED
   into its card, so reserving its old space would just trade a flash of wrong
   text for a flash of empty gap. */
.cart-guarding > *:not(.cart-product-row) { display: none; }

/* Same box, neutral voice: a relocated platform line that is informational
   (free shipping, points) rather than a problem. It must not read as an error,
   and it never blocks checkout — see the benign list in cart.jinja. */
.cart-note {
  grid-area: oos;
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin-top: 8px;
  padding: 7px 9px;
  border-radius: var(--radius-sm);
  background: var(--foam-mid);
  /* --stone measures 3.1:1 on --foam-mid, below AA for 12px; --espresso-mid
     is the same family and measures well past it. */
  color: var(--espresso-mid);
  font-size: 12px;
  line-height: 1.45;
}
.cart-note .cart-oos__icon { flex-shrink: 0; margin-top: 1px; }
.cart-note .cart-oos__text > *:first-child { font-weight: 600; }
.cart-note .cart-oos__text > * + * { color: inherit; }

/* Attention pulse when a blocked checkout points back at the offending item.
   Border/background only — nothing moves, so it cannot shift the list. */
@keyframes cart-oos-nudge {
  0%, 100% { box-shadow: 0 0 0 0 rgba(192, 83, 63, 0); }
  30%      { box-shadow: 0 0 0 4px rgba(192, 83, 63, .18); }
}
@media (prefers-reduced-motion: no-preference) {
  .cart-product-row.cart-oos-nudge { animation: cart-oos-nudge 900ms ease-out 2; }
}

/* Blocked checkout: still a real link (JS off, new tab, middle-click all
   still work) — this is the visible half of the guard in cart.jinja. */
.btn-checkout.is-blocked {
  opacity: .45;
  cursor: not-allowed;
  box-shadow: none;
}
.btn-checkout.is-blocked:hover { transform: none; }
.checkout-block-note {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: #a8402c;   /* var(--danger) measures 3.80:1 on the summary panel — see .cart-oos */
  text-align: center;
}

/* Remove — refined round trash-icon button in the card's far corner.
   Hides the platform's empty icon-font glyph + loading spans; draws our own
   trash via a CSS mask so hover recolours it red. */
.cart-product-delete {
  position: absolute;
  top: 10px;
  inset-inline-end: 12px;
  margin: 0;
}
.cart-product-delete a {
  width: 28px; height: 28px;
  border-radius: 50%;
  background-color: var(--foam-mid);
  color: var(--stone);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color var(--t-fast), background-color var(--t-fast), transform var(--t-fast);
}
@media (hover: hover) {
  .cart-product-delete a:hover { color: #d94f4f; background-color: rgba(217, 79, 79, .12); }
}
.cart-product-delete a:active,
.cart-product-delete a.is-pressed { color: #d94f4f; background-color: rgba(217, 79, 79, .2); transform: scale(0.92); transition-duration: 80ms; }
.cart-product-delete .icon-delete,
.cart-product-delete .prefix,
.cart-product-delete .postfix { display: none; }
.cart-product-delete a::before {
  content: "";
  width: 16px; height: 16px;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='3 6 5 6 21 6'/%3E%3Cpath d='M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2'/%3E%3Cline x1='10' y1='11' x2='10' y2='17'/%3E%3Cline x1='14' y1='11' x2='14' y2='17'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='3 6 5 6 21 6'/%3E%3Cpath d='M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2'/%3E%3Cline x1='10' y1='11' x2='10' y2='17'/%3E%3Cline x1='14' y1='11' x2='14' y2='17'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Mobile */
@media (max-width: 600px) {
  .cart-product-row {
    grid-template-columns: 72px minmax(0, 1fr);
    column-gap: 12px;
    padding: 10px;
  }
  img.cart-product-image { width: 72px; height: 72px; }
}

/* ===== 20. LISTING PAGES ===== */
.page-head {
  background: var(--foam-mid);
  padding-block: clamp(40px, 6vw, 72px);
  text-align: center;
  border-bottom: 1px solid var(--linen);
}
.page-head h1 { margin: 0; }

.breadcrumb { font-size: 13px; color: var(--stone); margin-bottom: 8px; }
.breadcrumb a { color: var(--stone); }
.breadcrumb a:hover { color: var(--copper); }
.breadcrumb a:active { color: var(--copper); opacity: 0.7; }

.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.toolbar .count { color: var(--stone); font-size: 14px; }

/* ===== 21. FEATURES SECTION ===== */
.features-section { background: var(--espresso); }
.features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--gap);
  padding-block: clamp(40px, 6vw, 64px);
}
.feature { text-align: center; }
.feature-icon {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.14);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
}
.feature-icon svg {
  width: 22px; height: 22px;
  stroke: var(--caramel);
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.feature h4 { color: var(--white); font-size: 15px; margin-bottom: 6px; }
.feature p  { color: rgba(255,255,255,.55); font-size: 14px; }

/* ===== 22. BRAND STORY ===== */
.brand-story {
  background: var(--espresso);
  color: var(--white);
  padding-block: clamp(64px, 10vw, 120px);
  position: relative;
  overflow: hidden;
}
.brand-story::before {
  content: "DROPLET";
  position: absolute;
  inset-inline-end: -20px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-accent);
  font-size: clamp(80px, 15vw, 200px);
  font-weight: 700;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255,255,255,.05);
  pointer-events: none;
  letter-spacing: -.02em;
  white-space: nowrap;
  user-select: none;
}
.brand-story-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.brand-story h2 {
  color: var(--white);
  font-size: clamp(28px, 5vw, 52px);
  margin-bottom: 20px;
  line-height: 1.15;
}
.brand-story p { color: rgba(255,255,255,.72); font-size: 17px; line-height: 1.85; }
.brand-story .eyebrow { color: var(--caramel); }
.brand-story-img {
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.1);
}
.brand-story-img img { width: 100%; height: 100%; object-fit: cover; }

/* ===== 23. PROMO CARD ===== */
.promo-card-section { padding-block: var(--section-v); }
.promo-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  padding: clamp(32px, 5vw, 60px);
  display: flex;
  align-items: center;
  gap: 40px;
  min-height: 240px;
  box-shadow: var(--shadow-md);
}
/* «يمين/يسار» are PHYSICAL sides. flex row follows the reading direction, so
   without the RTL pair Arabic showed «صورة على اليمين» with the image on the left. */
.promo-card--image-right { flex-direction: row; }
.promo-card--image-left  { flex-direction: row-reverse; }
[dir="rtl"] .promo-card--image-right { flex-direction: row-reverse; }
[dir="rtl"] .promo-card--image-left  { flex-direction: row; }

.promo-card__body {
  flex: 1;
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}
.promo-card__eyebrow {
  font-size: 11px; font-weight: 800;
}
.promo-card__title {
  font-family: var(--font-head);
  font-size: clamp(22px, 4vw, 36px);
  font-weight: 700;
  line-height: 1.2; margin: 0;
  color: inherit;
}
.promo-card__desc {
  font-size: 15px;
  line-height: 1.7;
  opacity: .85;
  max-width: 38ch;
  margin: 0;
}
.promo-card__btn { margin-top: 8px; }
.promo-card__media {
  flex: 0 0 40%; max-width: 40%;
  display: flex; align-items: center; justify-content: center;
  position: relative; z-index: 2;
}
.promo-card__media img {
  width: 100%; max-height: 260px;
  object-fit: contain;
  filter: drop-shadow(0 12px 24px rgba(0,0,0,.2));
}
/* «خلفية كاملة»: the image covers the whole card behind the copy, under a scrim */
.promo-card--full .promo-card__media {
  position: absolute; inset: 0;
  flex: none; max-width: none;
  z-index: 0;
}
.promo-card--full .promo-card__media::after {
  content: ""; position: absolute; inset: 0;
  background: rgba(0,0,0,.4);
}
.promo-card--full .promo-card__media img {
  width: 100%; height: 100%; max-height: none;
  object-fit: cover; filter: none;
}
.promo-card__ghost {
  position: absolute;
  inset-inline-end: -20px; top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-accent);
  font-size: clamp(80px, 14vw, 160px);
  font-weight: 700;
  letter-spacing: -.03em; line-height: 1;
  opacity: .07;
  white-space: nowrap;
  pointer-events: none; user-select: none;
  z-index: 1;
}

/* Image controls (customizer, 2026-10-20): size, overlap onto the copy, vertical position.
   Defaults (md / none / center) reproduce the original card exactly. Sides are physical,
   like the layouts themselves: image-right pulls left toward the copy, image-left pulls right. */
.promo-card--img-sm .promo-card__media img { max-height: 200px; }
.promo-card--img-lg .promo-card__media { flex-basis: 46%; max-width: 46%; }
.promo-card--img-lg .promo-card__media img { max-height: 330px; }
.promo-card--img-xl .promo-card__media { flex-basis: 52%; max-width: 52%; }
.promo-card--img-xl .promo-card__media img { max-height: 400px; }
/* Overlap: the copy stays on top (body z 2), the image slides under its edge. */
.promo-card:not(.promo-card--ov-none):not(.promo-card--full) .promo-card__media { z-index: 1; }
.promo-card--image-right.promo-card--ov-sm .promo-card__media { margin-left: -32px; }
.promo-card--image-right.promo-card--ov-md .promo-card__media { margin-left: -72px; }
.promo-card--image-right.promo-card--ov-lg .promo-card__media { margin-left: -120px; }
.promo-card--image-left.promo-card--ov-sm  .promo-card__media { margin-right: -32px; }
.promo-card--image-left.promo-card--ov-md  .promo-card__media { margin-right: -72px; }
.promo-card--image-left.promo-card--ov-lg  .promo-card__media { margin-right: -120px; }
/* Top / bottom: the image runs into the card's edge (overflow is hidden), for depth. */
.promo-card--va-top:not(.promo-card--full) .promo-card__media {
  align-self: flex-start; margin-top: calc(-1 * clamp(32px, 5vw, 60px));
}
.promo-card--va-bottom:not(.promo-card--full) .promo-card__media {
  align-self: flex-end; margin-bottom: calc(-1 * clamp(32px, 5vw, 60px));
}
.promo-card--va-top .promo-card__media img,
.promo-card--va-bottom .promo-card__media img { filter: none; }

/* Free position (customizer): the template writes --pc-x/--pc-y (px) and --pc-s (scale) for
   desktop, --pc-xm/--pc-ym/--pc-sm for phones. transform moves the picture without moving the copy;
   the card's overflow:hidden crops whatever leaves it. Copy stays above the image (body z 2). */
.promo-card:not(.promo-card--full) .promo-card__media img {
  transform: translate(var(--pc-x, 0px), var(--pc-y, 0px)) scale(var(--pc-s, 1));
}

/* ===== 24. FOOTER ===== */
.site-footer {
  background: var(--espresso);
  color: rgba(255,255,255,.8);
  margin-top: clamp(40px, 6vw, 80px);
}
.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 32px;
  padding-block: clamp(48px, 7vw, 72px);
}
.footer-logo { height: 34px; width: auto; margin-bottom: 16px; }
.site-footer h4 {
  color: var(--white);
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.site-footer p { font-size: 14px; color: rgba(255,255,255,.58); line-height: 1.7; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 10px; }
.footer-links a {
  color: rgba(255,255,255,.58);
  font-size: 14px;
  transition: color var(--t-fast);
}
.footer-links a:hover { color: var(--caramel); }
.footer-links a:active { color: var(--caramel); opacity: 0.75; }
.footer-phone { margin-top: 16px; }
.footer-phone a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,.58);
  font-size: 14px;
  letter-spacing: .3px;
  transition: color var(--t-fast);
}
.footer-phone a:hover { color: var(--caramel); }
.footer-phone a:active { color: var(--caramel); opacity: 0.75; }
.footer-phone__ic { flex: none; opacity: .85; }
.newsletter { display: flex; gap: 8px; margin-top: 12px; }
/* `display: flex` above is an AUTHOR rule and therefore beats the user-agent's
   `[hidden] { display: none }`. Without this line, setting form.hidden = true
   in JS does nothing visible and a guest still sees a subscribe control that
   cannot work — caught by screenshotting the rendered footer, not by reading
   the .hidden property, which was true the whole time. */
.newsletter[hidden] { display: none; }
.newsletter input {
  flex: 1; padding: 10px 14px;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,.07);
  font-family: var(--font-body);
  color: var(--white); font-size: 14px;
}
.newsletter input::placeholder { color: rgba(255,255,255,.35); }
.newsletter input:focus { outline: none; border-color: var(--caramel); }
.newsletter .btn { flex-shrink: 0; padding: 10px 18px; font-size: 14px; }
/* Single honest line under the newsletter column: guest sign-in prompt,
   already-subscribed confirmation, or an error. Reuses the footer column's
   existing paragraph type rather than introducing new footer structure -
   the footer is architecturally frozen. */
.newsletter-note { margin-top: 10px; font-size: 13px; line-height: 1.7; }
.newsletter-note a { text-decoration: underline; }
.newsletter-note.is-ok { color: var(--success); }
.newsletter-note.is-error { color: var(--danger); }

.socials { display: flex; gap: 8px; margin-top: 16px; }
.socials a {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.12);
  display: inline-flex;
  align-items: center; justify-content: center;
  color: rgba(255,255,255,.65);
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}
.socials a:hover {
  background: var(--caramel);
  color: var(--espresso);
  border-color: var(--caramel);
}
.socials a:active,
.socials a.is-pressed { background: var(--caramel); color: var(--espresso); border-color: var(--caramel); transform: scale(0.9); transition-duration: 80ms; }
.socials a svg { width: 16px; height: 16px; fill: currentColor; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding-block: 18px;
  text-align: center;
  font-size: 13px;
  color: rgba(255,255,255,.38);
}

/* ===== 25. FORMS (global) ===== */
input, select, textarea, button {
  font-family: var(--font-body);
}

/* ===== 26. FLASH / ALERTS ===== */
#flash-host {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: var(--z-toast);
}
.flash {
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  font-weight: 600;
  font-size: 14px;
}
.flash-success { background: #e6f2eb; color: var(--success); border: 1px solid #c3dece; }
.flash-error   { background: #f8e7e3; color: var(--danger);  border: 1px solid #ecc5bb; }

/* ===== 26b. SAVE/WISHLIST TOAST =====
   Bottom-anchored, so it can never meet the sticky header (top: 0). It is
   also withdrawn whenever the cart drawer or the mobile menu opens. That rule
   predates the centring below, when the toast was pinned to the inline-start
   edge and would have sat under the drawer in whichever locale puts that edge
   on the right (.cart-drawer is pinned with a PHYSICAL right). Centring
   narrows the overlap but does not remove it - the drawer is full-height and
   a wide toast still reaches under it - and superseding is what Overlay
   Lifecycle prescribes for a new navigation request arriving over an open
   overlay regardless, so the rule stays.

   Nothing here is left/right: the desktop rule is symmetric and the mobile
   rule is logical, so neither needs a second rule for RTL.

   No new timing or easing values — Phase 6 (Tokens) has not started, so this
   reuses --t-base, the file's default for an isolated small surface, for both
   the arrival and the departure. */
.wish-toast {
  position: fixed;
  inset-block-end: 20px;
  /* Horizontally centred, by merchant request. Centring is done with equal
     logical insets plus auto inline margins rather than a
     left:50%/translateX(-50%) pair, for two reasons: translateX would fight
     the translateY this element already animates on, and equal insets need no
     mirroring at all - a centred surface has no leading edge to get wrong.
     width:max-content is required, because a fixed element with both inline
     insets set and width:auto stretches to fill instead of shrinking to fit,
     and auto margins have nothing left to distribute. */
  inset-inline: 0;
  margin-inline: auto;
  width: max-content;
  z-index: var(--z-toast);
  max-width: min(360px, calc(100vw - 40px));
  display: flex;
  align-items: center;
  gap: 12px;
  padding-block: 12px;
  padding-inline: 16px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--linen);
  background: var(--white);
  box-shadow: var(--shadow-md);
  /* Departing/Withdrawn resting values. Arriving adds .is-open. Travel is
     along the block axis, so it does not need mirroring either. */
  opacity: 0;
  transform: translateY(12px);
  transition: opacity var(--t-base), transform var(--t-base);
}
.wish-toast.is-open {
  opacity: 1;
  transform: translateY(0);
}
.wish-toast-msg {
  margin: 0;
  flex: 1;
  min-width: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--espresso);
}
.wish-toast-link {
  flex-shrink: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--copper);
  text-decoration: underline;
  text-underline-offset: 3px;
  border-radius: var(--radius-sm);
}
.wish-toast-link:hover { color: var(--copper-light); }
.wish-toast-link:focus-visible,
.wish-toast-close:focus-visible {
  outline: 2px solid var(--copper);
  outline-offset: 2px;
}
/* An explicit close control, not only the timer. Parity: a pointer user gets
   a hover that pauses the countdown and a keyboard user gets focus-within
   doing the same, but neither is a way to DISMISS — without this button the
   only dismissal available to a keyboard or touch user is waiting. */
.wish-toast-close {
  flex-shrink: 0;
  width: 28px; height: 28px;
  display: inline-flex;
  align-items: center; justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--stone);
  cursor: pointer;
  transition: background var(--t-fast), color var(--t-fast);
}
.wish-toast-close:hover { background: var(--foam-mid); color: var(--espresso); }
.wish-toast-close svg { width: 14px; height: 14px; }

@media (max-width: 480px) {
  /* Full-width on a phone rather than a floating card pinned to one corner —
     at this size a 360px box beside a 20px inset is the whole screen anyway,
     and centring it avoids a ragged gap on the trailing edge. */
  .wish-toast {
    inset-inline: 12px;
    inset-block-end: 12px;
    /* Back to filling the width: at this size a centred max-content box is
       the screen anyway, and both overrides are needed because the desktop
       rule shrink-wraps rather than stretching. */
    width: auto;
    margin-inline: 0;
    max-width: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  /* State stays, movement goes — the same trade the rest of this file makes. */
  .wish-toast { transition: opacity var(--t-fast); transform: none; }
  .wish-toast.is-open { transform: none; }
}

/* ===== 27. PAGINATION ===== */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 48px;
  flex-wrap: wrap;
}
.pagination a,
.pagination span {
  min-width: 40px; height: 40px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center; justify-content: center;
  border: 1px solid var(--linen);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--stone);
  font-weight: 600;
  font-size: 14px;
  transition: border-color var(--t-fast), color var(--t-fast), background var(--t-fast);
}
.pagination a:hover { border-color: var(--copper); color: var(--copper); }
.pagination a:active,
.pagination a.is-pressed { border-color: var(--copper); color: var(--copper); background: var(--foam-mid); transform: scale(0.92); transition-duration: 80ms; }
.pagination .is-active { background: var(--espresso); color: var(--white); border-color: var(--espresso); }
.pagination .is-disabled { opacity: .4; pointer-events: none; }

/* ===== 28. ACCOUNT PAGES ===== */
.account-layout {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 28px;
  padding-block: 48px;
  align-items: start;
}
.account-nav {
  background: var(--white);
  border: 1px solid var(--linen);
  border-radius: var(--radius-lg);
  padding: 8px;
}
.account-nav a {
  display: block;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  color: var(--stone);
  font-weight: 600;
  font-size: 14px;
  transition: background var(--t-fast), color var(--t-fast);
}
.account-nav a:hover,
.account-nav a.active { background: var(--foam-mid); color: var(--espresso); }
.account-nav a:active { background: var(--foam-dark); color: var(--espresso); }
.account-card {
  background: var(--white);
  border: 1px solid var(--linen);
  border-radius: var(--radius-lg);
  padding: 28px;
}

/* ===== 29. FADE-UP ANIMATION (IntersectionObserver-driven) ===== */
@media (prefers-reduced-motion: no-preference) {
  .fade-up {
    opacity: 0;
    transform: translateY(36px);
    transition: opacity .65s ease, transform .65s cubic-bezier(0.16, 1, 0.3, 1);
    transition-delay: calc(var(--i, 0) * 60ms);
  }
  .fade-up.visible {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== 30. REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  .marquee-inner { animation: none; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

/* ===== 31. RESPONSIVE ===== */

/* ── Tablet landscape: 1024px ── */
@media (max-width: 1024px) {
  .product-grid  { grid-template-columns: repeat(3, 1fr); }
  .cat-grid      { grid-template-columns: repeat(3, 1fr); }
  .footer-top    { grid-template-columns: 1fr 1fr; gap: 24px; }
  .hero-inner    { gap: 32px; }
  .features      { grid-template-columns: repeat(2, 1fr); }
}

/* ── Tablet: 768px ── */
@media (max-width: 768px) {
  .product-grid  { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .cat-grid      { grid-template-columns: repeat(2, 1fr); gap: 10px; }

  /* Thumb is square at every breakpoint now — only inset and radius differ. */
  .product-card  { border-radius: 8px 16px 8px 8px; }
  .product-thumb { margin: 6px 6px 0; border-radius: 9px 18px 9px 9px; }
  .product-body  { padding: 9px 9px 4px; }
  .product-foot  { padding: 0 7px 9px; gap: 6px; }
  .product-name  { font-size: 13px; line-height: 1.35; }
  .product-cue   { margin-top: 3px; font-size: 12px; }
  .product-quick-trigger { width: 36px; height: 36px; }
  .product-quick-trigger svg { width: 16px; height: 16px; }
  .product-detail{ grid-template-columns: 1fr; gap: 28px; }
  .cart-wrap     { grid-template-columns: 1fr; }

  /* Listing/category/search mobile polish */
  .page-head        { padding-block: 28px 24px; }
  .toolbar          { margin-bottom: 18px; }
  .brand-story-inner { grid-template-columns: 1fr; }

  /* Product page — mobile purchase flow */
  .product-info h1 {
    line-height: 1.4;
    word-break: break-word;
    overflow-wrap: break-word;
    margin-bottom: 12px;
  }
  .stock-row     { margin-block: 12px 0; }
  .product-trust { margin-top: 10px; padding-top: 10px; }
  .product-desc  { margin-block: 14px; font-size: 14px; }
  .qty-row       { margin-block: 14px; }
  .brand-story-img   { display: none; }
  .account-layout    { grid-template-columns: 1fr; }

  /* Hero collapses */
  .hero-inner    { grid-template-columns: 1fr; text-align: center; }
  .hero::after   { display: none; }
  .hero-cta      { justify-content: center; }
  .hero-media    { display: none; }
  .hero-brands   { justify-content: center; }
  .hero-sub      { margin-inline: auto; }

  /* Hide desktop nav */
  .nav                          { display: none; }
  /* Account access already exists in the mobile drawer (.nav-account-item);
     avoid duplicating it in the already-tight mobile icon row. */
  .header-account-btn           { display: none; }

  /* ── Mobile menu motion tokens ────────────────────────────────────
     ONE clock for the whole spatial move: page, panel and panel
     contents all travel on --menu-dur/--menu-ease so they read as a
     single connected surface. The curve is heavily front-loaded
     (~60% of the distance in the first quarter of the duration) and
     then feathers to a stop over the remaining tail — that pairing of
     an immediate launch with a long, soft landing is what reads as
     "weight" rather than "slow". The long duration only works because
     of that front-load: the menu is legible almost at once and the
     tail is settle, not wait.

     Geometry is solved, not guessed. The page's trailing edge and the
     panel's leading edge both travel 100vw → (100vw - --menu-panel),
     so they track each other and the two surfaces never gap or
     overlap. With transform-origin at the shell's left edge:
         right edge = scale x (100vw + shift)
     so shift = (100 - panel)/scale - 100 = (100-88)/.86 - 100 ≈ -86vw.
     Changing --menu-panel or --menu-scale means re-deriving --menu-shift. */
  :root {
    --menu-dur:   .8s;
    --menu-ease:  cubic-bezier(.15, .2, .1, 1);
    --menu-panel: 88vw;   /* drawer width */
    --menu-scale: .86;    /* page recede depth */
    --menu-shift: -86vw;  /* derived — see formula above */
    --menu-icon:  .18s;   /* hamburger morph — the one fast clock */
  }

  /* Mobile drawer. right:0 anchors it; the closed state is a transform
     (compositor-only, no per-frame layout). translateX(100%) is exactly
     one panel width, so the closed leading edge sits at 100vw and the
     open one at 100vw - panel — the page's trailing edge path.
     direction:rtl keeps Arabic nav-link text correctly right-aligned. */
  .nav {
    display: flex;
    position: fixed;
    top: 0;
    right: 0;
    transform: translateX(var(--menu-panel));
    direction: rtl;
    width: var(--menu-panel);
    height: 100dvh;
    background: var(--foam);
    border-left: 1px solid var(--linen);
    flex-direction: column;
    align-items: flex-start;
    /* Generous, deliberate spacing: the panel is now near-full-width, so
       it is a destination rather than a strip. Top pad clears the toggle. */
    padding: 76px 30px 40px;
    gap: 2px;
    z-index: var(--z-nav);
    box-shadow: var(--shadow-lg);
    transition: transform var(--menu-dur) var(--menu-ease);
    /* overflow-x clips the counter-translated contents (see .nav > li) —
       this is what turns the panel's travel into an uncovering rather than
       an arrival. overflow-y keeps long merchant menus scrollable. */
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;   /* no scroll chaining to the page */
    /* Items sit centred in the panel (the reference does the same, and it
       suits a full-height surface). `safe` keeps a long merchant menu
       reachable: plain `center` overflows equally in both directions and
       makes the FIRST items unscrollable once the list exceeds the panel.
       Browsers without `safe` drop the declaration and inherit the plain
       centring the desktop rule already sets — i.e. today's behaviour. */
    justify-content: safe center;
    /* NO backdrop-filter — causes iOS freeze */
  }
  .nav.open { transform: translateX(0); }

  /* ── The reveal ───────────────────────────────────────────────────
     The reference does not slide its menu in: the menu is already in
     place and the departing page uncovers it. Reproduced exactly here
     without moving the panel out of the header (it is the desktop nav
     too, so relocating or duplicating it would fork the Categories
     engine): the panel travels one panel-width, and its contents carry
     the exact opposite translation, so the two cancel and the contents
     never move on screen. The panel's overflow clip is then the only
     thing advancing — which is precisely what an uncovering is.

         content on screen = panel(1-p) + (44px - panel)(1-p)
                           = 44px(1-p)

     Both translations are pure, share one clock and one curve, so they
     cancel at EVERY frame, not just at the endpoints (this is why the
     two must stay pure translations — interpolating a scale against its
     own inverse would NOT cancel mid-flight, and the contents would
     visibly wobble). The residual 44px is Salient's content parallax,
     kept deliberately: the contents settle the last few pixels as they
     are revealed, which is what gives the panel internal depth instead
     of reading as one flat slab. Opacity resolves earlier than position
     so the menu is legible while it is still settling. */
  .nav > li {
    /* Full-width rows. The panel is near-full-width now, so shrink-to-fit
       items left ragged, text-width tap targets and a press highlight that
       stopped mid-row. */
    width: 100%;
    transform: translateX(calc(44px - var(--menu-panel)));
    opacity: 0;
    transition: transform var(--menu-dur) var(--menu-ease),
                opacity .45s var(--menu-ease);
  }
  .nav.open > li { transform: translateX(0); opacity: 1; }

  .nav .navlink {
    width: 100%;
    /* 18px, not the 20px this panel first shipped with: at full width the
       rows carried too much weight and crowded the panel. Padding and row
       height are deliberately unchanged — the row stays a comfortable
       ~60px target, and only the type inside it settles down. */
    font-size: 18px;
    padding: 15px 14px;
    border-radius: var(--radius-sm);
  }

  /* Overlay dims the receded page AND the header strip beside the panel
     (it sits above the header's background but below the panel), so the
     whole remaining sliver reads as one dimmed layer. Same clock. */
  .nav-overlay { background: rgba(26,18,8,.45); }
  .nav-overlay { transition: opacity var(--menu-dur) var(--menu-ease); }

  /* ── Page recede ──────────────────────────────────────────────────
     One wrapper, one transform, one origin — the only way a scale stays
     rigid across the header/main/footer stack. .page-shell excludes the
     header precisely because the drawer lives inside the header, and a
     transformed ancestor would capture the fixed drawer and drag it
     along with the page (measured: an ancestor transform re-anchored
     the overlay's inset:0 to the full document height).

     transform-origin's Y is set in JS at open time to the viewport's
     vertical centre in the shell's own coordinates — the shell is as
     tall as the page, so its natural 50% centre is far off-screen and
     scaling about it would throw content vertically. See toggleNav(). */
  .page-shell {
    transform-origin: 0 50%;
    transition: transform var(--menu-dur) var(--menu-ease);
  }
  html.nav-open .page-shell {
    transform: scale(var(--menu-scale)) translateX(var(--menu-shift)) translateZ(0);
  }

  /* Header chrome yields to the panel: everything except the toggle
     fades, so the visible sliver holds one control and not a row of
     half-covered icons. The toggle itself is lifted above the panel —
     in RTL it sits within a few px of the panel's leading edge. */
  .logo,
  .header-actions > :not(.nav-toggle) {
    transition: opacity .3s var(--menu-ease);
  }
  html.nav-open .logo,
  html.nav-open .header-actions > :not(.nav-toggle) {
    opacity: 0;
    pointer-events: none;
  }
  html.nav-open .nav-toggle { position: relative; z-index: calc(var(--z-nav) + 1); }

  /* The header is position:sticky, and the scroll lock below sets
     overflow:hidden on html/body while the menu is open. On iOS that takes the
     scroll container out from under the sticky element, which then paints at
     its static position — the top of the document, above the viewport — so on
     a scrolled page the toggle vanished while the drawer (position:fixed)
     stayed put: the X was there at the top of the page and missing anywhere
     else. Pinning the header to the viewport for the duration removes the
     dependency on the scroll container. Safe only because the header sits
     outside .page-shell; inside the transformed shell this would re-anchor.

     Going fixed takes the header out of flow, which would pull the shell up by
     exactly its height — a visible lurch as the page recedes. --nav-header-h is
     measured in toggleNav at the same moment as the recede origin and gives
     that space straight back, so the swap costs no layout movement. */
  /* Held through .nav-closing as well, not just .nav-open. The scroll lock
     below deliberately spans the closing animation, and unpinning while it is
     still applied puts the header back to position:sticky inside an
     overflow:hidden scroll container - the exact condition described above,
     where iOS paints it at the top of the document instead. The header
     vanished for the length of the close and returned when the lock lifted.
     Pin and lock now have identical lifetimes. (Same reasoning already
     applied to .sticky-atc a few rules down.) */
  html.nav-open .site-header,
  html.nav-closing .site-header {
    position: fixed;
    inset-inline: 0;
    top: 0;
  }
  html.nav-open .page-shell,
  html.nav-closing .page-shell { padding-top: var(--nav-header-h, 0px); }

  /* Scroll lock. The page must not scroll behind an open menu (it did
     before this change — the drawer trapped focus but not the scroll).
     overflow:hidden preserves the current offset, so there is no jump
     on open or close, unlike the position:fixed technique.

     .nav-closing extends the lock across the closing animation only (see
     toggleNav): releasing it while the shell is still scaled let iOS
     re-adjust the scroll offset under a moving layer, which read as the
     page jumping instead of settling. */
  html.nav-open, html.nav-open body,
  html.nav-closing, html.nav-closing body { overflow: hidden; }

  /* .page-shell is a containing block for its fixed descendants while
     transformed. The sticky ATC bar is the only one that can be open
     concurrently; it would re-anchor and drift, and it sits behind the
     overlay anyway, so it rests while the menu is open.

     Kept resting through .nav-closing too: reappearing while the shell is
     still transformed is exactly the drift this rule exists to prevent. */
  html.nav-open .sticky-atc,
  html.nav-closing .sticky-atc { visibility: hidden; }

  /* Hamburger → X. Sequenced, not simultaneous: the second stroke
     follows 60ms behind the first, so the mark assembles rather than
     snapping — the one detail from the reference that is pure
     acknowledgment, and the one place a fast clock belongs. */
  .nav-toggle svg line {
    transform-box: fill-box;
    transform-origin: center;
    transition: transform var(--menu-icon) var(--menu-ease), opacity .12s linear;
  }
  html.nav-open .nav-toggle svg line:nth-child(1) { transform: translateY(5px) rotate(45deg); }
  html.nav-open .nav-toggle svg line:nth-child(2) { opacity: 0; }
  html.nav-open .nav-toggle svg line:nth-child(3) {
    transform: translateY(-5px) rotate(-45deg);
    transition-delay: 60ms;
  }

  /* Reduced motion: state changes stay, movement is removed (site-wide
     pattern). The panel and the dim still appear, the page does not
     recede, the icon still reads as an X. */
  @media (prefers-reduced-motion: reduce) {
    .nav, .nav-overlay, .nav > li, .nav-toggle svg line,
    .page-shell, .logo, .header-actions > :not(.nav-toggle) { transition: none; }
    .nav > li { transform: none; opacity: 1; }
    html.nav-open .page-shell { transform: none; }
  }
  .nav-account-item {
    display: block;
    border-top: 1px solid var(--linen);
    margin-top: 12px;
    padding-top: 12px;
  }
  .nav-toggle { display: inline-flex; }

  /* Category accordion — same cached data as desktop, rendered as a nested
     two-level list instead of a hover panel. Only categories that actually
     have subcategories get the expand chevron; the rest are plain links. */
  .nav-cats-item { width: 100%; }
  .nav-cats-trigger { width: 100%; justify-content: space-between; }
  .nav-cats-trigger[aria-expanded="true"] {
    background: none;
    border-radius: var(--radius-sm);
  }
  /* chevron rotation is handled by the shared [aria-expanded] .nav-chevron rule */
  .nav-cats-panel {
    position: static;
    border: none;
    box-shadow: none;
    background: none;
    padding: 0 0 0 14px;
    min-width: 0;
    opacity: 1;
  }
  .nav-cats-panel:not([hidden]) { display: block; }
  .nav-cats-detail { display: none; } /* desktop-only right pane */

  /* Physical, same reason as the desktop panel above — this drawer renders
     inside the same dir="rtl" element, and the same iPad resolved these
     logical values inconsistently. */
  .nav-cats-list { gap: 0; padding-left: 0; }
  .nav-cats-mrow { border-top: 1px solid var(--linen); }
  .nav-cats-mrow:first-child { border-top: none; }

  .nav-cats-mrow-toggle,
  .nav-cats-mrow-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 11px 2px;
    font-size: 14px;
    font-family: var(--font-body);
    color: var(--stone);
    background: none;
    border: none;
    text-align: right;
    text-decoration: none;
    cursor: pointer;
  }
  .nav-cats-mrow-toggle.is-open { font-weight: 600; color: var(--espresso); }
  .nav-cats-chevron { color: var(--stone-light, var(--stone)); flex-shrink: 0; }
  @media (prefers-reduced-motion: no-preference) {
    .nav-cats-chevron { transition: transform .2s ease; }
  }
  .nav-cats-mrow-toggle.is-open .nav-cats-chevron { transform: rotate(180deg); }

  .nav-cats-msublist[hidden] { display: none; }
  .nav-cats-msublist:not([hidden]) {
    display: flex;
    flex-direction: column;
    gap: 9px;
    padding: 0 2px 12px 14px;
  }
  .nav-cats-msub { font-size: 13px; color: var(--stone); text-decoration: none; }
  .nav-cats-msub--cta { color: var(--copper); }
  .nav-cats-msub--parent {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    font-size: 13px;
    color: var(--espresso);
    cursor: pointer;
    text-align: right;
  }
  .nav-cats-msub--parent.is-open { font-weight: 600; }
  .nav-cats-msubsublist[hidden] { display: none; }
  .nav-cats-msubsublist:not([hidden]) {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 8px 2px 4px 14px;
    margin-right: 2px;
    border-right: 1px solid var(--linen);
  }
  .nav-cats-msubsub { font-size: 12.5px; color: var(--stone); text-decoration: none; }

  /* Promo cards */
  .promo-card {
    flex-direction: column !important;
    min-height: auto; gap: 20px;
  }
  /* full width when stacked: shrink-to-content left a lazy image at 0x0, so it never loaded */
  .promo-card__media { flex: unset; max-width: 100%; width: 100%; align-self: stretch; }
  /* Phones: a side image stacked under the copy doubled the card's height (grinder banner, 2026-10-20).
     Keep it beside the copy instead, smaller, so the card stays about as tall as an image-less one.
     Browsers without :has() keep the stacked layout above. */
  .promo-card:has(> .promo-card__media):not(.promo-card--full) {
    align-items: center; gap: 8px; padding: 24px 18px;
  }
  .promo-card--image-right:has(> .promo-card__media) { flex-direction: row !important; }
  [dir="rtl"] .promo-card--image-right:has(> .promo-card__media) { flex-direction: row-reverse !important; }
  .promo-card--image-left:has(> .promo-card__media) { flex-direction: row-reverse !important; }
  [dir="rtl"] .promo-card--image-left:has(> .promo-card__media) { flex-direction: row !important; }
  .promo-card:has(> .promo-card__media):not(.promo-card--full) .promo-card__media {
    flex: 0 0 36%; max-width: 36%; width: auto; align-self: center;
  }
  .promo-card:not(.promo-card--full) .promo-card__media img { max-height: 170px; }
  .promo-card--img-sm:has(> .promo-card__media):not(.promo-card--full) .promo-card__media { flex-basis: 28%; max-width: 28%; }
  .promo-card--img-sm:not(.promo-card--full) .promo-card__media img { max-height: 130px; }
  .promo-card--img-lg:has(> .promo-card__media):not(.promo-card--full) .promo-card__media { flex-basis: 44%; max-width: 44%; }
  .promo-card--img-lg:not(.promo-card--full) .promo-card__media img { max-height: 210px; }
  .promo-card--img-xl:has(> .promo-card__media):not(.promo-card--full) .promo-card__media { flex-basis: 52%; max-width: 52%; }
  .promo-card--img-xl:not(.promo-card--full) .promo-card__media img { max-height: 250px; }
  .promo-card--image-right.promo-card--ov-sm .promo-card__media { margin-left: -14px; }
  .promo-card--image-right.promo-card--ov-md .promo-card__media { margin-left: -32px; }
  .promo-card--image-right.promo-card--ov-lg .promo-card__media { margin-left: -56px; }
  .promo-card--image-left.promo-card--ov-sm  .promo-card__media { margin-right: -14px; }
  .promo-card--image-left.promo-card--ov-md  .promo-card__media { margin-right: -32px; }
  .promo-card--image-left.promo-card--ov-lg  .promo-card__media { margin-right: -56px; }
  .promo-card--va-top:not(.promo-card--full) .promo-card__media { margin-top: -24px; }
  .promo-card--va-bottom:not(.promo-card--full) .promo-card__media { margin-bottom: -24px; }
  /* «الصورة على الجوال». corner: a tall image comes out of the bottom corner, the copy keeps
     60% of the width so the two never collide. strip: a wide image sits on the bottom edge under
     the copy. Both bleed past the card's edge (overflow hidden) for depth. */
  .promo-card--m-corner:has(> .promo-card__media):not(.promo-card--full),
  .promo-card--m-strip:has(> .promo-card__media):not(.promo-card--full) {
    flex-direction: column !important; align-items: stretch;
  }
  .promo-card--m-corner:has(> .promo-card__media):not(.promo-card--full) { min-height: 250px; }
  .promo-card--m-corner:not(.promo-card--full) .promo-card__body { max-width: 60%; }
  /* The copy takes the side away from the image, whatever the reading direction. */
  .promo-card--image-right.promo-card--m-corner .promo-card__body { margin-right: auto; margin-left: 0; }
  .promo-card--image-left.promo-card--m-corner  .promo-card__body { margin-left: auto; margin-right: 0; }
  .promo-card--m-corner:has(> .promo-card__media):not(.promo-card--full) .promo-card__media {
    position: absolute; bottom: -22px; width: 54%; max-width: 54%; flex: none; margin: 0; z-index: 1;
  }
  .promo-card--image-right.promo-card--m-corner .promo-card__media { right: -14px; }
  .promo-card--image-left.promo-card--m-corner  .promo-card__media { left: -14px; }
  .promo-card--m-corner:not(.promo-card--full) .promo-card__media img {
    max-height: 260px; width: 100%; object-fit: contain; object-position: bottom; filter: none;
  }
  .promo-card--m-corner.promo-card--img-sm:has(> .promo-card__media):not(.promo-card--full) .promo-card__media { width: 44%; max-width: 44%; }
  .promo-card--m-corner.promo-card--img-lg:has(> .promo-card__media):not(.promo-card--full) .promo-card__media { width: 62%; max-width: 62%; }
  .promo-card--m-corner.promo-card--img-xl:has(> .promo-card__media):not(.promo-card--full) .promo-card__media { width: 70%; max-width: 70%; }
  .promo-card--m-strip:has(> .promo-card__media):not(.promo-card--full) { padding: 24px 18px 0; gap: 10px; }
  .promo-card--m-strip:has(> .promo-card__media):not(.promo-card--full) .promo-card__media {
    position: static; width: 100%; max-width: 100%; flex: none; align-self: stretch; margin: 0 0 -4px;
  }
  .promo-card--m-strip:not(.promo-card--full) .promo-card__media img {
    max-height: 150px; width: 100%; object-fit: contain; object-position: center bottom; filter: none;
  }
  .promo-card--m-strip.promo-card--img-sm:not(.promo-card--full) .promo-card__media img { max-height: 110px; }
  .promo-card--m-strip.promo-card--img-lg:not(.promo-card--full) .promo-card__media img { max-height: 190px; }
  .promo-card--m-strip.promo-card--img-xl:not(.promo-card--full) .promo-card__media img { max-height: 230px; }
  .promo-card--m-hide:not(.promo-card--full) .promo-card__media { display: none; }
  .promo-card:not(.promo-card--full) .promo-card__media img {
    transform: translate(var(--pc-xm, 0px), var(--pc-ym, 0px)) scale(var(--pc-sm, 1));
  }
}

/* ── Mobile: 640px — footer + newsletter ── */
@media (max-width: 640px) {
  .footer-top { grid-template-columns: 1fr; gap: 28px; }

  /* stack newsletter form so زر اشتراك لا يطلع بره */
  .newsletter { flex-direction: column; gap: 10px; }
  .newsletter input { width: 100%; min-width: 0; }
  .newsletter .btn  { width: 100%; }
}

/* ── Mobile: 480px ── */
@media (max-width: 480px) {
  .features   { grid-template-columns: 1fr 1fr; }
  .hero h1    { font-size: clamp(30px, 9vw, 48px); }

  /* Product card — tighter inset + body for narrow 2-col cards */
  .product-card  { border-radius: 9px 18px 9px 9px; }
  .product-thumb { margin: 8px 8px 0; border-radius: 10px 20px 10px 10px; }
  .product-body  { padding: 10px 11px 6px; }
  .product-foot  { padding: 0 8px 11px; gap: 8px; }
  .product-quick-trigger { width: 44px; height: 44px; }
  .product-quick-trigger svg { width: 18px; height: 18px; }
  .product-name  { font-size: 13.5px; }
  .product-cue   { margin-top: 6px; font-size: 12px; }

  /* Search overlay — reduce top offset so keyboard doesn't push it off-screen */
  .search-overlay { padding-block-start: 48px; padding-inline: 14px; }

  /* Listing/search page h1 — reduce size so "نتائج البحث عن: …" is not dominant */
  .page-head h1 { font-size: clamp(20px, 5.5vw, 26px); line-height: 1.15; }

  /* Product page — narrowest phones */
  .product-info h1   { font-size: clamp(20px, 5.5vw, 26px); }
  .product-info .price { font-size: 26px; }
  /* Sticky bar: compact button so product name has more room */
  .sticky-atc-btn    { padding: 10px 16px; font-size: 13px; }
}

/* ===== 32. UTILITIES ===== */
.text-center  { text-align: center; }
.text-copper  { color: var(--copper); }
.text-stone   { color: var(--stone); }
.bg-foam      { background: var(--foam); }
.bg-foam-mid  { background: var(--foam-mid); }
.bg-espresso  { background: var(--espresso); color: var(--white); }
.bg-mint-soft { background: var(--mint-soft); }
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ═══════════════════════════════════════════════
   HOME V2 — NEW SECTIONS
   ═══════════════════════════════════════════════ */

/* ── Hero V2 ── */
/* Single centred column at every width — desktop and mobile render the same
   composition, only the type scale changes. */
.hero-v2 {
  position: relative;
  padding-block: clamp(48px, 7vw, 88px) var(--section-v);
  background: var(--foam);
  overflow: hidden;
}
.hero-blob {
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: 100%;
  background: radial-gradient(ellipse 60% 85% at 50% 30%, var(--foam-mid) 0%, transparent 70%);
  pointer-events: none;
}
.hero-v2-inner {
  position: relative;
  z-index: 1;
}
.hero-v2-copy {
  max-width: 46rem;
  margin-inline: auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* eyebrow with pulse dot */
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--stone);
  text-transform: uppercase;
  margin-bottom: 20px;
}
.hero-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--copper);
  flex-shrink: 0;
  animation: hero-dot-pulse 2.4s ease infinite;
}
@keyframes hero-dot-pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(181,98,42,.5); }
  50%      { box-shadow: 0 0 0 7px rgba(181,98,42,0); }
}

/* big title */
.hero-v2-title {
  font-family: var(--font-head);
  font-size: clamp(40px, 6.5vw, 76px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--espresso);
  margin-bottom: 20px;
}
.hero-line-1 { display: block; }
.hero-line-2 { display: block; color: var(--copper); }

.hero-v2-desc {
  font-size: clamp(15px, 1.8vw, 17px);
  color: var(--stone);
  max-width: 42ch;
  line-height: 1.75;
  margin-bottom: 32px;
}
.hero-v2-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 0;
}
/* visual side */
.hero-v2-frame {
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--foam-dark);
  box-shadow: var(--shadow-lg);
  max-height: 540px;
}
.hero-v2-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-v2-frame .img-placeholder {
  object-fit: contain;
  padding: 20%;
  opacity: .5;
}

/* floating badges */
.hbadge {
  position: absolute;
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--linen);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  font-size: 12px;
  font-weight: 700;
  color: var(--espresso);
  z-index: 3;
  white-space: nowrap;
}
.hbadge svg {
  width: 15px;
  height: 15px;
  stroke: var(--copper);
  flex-shrink: 0;
}
.hbadge--ship {
  top: 20px;
  inset-inline-start: -16px;
}
.hbadge--stat {
  bottom: 32px;
  inset-inline-end: -16px;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 14px 20px;
}
.hbadge-num {
  font-family: var(--font-accent);
  font-size: 30px;
  font-weight: 700;
  color: var(--copper);
  line-height: 1;
}
.hbadge-label {
  font-size: 11px;
  color: var(--stone);
  font-weight: 600;
}

/* ── Stats Strip ── */
.stats-strip {
  background: var(--white);
  border-top: 1px solid var(--linen);
  border-bottom: 1px solid var(--linen);
  padding-block: 32px;
}
.stats-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
}
.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding-inline: clamp(24px, 4vw, 60px);
  text-align: center;
}
.stat-num {
  font-family: var(--font-accent);
  font-size: clamp(36px, 5vw, 52px);
  font-weight: 700;
  color: var(--copper);
  line-height: 1;
}
.stat-unit {
  font-size: .55em;
  font-weight: 700;
  color: var(--stone);
}
.stat-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--stone);
}
.stat-divider {
  width: 1px;
  height: 40px;
  background: var(--linen);
  flex-shrink: 0;
}

/* Category pills/section were removed from the homepage body (2026-06-18);
   categories now live only in the top navigation. This general page-head
   adjacency rule is retained — it applies to listing/category/search pages. */
.page-head + .section { padding-block-start: clamp(24px, 3vw, 36px); }


/* ── Bento Features ── */
.bento-section {
  padding-block: var(--section-v);
  background: var(--foam);
}
.bento-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 16px;
}
.bento-card {
  background: var(--white);
  border: 1.5px solid var(--linen);
  border-radius: var(--radius-xl);
  padding: clamp(24px, 3vw, 36px);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform var(--t-base), box-shadow var(--t-base);
  cursor: default;
}
.bento-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

/* big main card spans 2 rows */
.bento-card--main { grid-row: span 2; }

/* dark espresso card */
.bento-card--dark {
  background: var(--espresso);
  border-color: var(--espresso);
}
.bento-card--dark h3 { color: var(--white); }
.bento-card--dark p  { color: rgba(255,255,255,.62); }

/* copper accent card */
.bento-card--copper {
  background: var(--copper);
  border-color: var(--copper);
}
.bento-card--copper h3 { color: var(--white); }
.bento-card--copper p  { color: rgba(255,255,255,.72); }

/* light foam card */
.bento-card--light {
  background: var(--foam);
  border-color: var(--foam-dark);
}

/* bento icon circle */
.bento-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-bottom: 4px;
  background: rgba(255,255,255,.1);
}
.bento-card--light .bento-icon-wrap {
  background: var(--foam-mid);
}
.bento-icon-wrap svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  color: var(--caramel);
}
.bento-card--dark  .bento-icon-wrap svg { color: var(--caramel); }
.bento-card--copper .bento-icon-wrap svg { color: var(--white); }
.bento-card--light  .bento-icon-wrap svg { color: var(--copper); }

/* big accent number inside bento */
.bento-main-num {
  font-family: var(--font-accent);
  font-size: clamp(44px, 5vw, 64px);
  font-weight: 700;
  color: var(--caramel);
  line-height: 1;
}
.bento-days-num {
  font-family: var(--font-accent);
  font-size: clamp(36px, 4vw, 52px);
  font-weight: 700;
  color: var(--copper);
  line-height: 1;
}

.bento-card h3 {
  font-size: clamp(17px, 2.2vw, 21px);
  margin: 0;
  line-height: 1.2;
  color: var(--espresso);
}
.bento-card p {
  font-size: 14px;
  line-height: 1.65;
  color: var(--stone);
  margin: 0;
}

/* ── Brand Story V2 ── */
.brand-story-v2 {
  background: var(--espresso);
  color: var(--white);
  padding-block: clamp(64px, 10vw, 120px);
  position: relative;
  overflow: hidden;
}
.brand-story-v2-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
}
.brand-story-v2-text .eyebrow { color: var(--caramel); }
.brand-story-v2-text h2 {
  color: var(--white);
  font-size: clamp(28px, 5vw, 54px);
  margin-block: 12px 20px;
  line-height: 1.1;
}
.brand-story-v2-text p {
  color: rgba(255,255,255,.68);
  font-size: 17px;
  line-height: 1.85;
  max-width: 52ch;
}
.brand-story-v2-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 32px;
}

/* decorative side */
.brand-story-v2-deco {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.bs-watermark {
  font-family: var(--font-accent);
  font-size: clamp(60px, 10vw, 140px);
  font-weight: 700;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255,255,255,.07);
  letter-spacing: -.02em;
  user-select: none;
  pointer-events: none;
  white-space: nowrap;
}
.bs-logo {
  position: absolute;
  width: clamp(80px, 10vw, 130px);
  height: auto;
  opacity: .9;
}

/* ═══════════════════════════════════════════════
   HOME V2 — RESPONSIVE
   ═══════════════════════════════════════════════ */

/* Tablet 1024px */
@media (max-width: 1024px) {
  .bento-grid { grid-template-columns: 1.2fr 1fr; grid-template-rows: auto auto auto; }
  .bento-card--main { grid-row: span 1; grid-column: span 2; }
  .brand-story-v2-inner { grid-template-columns: 1fr; }
  .brand-story-v2-deco { display: none; }
}

/* Tablet 768px */
@media (max-width: 768px) {
  .bento-grid { grid-template-columns: 1fr 1fr; }
  .bento-card--main { grid-column: span 2; }
  .stats-inner { gap: 0; }
  .stat-item { padding-inline: clamp(16px, 3vw, 32px); }
}

/* Mobile 640px */
@media (max-width: 640px) {
  .bento-grid { grid-template-columns: 1fr; }
  .bento-card--main { grid-column: span 1; }
  .stat-divider { display: none; }
  .stats-inner { gap: 12px 0; }
  .stat-item { padding-inline: 20px; flex-direction: row; gap: 12px; }
  .stat-num { font-size: 28px; }
}


/* Brand Strip: CSS removed 2026-06-23, source files (brand-strip.jinja/
   .schema.json) deleted 2026-07-01 (architecture audit, Tier 1 cleanup).
   Superseded entirely by the Featured Brands section. */

/* ════════════════════════════════════════════════════════════
   BRAND FILTER CHIPS — category & products pages toolbar
════════════════════════════════════════════════════════════ */

.search-heading-term {
  color: var(--copper);
  font-weight: 400;
}
/* ════════════════════════════════════════════════════════════
   SEARCH OVERLAY — full-viewport search experience
════════════════════════════════════════════════════════════ */

.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 400;
  background: rgba(26, 18, 8, 0.88);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-block-start: clamp(72px, 14vw, 130px);
  padding-inline: var(--gap);
  opacity: 0;
  pointer-events: none;
  /* Matches the nav drawer / sticky ATC bar's considered curve — the same
     overlay-reveal category, previously on a generic "ease" instead. */
  transition: opacity 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}
.search-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.search-close-btn {
  position: fixed;
  top: 16px;
  right: 16px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--t-fast), transform var(--t-fast);
}
.search-close-btn:hover { background: rgba(255, 255, 255, 0.22); }
.search-close-btn:active,
.search-close-btn.is-pressed { background: rgba(255, 255, 255, 0.3); transform: scale(0.9); transition-duration: 80ms; }

.search-inner { width: 100%; max-width: 620px; }

.search-label {
  display: block;
  font-family: var(--font-head);
  font-size: clamp(22px, 4vw, 32px);
  font-weight: 900;
  color: white;
  margin-block-end: 18px;
}

.search-input-wrap { position: relative; }

.search-input {
  width: 100%;
  background: white;
  border: 2px solid transparent;
  border-radius: 14px;
  padding: 16px 56px 16px 20px;
  font-size: 16px;
  font-family: var(--font-body);
  color: var(--ink);
  outline: none;
  transition: border-color var(--t-fast);
  box-sizing: border-box;
}
.search-input:focus { border-color: var(--copper); }
.search-input::placeholder { color: var(--stone); }

.search-submit {
  position: absolute;
  inset-block: 8px;
  inset-inline-end: 2px;
  background: var(--copper);
  border: none;
  border-radius: 10px;
  width: 40px;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--t-fast), transform var(--t-fast);
}
.search-submit:hover { background: var(--espresso); }
.search-submit:active,
.search-submit.is-pressed { background: var(--espresso); transform: scale(0.9); transition-duration: 80ms; }

.search-quick-links {
  margin-block-start: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.search-quick-label { font-size: 12px; color: rgba(255, 255, 255, 0.55); }

.search-quick-link {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 100px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  transition: background var(--t-fast), transform var(--t-fast);
}
.search-quick-link:hover { background: rgba(255, 255, 255, 0.2); color: white; }
.search-quick-link:active,
.search-quick-link.is-pressed { background: rgba(255, 255, 255, 0.3); color: white; transform: scale(0.92); transition-duration: 80ms; }

/* ── Search autocomplete dropdown ───────────────────────── */
.search-suggestions {
  position: absolute;
  inset-block-start: calc(100% + 4px);
  inset-inline-start: 0;
  inset-inline-end: 0;
  background: white;
  border-radius: 10px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.15);
  list-style: none;
  margin: 0;
  padding: 4px 0;
  z-index: 10;
  overflow: hidden;
}
.search-suggestions[hidden] { display: none; }

.sug-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  font-size: 14px;
  color: var(--espresso);
  cursor: pointer;
  transition: background 0.1s;
  unicode-bidi: isolate;
}
.sug-item:hover,
.sug-item.is-active { background: var(--foam); }
.sug-item:active { background: var(--foam-mid); }

.sug-icon {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  opacity: 0.38;
}

.sug-item--product {
  align-items: center;
  gap: 12px;
  padding: 7px 14px;
}
.sug-prod-img {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
  background: var(--foam);
}
.sug-prod-img--placeholder {
  width: 44px;
  height: 44px;
  border-radius: 6px;
  flex-shrink: 0;
  background: var(--foam);
}
.sug-prod-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.sug-prod-name {
  font-size: 13px;
  color: var(--espresso);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sug-prod-price {
  font-family: var(--font-numeric);
  font-size: 12px;
  color: var(--copper);
  font-weight: 700;
}

.sug-item--all {
  border-block-start: 1px solid var(--foam);
  margin-block-start: 2px;
  padding-block-start: 10px;
  font-size: 13px;
  color: var(--copper);
}
.sug-item--all .sug-icon { opacity: 0.7; color: var(--copper); }
/* converter row: the icon sits in a 44px tile so it lines up with product images */
.sug-item--guide .sug-icon--guide {
  width: 44px;
  height: 44px;
  padding: 12px;
  box-sizing: border-box;
  border-radius: 6px;
  background: var(--mint-soft);
  color: var(--mint);
  opacity: 1;
}
.sug-item--guide .sug-prod-name { white-space: normal; font-weight: 600; }
.sug-item--all strong { font-weight: 600; }

/* ════════════════════════════════════════════════════════════
   STAGGER GRID — parent-triggered child animations
════════════════════════════════════════════════════════════ */

@media (prefers-reduced-motion: no-preference) {
  /* .stagger-skip = first-row card (JS-marked before .js-loaded lands):
     painted from server markup, never re-hidden. See main.js stagger block. */
  .stagger-grid.js-loaded > :not(.stagger-skip) {
    opacity: 0;
    transform: translateY(44px) scale(0.94);
    transition: opacity 0.6s ease, transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    transition-delay: calc(var(--i, 0) * 110ms);
    will-change: opacity, transform;
  }
  .stagger-grid.stagger-visible > :not(.stagger-skip) {
    opacity: 1;
    transform: translateY(0) scale(1);
    will-change: auto;
  }
}

/* ════════════════════════════════════════════════════════════
   SORT SELECT — toolbar dropdown
════════════════════════════════════════════════════════════ */

.toolbar { flex-wrap: wrap; }

.sort-field { display: flex; align-items: center; }

.sort-select {
  appearance: none;
  -webkit-appearance: none;
  padding: 7px 32px 7px 14px;
  min-height: 44px;
  border: 1px solid var(--linen);
  border-radius: 8px;
  background-color: white;
  font-size: 13px;
  font-family: var(--font-body);
  color: var(--ink);
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%238a7464' fill='none' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  /* Chevron on the TRAILING edge: right in English, left in Arabic.
     These two rules were the wrong way round - the base carried the RTL
     arrangement and [dir=rtl] carried the LTR one. Desktop hid it because the
     enhanced control replaces the native select there; on mobile the native
     select shows and the chevron sat on the leading edge, ahead of the label. */
  background-position: calc(100% - 10px) center;
}
[dir=rtl] .sort-select {
  /* Chevron on the left here, so the ROOM has to be on the left too. Swapping
     only background-position left this padding matching the LTR base, which
     put 32px of space on the side with no chevron and let the label run under
     the one on the other side. */
  padding: 7px 14px 7px 32px;
  background-position: 10px center;
}
.sort-select:focus-visible {
  outline: 2px solid var(--copper);
  outline-offset: 2px;
}

/* Dropdown list items.
   The 32px side padding above exists only to keep the closed control's text
   clear of the chevron. Options inherit no padding of their own, so the
   browser was painting every popup row with that same 32px reservation —
   which in RTL reads as a gap, then the word. Giving option its own padding
   removes the inherited gap.

   The popup itself is drawn by the OS, so this is best effort by design:
   Chrome, Edge and Firefox on Windows and Linux honour it; macOS, iOS and
   Android replace the list with a native picker that ignores it. That is an
   acceptable trade — those native pickers are already good, and this only
   has to fix the desktop rendering. */
.sort-select option {
  padding: 10px 14px;
  direction: rtl;
  text-align: right;
  font-size: 14px;
  font-family: var(--font-body);
  background-color: white;
  color: var(--ink);
}
/* Keep the popup in light chrome even when the OS is in dark mode, so the
   list cannot render as white text on a dark panel against our light theme. */
.sort-select { color-scheme: light; }

/* ────────────────────────────────────────────────────────────
   CUSTOM SORT LISTBOX — desktop only

   The native popup is drawn by the OS: its row highlight, radius, shadow
   and spacing are all beyond CSS, and it cannot be inspected or verified.
   On desktop we hide the select and mirror it with real DOM. The select
   stays in the document as the source of truth — the listbox writes to it
   and dispatches change, so the URL logic is untouched.

   Mobile keeps the native picker on purpose. A full-height OS wheel beats
   any custom list on a phone.
──────────────────────────────────────────────────────────── */

.sort-lb { position: relative; }

.sort-select.is-enhanced { display: none; }

.sort-lb-trigger {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 7px 14px;
  border: 1px solid var(--linen);
  border-radius: 8px;
  background: var(--white);
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.sort-lb-trigger:hover { border-color: var(--stone-light); }
.sort-lb-trigger:focus-visible {
  outline: 2px solid var(--copper);
  outline-offset: 2px;
}
.sort-lb-trigger[aria-expanded="true"] {
  border-color: var(--copper);
  box-shadow: 0 0 0 3px rgba(181, 98, 42, 0.12);
}

/* Chevron lives in its own element, so the trigger needs no oversized
   padding reservation — which is what leaked into the native popup. */
.sort-lb-chevron {
  flex: none;
  width: 10px;
  height: 6px;
  transition: transform 0.2s ease;
}
.sort-lb-trigger[aria-expanded="true"] .sort-lb-chevron { transform: rotate(180deg); }

.sort-lb-list {
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  inset-inline-start: 0;
  min-width: 100%;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--white);
  border: 1px solid var(--linen);
  border-radius: 10px;
  box-shadow: 0 12px 28px rgba(45, 28, 28, 0.14);
  white-space: nowrap;
}
.sort-lb-list[hidden] { display: none; }
.sort-lb-list:focus { outline: none; }

.sort-lb-option {
  padding: 10px 14px;
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--ink);
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.sort-lb-option:hover { background: var(--foam); }

/* Virtual focus. The listbox itself holds DOM focus and points here with
   aria-activedescendant, so no option is ever autofocused. */
.sort-lb-option.is-active { background: var(--foam-mid); }

.sort-lb-option[aria-selected="true"] {
  background: var(--copper);
  color: var(--white);
  font-weight: 700;
}
.sort-lb-option[aria-selected="true"]:hover { background: var(--copper); }

@media (prefers-reduced-motion: no-preference) {
  .sort-lb-list {
    animation: sort-lb-in 0.16s cubic-bezier(0.4, 0, 0.2, 1);
  }
}
@keyframes sort-lb-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ════════════════════════════════════════════════════════════
   STICKY ADD-TO-CART BAR — mobile product page
════════════════════════════════════════════════════════════ */

.sticky-atc {
  position: fixed;
  bottom: 0;
  inset-inline: 0;
  z-index: 90;
  background: white;
  border-block-start: 1px solid var(--linen);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 -4px 20px rgba(45, 28, 28, 0.1);
}
.sticky-atc.visible { transform: translateY(0); }

.sticky-atc-info { flex: 1; min-width: 0; }
.sticky-atc-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.3;
}
.sticky-atc-price {
  display: flex;
  align-items: baseline;
  gap: 7px;
  flex-wrap: wrap;
}
.sticky-price-sale {
  font-family: var(--font-numeric);
  font-size: 16px;
  font-weight: 700;
  color: var(--copper);
}
.sticky-price-orig {
  font-family: var(--font-numeric);
  font-size: 11px;
  font-weight: 300;
  color: var(--stone-light);
  text-decoration: line-through;
  text-decoration-color: var(--stone-light);
}
@media (max-width: 380px) { .sticky-price-orig { display: none; } }
.sticky-atc-btn { flex-shrink: 0; padding: 10px 20px; font-size: 14px; white-space: nowrap; }

@media (min-width: 769px) { .sticky-atc { display: none !important; } }

/* ════════════════════════════════════════════════════════════
   RECENTLY VIEWED — product page section
════════════════════════════════════════════════════════════ */

.recently-viewed { padding-block: clamp(40px, 6vw, 72px); background: var(--foam); }

.rv-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--gap);
  margin-block-start: 28px;
}

.rv-card {
  display: block;
  text-decoration: none;
  color: inherit;
  border-radius: 12px;
  overflow: hidden;
  background: white;
  border: 1px solid var(--linen);
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.42s ease, transform 0.42s ease, box-shadow var(--t-mid);
  transition-delay: calc(var(--i, 0) * 60ms);
}
.rv-card.visible { opacity: 1; transform: none; }
.rv-card:hover { box-shadow: var(--shadow-card); transform: translateY(-3px); }
.rv-card.visible:active,
.rv-card.visible.is-pressed { box-shadow: var(--shadow-sm); transform: scale(0.97); transition: transform 80ms ease, box-shadow 80ms ease; }

/* Square, not 3/2. A landscape frame was the worst crop on the page — it cut
   the product in half. Square matches both the photography and the card tile,
   so `cover` crops nothing. */
.rv-thumb { aspect-ratio: 1 / 1; overflow: hidden; background: var(--foam); }
.rv-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.rv-card:hover .rv-thumb img { transform: scale(1.05); }

.rv-body { padding: 12px 14px; }
.rv-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  margin-block-end: 4px;
  line-height: 1.4;
}
.rv-price { font-family: var(--font-numeric); font-size: 15px; color: var(--copper); }

@media (max-width: 768px) { .rv-grid { grid-template-columns: repeat(2, 1fr); } }

/* Brewing Methods module CSS removed (2026-07-01) — orphaned, unused by
   any shipped section (offers-cta-section.jinja, formerly this file's
   namesake, uses the generic .section/.eyebrow classes instead), and
   contained a broken reference to an undefined --t-mid token. Predates
   the frozen editorial language established during the Brands work;
   the real Brewing Methods section will be designed fresh from that
   language, not from this. See docs/MOTION-LANGUAGE.md Part IV §IV.6
   for the full reasoning. */

/* ════════════════════════════════════════════════════════════
   RESPONSIVE: new sections on small screens
════════════════════════════════════════════════════════════ */

@media (max-width: 640px) {
  .search-overlay { padding-block-start: 56px; }
}

/* ════════════════════════════════════════════════════════════
   HERO ENTRANCE — page-load staggered reveal
   Plays once on first paint; spring easing for premium feel.
════════════════════════════════════════════════════════════ */

@keyframes droplet-rise {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: no-preference) {
  .hero-eyebrow {
    animation: droplet-rise 0.65s cubic-bezier(0.16, 1, 0.3, 1) both;
    animation-delay: 0.08s;
  }
  .hero-v2-title {
    animation: droplet-rise 0.75s cubic-bezier(0.16, 1, 0.3, 1) both;
    animation-delay: 0.22s;
  }
  .hero-v2-desc {
    animation: droplet-rise 0.65s cubic-bezier(0.16, 1, 0.3, 1) both;
    animation-delay: 0.38s;
  }
  .hero-v2-cta {
    animation: droplet-rise 0.65s cubic-bezier(0.16, 1, 0.3, 1) both;
    animation-delay: 0.50s;
  }
}

/* ════════════════════════════════════════════════════════════
   PRODUCT CARD IMAGE — zoom-settle entrance inside stagger
   Image scales in from 1.07 → 1 while the card rises up,
   giving a rich "settling" feel without heavy animation.
════════════════════════════════════════════════════════════ */

@keyframes img-zoom-settle {
  from { transform: scale(1.1); }
  to   { transform: scale(1); }
}

@media (prefers-reduced-motion: no-preference) {
  .stagger-grid.stagger-visible > :not(.stagger-skip) .product-thumb img {
    animation: img-zoom-settle 1s cubic-bezier(0.16, 1, 0.3, 1) both;
    animation-delay: calc(var(--i, 0) * 110ms + 80ms);
  }
  /* The entrance zoom is for a card ARRIVING. A variant-cycle layer is inserted
     long after that moment (it waits on a fetch and a decode), so it would run
     the settle animation fresh on its first fade-in and the incoming photo
     would visibly zoom on every rotation. Excluded here rather than in the
     cycle block above so source order does the overriding — the two rules have
     equal specificity. */
  .stagger-grid.stagger-visible > * .product-thumb.is-cycling img.pt-layer {
    animation: none;
  }
}

/* ════════════════════════════════════════════════════════════
   PAGE ENTRANCE — soft fade+rise for non-home pages
   Homepage hero has its own staggered entrance, so JS only
   adds .page-enter to .site-main when no hero is present.
════════════════════════════════════════════════════════════ */

@keyframes page-enter {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: no-preference) {
  .site-main.page-enter {
    /* No fill-mode. CORRECTION (2026-08-20): this was changed from `both` on
       the theory that `backwards` stranded <main> blank in a non-compositing
       tab. That was WRONG and is recorded rather than quietly dropped. Fill
       mode only applies outside the active interval, so with no
       animation-delay `both` and `none` are indistinguishable — measured live:
       t=0 -> 0, t=200ms -> 0.5, finished -> 1, identical under both. Only with
       a delay do they diverge (`both` -> 0, `none` -> 1). The change is
       therefore inert; it is kept only because `none` is the safer default if
       an animation-delay is ever added here. The blank <main> seen in a
       headless capture was the 0.4s fade caught near its own first frame, not
       a fill-mode bug. */
    animation: page-enter 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  }
}

/* ════════════════════════════════════════════════════════════
   CURSOR POLISH — ensure all interactive surfaces feel clickable
════════════════════════════════════════════════════════════ */
.product-card,
.cat-pill,
.cat-card,
.rv-card { cursor: pointer; }

/* ── Announcement Bar ────────────────────────── */
.announcement-bar {
    background: var(--copper);
    color: #fff;
    text-align: center;
    padding: 10px 48px 10px 16px;
    font-size: 13px;
    font-weight: 500;
    position: relative;
    line-height: 1.4;
}
.announcement-bar-inner {
    max-width: var(--container);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}
.announcement-bar-close {
    position: absolute;
    inset-inline-end: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    transition: transform var(--t-fast);
}
.announcement-bar-close:active,
.announcement-bar-close.is-pressed { transform: translateY(-50%) scale(0.85); transition-duration: 80ms; }
.announcement-bar-close svg { width: 16px; height: 16px; }
.announcement-bar-text { flex: 1; min-width: 0; }
.announcement-bar-link { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.announcement-bar-link:hover { opacity: 0.85; }


/* ── Shared rail visual language (Products section, Horizontal Scroll mode) ──
   Originally built for the now-retired homepage SDK rail; kept here because
   sections/products-section.jinja reuses this exact head structure and scroll
   container so both experiences stay one family. Lives inside .container
   (centered, max-width var(--container)) so it never touches the viewport
   edges. Desktop shows a tidy 4-up row; narrower viewports show fewer with a
   partial-peek + horizontal swipe. */
.rail-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-block-end: clamp(18px, 3vw, 28px);
}
.rail-head-start { text-align: start; }
.rail-title {
    font-family: var(--font-head);
    font-size: clamp(24px, 4vw, 34px);
    font-weight: 700;
    color: var(--espresso);
    margin-block-start: 6px;
}
.rail-browse-link {
    font-size: 13px;
    font-family: var(--font-body);
    color: var(--stone);
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
    transition: color var(--t-fast);
}
.rail-browse-link:active { color: var(--copper); opacity: 0.7; }
@media (hover: hover) {
    .rail-browse-link:hover { color: var(--copper); }
}
/* Rail prev/next arrows — attached to the rail itself (one on each side,
   vertically centered on the cards, slightly overlapping the viewport
   edge), not to the section header — they control the cards, not the
   title. Same interactive vocabulary as .qty-btn (cart stepper):
   transparent, copper fill on hover/press, --stone-light when disabled.
   Hidden entirely (not just disabled) when the list doesn't overflow one
   viewport, or on touch-only devices where swipe already covers this and
   a non-functional-looking control would be clutter. */
.rail-viewport { position: relative; }
.rail-arrows { position: absolute; inset: 0; display: none; pointer-events: none; }
@media (hover: hover) {
    .rail-arrows.is-active { display: block; }
    .rail-arrow {
        position: absolute;
        top: 50%;
        --rail-arrow-x: 0px;
        --rail-arrow-scale: 1;
        transform: translateY(-50%) translateX(var(--rail-arrow-x)) scale(var(--rail-arrow-scale));
        opacity: 1;
        z-index: 2;
        pointer-events: auto;
        width: 30px; height: 30px;
        border: 1px solid var(--linen);
        border-radius: 50%;
        background: var(--white);
        color: var(--espresso);
        display: inline-flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        box-shadow: 0 0 0 rgba(45,28,28,0);
        transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast), box-shadow var(--t-fast);
        outline: none;
    }
    /* Logical, not physical: "prev" (back toward the first card) anchors
       inline-start and "next" (toward later cards) anchors inline-end, so the
       pair mirrors with the reading direction and needs no second rule.
       The GLYPHS have to mirror with them — each chevron points outward at
       the edge its button is pinned to — which is why the two paths are
       resolved per-locale in products-section.jinja rather than hardcoded.
       (Reading-flow cues like .rail-browse-link use arrow-forward.jinja; the
       gallery's physical-edge arrows mirror neither. Three different cases.) */
    .rail-arrow--prev { inset-inline-start: -14px; }
    .rail-arrow--next { inset-inline-end: -14px; }
    .rail-arrow svg { width: 16px; height: 16px; }
    /* No shadow at rest — a permanently shadowed circle sitting on top of
       product photography reads as persistent UI chrome, not a quiet
       affordance. Weight is revealed on interaction only, same as every
       other restrained hover cue in this theme (rail-browse-link, product
       card cue, etc.) — the arrow should feel discovered, not installed. */
    .rail-arrow:hover:not(:disabled) { background: var(--copper); border-color: var(--copper); color: #fff; box-shadow: 0 2px 10px rgba(45,28,28,.08); }
    .rail-arrow:focus-visible {
        outline: 2px solid var(--copper);
        outline-offset: 2px;
    }
    .rail-arrow:active:not(:disabled),
    .rail-arrow.is-pressed:not(:disabled) { --rail-arrow-scale: 0.92; }
    /* Hidden at the extreme it points toward — quietly communicates where
       the visitor is in the rail rather than just disabling a click.
       Recedes outward (away from the cards, toward its own edge) rather
       than shrinking in place. Pointer-events off during the hidden state;
       :disabled already removes it from tab order. */
    .rail-arrow:disabled {
        opacity: 0;
        pointer-events: none;
        color: var(--stone-light);
        border-color: var(--linen);
        background: var(--white);
        cursor: default;
    }
    .rail-arrow--prev:disabled { --rail-arrow-x: 8px; --rail-arrow-scale: 0.9; }
    .rail-arrow--next:disabled { --rail-arrow-x: -8px; --rail-arrow-scale: 0.9; }
    @media (prefers-reduced-motion: no-preference) {
        .rail-arrow { transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast), box-shadow var(--t-fast), opacity 200ms cubic-bezier(.4,0,.2,1), transform 200ms cubic-bezier(.4,0,.2,1); }
    }
}
.rail-scroll-wrap {
    overflow-x: auto;
    padding-block: 16px 24px;   /* breathing room so scale/lift never clips */
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    /* proximity, not mandatory: on reload the browser restores this element's
       saved scrollLeft, and a mandatory snap then drags the rail to whichever
       card is nearest that restored offset — landing the customer deep in the
       list instead of at its start. Intermittent by nature, since it only
       fires when a scroll position was saved. Proximity keeps the settle
       behaviour for deliberate swipes without seizing on restore. */
    scroll-snap-type: x proximity;
    /* Restore is refused outright — a product rail has no reading position
       worth preserving across a reload, unlike the page itself. */
    overflow-anchor: none;
}
.rail-scroll-wrap::-webkit-scrollbar { display: none; }
.rail-scroll {
    display: flex;
    gap: var(--gap);
}
/* Desktop: 4-up row, centered snap. Cards sized to fit N per view exactly. */
.rail-scroll .product-card {
    flex: 0 0 auto;
    width: calc((100% - 3 * var(--gap)) / 4);   /* 4 per view — desktop */
    scroll-snap-align: center;
}
@media (max-width: 1024px) {
    .rail-scroll .product-card { width: calc((100% - 2 * var(--gap)) / 3); }   /* 3 per view */
}
/* Mobile carousel — one centered card, ~19vw peek on each side, plus a
   fixed +14px frame so the first/last cards read as intentionally framed
   rather than flush against the viewport edge. Cards are 62vw.
   Framing space is a pair of empty ::before/::after flex items on
   .rail-scroll, not padding or margin. Verified in-browser that browsers
   exclude a scroll container's own trailing padding, and a last/first
   child's own margin, from scrollWidth at the far end of a horizontal
   scroll-snap container (RTL or not) — so both of those approaches collapse
   to a flush edge at one end while still working at the other. A real flex
   item (which a pseudo-element on a flex container counts as) is always
   included in scrollWidth, so it's the only reliable way to frame both ends.
   scroll-padding-inline is kept in sync so the first card still snaps to
   visual center at scrollLeft=0.
   The wrap breaks out of the container so cards can reach viewport edges. */
@media (max-width: 768px) {
    .rail-scroll-wrap {
        margin-inline: calc(-1 * clamp(16px, 4vw, 32px));
        scroll-padding-inline: calc(19vw + 14px);
    }
    .rail-scroll .product-card {
        width: 62vw;
        scroll-snap-align: center;
    }
    .rail-scroll::before,
    .rail-scroll::after {
        content: '';
        flex: 0 0 auto;
        width: calc(19vw + 14px);
        display: block;
    }
}

/* ── Rail active-card focus effect ──────────────────────────────
   The card whose center sits closest to the scroll container's center
   gets .rail-card-active (set by JS). Active card lifts subtly;
   neighbours step back slightly. Idle breathing plays on the active
   card after ~1.8s of no scrolling. Values kept deliberately understated
   so the cue reads as a quiet focus shift, not a pop.
   All motion is gated by prefers-reduced-motion so it degrades cleanly. */
@media (prefers-reduced-motion: no-preference) {
    .rail-scroll .product-card {
        opacity: 0.92;
        transform: scale(0.985);
        transition: transform .35s cubic-bezier(.4,0,.2,1), box-shadow .35s, opacity .35s;
    }
    .rail-scroll .product-card.rail-card-active {
        opacity: 1;
        transform: translateY(-1px) scale(1.008);
        box-shadow: 0 6px 24px rgba(45,28,28,.11);
    }
    @media (hover: hover) {
        .rail-scroll .product-card.rail-card-active:hover {
            transform: translateY(-2px) scale(1.008);
        }
    }
    @keyframes rail-breathe {
        0%, 100% { transform: translateY(-1px) scale(1.008); }
        50%       { transform: translateY(-1.5px) scale(1.01); }
    }
    .products-section.rail-idle .rail-scroll .product-card.rail-card-active {
        animation: rail-breathe 3.2s ease-in-out infinite;
    }
}

/* ===== MARKETING BANNER — premium, minimal campaign banner ===== */
.marketing-banner {
  position: relative;
  overflow: hidden;
  padding-block: clamp(64px, 10vw, 120px);
  display: flex;
  align-items: center;
}
.marketing-banner__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.marketing-banner__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: #000;
}
.marketing-banner__overlay--light  { opacity: .2; }
.marketing-banner__overlay--medium { opacity: .4; }
.marketing-banner__overlay--strong { opacity: .6; }

.marketing-banner__inner {
  position: relative;
  z-index: 2;
  width: 100%;
}
.marketing-banner__content {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 560px;
}
.marketing-banner--align-center .marketing-banner__content { margin-inline: auto; align-items: center; text-align: center; }
.marketing-banner--align-left   .marketing-banner__content { margin-inline-end: auto; align-items: flex-start; text-align: left; }
.marketing-banner--align-right  .marketing-banner__content { margin-inline-start: auto; align-items: flex-end; text-align: right; }

.marketing-banner__subtitle {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  opacity: .85;
  margin: 0;
}
.marketing-banner__title {
  font-family: var(--font-head);
  font-size: clamp(28px, 4.5vw, 48px);
  font-weight: 700;
  line-height: 1.2;
  color: inherit;
  margin: 0;
}
.marketing-banner__btn { margin-top: 10px; }

@media (max-width: 768px) {
  .marketing-banner { padding-block: clamp(48px, 12vw, 80px); }
  .marketing-banner__content { max-width: 100%; }
}

/* ===== BRANDS — navigation surface (docs/BRANDS-LANGUAGE.md) =====
   Equal-treatment logo grid, no captions (mark is the accessible
   name via alt, not visible text), restrained hover only, no JS.
   Compact utility-band footprint — deliberately lighter than any
   commerce section on this page. */
.fb-section {
  background: var(--foam);
  padding-block: var(--section-v);
}
.fb-head {
  text-align: center;
  margin-block-end: 20px;
}
.fb-title {
  font-family: var(--font-head);
  font-size: clamp(18px, 2.2vw, 22px);
  font-weight: 600;
  color: var(--espresso);
  margin: 0;
}
.fb-subtitle {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--stone);
  margin: 5px 0 0;
}
/* Every brand visible at once — no horizontal scroll on any viewport. Brands
   are a navigation surface: a shopper has to be able to see the whole set to
   choose from it, and anything parked off-screen effectively doesn't exist.
   Four per row on desktop, three on mobile, with a short final row centring
   itself (7 brands read as 4 + 3, or 3 + 3 + 1). Flex basis rather than grid
   because grid would left-align that short row. */
.fb-track {
  --fb-gap: 12px;
  --fb-per-row: 4;
  display: flex;
  flex-wrap: wrap;
  gap: var(--fb-gap);
  justify-content: center;
  /* The 200px per-tile ceiling lives on the TRACK, not the tile: capping the
     tile instead leaves slack that a fifth logo slips into on a wide viewport,
     silently breaking the 4-up rhythm. 4 x 200 + 3 x 12. */
  max-width: 836px;
  margin-inline: auto;
}
.fb-surface {
  flex: 0 0 calc((100% - (var(--fb-per-row) - 1) * var(--fb-gap)) / var(--fb-per-row));
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: var(--white);
  border: 1px solid var(--linen);
  border-radius: 10px 18px 10px 10px;
  text-decoration: none;
  transition: transform var(--t-fast), border-color var(--t-fast), box-shadow var(--t-fast);
}
.fb-surface:hover {
  transform: translateY(-2px);
  border-color: var(--copper);
  box-shadow: 0 6px 18px rgba(45,28,28,.10);
}
.fb-mark {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.fb-ctarow {
  text-align: center;
  margin-block-start: 16px;
}
.fb-cta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
@media (prefers-reduced-motion: reduce) {
  .fb-surface { transition: none; }
}
@media (max-width: 768px) {
  .fb-section { padding-block: var(--section-v); }
  .fb-head { margin-block-end: 16px; }
  .fb-track {
    --fb-gap: 10px;
    --fb-per-row: 3;
  }
  .fb-surface {
    padding: 12px;
  }
}

/* ===== Brand page (brand.jinja, /brands/<slug>) =====
   The mark above the brand page's h1. Height-capped, never width-stretched:
   these logos arrive at wildly different aspect ratios, and a shared cap
   height is what keeps them looking deliberate. Restored 2026-11-16. */
.brand-page-mark {
  display: block;
  max-height: 64px;
  max-width: 220px;
  width: auto;
  object-fit: contain;
  margin: 0 auto 14px;
}
@media (max-width: 768px) {
  .brand-page-mark { max-height: 52px; }
}

/* ===== Shipping & payment (shipping_payment.jinja) =====
   Shares the CMS page shell (.page-wrap / .page-title). Everything rendered
   here comes from the store's dashboard configuration, so the styling has to
   tolerate a variable number of sections and logos of inconsistent size. */
.sp-section + .sp-section { margin-top: clamp(32px, 5vw, 48px); }
.sp-heading {
  font-family: var(--font-head);
  font-size: 19px;
  font-weight: 600;
  color: var(--espresso);
  line-height: 1.5;
  margin: 0 0 16px;
}
.sp-list { list-style: none; margin: 0; padding: 0; }
.sp-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--linen);
  border-radius: var(--radius-md);
  background: var(--foam);
}
.sp-item + .sp-item { margin-top: 10px; }
.sp-bank { align-items: flex-start; }
/* Carrier and bank logos arrive at wildly different intrinsic sizes; box them
   so one oversized asset can't set the row height for the whole list. */
.sp-logo {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  object-fit: contain;
}
.sp-item-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.sp-item-name {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  color: var(--espresso);
  line-height: 1.6;
}
.sp-note {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 400;
  color: var(--stone);
  line-height: 1.7;
}
/* IBANs and account numbers are Latin strings inside an RTL line. Only the
   value gets isolated — setting direction:ltr on the whole row would make
   `text-align: start` resolve to left and knock these lines out of alignment
   with every other row on the card. <bdi> keeps the number's own order
   without disturbing the Arabic label around it. */
.sp-num bdi {
  direction: ltr;
  unicode-bidi: isolate;
  font-family: var(--font-numeric);
  word-break: break-all;
}
.sp-icons {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.sp-icon {
  height: 30px;
  width: auto;
  object-fit: contain;
}
.sp-empty {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--stone);
  line-height: 1.9;
  margin: 0;
}

/* ===== Account area =====
   Shell shared by /account, /account/orders and /addresses. Rebuilt against
   the default theme's account page: a sidebar that says what each section is
   for, the profile as a readable summary, and editing raised into a dialog.

   Motion is the theme's existing vocabulary, not a new one — .js-press-ack for
   intent acknowledgment, .stagger-grid for entrance, and the same dialog
   behaviour the Quick Buy modal uses. */
.acct-shell {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: clamp(20px, 3vw, 40px);
  align-items: start;
  padding-block: clamp(32px, 5vw, 56px) clamp(56px, 8vw, 88px);
}
@media (max-width: 900px) {
  .acct-shell { grid-template-columns: minmax(0, 1fr); }
}

/* -- Sidebar -- */
.acct-side { display: flex; flex-direction: column; gap: 10px; }
@media (max-width: 900px) {
  /* Horizontal rail on narrow screens: three stacked cards would push the
     actual content below the fold. */
  .acct-side {
    flex-direction: row;
    overflow-x: auto;
    scrollbar-width: none;
    margin-inline: calc(clamp(16px, 4vw, 32px) * -1);
    padding-inline: clamp(16px, 4vw, 32px);
    scroll-snap-type: x proximity;
  }
  .acct-side::-webkit-scrollbar { display: none; }
  .acct-card { flex: 0 0 auto; min-width: 210px; scroll-snap-align: start; }
  .acct-card-desc { display: none; }
}
.acct-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--linen);
  border-radius: var(--radius-md);
  background: var(--white);
  transition: border-color var(--t-base), background var(--t-base), transform var(--t-base);
}
.acct-card:hover { border-color: var(--stone-light); background: var(--foam); }
.acct-card:active,
.acct-card.is-pressed { transform: scale(0.985); transition-duration: 80ms; }
.acct-card.is-active {
  border-color: var(--espresso);
  background: var(--foam-mid);
}
.acct-card-ico {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--foam-mid);
  color: var(--espresso);
}
.acct-card.is-active .acct-card-ico { background: var(--white); color: var(--copper); }
/* The wishlist heart FILLS on its own page. The colour is already copper from
   the rule above; only the fill is added here, so this is the exact treatment
   a saved heart gets on a product card (.product-wish[aria-pressed="true"]) -
   one filled-heart language, not a second one that happens to look similar. */
.acct-card.is-active[data-acct="wishlist"] .acct-card-ico svg { fill: currentColor; }
.acct-card-ico svg { width: 19px; height: 19px; }
.acct-card-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.acct-card-title {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  color: var(--espresso);
}
.acct-card-desc {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--stone);
  line-height: 1.6;
}

/* -- Content sections -- */
.acct-main { display: flex; flex-direction: column; gap: clamp(28px, 4vw, 44px); min-width: 0; }
.acct-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--linen);
}
.acct-section-title {
  font-family: var(--font-head);
  font-size: clamp(17px, 3vw, 20px);
  font-weight: 600;
  color: var(--espresso);
  margin: 0;
}
.acct-loading,
.acct-error {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--stone);
  line-height: 1.8;
  margin: 0;
}
.acct-error { color: var(--danger); }
.acct-blank {
  text-align: center;
  padding: 36px 20px;
  border: 1px dashed var(--linen);
  border-radius: var(--radius-md);
}
.acct-blank p {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--stone);
  margin: 0 0 16px;
}

/* -- Profile summary -- */
.acct-facts { margin: 0; display: flex; flex-direction: column; }
.acct-fact {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 16px;
  padding: 11px 0;
}
.acct-fact + .acct-fact { border-top: 1px solid var(--foam-mid); }
@media (max-width: 520px) {
  .acct-fact { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}
.acct-fact dt {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--stone);
}
.acct-fact dd {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  color: var(--espresso);
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}
/* Latin values (phone, email, date) inside an RTL row. direction:ltr keeps the
   digit order correct, but it also flips what `start` means — with text-align:
   start these lines aligned LEFT while every Arabic value aligned right. `end`
   resolves to the right in an LTR box, putting them back on the row's own
   edge. */
.acct-ltr { direction: ltr; unicode-bidi: isolate; text-align: end; font-family: var(--font-numeric); }

/* -- Buttons and icon controls -- */
.acct-ghost {
  appearance: none;
  background: none;
  border: 1px solid var(--linen);
  border-radius: 999px;
  padding: 7px 15px;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--espresso);
  cursor: pointer;
  white-space: nowrap;
  transition: border-color var(--t-base), background var(--t-base), transform var(--t-base);
}
.acct-ghost:hover { border-color: var(--stone-light); background: var(--foam); }
.acct-ghost:active,
.acct-ghost.is-pressed { transform: scale(0.94); background: var(--foam-mid); transition-duration: 80ms; }
.acct-icon {
  appearance: none;
  border: 0;
  background: none;
  padding: 6px;
  border-radius: var(--radius-sm);
  color: var(--stone);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: color var(--t-base), background var(--t-base), transform var(--t-base);
}
.acct-icon svg { width: 17px; height: 17px; }
.acct-icon:hover { color: var(--espresso); background: var(--foam-mid); }
.acct-icon:active,
.acct-icon.is-pressed { transform: scale(0.88); transition-duration: 80ms; }
.acct-icon-danger:hover { color: var(--danger); }
.acct-icon[disabled] { opacity: .5; cursor: default; }
.acct-link {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--copper);
  text-decoration: underline;
  text-underline-offset: 3px;
  white-space: nowrap;
}
.acct-footer-row { display: flex; gap: 12px; flex-wrap: wrap; }

/* -- Address cards -- */
.acct-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}
.acct-addr {
  border: 1px solid var(--linen);
  border-radius: var(--radius-md);
  background: var(--foam);
  padding: 14px 16px;
  transition: opacity 200ms ease, transform 200ms ease;
}
/* Removal is shown before the card goes, so the list visibly reconciles
   rather than snapping. */
.acct-addr.is-leaving { opacity: 0; transform: scale(0.97); }
.acct-addr-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.acct-addr-title {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  color: var(--espresso);
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}
.acct-addr-tools { display: flex; gap: 2px; flex: 0 0 auto; }
.acct-addr-line {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--stone);
  line-height: 1.75;
  margin: 6px 0 0;
  overflow-wrap: anywhere;
}

/* -- Orders table -- */
.acct-table { width: 100%; border-collapse: collapse; }
.acct-table th {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  color: var(--stone);
  text-align: start;
  padding: 10px 12px;
  background: var(--foam-mid);
  white-space: nowrap;
}
.acct-table th:first-child { border-start-start-radius: var(--radius-sm); }
.acct-table th:last-child { border-start-end-radius: var(--radius-sm); }
.acct-table td {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--espresso);
  padding: 14px 12px;
  border-bottom: 1px solid var(--linen);
  vertical-align: middle;
}
.acct-table tbody tr { transition: background var(--t-base); }
.acct-table tbody tr:hover { background: var(--foam); }
/* The cells keep the table's own direction so every value sits under its
   header. The value is isolated so it can't be reordered by whatever sits
   beside it, but stays RTL: Latin digits are strong LTR and keep their own
   order regardless, while the riyal mark must land to the left of the amount
   the way it does in the cart. */
.acct-num {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  direction: rtl;
  unicode-bidi: isolate;
  white-space: nowrap;
}
/* The order number is a single LTR token — the leading "#" belongs in front of
   the digits, which an RTL run would push to the other end. */
.acct-cell-id .acct-num { direction: ltr; }
.acct-cell-id { font-family: var(--font-numeric); }
.acct-cell-date { color: var(--stone); font-size: 13px; white-space: nowrap; }
.acct-cell-total { font-family: var(--font-numeric); font-weight: 700; white-space: nowrap; }
.acct-cell-link { text-align: end; }
.acct-pill {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 12px;
  line-height: 1.6;
  padding: 3px 11px;
  border: 1px solid var(--linen);
  border-radius: 999px;
  color: var(--stone);
  white-space: nowrap;
}
/* Below 640px the table becomes stacked blocks with their labels attached --
   four columns on a phone forces horizontal scrolling to read a total. */
@media (max-width: 640px) {
  .acct-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .acct-table, .acct-table tbody, .acct-table tr, .acct-table td { display: block; width: 100%; }
  .acct-table tr {
    border: 1px solid var(--linen);
    border-radius: var(--radius-md);
    background: var(--foam);
    padding: 6px 14px 10px;
    margin-bottom: 10px;
  }
  .acct-table td { border: 0; padding: 6px 0; display: flex; justify-content: space-between; gap: 14px; align-items: center; }
  .acct-table td::before {
    content: attr(data-label);
    font-size: 12px;
    color: var(--stone);
    flex: 0 0 auto;
  }
  .acct-table td:empty { display: none; }
  .acct-cell-link { justify-content: flex-end; }
}

/* -- Edit dialog: same behaviour as the Quick Buy modal -- */
.acct-modal { display: none; position: fixed; inset: 0; z-index: 200; }
.acct-modal.open { display: block; }
.acct-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(45, 28, 28, .45);
  opacity: 0;
  transition: opacity 220ms ease;
}
.acct-modal.open .acct-backdrop { opacity: 1; }
.acct-sheet {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  margin-inline: auto;
  max-width: 560px;
  max-height: 88vh;
  overflow-y: auto;
  background: var(--foam-mid);
  border-radius: 22px 22px 0 0;
  box-shadow: 0 -8px 30px rgba(45, 28, 28, .18);
  transform: translateY(100%);
  transition: transform var(--t-base);
}
.acct-modal.open .acct-sheet { transform: translateY(0); }
/* The sheet takes focus on open (tabindex="-1") so the surface, not a control
   inside it, is where the dialog starts — but a programmatic focus on a
   container should not paint a ring. Same rule the lightbox already carries;
   every real control inside keeps its own focus-visible styling. */
.acct-sheet:focus, .acct-sheet:focus-visible { outline: none; }
@media (min-width: 720px) {
  .acct-sheet {
    top: 50%;
    bottom: auto;
    transform: translateY(-42%);
    opacity: 0;
    border-radius: var(--radius-lg);
    transition: opacity 220ms ease, transform 220ms ease;
  }
  .acct-modal.open .acct-sheet { transform: translateY(-50%); opacity: 1; }
}
.acct-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px 12px;
  border-bottom: 1px solid var(--linen);
}
.acct-sheet-title {
  font-family: var(--font-head);
  font-size: 17px;
  font-weight: 600;
  color: var(--espresso);
  margin: 0;
}

/* -- Form -- */
.acct-form { display: flex; flex-direction: column; gap: 16px; padding: 18px 20px 22px; }
.acct-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 520px) { .acct-field-row { grid-template-columns: 1fr; } }
.acct-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.acct-field label {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  color: var(--espresso);
}
.acct-field input,
.acct-field select {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--espresso);
  background: var(--white);
  border: 1px solid var(--linen);
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  width: 100%;
  transition: border-color var(--t-base);
}
.acct-field input:hover,
.acct-field select:hover { border-color: var(--stone-light); }
.acct-field input:focus-visible,
.acct-field select:focus-visible { outline: 2px solid var(--copper); outline-offset: 1px; border-color: var(--copper); }
.acct-field input[disabled] { background: var(--foam-mid); color: var(--stone); cursor: not-allowed; }
.acct-check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--espresso);
  cursor: pointer;
}
.acct-check input { width: 17px; height: 17px; accent-color: var(--copper); flex: 0 0 auto; }
.acct-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.acct-msg { font-family: var(--font-body); font-size: 13px; color: var(--stone); }
.acct-msg.is-ok { color: var(--success); }
.acct-msg.is-error { color: var(--danger); }

/* Required-field marker in the address form. */
.acct-req { color: var(--danger); font-weight: 400; }

/* -- City combobox --
   115 cities is too many for a select, so the field is type-to-filter. The
   list is positioned against .acct-combo and scrolls internally rather than
   growing the dialog. */
.acct-combo { position: relative; }
.acct-combo-list {
  position: absolute;
  z-index: 5;
  inset-inline: 0;
  top: 100%;
  margin: 4px 0 0;
  padding: 4px;
  list-style: none;
  max-height: 220px;
  overflow-y: auto;
  background: var(--white);
  border: 1px solid var(--linen);
  border-radius: var(--radius-sm);
  box-shadow: 0 10px 24px rgba(45, 28, 28, .12);
}
.acct-combo-item {
  padding: 9px 11px;
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--espresso);
  cursor: pointer;
}
.acct-combo-item:hover,
.acct-combo-item.is-active { background: var(--foam-mid); }

/* -- In-store confirmation --
   Replaces window.confirm, which rendered Chrome's own slab with English
   buttons in the middle of an Arabic RTL store. Sits above the dialog that
   opened it, so its z-index clears .acct-modal. */
.acct-modal--confirm { z-index: 210; }
.acct-sheet--sm { max-width: 380px; }
/* The confirmation is short and destructive, so it stays centred at every
   width rather than sliding up as a bottom sheet like the address form: the
   question belongs where the eye already is, not at the bottom edge. */
.acct-modal--confirm .acct-sheet {
  top: 50%;
  bottom: auto;
  margin-inline: auto;
  width: calc(100% - 40px);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 40px rgba(45, 28, 28, .22);
  transform: translateY(-42%);
  opacity: 0;
  transition: opacity 220ms ease, transform 220ms ease;
}
.acct-modal--confirm.open .acct-sheet { transform: translateY(-50%); opacity: 1; }
.acct-confirm-body { padding: 22px 22px 6px; }
.acct-confirm-note {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 10px 0 0;
}
/* The address is stacked rather than run together on one line: the customer
   is checking it, and a wrapped comma-separated string is harder to scan than
   discrete lines. */
.acct-confirm-line {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--stone);
  line-height: 1.75;
  overflow-wrap: anywhere;
}
.acct-confirm-line.is-lead {
  font-size: 14px;
  font-weight: 700;
  color: var(--espresso);
}
.acct-confirm-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 16px 22px 22px;
}
/* Destructive confirmation carries the weight; cancel stays quiet, so the
   safe choice is the easy one to hit and the destructive one is deliberate. */
.btn-danger {
  background: var(--danger);
  color: var(--white);
  border: 0;
}
.btn-danger:hover { filter: brightness(0.94); }
.btn-danger:active,
.btn-danger.is-pressed { transform: scale(0.96); transition-duration: 80ms; }

/* Date input sizing. A date control carries an intrinsic width from its own
   rendered text, and Safari lets that win over width:100% — so the box grew
   past every other field in the form instead of lining up with them.
   Suppressing the native appearance drops the intrinsic sizing, and min-width
   lets it shrink inside its flex column. Only the box changes; the control is
   still the platform date picker. */
.acct-field input[type="date"] {
  -webkit-appearance: none;
  appearance: none;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}
/* Safari also inflates the inner text container; without this the value can
   still push the box wider than its parent. */
.acct-field input[type="date"]::-webkit-date-and-time-value {
  width: 100%;
  margin: 0;
  text-align: start;
}

/* ===== Page shell: footer sits at the bottom of short pages =====
   Without this the document simply ends where the content does, and on a
   phone — where an account or policy page is often shorter than the screen —
   the strip below the footer showed body's cream, reading as an unfinished
   page after the copyright line.

   .app wraps header + main + footer (layout.jinja), so making it a
   full-height column and letting .site-main take the slack pushes the footer
   to the bottom edge when content is short, and leaves it in normal flow when
   content is long. dvh accounts for mobile browser chrome; the vh line is the
   fallback for browsers without it. */
.app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}
/* .page-shell takes over .app's column role for main + footer so the
   short-page sticky footer behaves exactly as before the wrapper existed. */
.page-shell { display: flex; flex-direction: column; flex: 1 0 auto; }
.site-main { flex: 1 0 auto; }
.site-footer { flex-shrink: 0; }

/* ===== Touch text entry: never zoom the page on focus =====================
   iOS Safari zooms the whole page in whenever a focused text field's
   font-size is below 16px, and it does not zoom back out when the field is
   blurred — tapping كود الخصم left the cart magnified and off-centre, and
   the same defect was latent in every other sub-16px field (notify-me,
   account and address forms, search on some breakpoints).

   16px is the documented threshold, and it is also the minimum readable
   body size on a phone, so raising it is the correct fix rather than a
   workaround. Scoped to coarse pointers, so every desktop surface keeps the
   proportions it was designed with.

   user-scalable=no / maximum-scale=1 would also stop the zoom and are
   deliberately NOT used: they take pinch-zoom away from everyone, which is
   a WCAG 1.4.4 failure. This fixes the cause instead of removing the
   capability.

   Kept last in the file, as one rule for the whole theme, so a new field
   inherits the behaviour instead of reintroducing the bug. */
@media (pointer: coarse) {
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="url"],
  input[type="password"],
  input[type="number"],
  input[type="search"],
  input[type="date"],
  input:not([type]),
  select,
  textarea {
    font-size: 16px;
  }
}

/* ══════════════════════════════════════════════════════════════════
   CART DRAWER
   Right-side cart preview opened from #cart-link. Geometry mirrors the
   mobile nav drawer (same clock, same easing, same recede depth), but the
   panel is capped in px so it reads as a panel on desktop rather than a
   near-full-width sheet.

   Physical properties (right/left) are used deliberately instead of logical
   ones (inset-inline-*): logical properties resolve inconsistently on iPad
   Safari inside this theme's hardcoded dir="rtl" containers.

   Shift derivation, same as the nav's: with transform-origin at the shell's
   left edge, the shell's right edge sits at scale x (100vw + shift), and the
   panel's leading edge at (100vw - panel). Setting them equal:
       shift = (100vw - panel) / scale - 100vw
   Expressed as a calc so the panel width can change without re-deriving by
   hand — the one number the nav has to maintain manually.
   ══════════════════════════════════════════════════════════════════ */
:root {
  --cart-panel: min(400px, 88vw);
  --cart-shift: calc((100vw - var(--cart-panel)) / 0.86 - 100vw);
  /* The drawer's own clock. Deliberately NOT var(--menu-dur) et al: those are
     defined inside @media (max-width: 768px) for the nav drawer, so above
     768px they are unset — the transitions would not run and
     scale(var(--menu-scale)) would be invalid, dropping the whole recede
     transform. Same values, own names, defined at every width. Retuning the
     nav's clock deliberately does not retune this surface; they are different
     surfaces at different sizes. */
  --cart-dur:   .8s;
  --cart-ease:  cubic-bezier(.15, .2, .1, 1);
  --cart-scale: .86;
}

.cart-scrim {
  position: fixed;
  inset: 0;
  /* Above the header, below the panel. The header is pinned at --z-nav, so a
     scrim beneath it left the top strip - nav links included - lit and
     undimmed above a page that had dimmed and receded. Raising the scrim
     alone is not enough: the panel has to clear it too, or the drawer renders
     under the wash and every tap on it hits the scrim instead. */
  z-index: calc(var(--z-nav) + 1);
  background: rgba(26, 18, 8, .55);   /* matched to .nav-overlay */
  opacity: 0;
  transition: opacity var(--cart-dur) var(--cart-ease);
}
.cart-scrim[hidden] { display: none; }

/* The header lives outside .page-shell (it must - a transformed ancestor
   would capture the fixed drawer), so it does not recede with the page.
   Left alone it stayed full-bleed and fully opaque above a page that had
   shrunk to 86% and slid sideways: the two surfaces visibly detached during
   the whole 800ms, which is what the drawer's "glitching" was.

   The nav drawer solves the same problem by fading its chrome and keeping
   only the hamburger, which it needs as the close control. This panel
   carries its own close button, so the header has nothing to keep and can
   simply yield. */
/* The header BOX stays painted; only its contents yield. Fading the whole
   header left a void the height of the header (111px on this store) above the
   receded page - its layout space was still reserved but nothing was drawn in
   it, so the top of the screen read as an empty band under the scrim.

   This is the nav drawer's arrangement, and the reason it is that way: going
   fixed takes the header out of flow, which would pull the shell up by exactly
   its height, so --cart-header-h hands that space straight back and the swap
   costs no layout movement. Pinning is also required rather than cosmetic -
   the scroll lock sets overflow:hidden, which on iOS takes the scroll
   container out from under a position:sticky header and drops it to the top
   of the document. */
html.cart-open .site-header,
html.cart-closing .site-header { position: fixed; inset-inline: 0; top: 0; }
html.cart-open .page-shell,
html.cart-closing .page-shell { padding-top: var(--cart-header-h, 0px); }

/* The header's contents are deliberately NOT faded. With the scrim above the
   header they dim exactly like the rest of the page behind the drawer, which
   is the honest reading: nothing has gone away, one surface has come forward.
   Fading them as well produced an empty bar whose contents had vanished for
   no reason the customer could see. */

/* The recede needs a transition at every width. The .page-shell transition
   lives beside the --menu-* tokens inside @media (max-width: 768px), because
   the nav drawer that owns it is mobile-only - so above 768px the transform
   had nothing to animate and the page simply teleported into its receded
   position. Same values as the nav's, so the mobile behaviour it already
   inherits is unchanged. */
.page-shell {
  transition: transform var(--cart-dur) var(--cart-ease);
}
html.cart-open .cart-scrim { opacity: 1; }

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: calc(var(--z-nav) + 2);   /* must clear the scrim, see .cart-scrim */
  display: flex;
  flex-direction: column;
  width: var(--cart-panel);
  height: 100dvh;
  background: var(--foam);
  border-left: 1px solid var(--linen);
  box-shadow: var(--shadow-lg);
  transform: translateX(100%);
  transition: transform var(--cart-dur) var(--cart-ease);
  overscroll-behavior: contain;
}
.cart-drawer[hidden] { display: none; }
html.cart-open .cart-drawer { transform: translateX(0); }

/* Touch feedback. This theme has no global tap-highlight reset - every
   interactive surface opts out for itself - so the drawer inherited the
   platform default, rgba(51,181,229,.4). On touch that painted a blue wash
   across whatever was tapped; over a product name it reads as a blue line
   through the text, as if it had been selected. */
.cart-drawer,
.cart-drawer-close,
.cart-drawer-remove,
.cart-drawer-name,
.cart-drawer-checkout,
.cart-drawer-continue,
.cart-drawer-retry,
.cart-drawer-empty-cta,
.cart-drawer-error-link,
.cart-scrim {
  -webkit-tap-highlight-color: transparent;
}
.cart-drawer-close,
.cart-drawer-remove,
.cart-drawer-checkout,
.cart-drawer-retry {
  touch-action: manipulation;   /* no 300ms double-tap zoom delay */
}
/* The panel takes programmatic focus on arrival (it is the surface, not a
   control), which must never paint a ring. Keyboard users are unaffected:
   this element is never reached by Tab, only by that focus() call. */
.cart-drawer:focus { outline: none; }

html.cart-open .page-shell {
  transform: scale(var(--cart-scale)) translateX(var(--cart-shift)) translateZ(0);
}
/* Scroll lock for the drawer's lifetime, released one clock later on close
   for the same reason the nav holds it: dropping it while the shell is still
   scaled makes iOS adjust the scroll offset under a moving layer. */
html.cart-open, html.cart-open body,
html.cart-closing, html.cart-closing body {
  overflow: hidden;
}

.cart-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 22px 14px;
  border-bottom: 1px solid var(--linen);
  flex: 0 0 auto;
}
.cart-drawer-title {
  margin: 0;
  font-family: var(--font-head);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
}
.cart-drawer-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: -10px;
  border: 0;
  background: none;
  color: var(--ink);
  cursor: pointer;
  border-radius: 50%;
  transition: background var(--t-base), color var(--t-base);
}
/* Gated: on touch there is no pointer to leave, so an ungated :hover sticks
   to whatever was last tapped. After a removal the list shifts up under a
   stationary finger and the NEXT row's control inherits the highlight, which
   reads as that X being selected. */
@media (hover: hover) {
  .cart-drawer-close:hover { background: var(--linen); }
}

/* Announced, not displayed. A removal is already confirmed visually by the
   row leaving and the total falling; printing "the item was deleted" above
   the list said the same thing a third time, in a band that pushed the
   layout and then sat there for the rest of the session. The live region
   still carries the outcome to screen readers, which have no other signal.
   Failures are exempt - those surface inline on the offending row. */
.cart-drawer-status {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.cart-drawer-list {
  flex: 1 1 auto;
  margin: 0;
  padding: 8px 22px;
  list-style: none;
  overflow-y: auto;
  overscroll-behavior: contain;
}

/* Two columns, not three. The remove control used to share a column with the
   price, so a 44px touch target set that column's width and crowded the
   figure it sat under. It now lives at the row's outer top corner, and the
   price gets a baseline of its own. */
.cart-drawer-row {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 14px;
  align-items: start;
  padding: 18px 0;
  border-bottom: 1px solid var(--linen);
}
.cart-drawer-thumb {
  width: 72px;
  height: 72px;
  object-fit: cover;      /* square crop, per the project image guidelines */
  border-radius: 10px;
  background: var(--linen);
}
/* min-width:0 lets the name clamp instead of forcing the grid column wider —
   a flex/grid child defaults to min-content width and would refuse to shrink. */
.cart-drawer-main { min-width: 0; }

.cart-drawer-topline {
  display: flex;
  align-items: flex-start;
  /* 10px, not 6px. The remove button's hover disc is painted 28px inside a 44px
     box, which leaves it clearing the product name by a single pixel at gap 6 -
     clear on paper, cramped to look at. */
  gap: 10px;
}
.cart-drawer-name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  font-size: .88rem;
  line-height: 1.5;
  color: var(--ink);
  text-decoration: none;
}
/* The variant values Zid concatenated into the name, given their own quiet
   line so the product reads as a product rather than a hyphenated string. */
.cart-drawer-variant {
  margin: 3px 0 0;
  font-size: .76rem;
  line-height: 1.45;
  color: var(--stone);
}
/* gap is 8px rather than 10 because of the densest case this line has to
   hold: a discounted line with quantity, which puts price + struck original +
   quantity side by side. At the 330px panel that combination overran its own
   content box and pushed the quantity into the row's padding gutter, out of
   line with the column above it. */
.cart-drawer-footline {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 9px;
}
/* inline-flex so the sign and the number are placed by `direction`, giving
   "2x" in Arabic and "x2" in English off one markup order. Not a bidi
   accident: a flex row's order follows direction outright, whereas the bare
   multiplication sign is a neutral whose side depends on its neighbours. */
.cart-drawer-qty {
  display: inline-flex;
  align-items: baseline;
  font-size: .78rem;
  color: var(--stone);
  font-variant-numeric: tabular-nums;
}
.cart-drawer-price {
  font-family: var(--font-numeric);
  font-size: 1.02rem;
  color: var(--ink);
  white-space: nowrap;
}
/* Discounts reuse the theme's existing vocabulary rather than inventing one:
   .price--sale (copper, bold) on the current figure and .price-old
   (line-through, --stone-light) on the original, exactly as the product card
   does. Only the size is set here, because .price-old carries a 13px meant
   for the grid.

   One line, current price first - the card's arrangement, chosen there so
   every card keeps the same height, which matters just as much in a list:
   a discounted row must not be taller than an undiscounted one. No badge and
   no percentage, following the rationale already recorded for the card: the
   strikethrough is the label. */
.cart-drawer-price-old {
  font-size: .76rem;
  white-space: nowrap;
}
/* Two classes deliberately. .price--sale alone loses to .cart-drawer-price -
   equal specificity, and this block is later in the file - so the sale figure
   rendered in --ink and the discount lost the one cue that carries it. */
.cart-drawer-price.price--sale {
  color: var(--copper);
  font-weight: 700;
}
/* 44px target kept for touch, but pulled into the row's own padding with
   negative margins so it reads as a small quiet mark rather than a button
   competing with the product name beside it.

   THE HIT AREA AND THE VISIBLE DISC ARE DIFFERENT SIZES, deliberately. Filling
   the whole 44px box on hover painted a disc wide enough to sit over the
   product name beside it - the control looked like it belonged to the text it
   was covering. So the box stays 44px for the finger, and the disc is painted
   at 28px by a radial-gradient: the same trick .product-wish already uses, and
   the same 28px the main cart's own delete button draws. Hover feedback now
   lands on the icon instead of spilling into the name.

   Resting colour is --stone, not --stone-light. At #c4b6a4 on this near-white
   panel the trash was technically present and practically invisible; the main
   cart has always drawn its delete at --stone and reads correctly. Hover goes
   red, again matching the main cart - if the two surfaces are going to share
   an icon they should share its behaviour, or the shared icon is cosmetic. */
.cart-drawer-remove {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  margin: -11px -13px 0 0;
  border: 0;
  background: radial-gradient(circle at center, transparent 0 14px, transparent 14px);
  color: var(--stone);
  cursor: pointer;
  border-radius: 50%;
  transition: background var(--t-fast), color var(--t-fast), transform var(--t-fast);
}
@media (hover: hover) {
  .cart-drawer-remove:hover {
    background: radial-gradient(circle at center, rgba(217, 79, 79, .12) 0 14px, transparent 14px);
    color: #d94f4f;
  }
}
.cart-drawer-remove:active {
  background: radial-gradient(circle at center, rgba(217, 79, 79, .2) 0 14px, transparent 14px);
  color: #d94f4f;
  transform: scale(0.92);
  transition-duration: 80ms;
}
.cart-drawer-remove[disabled] { opacity: .45; cursor: default; }

.cart-drawer-warn {
  margin: 6px 0 0;
  font-size: .78rem;
  color: var(--copper);
}
.cart-drawer-row-error {
  margin: 6px 0 0;
  font-size: .78rem;
  color: var(--danger);
}

.cart-drawer-empty,
.cart-drawer-error {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 40px 22px;
  text-align: center;
}
.cart-drawer-empty[hidden],
.cart-drawer-error[hidden],
.cart-drawer-foot[hidden] { display: none; }
.cart-drawer-empty-mark { color: var(--copper); }
.cart-drawer-empty-text { margin: 0; color: var(--stone); }
.cart-drawer-empty-cta,
.cart-drawer-error-link { color: var(--copper); font-size: .88rem; }

.cart-drawer-foot {
  flex: 0 0 auto;
  padding: 16px 22px calc(18px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--linen);
  background: var(--foam);
}
.cart-drawer-subtotal {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 12px;
}
.cart-drawer-subtotal-label { font-size: .86rem; color: var(--stone); }
.cart-drawer-subtotal-value { font-family: var(--font-numeric); font-size: 1.15rem; color: var(--ink); }
.cart-drawer-checkout { display: block; width: 100%; text-align: center; }
/* Quiet by design. It sits under a filled primary and must read as the calm
   way out, not a second thing to weigh - the drawer now opens on its own after
   an add, so this is the path most customers take. Full width and 44px tall so
   it is as easy to hit as the button above it. */
.cart-drawer-continue {
  display: block;
  width: 100%;
  min-height: 44px;
  margin-top: 6px;
  padding: 10px;
  border: 0;
  background: none;
  font-family: var(--font-body);
  font-size: .86rem;
  color: var(--stone);
  cursor: pointer;
  border-radius: 8px;
  transition: color var(--t-base), background var(--t-base);
}
@media (hover: hover) {
  .cart-drawer-continue:hover { color: var(--ink); background: var(--linen); }
}
.cart-drawer-blocked {
  margin: 0 0 10px;
  font-size: .8rem;
  color: var(--copper);
}
.cart-drawer-blocked[hidden] { display: none; }

/* Skeleton rows — shown from the instant the drawer opens until the first
   fetch resolves, so the panel is never an empty box waiting on a network. */
.cart-drawer-skeleton .cart-drawer-thumb,
.cart-drawer-skeleton .cart-drawer-sk-line {
  background: var(--linen);
  animation: cart-sk-pulse 1.4s ease-in-out infinite;
}
.cart-drawer-sk-line { height: 10px; border-radius: 5px; margin-bottom: 8px; }
.cart-drawer-sk-line.is-short { width: 45%; }
@keyframes cart-sk-pulse { 0%,100% { opacity: 1 } 50% { opacity: .55 } }

/* Removal: the row collapses its own height and fades, so the list closes
   the gap rather than snapping. Height is set in px by JS before the class
   lands, because a transition to 0 needs a concrete start value. */
.cart-drawer-row.is-removing {
  overflow: hidden;
  opacity: 0;
  padding-top: 0;
  padding-bottom: 0;
  transition: height 280ms var(--cart-ease),
              opacity 180ms ease,
              padding 280ms var(--cart-ease);
}

/* Entrance: rows arrive slightly after the panel and slightly apart, so the
   list pours in rather than appearing as a block. --i is set per row in
   itemHtml(). Capped at 5 so a large cart does not animate as a long wave:
   rows past the fifth all use the fifth's delay.

   Reuses droplet-rise's shape (the theme's existing arrival curve) rather
   than introducing a new one. */
/* Gated on .is-entering, which main.js grants to the first real render after
   the drawer opens and to no other. Without the gate every render re-runs the
   stagger - including the reload after a removal, so deleting one line made
   the whole surviving list re-pour, and opening the drawer with a cached cart
   animated once for the cache and again for the fetch. */
html.cart-open .cart-drawer-list.is-entering .cart-drawer-row {
  animation: cart-row-in 420ms cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: calc(180ms + min(var(--i, 0), 5) * 40ms);
}
@keyframes cart-row-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

/* Movement is removed; every state change still happens, instantly. */
@media (prefers-reduced-motion: reduce) {
  .cart-drawer,
  .cart-scrim,
  .page-shell,
  .site-header {
    transition: none !important;
  }
  html.cart-open .page-shell { transform: none !important; }
  html.cart-open .cart-drawer-list.is-entering .cart-drawer-row { animation: none !important; }
  .cart-drawer-row.is-removing { transition: none !important; }
  .cart-drawer-skeleton .cart-drawer-thumb,
  .cart-drawer-sk-line { animation: none !important; }
}

/* ── Language switcher ──────────────────────────────────────────────────
   Sits in .header-actions beside the icon buttons, but is text not an icon,
   so it borrows the icon button's hit area and press behaviour rather than
   inventing a new control. Labelled with the target language, so the glyph
   set itself signals what the press will do. */



/* =====================================================
   SAVE / WISHLIST HEART
   One control, one meaning, everywhere: a heart means saved, click to unsave.
   The saved-items page uses this same control rather than a second affordance.
   ===================================================== */
.product-card { position: relative; }

.product-wish {
  position: absolute;
  inset-block-start: 2px;
  /* Logical, not physical: this puts the heart in the far corner in BOTH
     directions - top-right in LTR, top-left in RTL - without a [dir] override. */
  inset-inline-end: 8px;
  z-index: 2;
  /* The BUTTON is 44x44 - a real touch target - while the visible disc is the
     32px circle painted by the gradient below. Doing it this way rather than
     expanding a ::after means the whole 44px genuinely receives the click;
     hit-testing 4px outside a 32px button was landing on the card link.
     Never gate this control on :hover - that makes it unreachable on touch. */
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  /* Light over the photo: a soft 16px-radius disc, not a heavy chip. */
  background: radial-gradient(circle at 50% 50%,
              rgba(255, 255, 255, .58) 15px, rgba(255, 255, 255, 0) 16px);
  color: var(--ink);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 160ms ease, transform 160ms ease, color 160ms ease;
}

.product-wish svg {
  width: 18px; height: 18px;
  fill: none; stroke: currentColor; stroke-width: 1.7px;
  /* Keeps the outline readable on a pale photo. */
  filter: drop-shadow(0 0 1px rgba(255, 255, 255, .9));
}
.product-wish:hover {
  background: radial-gradient(circle at 50% 50%,
              rgba(255, 255, 255, .95) 15px, rgba(255, 255, 255, 0) 16px);
}
.product-wish:active { transform: scale(.9); }
.product-wish:focus-visible { outline: 2px solid var(--copper, #b87333); outline-offset: 2px; }

/* Saved: filled heart. The FILL is the state signal, not colour alone. */
.product-wish[aria-pressed="true"] { color: var(--copper, #b87333); }
.product-wish[aria-pressed="true"] svg { fill: currentColor; stroke: currentColor; }

/* In flight: dimmed, and refuses further presses until the write settles.
   This is Acquisition Flow's Unavailable state — the rule that the trigger
   must go Unavailable rather than stay Engaged, so the same save cannot be
   fired twice. The attribute was declared here before anything set it; the
   toggle in main.js now drives it, and pairs it with aria-disabled so the
   state is announced and Enter on a focused heart is refused too —
   pointer-events alone stops a click and nothing else. */
.product-wish[data-busy="1"] { opacity: .55; pointer-events: none; }

/* PDP: beside the title in normal flow, not pinned over an image. */
.product-title-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  justify-content: space-between;
}
.product-title-row h1 { margin: 0; flex: 1 1 auto; }
.product-wish--pdp {
  position: static;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  background: var(--paper, #f7f5f2);
}
.product-wish--pdp svg { width: 22px; height: 22px; filter: none; }

/* A saved product that is gone or unbuyable still renders, but reads as
   inactive rather than looking broken. */
.product-card--gone { opacity: .62; }
.product-card--gone .product-quick-trigger { display: none; }
.wishlist-note {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--ink-soft, #6b6560);
}

/* Header badge showing how many items are saved. */
.wish-badge {
  position: absolute;
  inset-block-start: -4px;
  inset-inline-end: -4px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 9px;
  background: var(--copper, #b87333);
  color: #fff;
  font-size: 11px;
  line-height: 17px;
  text-align: center;
}
.wish-badge[hidden] { display: none; }

/* Quiet placeholder while the saved-items read is in flight. Deliberately
   understated: it holds the space so the page does not jump, without
   competing with the content that is about to replace it. */
/* Saved products sit in the account shell's content column, not the full
   container, so the page's viewport-width breakpoints (4/3/2 columns) describe
   a width this grid does not have - at 1024px the sidebar is still 300px wide
   and three cards do not fit what is left. Sizing from the available space
   instead of the viewport is the only version that stays right at every width
   without a second set of breakpoints tracking the sidebar. Scoped to
   .acct-main so every other product grid keeps its existing rules. */
.acct-main .product-grid {
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}


/* =====================================================
   ENGLISH (LTR) OVERRIDES

   The theme was built Arabic-only, so a number of surfaces pin `direction:
   rtl` or `text-align: right` outright. Those are correct for Arabic and were
   never wrong until a second language existed. Arabic is the reference and is
   left exactly as it is; everything here is additive and scoped to [dir=ltr],
   so no Arabic rule changes value.

   PHYSICAL VALUES ON PURPOSE, NOT LOGICAL ONES. The categories panel carries a
   long comment explaining that logical properties resolved inconsistently on
   real iPad Safari and that `right` cannot be resolved two ways. The same
   lesson was re-learned on the coupon field, where logical radii resolved
   against an element's own dir attribute and produced a worse join than the
   bug they replaced. [dir] on an ancestor is the one signal that cannot be
   overridden locally.
   ===================================================== */

/* ---- Categories mega menu (desktop) ---- */
[dir=ltr] .nav-cats-list {
  padding-left: 0;
  padding-right: 20px;
  text-align: left;
}
[dir=ltr] .nav-cats-detail {
  text-align: left;
  border-right: 0;
  border-left: 1px solid var(--linen);
  padding-right: 0;
  padding-left: 24px;
}

/* ---- Mobile drawer ----
   The panel stays anchored right, matching the hamburger's position in both
   languages - the open/closed transform maths is built on that anchor and is
   deliberately not touched. Only the CONTENT direction flips, which is what
   left-aligns the links and moves each row's chevron to the trailing edge. */
@media (max-width: 768px) {
  [dir=ltr] .nav { direction: ltr; }
}


/* ---- Cart line-item prices ----
   .cart-product-total-price and its before-price pin direction:rtl, which is
   what puts the currency mark ahead of the number on every line. The unit
   price beneath them does not, which is why "Item price 2.000 OMR" already
   read correctly while the line total above it did not - the two lines
   disagreed inside the same card.

   These are inline-flex, so `direction` alone decides which side the mark
   lands on; no order or margin changes are needed. */
[dir=ltr] .cart-product-prices .cart-product-total-price,
[dir=ltr] .cart-product-prices .cart-product-total-before-price { direction: ltr; }

/* ---- Account chip and greeting ----
   `direction: rtl` here is what puts the avatar first. In English the avatar
   leads on the LEFT and the text flows right from it, so the whole chip simply
   runs ltr. This is also what fixes "Welcome," rendering as ",Welcome": the
   comma is bidi-neutral, so it attaches to whichever end the surrounding
   direction dictates. The string was always correct; its container was not. */
[dir=ltr] .header-account { direction: ltr; }
[dir=ltr] .header-greeting { text-align: left; }
[dir=ltr] .nav-account { direction: ltr; }
[dir=ltr] .nav-account .nav-greeting { text-align: left; }

/* ── Carton Discount («خصم الكرتون») ─────────────────────────────
   PDP: one heading, one explanation line, between the price block and
   the form. The card carries only the grade in the theme's own badge
   slot (.product-badge) and the struck-through price the theme already
   renders, so there is no card CSS here. See carton-discount.jinja. */
.cd-panel {
  margin-top: 16px;
  padding: 16px 18px;
  min-height: 44px;
  border: 1px solid var(--linen);
  border-radius: var(--radius-md);
  background: var(--mint-soft);
  color: var(--ink);
}
.cd-panel-title {
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 6px;
  color: var(--espresso);
}
.cd-why {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.85;
  color: var(--espresso);
}
@media (max-width: 768px) {
  .cd-panel { margin-top: 12px; padding: 14px 16px; }
}
