/* Qeshla design tokens. Source: "Qeshla package.pdf" brand guide (Pantone page, typography pages).
   Every colour, font and spacing value used by the site comes from here. */

/* Fonts (owner's choice): IBM Plex Sans Arabic for Arabic letters, Inter for Latin and every digit.
   Both are free under the SIL Open Font License 1.1 (public/fonts/OFL-*.txt). */
@font-face {
  font-family: "Qeshla Arabic";
  src: url("/fonts/ibm-plex-sans-arabic-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200F, U+2010-2011;
}
@font-face {
  font-family: "Qeshla Arabic";
  src: url("/fonts/ibm-plex-sans-arabic-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200F, U+2010-2011;
}
@font-face {
  font-family: "Qeshla Arabic";
  src: url("/fonts/ibm-plex-sans-arabic-700.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200F, U+2010-2011;
}
@font-face {
  font-family: "Qeshla Latin";
  src: url("/fonts/inter-latin-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0020-007E, U+00A0-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-2027,
    U+2030-205E, U+20AC, U+2122, U+2212;
}
@font-face {
  font-family: "Qeshla Latin";
  src: url("/fonts/inter-latin-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
  unicode-range: U+0020-007E, U+00A0-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-2027,
    U+2030-205E, U+20AC, U+2122, U+2212;
}
@font-face {
  font-family: "Qeshla Latin";
  src: url("/fonts/inter-latin-700.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
  unicode-range: U+0020-007E, U+00A0-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-2027,
    U+2030-205E, U+20AC, U+2122, U+2212;
}

:root {
  /* Qeshla palette (design kit colors.png). The token names are kept from the original code base:
     --brand-navy is Qeshla green, the main colour (text on white 10.3:1). */
  --brand-navy: #0f483e; /* Qeshla green: logo, primary buttons, links */
  --brand-cloud: #fff1dd; /* cream: warm surfaces, the footer, image backgrounds */
  --brand-yellow: #ac8854; /* gold: accents only, never small text on white (3.1:1) */
  --brand-periwinkle: #cbfff6; /* mint: soft cool surfaces */
  --brand-peach: #fff1dd; /* cream */

  /* Roles */
  --color-bg: #ffffff;
  --color-surface: var(--brand-cloud);
  --color-surface-cool: var(--brand-periwinkle);
  --color-surface-warm: var(--brand-peach);
  /* Pressed and open states of everything light (sections, menus, sizes, links): the footer background, never blue
     (owner, 1 Nov 2026). On it: text #1e1e1e 14.4:1, navy 10.4:1, grey #505050 6.9:1 (AA). */
  --press-bg: var(--color-surface);
  --color-text: #1e1e1e;
  --color-muted: #505050;
  --color-line: #e3e0d9;
  --color-field-line: #8a877f; /* 3.6:1 on white */
  --color-accent: var(--brand-navy);
  --color-accent-ink: #ffffff;
  --color-highlight: var(--brand-yellow);
  --color-highlight-ink: var(--brand-navy);
  --color-error: #b3261e;
  --color-success: #1e6b3a; /* text: 6.6:1 on white */
  --color-progress: #2f9e5f; /* free-delivery bar fill */
  --color-price: var(--color-muted); /* grey prices: #505050, 8.6:1 on white */
  /* Buttons: a deep background with a bright label of the same hue, as in the admin panel. Contrast of each
     label on its background (WCAG AA needs 4.5:1) is noted; hover and pressed keep it. */
  --btn-primary-bg: var(--brand-navy); /* #0f483e + white: 10.3:1 */
  --btn-primary-fg: #ffffff;
  --btn-primary-hover: #0c3b33; /* 12.3:1 */
  --btn-primary-press: #092e28; /* 14.2:1 */
  --btn-confirm-bg: #053827; /* WhatsApp / confirm: deep green + mint #69F2C4: 9.4:1 */
  --btn-confirm-fg: #69f2c4;
  --btn-confirm-hover: #064a34; /* 7.4:1 */
  --btn-confirm-press: #032619; /* 11.7:1 */
  --btn-tonal-bg: #e1fbf5; /* secondary (tonal): light mint + green: 9.6:1 */
  --btn-tonal-fg: var(--brand-navy);
  --btn-tonal-hover: #cbfff6; /* 9.4:1 */
  --btn-tonal-press: #b4f0e4; /* 8.4:1 */
  --btn-outline-bg: transparent; /* the owner may give the outline button a fill («الألوان») */
  --btn-outline-fg: var(--brand-navy); /* outline: green label and edge on white, 10.3:1; hover/pressed tonal */
  --btn-on-dark-fg: #cbfff6; /* outline on the green cards: mint on #0f483e, 8.9:1 */
  --btn-danger-bg: #5c0a12; /* destructive: deep red + pink #FFB3B8: 8.2:1 */
  --btn-danger-fg: #ffb3b8;
  --btn-danger-hover: #6e0d17; /* 7.2:1 */
  --btn-danger-press: #4a070e; /* 9.3:1 */
  /* The «تخفيض» badge on product cards: the same deep / bright pair idea, deep red + pink, 8.2:1. */
  --badge-sale-bg: #5c0a12;
  --badge-sale-fg: #ffb3b8;
  --btn-disabled-bg: var(--color-line); /* #E3E0D9 + #505050: 6.1:1 */
  --btn-disabled-fg: var(--color-muted);
  /* Message boxes: white text (owner's request). The brand periwinkle #9FAEE5 gives white text only 2.2:1,
     so the boxes use a deeper periwinkle from the same family: 5.05:1 with white (WCAG AA). */
  --color-note: #1f5f52; /* white text: 7.4:1 */
  --color-note-ink: #ffffff;
  /* Notices the owner can recolour on «الألوان» (each pair checked for 4.5:1 there). */
  --top-bar-bg: var(--color-accent); /* offer bar: green + white, 10.3:1 */
  --top-bar-fg: var(--color-accent-ink);
  --geo-notice-bg: var(--brand-cloud); /* one-time country message: cream + green */
  --geo-notice-fg: var(--brand-navy);
  --form-error-bg: #fdecea; /* form errors: 5.7:1 */
  --form-error-fg: var(--color-error);

  /* Typography: Arabic text uses the Arabic face; digits and Latin fall through to Inter. */
  --font-ar: "Qeshla Arabic", "Qeshla Latin", "Segoe UI", Tahoma, system-ui, sans-serif;
  --font-en: "Qeshla Latin", system-ui, -apple-system, "Segoe UI", sans-serif;
  /* Three weights only (the font files have no others): 400 text, 500 menus and small labels, 700 headings,
     product names, prices and buttons (the owner's rule, kept over M3's regular-weight headlines). */
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-bold: 700;

  /* Type scale: Google's Material Design 3 roles (display, headline, title, body, label). Each role has a size,
     a line height (M3's ratio: line / size) and a letter spacing (M3's tracking / size, in em). Sizes keep the
     store's floor for older customers, so most are larger than M3's: body 17 -> 18px (M3 16), nothing under
     15px (M3 body-small and label-small are 11-12). Sizes grow with the screen (phone -> desktop).
     Every font-size in this file is one of these roles.
     The type scale token: every role is 10% smaller (owner's request, 25 Oct 2026); the sizes in the comments are before it.
     That puts body text at 15.3 -> 16.2px and the smallest text at 13.5px, under the earlier 17-18 / 15px floor. */
  --type-scale: 0.9;
  /* Form fields on touch screens never go under 16px: iPhone Safari zooms the page into a smaller field. */
  --field-touch-min: 16px;
  --display-size: calc(clamp(2rem, 1.65rem + 1.7vw, 3rem) * var(--type-scale)); /* 32 -> 48px hero, the points number (M3 display-small 36) */
  --display-line: 1.22; /* 44 / 36 */
  --display-track: 0em;
  --headline-l-size: calc(clamp(1.75rem, 1.5rem + 1.2vw, 2.5rem) * var(--type-scale)); /* 28 -> 40px page and product titles (M3 32) */
  --headline-l-line: 1.25; /* 40 / 32 */
  --headline-l-track: 0em;
  --headline-s-size: calc(clamp(1.375rem, 1.25rem + 0.6vw, 1.75rem) * var(--type-scale)); /* 22 -> 28px section titles, big prices (M3 24) */
  --headline-s-line: 1.33; /* 32 / 24 */
  --headline-s-track: 0em;
  --title-l-size: calc(clamp(1.1875rem, 1.12rem + 0.3vw, 1.3125rem) * var(--type-scale)); /* 19 -> 21px small headings, totals (M3 22) */
  --title-l-line: 1.27; /* 28 / 22 */
  --title-l-track: 0em;
  --title-m-size: calc(clamp(0.9375rem, 0.9rem + 0.15vw, 1rem) * var(--type-scale)); /* 15 -> 16px menu (M3 16) */
  --title-m-line: 1.5; /* 24 / 16 */
  --title-m-track: 0.009em; /* 0.15 / 16 */
  --body-l-size: calc(clamp(1.0625rem, 1.03rem + 0.15vw, 1.125rem) * var(--type-scale)); /* 17 -> 18px body text (M3 16, a minimum) */
  --body-l-line: 1.5; /* 24 / 16 */
  --body-l-track: 0.031em; /* 0.5 / 16 */
  --body-m-size: calc(0.9375rem * var(--type-scale)); /* 15px captions, hints, meta: the smallest store text (M3 14) */
  --body-m-line: 1.43; /* 20 / 14 */
  --body-m-track: 0.018em; /* 0.25 / 14 */
  --label-l-size: var(--body-l-size); /* button text: 17 -> 18px, bold (M3 14, medium) */
  --label-l-line: 1.43; /* 20 / 14 */
  --label-l-track: 0.007em; /* 0.1 / 14 */
  --label-m-size: calc(0.9375rem * var(--type-scale)); /* 15px small buttons, badges, counters (M3 12) */
  --label-m-line: 1.33; /* 16 / 12 */
  --label-m-track: 0.042em; /* 0.5 / 12 */

  /* Shape and space */
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 22px;
  --tap: 48px; /* minimum touch target */
  --btn-radius: 8px; /* every button: the admin panel's shape, a rectangle with slightly rounded corners */
  /* Fields: one height, border and focus ring for every text field, select and code box (checkout, review form,
     /credit, search). The outline is 3:1 against white (WCAG non-text contrast), so older eyes find the box. */
  --field-h: 56px;
  --field-border: 1.5px solid var(--color-field-line);
  /* The owner's spacing rule: text above a control (its label) sits 15% of the control's height away, text under
     it (hint, error) 20%. Fields are 56px (8.4px / 11.2px), buttons 48px (7.2px / 9.6px), the WhatsApp button 60px. */
  --label-gap: calc(var(--field-h) * 0.15);
  --help-gap: calc(var(--field-h) * 0.2);
  --btn-label-gap: calc(var(--tap) * 0.15);
  --btn-help-gap: calc(var(--tap) * 0.2);
  --wa-btn-h: 60px;
  --focus-ring: 0 0 0 2px var(--color-accent); /* solid navy, never blue (owner, 1 Nov 2026) */
  --gutter: 16px;
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;
  --max-width: 1200px;
}

:root:lang(ar) {
  /* Arabic is a "tall" script (M3 language guidance): headings and running text get more room above and below
     than M3's Latin ratios, and no letter spacing at all, which would break the joins between letters. */
  --display-line: 1.4; --headline-l-line: 1.4; --headline-s-line: 1.4; --title-l-line: 1.4;
  --body-l-line: 1.55; --body-m-line: 1.55;
  --display-track: 0; --headline-l-track: 0; --headline-s-track: 0; --title-l-track: 0; --title-m-track: 0;
  --body-l-track: 0; --body-m-track: 0; --label-l-track: 0; --label-m-track: 0;
}

/* Qeshla storefront styles. Mobile first; logical properties so one file serves RTL and LTR.
   All values come from the tokens above. */

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
/* Thmanyah Sans ships 400/500/700 and no italic: never let the browser fake a bold or slanted Arabic face. */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; font-synthesis: none; }
/* No blue anywhere by default: no tap flash on phones, navy check boxes and radios, navy text selection. */
html { -webkit-tap-highlight-color: transparent; accent-color: var(--color-accent); }
::selection { background: var(--color-accent); color: var(--color-accent-ink); }
/* No double-tap zoom anywhere (repeated taps on +/- or any part of the page must not zoom the screen).
   "manipulation" keeps scrolling and two-finger pinch zoom, which older customers need, so the viewport
   meta stays zoomable on purpose. Set on the controls too, for browsers that do not combine it from <html>. */
html, body, a, button, summary, label, input, select, textarea { touch-action: manipulation; }
body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-ar);
  font-size: var(--body-l-size);
  font-weight: var(--weight-regular);
  line-height: var(--body-l-line);
  letter-spacing: var(--body-l-track);
  -webkit-font-smoothing: antialiased;
}
:lang(en) body, body:lang(en) { font-family: var(--font-en); }
/* `hidden` must beat component rules such as `display: grid` (an empty cart once kept showing its old total). */
[hidden] { display: none !important; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--color-accent); text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0 0 var(--space-2); font-weight: var(--weight-bold); }
h1 { font-size: var(--headline-l-size); line-height: var(--headline-l-line); letter-spacing: var(--headline-l-track); }
h2 { font-size: var(--headline-s-size); line-height: var(--headline-s-line); letter-spacing: var(--headline-s-track); }
h3 { font-size: var(--title-l-size); line-height: var(--title-l-line); letter-spacing: var(--title-l-track); }
p { margin: 0 0 var(--space-2); }
small, .small { font-size: var(--body-m-size); line-height: var(--body-m-line); letter-spacing: var(--body-m-track); }
:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 3px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

.wrap { max-width: var(--max-width); margin-inline: auto; padding-inline: var(--gutter); }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.skip-link {
  position: absolute; inset-inline-start: var(--gutter); top: -100px; z-index: 100;
  background: var(--color-accent); color: var(--color-accent-ink); padding: 12px 18px; border-radius: var(--radius-sm);
}
.skip-link:focus { top: 12px; }
.icon { width: 24px; height: 24px; flex: none; }
.icon-sm { width: 18px; height: 18px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--tap); padding: 0 26px; border-radius: var(--btn-radius); border: 0;
  font-size: var(--label-l-size); line-height: var(--label-l-line); letter-spacing: var(--label-l-track);
  font-weight: var(--weight-bold); text-decoration: none; cursor: pointer;
  transition: background-color .12s ease;
}
.btn-primary { background: var(--btn-primary-bg); color: var(--btn-primary-fg); }
.btn-confirm { background: var(--btn-confirm-bg); color: var(--btn-confirm-fg); }
.btn-tonal { background: var(--btn-tonal-bg); color: var(--btn-tonal-fg); }
.btn-ghost { background: var(--btn-outline-bg); color: var(--btn-outline-fg); box-shadow: inset 0 0 0 1.5px var(--btn-outline-fg); }
.btn-danger { background: var(--btn-danger-bg); color: var(--btn-danger-fg); }
/* Press feedback: only the button colour changes, the text stays the same (owner's request).
   Hover only on devices with a real pointer, so a tap on a phone does not leave a "stuck" colour. */
@media (hover: hover) {
  .btn-primary:hover { background: var(--btn-primary-hover); }
  .btn-confirm:hover { background: var(--btn-confirm-hover); }
  .btn-tonal:hover, .btn-ghost:hover { background: var(--btn-tonal-hover); }
  .btn-danger:hover { background: var(--btn-danger-hover); }
  .btn-outline-light:hover { background: var(--btn-primary-hover); }
}
.btn-primary:active { background: var(--btn-primary-press); }
.btn-confirm:active { background: var(--btn-confirm-press); }
/* Light buttons (dark label) take the footer colour when pressed; the filled ones above keep their own press colour. */
.btn-tonal:active, .btn-ghost:active { background: var(--press-bg); }
.btn-danger:active { background: var(--btn-danger-press); }
.btn-outline-light:active { background: var(--btn-primary-press); }
/* Pressed or open: the footer colour (--press-bg), never blue. background-color only, so a select keeps its arrow. */
.qty-btn:active, .header-link:active, .chip:active, .community-link:active, .dropdown-panel a:active,
.icon-btn:active, .size-option:active, .link-btn:active, .accordion > summary:active,
.nav-main > a:active, .nav-main > details > summary:active, .menu-sheet-panel a:active,
.site-footer li a:active, .social-row a:active, .quick-size:active, .gallery-dots a:active,
.dropdown[open] > summary, .menu-sheet[open] > summary, .accordion[open] > summary { background-color: var(--press-bg); }
.bubble-close:active { background: rgb(255 255 255 / .95); }
.btn-block { width: 100%; }
/* Smaller outline buttons for "view all", "read our story" and similar links (still a 48px tap target). */
.btn-sm { padding: 0 20px; font-size: var(--label-m-size); line-height: var(--label-m-line); letter-spacing: var(--label-m-track); white-space: nowrap; }
/* Outline button on the navy brand background. */
.btn-outline-light { background: transparent; color: var(--btn-on-dark-fg); box-shadow: inset 0 0 0 1.5px var(--btn-on-dark-fg); }

/* ---------- Header ---------- */
/* Free-delivery bar at the top of the sticky header. Fixed height, so the mobile menu sheet knows where to start. */
.site-header { --bar-h: 0px; }
.site-header.has-bar { --bar-h: 36px; }
/* Maintenance page (503 while the store is closed). */
.maintenance { min-height: 80vh; display: grid; place-content: center; justify-items: center; gap: 16px; text-align: center; padding-block: 48px; }
/* The owner's maintenance colours («الألوان»), when chosen: a box of that background with the title and text in
   that colour. Unset, the page looks as before (white, dark title, grey text). */
.maintenance { background: var(--maintenance-bg, transparent); border-radius: var(--radius-lg); }
.maintenance h1 { color: var(--maintenance-fg, inherit); }
.maintenance .lead { color: var(--maintenance-fg, var(--color-muted)); }
.maintenance .logo { width: 180px; height: 48px; }

/* Signed preview of an unpublished page (admin «معاينة»). */
.preview-band { margin: 0; padding: 12px 16px; background: var(--brand-yellow); color: var(--brand-navy); font-weight: 700; text-align: center; }

.top-bar {
  display: flex; align-items: center; justify-content: center; height: var(--bar-h); margin: 0; padding: 0 var(--gutter);
  background: var(--top-bar-bg); color: var(--top-bar-fg);
  font-size: var(--body-m-size); line-height: var(--body-m-line); font-weight: var(--weight-medium); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  letter-spacing: var(--label-l-track); /* one line: M3's tightest tracking, so the English offer still fits 390px */
}
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--color-bg);
  border-block-end: 1px solid var(--color-line);
}
/* The blur lives on a pseudo-element: backdrop-filter on the header itself would make it the containing
   block for the fixed mobile menu sheet and squash the sheet to the header's height. */
@supports (backdrop-filter: blur(1px)) {
  .site-header { background: transparent; }
  .site-header::before {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background: rgb(255 255 255 / .82); backdrop-filter: saturate(180%) blur(20px);
  }
}
.header-inner { display: flex; align-items: center; gap: 8px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; min-height: var(--tap); flex: none; }
.logo {
  display: block; width: 104px; height: 28px; background: var(--color-accent);
  -webkit-mask: url("/logo.png") no-repeat center / contain; mask: url("/logo.png") no-repeat center / contain;
}
.nav-main { display: none; }
.header-actions { display: flex; align-items: center; gap: 2px; margin-inline-start: auto; min-width: 0; }
/* 320px phones: four 48px icons and the logo fit without a sideways scroll. */
@media (max-width: 359px) { .header-inner { gap: 4px; padding-inline: 12px; } .header-inner .logo { width: 84px; height: 24px; } .header-actions { gap: 0; } }
.header-link {
  display: inline-flex; align-items: center; gap: 6px; min-height: var(--tap); min-width: var(--tap); padding: 0 8px;
  justify-content: center; white-space: nowrap;
  color: var(--color-text); text-decoration: none; border-radius: 999px; font-size: var(--body-m-size); line-height: var(--body-m-line); letter-spacing: var(--body-m-track);
}
@media (hover: hover) { .header-link:hover { background: var(--color-surface); } }
/* Search, language and cart: icons only, side by side (the name is in aria-label / visually-hidden text). */
.icon-link { padding: 0; gap: 0; position: relative; }
.icon-link .icon { width: 24px; height: 24px; }
/* Cart counter: big enough for two digits ("10", "12") to read at a glance; white ring separates it from the bag. */
.icon-link .cart-count {
  position: absolute; top: 2px; inset-inline-end: -10px;
  min-width: 24px; height: 24px; line-height: 24px; padding: 0 6px;
  font-family: var(--font-en); font-size: var(--label-m-size); font-weight: var(--weight-bold); font-variant-numeric: tabular-nums;
  box-shadow: 0 0 0 2px var(--color-bg);
}
.cart-count {
  min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px;
  background: var(--color-accent); color: var(--color-accent-ink);
  font-size: var(--label-m-size); font-weight: var(--weight-bold); line-height: 22px; text-align: center;
}
.cart-count[hidden] { display: none; }

/* Dropdowns and the mobile sheet use <details>, so they work without JavaScript. */
details > summary { list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }
.dropdown { position: relative; }
.dropdown > summary .icon { transition: transform .2s ease; }
.dropdown[open] > summary .icon { transform: rotate(180deg); }
.dropdown-panel {
  position: absolute; inset-inline-start: 0; top: calc(100% + 8px); min-width: 240px; z-index: 60;
  background: var(--color-bg); border: 1px solid var(--color-line); border-radius: var(--radius);
  box-shadow: 0 18px 40px rgb(0 0 0 / .08); padding: 8px; margin: 0; list-style: none;
}
.dropdown-panel a {
  display: flex; align-items: center; min-height: var(--tap); padding: 0 14px;
  border-radius: var(--radius-sm); color: var(--color-text); text-decoration: none;
}
.dropdown-panel a:hover { background: var(--color-surface); }
.dropdown-panel .sub { padding-inline-start: 28px; color: var(--color-muted); }

.menu-sheet > summary { gap: 6px; }
.menu-sheet[open] > summary { position: relative; z-index: 71; }
.menu-sheet-panel {
  position: fixed; inset: calc(64px + var(--bar-h)) 0 0 0; z-index: 70; overflow-y: auto;
  background: var(--color-bg); padding: var(--space-2) var(--gutter) var(--space-5);
}
.menu-sheet-panel ul { list-style: none; margin: 0; padding: 0; }
.menu-sheet-panel a {
  display: flex; align-items: center; justify-content: space-between; min-height: 56px;
  border-block-end: 1px solid var(--color-line); color: var(--color-text); text-decoration: none; font-size: var(--title-l-size); line-height: var(--title-l-line); letter-spacing: var(--title-l-track);
}
.menu-sheet-panel .group-title { margin: var(--space-3) 0 0; color: var(--color-muted); font-size: var(--body-m-size); line-height: var(--body-m-line); letter-spacing: var(--body-m-track); }
.menu-sheet-panel .sub a { font-size: var(--body-l-size); line-height: var(--body-l-line); letter-spacing: var(--body-l-track); padding-inline-start: 12px; }

@media (min-width: 960px) {
  .nav-main { display: flex; align-items: center; gap: 2px; margin-inline-start: var(--space-3); }
  .nav-main > a, .nav-main > details > summary {
    display: inline-flex; align-items: center; gap: 4px; min-height: var(--tap); padding: 0 12px;
    color: var(--color-text); text-decoration: none; border-radius: 999px; font-size: var(--title-m-size); line-height: var(--title-m-line); letter-spacing: var(--title-m-track); font-weight: var(--weight-medium);
  }
  .nav-main > a:hover, .nav-main > details > summary:hover { background: var(--color-surface); }
  .menu-sheet { display: none; }
  .logo { width: 140px; height: 37px; }
}

/* ---------- Main + page basics ---------- */
main { min-height: 50vh; }
.page { padding-block: var(--space-4); }
.page-title { font-size: var(--headline-l-size); line-height: var(--headline-l-line); letter-spacing: var(--headline-l-track); color: var(--color-accent); }
.lead { color: var(--color-muted); max-width: 46ch; }
.section { padding-block: var(--space-4); }
.section-surface { background: var(--color-surface); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-2); }
.empty-state { text-align: center; padding: var(--space-5) var(--gutter); }
.empty-state p { margin-inline: auto; }

/* ---------- Home ---------- */
.hero { background: var(--color-surface); padding-block: var(--space-5); }
.hero-title { font-size: var(--display-size); line-height: var(--display-line); letter-spacing: var(--display-track); color: var(--color-accent); max-width: 14ch; }
.hero .lead { font-size: var(--title-l-size); line-height: var(--title-l-line); letter-spacing: var(--title-l-track); margin-block-end: var(--space-3); }
.section-head { align-items: center; }
.section-head h2 { margin: 0; }
.chip-row { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; margin: 0; padding: 0; }
.chip {
  display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 20px; border-radius: 999px;
  background: var(--color-surface); color: var(--color-text); text-decoration: none;
}
@media (hover: hover) { .chip:hover { background: var(--color-line); } } /* chips already sit on the footer colour */
.feature-row { display: grid; gap: var(--space-3); }
/* Story and stockist cards: navy logo colour with everything on them in white (owner's request). */
.feature-card {
  display: block; padding: var(--space-4) var(--space-3); border-radius: var(--radius-lg);
  background: var(--color-accent); color: #fff; text-decoration: none;
}
.feature-card .icon { width: 32px; height: 32px; color: #fff; margin-block-end: var(--space-2); }
.feature-card h2 { color: #fff; }
.feature-card p { color: #fff; max-width: 40ch; }
.feature-link { margin-block-start: var(--space-1); }
.feature-card:active .feature-link { background: var(--btn-primary-press); }
@media (hover: hover) { .feature-card:hover .feature-link { background: var(--btn-primary-hover); } }
@media (min-width: 760px) { .feature-row { grid-template-columns: 1fr 1fr; } }

/* ---------- Product cards ---------- */
.product-grid {
  display: grid; gap: var(--space-3) var(--space-2); grid-template-columns: repeat(2, minmax(0, 1fr));
  list-style: none; margin: var(--space-2) 0 0; padding: 0;
}
@media (min-width: 960px) { .product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-4) var(--space-3); } }
.product-card { display: block; color: var(--color-text); text-decoration: none; }
/* --product-accent: the product's own colour behind its image (admin field, migration 0014), set by a class from
   /theme.css because the CSP allows no inline style. Only the image sits on it, never text. */
.product-card-media {
  position: relative; aspect-ratio: 1; border-radius: var(--radius-lg); overflow: hidden; background: var(--product-accent, var(--color-surface));
}
.product-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.product-card:hover .product-card-media img { transform: scale(1.03); }
.product-card-placeholder { display: grid; place-items: center; height: 100%; color: var(--color-surface-cool); }
.product-card-placeholder .icon { width: 56px; height: 56px; }
.badge {
  position: absolute; inset-block-start: 10px; inset-inline-start: 10px;
  background: var(--badge-sale-bg); color: var(--badge-sale-fg);
  font-size: var(--body-m-size); line-height: var(--body-m-line); letter-spacing: var(--body-m-track); font-weight: var(--weight-bold); padding: 2px 12px; border-radius: 999px;
}
.product-card-body { padding-block: 12px 0; }
.product-card-name { font-size: var(--body-l-size); line-height: var(--body-l-line); letter-spacing: var(--body-l-track); font-weight: var(--weight-bold); margin: 0 0 4px; }
.price { margin: 0; color: var(--color-accent); font-weight: var(--weight-bold); }
/* Listing cards with «أضف إلى السلة»: the card link on top; under it one row with the size (75%) and the icon
   button (25%), both 48px. In one row of the grid every button sits on the same line, whatever the names above. */
.has-quick-add > li { display: grid; }
.product-tile { display: grid; grid-template-rows: 1fr auto; gap: 12px; min-width: 0; }
.quick-add { display: grid; grid-template-columns: minmax(0, 3fr) minmax(var(--tap), 1fr); gap: 8px; align-items: stretch; min-width: 0; }
.quick-size {
  display: block; width: 100%; min-width: 0; min-height: var(--tap); padding: 0 36px 0 12px;
  font-size: var(--body-l-size); line-height: var(--body-l-line); letter-spacing: var(--body-l-track); font-weight: var(--weight-medium); color: var(--color-text); text-overflow: ellipsis;
  border: var(--field-border); border-radius: var(--radius-sm); background-color: var(--color-bg); cursor: pointer;
  -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230f483e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-size: 18px 18px; background-position: right 12px center;
}
[dir="rtl"] .quick-size { padding: 0 12px 0 36px; background-position: left 12px center; }
.quick-size:focus { outline: none; border-color: var(--color-accent); box-shadow: var(--focus-ring); }
.quick-size:disabled { background-color: var(--color-surface); color: var(--color-muted); cursor: not-allowed; }
/* One size, or sold out: the same box, read-only (no arrow), grey but readable (#505050 on cloud, 6.9:1). */
.quick-size.is-static {
  display: flex; align-items: center; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; cursor: default;
  background-image: none; background-color: var(--color-surface); color: var(--color-muted); border-color: var(--color-line);
}
[dir="rtl"] .quick-size.is-static, .quick-size.is-static { padding: 0 12px; }
.quick-add-btn { min-width: var(--tap); padding: 0 8px; gap: 2px; }
.quick-add-btn .icon-sm { width: 16px; height: 16px; }
.price s { color: var(--color-muted); font-weight: var(--weight-regular); margin-inline-start: 8px; font-size: var(--body-m-size); line-height: var(--body-m-line); letter-spacing: var(--body-m-track); }

/* ---------- Product page ---------- */
.product { display: grid; gap: var(--space-3); padding-block: var(--space-2) var(--space-4); }
@media (min-width: 960px) {
  .product { grid-template-columns: 1.1fr 1fr; gap: var(--space-5); align-items: start; padding-block-start: var(--space-4); }
  .product-gallery { position: sticky; top: 88px; }
}
.product-gallery { margin-inline: calc(var(--gutter) * -1); }
@media (min-width: 960px) { .product-gallery { margin-inline: 0; } }
.gallery-track {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  list-style: none; margin: 0; padding: 0; background: var(--product-accent, var(--color-surface));
}
.gallery-track::-webkit-scrollbar { display: none; }
.gallery-slide { flex: 0 0 100%; scroll-snap-align: center; aspect-ratio: 1; }
.gallery-slide img { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 960px) { .gallery-track, .gallery-placeholder { border-radius: var(--radius-lg); } }
.gallery-placeholder { display: grid; place-items: center; aspect-ratio: 1; background: var(--product-accent, var(--color-surface)); color: var(--color-surface-cool); }
.gallery-placeholder .icon { width: 72px; height: 72px; }
.gallery-dots { display: flex; justify-content: center; gap: 4px; padding-block: 10px 0; }
.gallery-dots a { width: 24px; height: 24px; display: grid; place-items: center; }
.gallery-dots a::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--color-line); }
.gallery-dots a:hover::after, .gallery-dots a:focus-visible::after { background: var(--color-accent); }

.product-title { font-size: var(--headline-l-size); line-height: var(--headline-l-line); letter-spacing: var(--headline-l-track); color: var(--color-accent); margin-block-end: var(--space-1); }
.product-subtitle { color: var(--color-muted); font-size: var(--title-l-size); line-height: var(--title-l-line); letter-spacing: var(--title-l-track); }
.product-price { font-size: var(--headline-s-size); line-height: var(--headline-s-line); letter-spacing: var(--headline-s-track); font-weight: var(--weight-bold); color: var(--color-accent); margin-block: var(--space-2); }

.size-picker { border: 0; margin: 0 0 var(--space-3); padding: 0; display: grid; gap: 10px; }
.size-picker legend { font-weight: var(--weight-bold); margin-block-end: 10px; padding: 0; }
.size-option {
  position: relative; display: flex; align-items: center; justify-content: space-between; gap: var(--space-2);
  min-height: 56px; padding: 0 18px; border-radius: var(--radius); cursor: pointer;
  border: 1.5px solid var(--color-line); background: var(--color-bg);
}
.size-option input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.size-option:has(input:checked) { border-color: var(--color-accent); box-shadow: inset 0 0 0 1px var(--color-accent); }
.size-option:has(input:focus-visible) { outline: 3px solid var(--color-accent); outline-offset: 2px; }
.size-option:has(input:disabled) { cursor: not-allowed; background: var(--color-surface); color: var(--color-muted); }
.size-label { font-weight: var(--weight-bold); }
.size-price { color: var(--color-accent); }
.size-option:has(input:disabled) .size-price { color: var(--color-muted); }

.qty-row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); margin-block-end: var(--space-3); }
.qty-row label { font-weight: var(--weight-bold); }
.qty-stepper { display: inline-flex; align-items: center; border: 1.5px solid var(--color-line); border-radius: var(--btn-radius); }
.qty-btn {
  width: var(--tap); height: var(--tap); display: grid; place-items: center; border: 0; background: none;
  color: var(--color-accent); cursor: pointer; border-radius: var(--btn-radius);
}
@media (hover: hover) { .qty-btn:hover { background: var(--color-surface); } }
/* Wide enough for "10" on every phone (iOS adds its own inner padding to number fields). */
.qty-stepper input {
  width: 56px; min-width: 56px; padding: 0; margin: 0; border: 0; text-align: center; background: none; color: var(--color-text);
  font-family: var(--font-en); font-size: var(--title-l-size); line-height: var(--title-l-line); letter-spacing: var(--title-l-track); font-weight: var(--weight-bold); font-variant-numeric: tabular-nums;
  -moz-appearance: textfield; appearance: textfield;
}
.qty-stepper input::-webkit-outer-spin-button, .qty-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.add-btn { min-height: 56px; font-size: var(--title-l-size); line-height: var(--title-l-line); letter-spacing: var(--title-l-track); }
.btn:disabled, .btn:disabled:hover, .btn:disabled:active { background: var(--btn-disabled-bg); color: var(--btn-disabled-fg); box-shadow: none; cursor: not-allowed; }
.btn:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 3px; }
.btn-outline-light:focus-visible { outline-color: var(--btn-on-dark-fg); } /* the navy ring would vanish on navy */
/* Busy (aria-busy="true" while a request runs): the label stays, a small spinner joins it. */
.btn[aria-busy="true"] { cursor: progress; }
.btn[aria-busy="true"]::after { content: ""; width: 16px; height: 16px; border: 2px solid currentColor; border-inline-end-color: transparent; border-radius: 50%; animation: btn-spin .7s linear infinite; }
@keyframes btn-spin { to { transform: rotate(360deg); } }

.benefits { list-style: none; margin: var(--space-3) 0 0; padding: 0; display: grid; gap: 10px; }
.benefits li { display: flex; align-items: center; gap: 10px; }
.benefits .icon { color: var(--color-accent); }
.accordion-body .benefits { margin-block-start: 0; }
/* The oil's minerals with their formulas, as printed on the carton (left to right on both pages). */
.composition { border-collapse: collapse; width: 100%; max-width: 420px; margin-block-end: var(--space-2); }
.composition th, .composition td { text-align: start; padding: 8px 12px; border-block-end: 1px solid var(--color-line); }
.composition th { font-weight: var(--weight-medium); color: var(--color-muted); }
.composition td + td, .composition th + th { text-align: end; white-space: nowrap; }
.inci p { margin-block-start: 0; }
/* Two lines printed on every carton: where it is made and how long it keeps after opening. */
.product-facts { margin: var(--space-3) 0 0; color: var(--color-muted); font-size: var(--body-m-size); line-height: var(--body-m-line); letter-spacing: var(--body-m-track); }

.bundle-box { margin-block-start: var(--space-3); padding: var(--space-3); border-radius: var(--radius-lg); background: var(--color-surface-cool); }
.bundle-box h2 { font-size: var(--title-l-size); line-height: var(--title-l-line); letter-spacing: var(--title-l-track); }
.bundle-box ul { margin: 0 0 var(--space-2); padding-inline-start: 1.2em; }
.bundle-box a { color: var(--color-accent); }
.bundle-saving { margin: 0; font-weight: var(--weight-bold); color: var(--color-accent); }

.accordions { margin-block-start: var(--space-4); border-block-start: 1px solid var(--color-line); }
.product-badges + .accordions { margin-block-start: 0; border-block-start: 0; } /* the badges already draw the line above the description */
.accordion { border-block-end: 1px solid var(--color-line); }
.accordion > summary {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-2);
  min-height: 60px; font-weight: var(--weight-bold); font-size: var(--title-l-size); line-height: var(--title-l-line); letter-spacing: var(--title-l-track);
  /* The pressed/open colour reaches a little past the text, which stays in line with the section below. */
  margin-inline: -12px; padding-inline: 12px; border-radius: var(--radius-sm);
}
.accordion > summary .icon { transition: transform .2s ease; color: var(--color-accent); }
.accordion[open] > summary .icon { transform: rotate(180deg); }
.accordion-body { padding-block-end: var(--space-3); color: var(--color-text); }
.faq-list { margin: 0; }
.faq-list dt { font-weight: var(--weight-bold); margin-block-start: var(--space-2); }
.faq-list dd { margin: 4px 0 0; color: var(--color-muted); }

/* Sticky add-to-cart bar on phones; hidden on desktop where the form is always in view. */
.buy-bar {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-2);
  padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom));
  background: rgb(255 255 255 / .96); border-block-start: 1px solid var(--color-line);
  box-shadow: 0 -8px 24px rgb(0 0 0 / .06);
}
.buy-bar-price { font-weight: var(--weight-bold); color: var(--color-accent); font-size: var(--title-l-size); line-height: var(--title-l-line); letter-spacing: var(--title-l-track); }
.buy-bar .btn { flex: 1; max-width: 260px; }
body:has(.buy-bar) .site-footer { padding-block-end: calc(var(--space-3) + 80px); }
@media (min-width: 960px) {
  .buy-bar { display: none; }
  body:has(.buy-bar) .site-footer { padding-block-end: var(--space-3); }
}

/* ---------- Cart drawer and cart page ---------- */
.cart-drawer {
  position: fixed; inset-block: 0; inset-inline-end: 0; inset-inline-start: auto; margin: 0;
  width: min(440px, 100%); height: 100dvh; max-height: 100dvh; max-width: 100%;
  padding: 0; border: 0; background: var(--color-bg); color: var(--color-text);
  box-shadow: 0 0 40px rgb(0 0 0 / .15); overflow-y: auto;
}
.cart-drawer::backdrop { background: rgb(0 0 0 / .35); }
.cart-drawer[open] { animation: drawer-in .25s ease-out; }
@keyframes drawer-in { from { transform: translateX(var(--drawer-from, 100%)); } to { transform: none; } }
[dir="rtl"] .cart-drawer { --drawer-from: -100%; }
.drawer-head {
  position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between;
  padding: 12px var(--gutter); background: var(--color-bg); border-block-end: 1px solid var(--color-line);
}
.drawer-head h2 { margin: 0; font-size: var(--title-l-size); line-height: var(--title-l-line); letter-spacing: var(--title-l-track); }
.icon-btn {
  width: var(--tap); height: var(--tap); display: grid; place-items: center; border: 0; border-radius: 999px;
  background: var(--color-surface); color: var(--color-text); cursor: pointer;
}
.cart-view { padding: var(--space-2) var(--gutter) var(--space-4); }
.cart-page .cart-view { padding-inline: 0; max-width: 720px; }
.cart-status:empty { display: none; }
.cart-status {
  margin: 0 0 var(--space-2); padding: 12px 16px; border-radius: var(--radius);
  background: var(--color-note); color: var(--color-note-ink); font-weight: var(--weight-bold);
}
.cart-empty { color: var(--color-muted); text-align: center; padding-block: var(--space-4); }
.cart-lines { list-style: none; margin: 0; padding: 0; }
.cart-line {
  display: grid; grid-template-columns: 72px 1fr auto; gap: 12px; align-items: start;
  padding-block: var(--space-2); border-block-end: 1px solid var(--color-line);
}
.cart-thumb {
  width: 72px; height: 72px; border-radius: var(--radius-sm); overflow: hidden; background: var(--color-surface);
  display: grid; place-items: center; color: var(--color-surface-cool);
}
.cart-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-line-info { display: grid; gap: 4px; min-width: 0; }
.cart-line-name { color: var(--color-text); font-weight: var(--weight-bold); text-decoration: none; }
.cart-line-size { color: var(--color-muted); font-size: var(--body-m-size); line-height: var(--body-m-line); letter-spacing: var(--body-m-track); }
.cart-line-controls { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.cart-line-controls .qty-btn { width: 40px; height: 40px; }
.qty-value { min-width: 40px; text-align: center; font-family: var(--font-en); font-size: var(--title-l-size); line-height: var(--title-l-line); letter-spacing: var(--title-l-track); font-weight: var(--weight-bold); font-variant-numeric: tabular-nums; }
.cart-line-total { color: var(--color-accent); white-space: nowrap; }
.link-btn {
  border: 0; background: none; padding: 0 4px; min-height: 40px; color: var(--color-muted);
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-size: var(--body-m-size); line-height: var(--body-m-line); letter-spacing: var(--body-m-track);
}
.cart-summary { display: grid; gap: 12px; padding-block-start: var(--space-3); }
.cart-subtotal { display: flex; justify-content: space-between; font-size: var(--title-l-size); line-height: var(--title-l-line); letter-spacing: var(--title-l-track); }
.cart-subtotal strong { color: var(--color-accent); }
.shipping-progress p { margin: 0 0 8px; font-size: var(--body-m-size); line-height: var(--body-m-line); letter-spacing: var(--body-m-track); font-weight: var(--weight-bold); color: var(--color-accent); }
.progress-track { height: 8px; border-radius: 999px; background: var(--color-surface); overflow: hidden; }
.progress-fill { display: block; height: 100%; width: 0; background: var(--color-progress); border-radius: inherit; transition: width .3s ease; }
.shipping-progress[data-free] p { color: var(--color-success); }
/* "Free delivery unlocked": a line celebration icon beside the text (no emoji, project rule). */
.shipping-msg { display: flex; align-items: center; gap: 8px; }
.shipping-progress:not([data-free]) .shipping-msg .icon { display: none; }
.top-bar-free { display: flex; align-items: center; gap: 8px; min-width: 0; }
.top-bar :is([data-top-bar-offer], .top-bar-free > span) { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.cart-recs { margin-block-start: var(--space-4); }
.cart-recs h3 { font-size: var(--body-l-size); line-height: var(--body-l-line); letter-spacing: var(--body-l-track); }
.cart-recs ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.rec-item { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: var(--radius); background: var(--color-surface); }
.rec-link { flex: 1; display: grid; grid-template-columns: 56px 1fr; grid-template-rows: auto auto; column-gap: 12px; color: var(--color-text); text-decoration: none; min-width: 0; }
.rec-link .cart-thumb { width: 56px; height: 56px; grid-row: span 2; background: var(--color-bg); }
.rec-name { font-weight: var(--weight-bold); align-self: end; }
.rec-price { color: var(--color-accent); font-size: var(--body-m-size); line-height: var(--body-m-line); letter-spacing: var(--body-m-track); }
.rec-add { padding: 0 16px; background: var(--color-bg); }

/* ---------- Content pages ---------- */
.prose { max-width: 760px; }
.blocks h2 { margin-block-start: var(--space-4); color: var(--color-accent); }
.blocks p { max-width: 65ch; }
.block-image { margin: var(--space-3) 0; }
.block-image img, .block-image-text img { width: 100%; border-radius: var(--radius-lg); }
.block-image-text { display: grid; gap: var(--space-3); align-items: center; margin-block: var(--space-4); }
@media (min-width: 760px) {
  .block-image-text { grid-template-columns: 1fr 1fr; }
  .block-image-text.media-start img { order: 0; }
  .block-image-text:not(.media-start) img { order: 1; }
}
.contact-actions { margin-block-start: var(--space-3); }

.sale-group { margin-block-start: var(--space-4); }
.sale-group h2 { color: var(--color-accent); }
.sale-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); }
@media (min-width: 760px) { .sale-list { grid-template-columns: 1fr 1fr; } }
.sale-card { padding: var(--space-3); border-radius: var(--radius-lg); background: var(--color-surface); }
.sale-card h3 { margin-block-end: 4px; }
.sale-card p { color: var(--color-muted); margin-block-end: var(--space-2); }
.sale-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.sale-actions .btn { padding: 0 18px; background: var(--color-bg); }

.community-list { list-style: none; margin: var(--space-3) 0 0; padding: 0; display: grid; gap: 12px; max-width: 560px; }
.community-link {
  display: flex; align-items: center; gap: var(--space-2); min-height: 72px; padding: 12px 18px;
  border-radius: var(--radius-lg); background: var(--color-surface); color: var(--color-text); text-decoration: none;
}
@media (hover: hover) { .community-link:hover { background: var(--color-line); } }
.community-link > span:nth-child(2) { flex: 1; display: grid; }
.community-handle { color: var(--color-muted); font-size: var(--body-m-size); line-height: var(--body-m-line); letter-spacing: var(--body-m-track); }
.community-icon {
  width: var(--tap); height: var(--tap); border-radius: 999px; display: grid; place-items: center;
  background: var(--color-bg); color: var(--color-accent);
}

/* ---------- Announcement bubble ---------- */
/* Always centred at the bottom of the page (phones too), text centred. Colours: the owner's per announcement
   (--bubble-bg / --bubble-fg set by bubble.js), else the brand yellow with navy (7.6:1). With the owner's colours the close button is an outline in the
   text colour, so it stays visible on any background. */
.bubble {
  position: fixed; z-index: 45; bottom: calc(16px + env(safe-area-inset-bottom)); inset-inline: var(--gutter);
  display: flex; align-items: center; gap: 10px; max-width: 420px; margin-inline: auto; padding: 12px 8px;
  border-radius: var(--radius-lg); background: var(--bubble-bg, var(--color-highlight)); color: var(--bubble-fg, var(--color-highlight-ink));
  box-shadow: 0 14px 34px rgb(0 0 0 / .16); animation: bubble-in .35s ease-out;
}
.bubble[hidden] { display: none; }
.bubble > .icon { flex: none; }
.bubble-text { margin: 0; flex: 1; font-weight: var(--weight-bold); line-height: var(--body-l-line); text-align: center; }
.bubble-link {
  flex: none; display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: var(--btn-radius);
  background: var(--color-accent); color: var(--color-accent-ink); font-weight: var(--weight-bold); text-decoration: none;
  font-size: var(--body-m-size); line-height: var(--body-m-line); letter-spacing: var(--body-m-track);
}
.bubble-close {
  flex: none; width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 999px;
  background: rgb(255 255 255 / .55); color: var(--bubble-fg, var(--color-highlight-ink)); cursor: pointer;
}
.bubble-geo { --bubble-bg: var(--geo-notice-bg); --bubble-fg: var(--geo-notice-fg); }
.bubble.has-colors .bubble-close { background: transparent; box-shadow: inset 0 0 0 1.5px currentColor; }
body:has(.buy-bar) .bubble { bottom: calc(92px + env(safe-area-inset-bottom)); }
@media (min-width: 960px) {
  body:has(.buy-bar) .bubble { bottom: 24px; }
}
@keyframes bubble-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* ---------- Forms and checkout ---------- */
/* Label, control, then hint and error: the gaps come from the spacing rule, not one grid gap. A second line
   under the control (an error after a hint) follows the first closely. */
.field { display: grid; gap: 0; margin-block-end: var(--space-3); }
.field label { font-weight: var(--weight-bold); }
.field > label { margin-block-end: var(--label-gap); }
.field > :is(input, select, textarea, .star-input) + :is(.field-hint, .field-error) { margin-block-start: var(--help-gap); }
.field > .field-hint + .field-error { margin-block-start: 4px; }
.field input, .field select, .field textarea {
  display: block; width: 100%; min-width: 0; min-height: var(--field-h); padding: 12px 16px; font-size: var(--body-l-size); line-height: var(--body-l-line); letter-spacing: var(--body-l-track);
  border: var(--field-border); border-radius: var(--radius); background: var(--color-bg); color: var(--color-text);
}
.field textarea { min-height: 96px; resize: vertical; }
/* Own chevron with breathing room from the edge (the native arrow sits flush against it). */
.field select {
  -webkit-appearance: none; appearance: none; cursor: pointer;
  padding-inline-end: 52px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230f483e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-size: 20px 20px; background-position: right 18px center;
}
[dir="rtl"] .field select { background-position: left 18px center; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--color-accent); box-shadow: var(--focus-ring); }
/* Numbers and codes are typed left to right but line up with the Arabic labels (caret and selection stay LTR). */
.field input:is([inputmode="numeric"], [type="email"], [dir="ltr"]) { direction: ltr; text-align: start; }
[dir="rtl"] .field input:is([inputmode="numeric"], [type="email"], [dir="ltr"]) { text-align: right; }
.field input:disabled, .field select:disabled, .field textarea:disabled { background: var(--color-surface); color: var(--color-muted); cursor: not-allowed; }
.field input[type="tel"] { direction: ltr; text-align: start; }
[dir="rtl"] .field input[type="tel"] { text-align: right; }
/* Dates (none in the store yet; same rule as the admin): the value exactly centred, the calendar icon (Chrome,
   Edge) moved into the end padding so it cannot pull the text off centre; iOS Safari centres the value itself. */
.field input[type="date"] { position: relative; -webkit-appearance: none; appearance: none; padding-inline: 40px; text-align: center; }
.field input[type="date"]::-webkit-date-and-time-value { text-align: center; }
.field input[type="date"]::-webkit-datetime-edit { display: flex; justify-content: center; padding: 0; }
.field input[type="date"]::-webkit-calendar-picker-indicator { position: absolute; top: 50%; right: 14px; width: 20px; height: 20px; margin: 0; padding: 0; transform: translateY(-50%); cursor: pointer; }
@supports (-moz-appearance: none) { .field input[type="date"] { padding-inline: 40px 10px; } }
.field-hint { margin: 0; color: var(--color-muted); font-size: var(--body-m-size); line-height: var(--body-m-line); letter-spacing: var(--body-m-track); }
.field-error { margin: 0; color: var(--color-error); font-weight: var(--weight-bold); font-size: var(--body-m-size); line-height: var(--body-m-line); letter-spacing: var(--body-m-track); }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--color-error); }
.form-error {
  margin-block-end: var(--space-3); padding: 14px 18px; border-radius: var(--radius);
  background: var(--form-error-bg); color: var(--form-error-fg); font-weight: var(--weight-bold);
}
/* «استخدم نقاطي»: a large tick box (48px row) the whole label toggles. */
.points-box { display: grid; gap: 0; margin-block-end: var(--space-3); padding: 14px 16px; border: 1px solid var(--color-line); border-radius: var(--radius); }
.check-field { display: flex; align-items: center; gap: 12px; min-height: 48px; font-weight: var(--weight-bold); cursor: pointer; }
.check-field input { width: 24px; height: 24px; flex: none; margin: 0; accent-color: var(--color-accent); }
.check-field + .field-hint { margin-block-start: calc(48px * 0.2); } /* the tick row is the 48px control */
#f-referral { direction: ltr; text-align: start; text-transform: uppercase; }
[dir="rtl"] #f-referral { text-align: right; }
.checkout-grid { display: grid; gap: var(--space-4); }
.checkout-grid > * { min-width: 0; } /* grid items never grow past the screen */
@media (min-width: 960px) {
  .checkout-grid { grid-template-columns: 1.2fr 1fr; align-items: start; }
  .checkout-summary { position: sticky; top: 88px; }
}
@media (max-width: 959px) { .checkout-summary { order: -1; } } /* phones: see the total before filling the form */
.checkout-summary { padding: var(--space-3); border-radius: var(--radius-lg); background: var(--color-surface); }
.checkout-summary h2 { font-size: var(--title-l-size); line-height: var(--title-l-line); letter-spacing: var(--title-l-track); }
.summary-lines { list-style: none; margin: 0 0 var(--space-2); padding: 0; }
.summary-line { display: flex; justify-content: space-between; gap: var(--space-2); padding-block: 10px; border-block-end: 1px solid var(--color-line); }
.summary-name { color: var(--color-text); }
.summary-line strong, .summary-totals dd { white-space: nowrap; }
.summary-totals { margin: 0 0 var(--space-2); display: grid; gap: 8px; }
.summary-totals div { display: flex; justify-content: space-between; gap: var(--space-2); }
.summary-totals dt { color: var(--color-muted); }
.summary-totals dd { margin: 0; font-weight: var(--weight-bold); }
/* Amounts stay on one line, but the "choose your governorate" hint is a sentence: it wraps
   (in English it is long enough to push the page wider than a phone screen). */
.summary-totals dd[data-checkout-shipping] { white-space: normal; text-align: end; min-width: 0; }
.summary-totals dt { flex: none; }
.summary-total { padding-block-start: 10px; border-block-start: 1px solid var(--color-line); font-size: var(--title-l-size); line-height: var(--title-l-line); letter-spacing: var(--title-l-track); }
.summary-total dt { color: var(--color-text); }
.summary-total dd { color: var(--color-accent); }
.checkout-note {
  display: flex; gap: 10px; align-items: flex-start; padding: 14px 16px; margin-block-end: var(--space-2);
  border-radius: var(--radius); background: var(--color-note); color: var(--color-note-ink); font-size: var(--body-m-size); line-height: var(--body-m-line); letter-spacing: var(--body-m-track);
}
.checkout-note .icon { margin-block-start: 3px; }
.checkout-cod { text-align: center; color: var(--color-muted); font-size: var(--body-m-size); line-height: var(--body-m-line); letter-spacing: var(--body-m-track); margin-block: calc(var(--field-h) * 0.2) 0; } /* under the 56px button */
.checkout-help { text-align: center; margin-block: 6px 0; }
.checkout-help a { display: inline-flex; gap: 6px; align-items: center; min-height: var(--tap); }
/* Final amount right above "Confirm order" */
.checkout-final {
  margin-block: var(--space-2); padding: var(--space-2) 18px; border-radius: var(--radius);
  border: 1.5px dashed var(--color-accent); background: var(--color-bg); text-align: center;
}
.checkout-final[data-ready] { border-style: solid; background: var(--color-surface); }
.checkout-final p { margin: 0; }
.checkout-final-title { font-size: var(--body-m-size); line-height: var(--body-m-line); letter-spacing: var(--body-m-track); font-weight: var(--weight-medium); color: var(--color-muted); }
.checkout-final-total { margin-block: 4px !important; font-size: var(--headline-s-size); line-height: var(--headline-s-line); letter-spacing: var(--headline-s-track); font-weight: var(--weight-bold); color: var(--color-accent); }
.checkout-final-note { font-size: var(--body-m-size); line-height: var(--body-m-line); letter-spacing: var(--body-m-track); color: var(--color-text); }
.checkout-final:not([data-ready]) .checkout-final-note { font-weight: var(--weight-bold); color: var(--color-accent); margin-block-start: 4px; }
.cf-turnstile { margin-block-end: var(--space-2); }

/* ---------- Verify page ---------- */
.verify { max-width: 560px; text-align: center; }
.verify-head { display: grid; justify-items: center; gap: var(--space-2); margin-block-end: var(--space-3); }
.verify-badge {
  display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%;
  background: #e6f4ee; color: #0b7a5a;
}
.verify-badge .icon { width: 32px; height: 32px; }
.verify .page-title { font-size: var(--headline-s-size); line-height: var(--headline-s-line); letter-spacing: var(--headline-s-track); margin: 0; }
.verify-sub { margin: calc(-1 * var(--space-1)) auto var(--space-3); max-width: 38ch; font-size: var(--title-l-size); line-height: var(--title-l-line); letter-spacing: var(--title-l-track); color: var(--color-text); }
.verify-card {
  padding: var(--space-3); border-radius: var(--radius-lg); background: var(--color-bg);
  border: 1px solid var(--color-line); box-shadow: 0 10px 30px rgb(6 3 141 / .07);
}
.verify-card > :last-child { margin-block-end: 0; }
.verify-label { margin: 0; color: var(--color-muted); font-weight: var(--weight-medium); }
.verify-instruction { font-size: var(--title-l-size); line-height: var(--title-l-line); letter-spacing: var(--title-l-track); font-weight: var(--weight-bold); margin-block-start: 0; }
.code {
  display: block; margin: var(--space-2) auto; padding: 14px 28px; width: fit-content;
  font-family: var(--font-en); font-size: var(--display-size); line-height: var(--display-line); font-weight: var(--weight-bold); letter-spacing: .25em;
  font-variant-numeric: tabular-nums; color: var(--color-accent); background: var(--color-surface); border-radius: var(--radius-lg);
}
.verify-countdown {
  display: inline-flex; gap: 6px; margin: 0 0 var(--space-3); padding: 6px 14px; border-radius: 999px;
  background: var(--color-surface); color: var(--color-muted); font-size: var(--body-m-size); line-height: var(--body-m-line); letter-spacing: var(--body-m-track);
}
.verify-countdown [data-expires-at] { font-family: var(--font-en); font-weight: var(--weight-bold); color: var(--color-text); font-variant-numeric: tabular-nums; }
.wa-btn { min-height: var(--wa-btn-h); font-size: var(--title-l-size); line-height: var(--title-l-line); letter-spacing: var(--title-l-track); } /* colours: .btn-confirm */
.verify-store-number, .verify-phone { color: var(--color-muted); margin-block: var(--space-2) 0; font-size: var(--body-m-size); line-height: var(--body-m-line); letter-spacing: var(--body-m-track); }
.wa-btn + .verify-store-number { margin-block-start: calc(var(--wa-btn-h) * 0.2); }

.verify-steps {
  list-style: none; counter-reset: step; margin: var(--space-3) 0; padding: 0; display: grid; gap: 10px; text-align: start;
}
.verify-steps li {
  counter-increment: step; display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px;
  border-radius: var(--radius); background: var(--color-surface);
}
.verify-steps li::before {
  content: counter(step); flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  background: var(--color-accent); color: var(--color-accent-ink); font-family: var(--font-en); font-weight: var(--weight-bold); font-size: var(--label-m-size);
}

.verify-waiting {
  display: flex; gap: 12px; align-items: center; justify-content: center; margin-block: var(--space-3); padding: 14px 16px;
  border-radius: var(--radius); background: var(--color-note); color: var(--color-note-ink); font-weight: var(--weight-medium);
}
.pulse { flex: none; width: 10px; height: 10px; border-radius: 50%; background: #fff; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.7); } }
@media (prefers-reduced-motion: reduce) { .pulse { animation: none; } }

.verify-details { margin: 0; padding: 0; }
.verify-details div { display: flex; justify-content: space-between; gap: var(--space-2); padding-block: 12px; border-block: 1px solid var(--color-line); }
.verify-details dt { color: var(--color-muted); }
.verify-details dd { margin: 0; font-weight: var(--weight-bold); }

.verify-actions { display: grid; gap: var(--space-2); margin-block-start: var(--space-3); align-items: start; }
@media (min-width: 520px) { .verify-actions { grid-template-columns: 1fr 1fr; } }
.verify-actions > .btn { width: 100%; }
.new-code-form { display: grid; gap: var(--btn-help-gap); justify-items: center; } /* hint under the button */
.new-code-form .btn { width: 100%; }
.new-code-form .field-hint { font-size: var(--body-m-size); line-height: var(--body-m-line); letter-spacing: var(--body-m-track); }
.verify-help { margin-block-start: var(--space-4); color: var(--color-muted); }
.verify-help a { font-weight: var(--weight-bold); }

/* ---------- Order success page ---------- */
.order-number-label { margin-block: var(--space-3) 0; color: var(--color-muted); }
.order-number { display: block; margin: 6px auto var(--space-2); font-family: var(--font-en); font-size: var(--headline-s-size); line-height: var(--headline-s-line); font-weight: var(--weight-bold); letter-spacing: .04em; color: var(--color-accent); }
.copy-btn { min-width: 140px; }
.order-contact { margin-block: var(--space-3); padding: 12px 16px; border-radius: var(--radius); background: var(--color-note); color: var(--color-note-ink); font-weight: var(--weight-bold); }
.order-details { margin-block: var(--space-3); padding: var(--space-3); border-radius: var(--radius-lg); background: var(--color-surface); text-align: start; }
.order-details h2 { font-size: var(--title-l-size); line-height: var(--title-l-line); letter-spacing: var(--title-l-track); margin-block: 0 var(--space-2); }
.order-meta { margin-block: var(--space-1) 0; color: var(--color-muted); }
.order-meta-inline { display: block; white-space: nowrap; color: var(--color-muted); font-size: var(--body-m-size); } /* 15px minimum */

/* ---------- Search ---------- */
.search-form { display: flex; gap: var(--space-1); max-width: 640px; margin-block-end: var(--space-4); }
.search-form input {
  flex: 1; min-width: 0; min-height: var(--field-h); padding: 0 18px; font: inherit; color: var(--color-text);
  border: 1.5px solid var(--color-accent); border-radius: 999px; background: var(--color-bg);
}
.search-form input:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.search-form .btn { flex: none; }
.search-results-title { font-size: var(--title-l-size); line-height: var(--title-l-line); letter-spacing: var(--title-l-track); }

/* ---------- Product badges (thin ring + line icon, label under it) ---------- */
.product-badges {
  list-style: none; margin: var(--space-3) 0 0; padding: var(--space-3) 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-2) 8px; align-items: start;
  border-block: 1px solid var(--color-line); text-align: center;
}
/* Four line icons on one row (the carton's symbols, redrawn): same box, same stroke, captions on one baseline. */
.product-badges li {
  display: grid; grid-template-rows: 48px auto; justify-items: center; gap: 8px; min-width: 0;
  font-size: var(--body-m-size); letter-spacing: var(--body-m-track); font-weight: var(--weight-medium); line-height: var(--body-m-line);
  color: var(--color-accent);
}
.product-badges .icon { width: 48px; height: 48px; }
.badge-label { overflow-wrap: anywhere; }

/* ---------- Reviews & testimonials ---------- */
.reviews-hero { background: var(--color-surface); padding-block: var(--space-5) var(--space-4); text-align: center; }
.reviews-hero .lead { margin-inline: auto; max-width: 46ch; }
.reviews-page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2); margin-block-end: var(--space-3); }
.reviews-page-head h2 { margin: 0; }
.reviews-summary { display: inline-flex; align-items: center; gap: 10px; margin-block-end: var(--space-3); }
.reviews-page-head .reviews-summary { margin: 0; }
.reviews-average { font-size: var(--headline-s-size); letter-spacing: var(--headline-s-track); font-weight: var(--weight-bold); color: var(--color-accent); line-height: var(--headline-s-line); }
.reviews-count { color: var(--color-muted); font-size: var(--body-m-size); line-height: var(--body-m-line); letter-spacing: var(--body-m-track); }
.stars { display: inline-flex; gap: 2px; color: var(--color-accent); }
.star-off { color: #d6d4ec; }
/* Masonry-style columns: cards keep their natural height, like the reference page. */
.review-grid { columns: 1; column-gap: var(--space-2); }
@media (min-width: 680px) { .review-grid { columns: 2; } }
@media (min-width: 1024px) { .review-grid { columns: 3; } }
.review-card {
  break-inside: avoid; display: grid; gap: 12px; margin-block-end: var(--space-2); padding: var(--space-3);
  border-radius: var(--radius-lg); background: var(--color-bg); border: 1px solid var(--color-line);
}
.section-surface .review-card { border-color: transparent; }
.review-body { margin: 0; line-height: var(--body-l-line); }
.review-meta { display: grid; gap: 4px; padding-block-start: 12px; border-block-start: 1px solid var(--color-line); }
.review-meta p { margin: 0; }
.review-author { font-weight: var(--weight-bold); }
.review-city { font-weight: var(--weight-regular); color: var(--color-muted); }
.review-verified { display: inline-flex; align-items: center; gap: 6px; color: var(--color-success); font-size: var(--body-m-size); line-height: var(--body-m-line); letter-spacing: var(--body-m-track); font-weight: var(--weight-medium); }
.review-product { justify-self: start; font-size: var(--body-m-size); line-height: var(--body-m-line); letter-spacing: var(--body-m-track); color: var(--color-accent); }
.reviews-more { text-align: center; margin-block-start: var(--space-3); }
.review-photo { display: block; border-radius: var(--radius); overflow: hidden; background: var(--color-surface); }
.review-photo img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; }
.photo-title { margin: 0 0 var(--btn-label-gap); font-weight: var(--weight-bold); } /* above the pick button */
.photo-field > .photo-pick + .field-hint { margin-block-start: var(--btn-help-gap); }
/* Visually hidden but still focusable and reachable by screen readers; the label below is the visible button. */
.photo-field .file-input { position: absolute; width: 1px; height: 1px; min-height: 0; padding: 0; border: 0; opacity: 0; overflow: hidden; }
.photo-field .file-input:focus-visible + .photo-pick { outline: 3px solid var(--color-accent); outline-offset: 2px; }
.photo-pick { justify-self: start; }
.photo-preview { display: flex; align-items: center; gap: var(--space-2); margin-block-start: var(--space-1); }
.photo-preview img { width: 96px; height: 96px; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--color-line); }
.reviews-teaser .section-head { margin-block-end: var(--space-2); }

/* Home page reviews: a swipeable slider on phones (like the reference site), the first three cards on wider screens. */
@media (max-width: 679px) {
  .reviews-slider .review-grid {
    columns: auto; display: flex; gap: 12px; overflow-x: auto; overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter);
    margin-inline: calc(-1 * var(--gutter)); padding: 4px var(--gutter) var(--space-2);
    scrollbar-width: none;
  }
  .reviews-slider .review-grid::-webkit-scrollbar { display: none; }
  /* 84% wide, so the edge of the next card shows that there is more to swipe. */
  .reviews-slider .review-card { flex: 0 0 84%; margin: 0; scroll-snap-align: start; align-content: start; }
}
@media (min-width: 680px) { .reviews-slider .review-card:nth-child(n + 4) { display: none; } .slider-dots { display: none; } }
.slider-dots { display: flex; justify-content: center; gap: 8px; margin-block-start: 4px; }
.slider-dot { width: 8px; height: 8px; border-radius: 999px; background: #c9c7e3; transition: width .2s ease, background-color .2s ease; }
.slider-dot.is-active { width: 22px; background: var(--color-accent); }

/* ---------- Review form (4 steps) ---------- */
.review-form-page { max-width: 640px; }
.review-step {
  display: flex; flex-direction: column; min-width: 0;
  margin: 0 0 var(--space-3); padding: var(--space-3); border: 1px solid var(--color-line); border-radius: var(--radius-lg);
  background: var(--color-bg);
}
.review-form.is-wizard .review-step { box-shadow: 0 10px 30px rgb(6 3 141 / .07); }
.step-count { order: -1; margin: 0 0 4px; color: var(--color-muted); font-size: var(--body-m-size); line-height: var(--body-m-line); letter-spacing: var(--body-m-track); font-weight: var(--weight-medium); }
/* float takes the legend out of the border line, so it sits inside the card like any heading */
.step-title { float: inline-start; width: 100%; margin: 0; padding: 0; font-size: var(--title-l-size); line-height: var(--title-l-line); letter-spacing: var(--title-l-track); font-weight: var(--weight-bold); color: var(--color-accent); }
.step-title:focus { outline: none; }
.step-hint { margin-block: 6px var(--space-2); }
.step-nav { display: flex; gap: var(--space-2); margin-block-start: var(--space-3); }
.step-nav .btn { flex: 1; }
.review-step textarea { width: 100%; min-height: 160px; padding: 12px 16px; font: inherit; border: var(--field-border); border-radius: var(--radius); }
.review-step textarea:focus { outline: none; border-color: var(--color-accent); box-shadow: var(--focus-ring); }
.check-row { display: flex; align-items: center; gap: 10px; min-height: var(--tap); margin-block-end: var(--space-2); cursor: pointer; }
.check-row input { width: 22px; height: 22px; accent-color: var(--color-accent); }
.review-consent { margin-block-start: var(--space-2); }
.hp { position: absolute; inset-inline-start: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Star rating: highest star first in the markup, shown first-to-last in reading order;
   the checked star and every lower one fill (sibling selectors), hover previews the choice. */
.star-input { position: relative; display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: 6px; }
/* Selector beats ".field input { width: 100% }": a full-width hidden radio would widen the page in RTL. */
.star-input .star-radio {
  position: absolute; inset-block-start: 0; inset-inline-start: 0; width: 1px; height: 1px; min-height: 0;
  margin: 0; padding: 0; border: 0; opacity: 0; overflow: hidden;
}
.star-label { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 12px; color: #d6d4ec; cursor: pointer; }
.star-label .icon { width: 40px; height: 40px; }
.star-input .star-radio:checked ~ .star-label { color: var(--color-accent); }
@media (hover: hover) {
  .star-input:hover .star-label { color: #d6d4ec; }
  .star-input .star-label:hover, .star-input .star-label:hover ~ .star-label { color: var(--color-accent); }
}
.star-input .star-radio:focus-visible + .star-label { outline: 3px solid var(--color-accent); outline-offset: 2px; }

.review-thanks { max-width: 560px; text-align: center; display: grid; justify-items: center; gap: var(--space-2); }
.review-thanks .verify-badge { color: var(--color-success); }
.reviews-write { margin-block-start: var(--space-2); text-align: center; }

/* ---------- Discount code (checkout summary) ---------- */
.discount-box { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; margin-block: var(--space-2); padding-block: var(--space-2); border-block: 1px solid var(--color-line); }
.discount-box label { font-weight: var(--weight-bold); margin-block-end: var(--label-gap); }
.discount-box > .discount-row + * { margin-block-start: var(--help-gap); }
.discount-box > .discount-msg:empty + .link-btn { margin-block-start: var(--help-gap); }
.discount-row { display: flex; gap: 8px; }
.discount-row input {
  flex: 1; min-width: 0; min-height: var(--field-h); padding: 0 14px; font: inherit; text-transform: uppercase; letter-spacing: .04em;
  border: var(--field-border); border-radius: var(--radius); background: var(--color-bg); color: var(--color-text);
}
.discount-row input::placeholder { text-transform: none; letter-spacing: 0; }
.discount-row input:focus { outline: none; border-color: var(--color-accent); box-shadow: var(--focus-ring); }
.discount-row .btn { flex: none; }
.discount-msg { margin: 0; font-size: var(--body-m-size); line-height: var(--body-m-line); letter-spacing: var(--body-m-track); font-weight: var(--weight-medium); color: var(--color-error); }
.discount-msg:empty { display: none; }
.discount-box.is-applied .discount-msg { color: var(--color-success); }
.discount-box.is-applied input { border-color: var(--color-success); }
.discount-box .link-btn { justify-self: start; }
.summary-discount dt { color: var(--color-success); }
.summary-totals .summary-discount dd { color: var(--color-success); }

/* ---------- Prices everywhere (owner's request, 17 Oct 2026) ----------
   25% smaller than the text they sit in, grey, regular weight, never below the 15px accessibility floor.
   Placed late in the file so it wins over the component rules above. */
.price, .product-price, .size-price, .buy-bar-price, .cart-line-total, .cart-subtotal strong, .rec-price,
.summary-line strong, .summary-totals dd, .checkout-final-total, .price s {
  color: var(--color-price); font-weight: var(--weight-regular);
}
.price, .size-price, .cart-line-total, .summary-line strong, .summary-totals dd, .rec-price, .price s { font-size: max(var(--body-m-size), 0.75em); }
.product-price { font-size: max(var(--body-m-size), calc(var(--headline-s-size) * 0.75)); }
.buy-bar-price { font-size: max(var(--body-m-size), calc(var(--title-l-size) * 0.75)); }
.cart-subtotal strong, .summary-total dd { font-size: max(var(--body-m-size), 0.75em); }
.checkout-final-total { font-size: max(var(--body-m-size), calc(var(--headline-s-size) * 0.75)); }
/* The crossed-out "before" price stays distinguishable from the grey current price by its line. */
.price s { margin-inline-start: 8px; }

/* ---------- Become a stockist ---------- */
.partner-invite {
  margin-block: var(--space-2) var(--space-4); padding: var(--space-4) var(--space-3); border-radius: var(--radius-lg);
  background: var(--color-surface); text-align: center;
}
.partner-invite h2 { font-size: var(--headline-s-size); line-height: var(--headline-s-line); letter-spacing: var(--headline-s-track); color: var(--color-accent); }
.partner-invite > p { max-width: 52ch; margin-inline: auto; }
.partner-benefits {
  list-style: none; padding: 0; margin: var(--space-3) auto; max-width: 560px;
  display: grid; gap: 10px; text-align: start;
}
.partner-benefits li { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: var(--radius); background: var(--color-bg); font-weight: var(--weight-medium); }
.partner-benefits .icon { color: var(--color-accent); }
@media (min-width: 720px) { .partner-benefits { grid-template-columns: 1fr 1fr; } }
.partner-cta { min-width: min(100%, 320px); }
.partner-note { margin-block: var(--space-2) 0; color: var(--color-muted); font-size: var(--body-m-size); line-height: var(--body-m-line); letter-spacing: var(--body-m-track); }

/* ---------- Notice (e.g. the 10-piece limit) ---------- */
.toast {
  position: fixed; z-index: 120; inset-inline: var(--gutter); bottom: calc(96px + env(safe-area-inset-bottom));
  max-width: 520px; margin-inline: auto; padding: 14px 18px; border-radius: var(--radius);
  background: var(--color-accent); color: var(--color-accent-ink); font-weight: var(--weight-medium); line-height: var(--body-l-line);
  box-shadow: 0 12px 32px rgb(6 3 141 / .25); text-align: center;
}
@media (min-width: 960px) { .toast { bottom: var(--space-4); } }

/* ---------- Footer ---------- */
.site-footer { background: var(--color-surface); margin-block-start: var(--space-5); padding-block: var(--space-4) var(--space-3); }
.footer-grid { display: grid; gap: var(--space-3); grid-template-columns: 1fr 1fr; }
.footer-brand { grid-column: 1 / -1; }
.footer-brand .logo { margin-block-end: var(--space-1); }
.footer-brand p { color: var(--color-muted); font-size: var(--body-m-size); line-height: var(--body-m-line); letter-spacing: var(--body-m-track); max-width: 36ch; }
.site-footer h2 { font-size: var(--body-l-size); line-height: var(--body-l-line); letter-spacing: var(--body-l-track); margin-block-end: var(--space-1); }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li a {
  display: inline-flex; align-items: center; min-height: 40px; color: var(--color-text);
  text-decoration: none; font-size: var(--body-m-size); line-height: var(--body-m-line); letter-spacing: var(--body-m-track);
}
.site-footer li a:hover { text-decoration: underline; }
.social-row { display: flex; gap: 8px; flex-wrap: wrap; }
.social-row a {
  display: inline-flex; align-items: center; justify-content: center; width: var(--tap); height: var(--tap);
  border-radius: 999px; background: var(--color-bg); color: var(--color-accent);
}
.footer-bottom {
  margin-block-start: var(--space-3); padding-block-start: var(--space-2); border-block-start: 1px solid var(--color-line);
  color: var(--color-muted); font-size: var(--body-m-size); line-height: var(--body-m-line); letter-spacing: var(--body-m-track);
}
@media (min-width: 760px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
  .footer-brand { grid-column: auto; }
}

/* «نقاطي» (/credit): the balance page. Same calm cards as the order pages; 18px text, 48px buttons. */
.credit-balance { max-width: 560px; }
.credit-phone { color: var(--color-muted); margin-block: 0 var(--space-3); }
.credit-card { padding: var(--space-3); border-radius: var(--radius); background: var(--color-accent); color: #fff; text-align: center; }
.credit-card p { margin: 0; }
.credit-label { font-weight: var(--weight-medium); opacity: .9; }
.credit-points strong { font-size: var(--display-size); line-height: var(--display-line); font-family: var(--font-en); font-weight: var(--weight-bold); }
.credit-points span { font-weight: var(--weight-bold); }
.credit-worth, .credit-next { margin-block-start: 6px !important; font-size: var(--body-m-size); line-height: var(--body-m-line); letter-spacing: var(--body-m-track); opacity: .9; }
.credit-facts { margin: var(--space-3) 0 0; padding: 0; }
.credit-facts div { display: flex; justify-content: space-between; gap: var(--space-2); padding-block: 12px; border-block-end: 1px solid var(--color-line); }
.credit-facts dt { color: var(--color-muted); }
.credit-facts dd { margin: 0; font-weight: var(--weight-bold); }
.credit-note { color: var(--color-muted); font-size: var(--body-m-size); line-height: var(--body-m-line); letter-spacing: var(--body-m-track); }
.credit-referral { margin-block: var(--space-3); padding: var(--space-3); border: 1px solid var(--color-line); border-radius: var(--radius); text-align: center; }
.credit-referral h2 { margin-block-start: 0; font-size: var(--title-l-size); line-height: var(--title-l-line); letter-spacing: var(--title-l-track); }
.credit-history-title { font-size: var(--title-l-size); line-height: var(--title-l-line); letter-spacing: var(--title-l-track); margin-block: var(--space-3) var(--space-1); }
.credit-history { list-style: none; margin: 0 0 var(--space-3); padding: 0; }
.credit-history li { display: flex; justify-content: space-between; align-items: center; gap: var(--space-2); padding-block: 12px; border-block-end: 1px solid var(--color-line); }
.credit-history li > span { display: grid; gap: 2px; min-width: 0; }
.credit-kind { font-weight: var(--weight-medium); }
.credit-meta { color: var(--color-muted); font-size: var(--body-m-size); line-height: var(--body-m-line); letter-spacing: var(--body-m-track); }
.credit-plus { color: var(--color-success); }
.credit-minus { color: var(--color-text); }
.credit-form { text-align: start; }

/* Form fields on touch screens: at least 16px, or iPhone Safari zooms the page while the customer types
   (after the 10% smaller type scale, body text is under 16px on phones). Last in the file so it wins. */
@media (pointer: coarse) {
  :is(input:not([type="checkbox"], [type="radio"]), select, textarea) { font-size: max(var(--field-touch-min), 1em); }
}

/* «تتبّع طلبي» (order tracking) and the order-received page. */
.track-form { display: grid; gap: var(--space-3, 16px); max-width: 28rem; margin-block: var(--space-4, 24px); }
.track-result { margin-block: var(--space-5, 32px); padding: var(--space-4, 24px); border: 1px solid var(--color-line); border-radius: 16px; background: var(--color-bg); }
.track-current { font-size: var(--title-l-size); font-weight: var(--weight-bold); color: var(--color-accent); margin-block: 8px 16px; }
.track-steps { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 12px; }
.track-step { display: grid; grid-template-columns: 28px 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; color: var(--color-muted); }
.track-step .track-at { grid-column: 2; font-size: var(--label-m-size); color: var(--color-muted); }
.track-dot { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--color-line); display: grid; place-items: center; grid-row: span 2; }
.track-step.is-done .track-dot, .track-step.is-current .track-dot { background: var(--color-accent); border-color: var(--color-accent); color: #fff; }
.track-step.is-current .track-label { color: var(--color-text); font-weight: var(--weight-bold); }
.order-number { font-size: var(--headline-s-size); font-weight: var(--weight-bold); letter-spacing: 0.04em; color: var(--color-accent); margin: 0; }
.order-number-card { text-align: center; padding: 24px 16px; border-radius: 16px; background: var(--color-surface); margin-block: 24px; display: grid; gap: 8px; justify-items: center; }
.order-head { text-align: center; display: grid; gap: 8px; justify-items: center; }
.order-badge { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--color-accent); color: #fff; }
.trap-field { position: absolute; inset-inline-start: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Qeshla product page (Purito layout: gallery beside a sticky buy box, then promises, details, info) ---------- */
@media (min-width: 960px) {
  .product .product-info { position: sticky; top: calc(var(--header-h, 72px) + 16px); }
}
.product-gallery img, .gallery-placeholder { background: var(--brand-cloud); }
.product-eyebrow {
  display: inline-block; margin: 0 0 var(--space-1); padding: 4px 12px; border-radius: 999px;
  background: var(--brand-periwinkle); color: var(--color-accent);
  font-size: var(--label-l-size); line-height: var(--label-l-line); font-weight: var(--weight-medium);
}
.product-size { margin: 0; color: var(--color-muted); font-size: var(--body-m-size); line-height: var(--body-m-line); }
.product-price-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 12px; margin-block: var(--space-2); }
.product-price-row .product-price { margin: 0; }
.product-compare { color: var(--color-muted); font-size: var(--body-l-size); line-height: var(--body-l-line); }
.save-badge {
  padding: 2px 10px; border-radius: 999px; background: var(--brand-cloud); color: var(--color-accent);
  font-size: var(--label-l-size); line-height: var(--label-l-line); font-weight: var(--weight-bold);
}
.claim-pills { list-style: none; margin: 0 0 var(--space-3); padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.claim-pills li {
  padding: 6px 14px; border: 1px solid var(--color-line); border-radius: 999px; color: var(--color-text);
  font-size: var(--label-l-size); line-height: var(--label-l-line);
}
.buy-form { display: grid; gap: var(--space-2); }
.offer-choice { border: 0; margin: 0; padding: 0; display: grid; gap: 10px; }
.offer-choice legend { margin-block-end: 8px; font-weight: var(--weight-medium); font-size: var(--body-m-size); line-height: var(--body-m-line); }
.offer-option {
  position: relative; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 4px 12px;
  min-height: 64px; padding: 12px 16px; border: 2px solid var(--color-line); border-radius: 14px; cursor: pointer;
  background: var(--color-bg); -webkit-tap-highlight-color: transparent;
}
.offer-option input { width: 22px; height: 22px; accent-color: var(--color-accent); margin: 0; }
.offer-label { font-weight: var(--weight-bold); font-size: var(--body-l-size); line-height: var(--body-l-line); }
.offer-price { font-weight: var(--weight-bold); color: var(--color-accent); font-size: var(--body-l-size); line-height: var(--body-l-line); }
.offer-badge {
  grid-column: 2 / -1; justify-self: start; padding: 2px 10px; border-radius: 999px;
  background: var(--color-accent); color: #fff; font-size: var(--label-m-size); line-height: var(--label-m-line); font-weight: var(--weight-medium);
}
.offer-option:has(input:checked) { border-color: var(--color-accent); background: var(--brand-cloud); }
.offer-option:has(input:focus-visible) { outline: 3px solid var(--color-accent); outline-offset: 2px; }
.order-btn { min-height: 56px; font-size: var(--title-m-size); line-height: var(--title-m-line); }
.trust-lines { list-style: none; margin: var(--space-3) 0 0; padding: 0; display: grid; gap: 10px; }
.trust-lines li { display: flex; align-items: center; gap: 10px; color: var(--color-text); font-size: var(--body-m-size); line-height: var(--body-m-line); }
.trust-lines .icon { color: var(--color-accent); flex: none; }

.promises { padding-block: var(--space-3); }
.promises ul {
  list-style: none; margin: 0; padding: var(--space-3) 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3) var(--space-2);
  border-block: 1px solid var(--color-line);
}
@media (min-width: 768px) { .promises ul { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.promises li { display: grid; justify-items: center; gap: 8px; text-align: center; font-size: var(--body-m-size); line-height: var(--body-m-line); }
.promise-icon { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-cloud); color: var(--color-accent); }

.product-details { padding-block: var(--space-2); max-width: 880px; }
.product-info-table { padding-block: var(--space-3); max-width: 880px; }
.product-info-table h2 { font-size: var(--title-l-size); line-height: var(--title-l-line); color: var(--color-accent); }
.info-table { width: 100%; border-collapse: collapse; font-size: var(--body-m-size); line-height: var(--body-m-line); }
.info-table th, .info-table td { padding: 12px; border-block-end: 1px solid var(--color-line); text-align: start; vertical-align: top; }
.info-table th { width: 34%; color: var(--color-muted); font-weight: var(--weight-medium); background: var(--brand-cloud); }
.order-again { padding-block: var(--space-3) var(--space-5); max-width: 560px; }

/* The sticky order bar shows on phones once the buy box's own button scrolled away (store.js); without JS always. */
.buy-bar.is-js { transform: translateY(110%); transition: transform .25s ease; }
.buy-bar.is-js.is-shown { transform: none; }
@media (prefers-reduced-motion: reduce) { .buy-bar.is-js { transition: none; } }

/* Header: «تتبّع طلبي» stays one tap away. */
.track-link { display: inline-flex; align-items: center; gap: 6px; min-height: var(--tap); padding-inline: 8px; color: var(--color-accent); text-decoration: none; font-weight: var(--weight-medium); font-size: var(--label-l-size); line-height: var(--label-l-line); }
@media (max-width: 380px) { .track-link-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } }

/* Home hero: text and the product image side by side on wide screens. */
.hero { background: var(--brand-cloud); }
.hero-inner { display: grid; gap: var(--space-3); align-items: center; }
.hero-image { display: none; width: 100%; max-width: 420px; height: auto; justify-self: center; border-radius: 24px; }
@media (min-width: 960px) { .hero-image { display: block; } }
@media (min-width: 960px) { .hero-inner { grid-template-columns: 1.2fr 1fr; } }
.top-bar { background: var(--top-bar-bg); color: var(--top-bar-fg); }

/* Checkout: the product beside its photo, and the cash-on-delivery line centred with its icon. */
.summary-item { display: flex; align-items: center; gap: 12px; margin-block-end: var(--space-2); }
.summary-item img { flex: none; width: 72px; height: 72px; object-fit: cover; border-radius: 12px; background: #fff; }
.summary-item-text p { margin: 0; }
.summary-item-name { font-weight: var(--weight-bold); }
.summary-item-size { color: var(--color-muted); font-size: var(--body-m-size); line-height: var(--body-m-line); }
.summary-item-offer { color: var(--color-accent); font-size: var(--label-l-size); line-height: var(--label-l-line); font-weight: var(--weight-medium); }
.checkout-cod { display: flex; align-items: center; justify-content: center; gap: 8px; }
.order-details > div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-block: 6px; }
.order-details dt { color: var(--color-muted); }
.order-details dd { margin: 0; font-weight: var(--weight-medium); }
