/* Najma 24, a fictional 24-hour minimart in Al Khalidiyah, Abu Dhabi.
   Concept site by Orvo. One stylesheet for both directions: logical properties
   throughout, so the Arabic page only swaps fonts and leading. */

:root {
  color-scheme: light;
  --cobalt: #2443ff;
  --cobalt-deep: #1631d8;
  --cobalt-ink: #1a2fbf;
  --ink: #0f1747;
  --ink-2: #3d4575;
  --ink-3: #676d96;
  --sun: #ffd23f;
  --sun-soft: #fff6d6;
  --tomato: #ff4a2e;
  --mint: #19b36f;
  --wa: #0e8a45;
  --paper: #f4f5fa;
  --tile: #eef0f6;
  --white: #fff;
  --line: rgba(15, 23, 71, 0.09);
  --line-strong: rgba(15, 23, 71, 0.18);

  --gutter: 16px;
  --max: 1240px;
  --header: 60px;
  --r-sm: 10px;
  --r: 16px;
  --r-lg: 22px;

  --sh-1: 0 1px 2px rgba(15, 23, 71, 0.05), 0 2px 6px -2px rgba(15, 23, 71, 0.06);
  --sh-2: 0 1px 2px rgba(15, 23, 71, 0.06), 0 16px 36px -18px rgba(15, 23, 71, 0.32);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);

  --font-body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Bricolage Grotesque", "Figtree", system-ui, sans-serif;
  --track-xl: -0.035em;
  --track-l: -0.025em;
  --track-m: -0.012em;
  --lh-xl: 0.98;
  --lh-l: 1.04;
}

:lang(ar) {
  --font-body: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
  --font-display: "Readex Pro", "IBM Plex Sans Arabic", sans-serif;
  --track-xl: 0;
  --track-l: 0;
  --track-m: 0;
  --lh-xl: 1.22;
  --lh-l: 1.3;
}

@media (min-width: 720px) {
  :root { --gutter: 28px; --header: 68px; }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-block-start: calc(var(--header) + 70px);
  scrollbar-width: thin;
  scrollbar-color: rgba(15, 23, 71, 0.4) transparent;
}

html::-webkit-scrollbar { inline-size: 10px; block-size: 10px; }
html::-webkit-scrollbar-track { background: transparent; }
html::-webkit-scrollbar-thumb { background: rgba(15, 23, 71, 0.32); border-radius: 10px; border: 2px solid var(--paper); }
html::-webkit-scrollbar-thumb:hover { background: rgba(15, 23, 71, 0.55); }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: clip;
  font-variant-numeric: lining-nums;
}

:lang(ar) body { line-height: 1.75; }

img, svg { display: block; max-inline-size: 100%; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
[hidden] { display: none !important; }

.sprite { position: absolute; inline-size: 0; block-size: 0; overflow: hidden; }

.visually-hidden {
  position: absolute !important;
  inline-size: 1px; block-size: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%);
  white-space: nowrap;
}

:focus-visible { outline: 2.5px solid var(--cobalt); outline-offset: 3px; border-radius: 8px; }
.stage :focus-visible, .site-header :focus-visible, .basket-bar :focus-visible,
.demo-bar :focus-visible, .site-footer :focus-visible { outline-color: var(--sun); }

.wrap {
  inline-size: 100%;
  max-inline-size: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

h1, h2, h3, h4 { font-family: var(--font-display); margin: 0; }

h2 {
  font-size: clamp(2rem, 1.2rem + 3.4vw, 3.4rem);
  line-height: var(--lh-l);
  letter-spacing: var(--track-l);
  font-weight: 700;
  text-wrap: balance;
}

h3 { font-size: 1.375rem; line-height: 1.2; letter-spacing: var(--track-m); font-weight: 700; }

.eyebrow {
  margin: 0 0 12px;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cobalt);
}
:lang(ar) .eyebrow { letter-spacing: 0; font-size: 0.9rem; }

.dot {
  inline-size: 8px;
  block-size: 8px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 3px rgba(25, 179, 111, 0.22);
  flex: none;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-block-size: 50px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.1;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms var(--ease-out), background-color 160ms ease, box-shadow 160ms ease;
  touch-action: manipulation;
  white-space: nowrap;
}

.btn svg { inline-size: 20px; block-size: 20px; flex: none; }
.btn:active { transform: scale(0.97); }

.btn-sun { background: var(--sun); color: var(--ink); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 8px 18px -10px rgba(10, 16, 60, 0.6); }
.btn-ink { background: var(--ink); color: var(--white); }
.btn-line { background: var(--white); color: var(--ink); border-color: var(--line-strong); }
.btn-glass { background: rgba(255, 255, 255, 0.12); color: var(--white); border-color: rgba(255, 255, 255, 0.38); }
.btn-wa { background: var(--wa); color: var(--white); inline-size: 100%; min-block-size: 54px; font-size: 1.05rem; box-shadow: 0 10px 22px -12px rgba(14, 138, 69, 0.8); }
.btn[disabled] { cursor: not-allowed; background: #e3e6f1; color: var(--ink-3); border-color: transparent; box-shadow: none; transform: none; }

@media (hover: hover) and (pointer: fine) {
  .btn-sun:hover { background: #ffdb5e; }
  .btn-glass:hover { background: rgba(255, 255, 255, 0.2); }
  .btn-line:hover { background: var(--paper); }
  .btn-wa:not([disabled]):hover { background: #0c7a3d; }
  .btn-ink:hover { background: #1b2566; }
}

/* ---------- Demo bar + header ---------- */

.demo-bar {
  margin: 0;
  padding: 13px var(--gutter);
  font-size: 13px;
  line-height: 1.4;
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
  background: #121c7a;
}

.demo-bar a {
  display: inline-block;
  padding: 13px 8px;
  margin: -13px -8px;
  min-inline-size: 44px;
  min-block-size: 44px;
  color: var(--white);
  text-underline-offset: 3px;
}

.site-header {
  position: sticky;
  inset-block-start: 0;
  z-index: 30;
  background: rgba(36, 67, 255, 0.82);
  -webkit-backdrop-filter: blur(16px) saturate(1.5);
  backdrop-filter: blur(16px) saturate(1.5);
  color: var(--white);
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.12);
}

@media (prefers-reduced-transparency: reduce) {
  .site-header { background: var(--cobalt); backdrop-filter: none; -webkit-backdrop-filter: none; }
}

.header-row { display: flex; align-items: center; gap: 8px; block-size: var(--header); }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-block-size: 44px;
  text-decoration: none;
  margin-inline-end: auto;
}

.brand-mark {
  display: grid;
  place-items: center;
  inline-size: 34px;
  block-size: 34px;
  border-radius: 10px;
  background: var(--sun);
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.08);
}

.brand-mark svg { inline-size: 21px; block-size: 21px; fill: var(--cobalt); }

.brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.35rem;
  line-height: 1;
  letter-spacing: -0.02em;
}

.brand-name b { color: var(--sun); margin-inline-start: 0.12em; }
:lang(ar) .brand-name { letter-spacing: 0; font-weight: 700; }

.nav { display: none; }

.nav a, .lang {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-block-size: 44px;
  min-inline-size: 44px;
  padding-inline: 12px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: background-color 160ms ease;
}

.lang:lang(en) { font-family: "Figtree", system-ui, sans-serif; }
.lang:lang(ar) { font-family: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif; }

.open-pill { display: none; }

@media (hover: hover) and (pointer: fine) {
  .nav a:hover, .lang:hover { background: rgba(255, 255, 255, 0.14); }
  .demo-bar a:hover { color: var(--sun); }
}

.basket-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-block-size: 44px;
  padding: 0 14px 0 12px;
  border-radius: 999px;
  background: var(--white);
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 6px 16px -10px rgba(10, 16, 60, 0.7);
  transition: transform 160ms var(--ease-out);
}

.basket-pill svg { inline-size: 19px; block-size: 19px; }
.basket-pill:active { transform: scale(0.97); }

.pill-n {
  display: grid;
  place-items: center;
  min-inline-size: 22px;
  block-size: 22px;
  padding-inline: 6px;
  border-radius: 999px;
  background: var(--tomato);
  color: var(--white);
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1;
}

.basket-pill.bump .pill-n { animation: bump 300ms var(--ease-out); }
@keyframes bump { 40% { transform: scale(1.25); } }

@media (max-width: 400px) {
  .pill-sum { display: none; }
  .basket-pill { padding-inline: 12px 10px; }
}

@media (min-width: 860px) {
  .nav { display: flex; gap: 2px; margin-inline-end: 4px; }
}

@media (min-width: 1100px) {
  .open-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 6px;
    padding: 0 12px;
    min-block-size: 32px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
  }
}

/* ---------- The drop: pinned 3D scene ---------- */

.drop { position: relative; }
.js .drop { block-size: 340vh; }
.js .drop.is-static { block-size: auto; }

.stage {
  position: sticky;
  inset-block-start: 0;
  block-size: 100vh;
  block-size: 100svh;
  min-block-size: 620px;
  overflow: hidden;
  color: var(--white);
  background-color: var(--cobalt);
  background-image:
    radial-gradient(120% 80% at 75% 55%, rgba(120, 146, 255, 0.45), transparent 60%),
    radial-gradient(rgba(255, 255, 255, 0.11) 1.4px, transparent 1.6px);
  background-size: auto, 24px 24px;
  isolation: isolate;
}

:dir(rtl) .stage { background-image: radial-gradient(120% 80% at 25% 55%, rgba(120, 146, 255, 0.45), transparent 60%), radial-gradient(rgba(255, 255, 255, 0.11) 1.4px, transparent 1.6px); }

.drop.is-static .stage { position: relative; }

/* The canvas covers the whole stage (things fall from the top), above the slot's poster. */
.stage-art { position: absolute; inset: 0; z-index: 1; pointer-events: none; }

.scene {
  position: absolute;
  inset: 0;
  inline-size: 100%;
  block-size: 100%;
  opacity: 0;
}
.is-3d .scene { opacity: 1; }
/* The poster and the first 3D frame are the same picture, so they swap on one frame. Only
   when the 3D arrives mid-scroll (pile half built) does the canvas fade in over the poster. */
.stage.fade-in .scene { transition: opacity 400ms ease; }

/* The slot: where the crate sits. Its custom properties are read by scene.js for the camera
   (elevation, distance, world units across the slot, look height), and the two posters were
   rendered through that same camera, so poster and 3D line up to the pixel. */
.stage-floor { position: relative; z-index: 0; pointer-events: none; }

.slot {
  --elev: 37; --dist: 14; --span: 4.2; --look-y: 0.62; --small: 1;
  /* floor disc (r 3.4 around the crate) in slot widths: centre below the slot centre, radii */
  --floor-y: 0.213; --floor-rx: 0.8; --floor-ry: 0.516;
  position: relative;
  aspect-ratio: 1.72;
  container-type: size;
}

.floor {
  position: absolute;
  inset-inline-start: 50%;
  inset-block-start: calc(50cqh + (var(--floor-y) - var(--floor-ry)) * 100cqw);
  inline-size: calc(var(--floor-rx) * 200cqw);
  block-size: calc(var(--floor-ry) * 200cqw);
  translate: -50% 0;
  border-radius: 50%;
  background: radial-gradient(closest-side, #7398ff, #6d93ff 70%, #6a8ffd);
}
[dir="rtl"] .floor { translate: 50% 0; }

.poster { position: absolute; inset: 0; transition: opacity 300ms ease; }
.poster img { inline-size: 100%; block-size: 100%; max-inline-size: none; }

/* No JS, no WebGL or reduced motion: the finished crate. Otherwise the empty crate, exactly
   what the 3D shows at the top of the scroll; the full one takes over late in the section
   if the 3D is still on its way. Once the canvas has faded in, the posters step out. */
.poster-empty { opacity: 0; }
.js .drop:not(.is-static) .poster-empty { opacity: 1; transition: none; }
.js .drop:not(.is-static) .poster-full { opacity: 0; }
/* full fades in over the empty one, then the empty one steps out (no doubled shadow) */
.js .drop:not(.is-static) .stage.is-full .poster-full { opacity: 1; }
.js .drop:not(.is-static) .stage.is-full .poster-empty { opacity: 0; transition: opacity 0s linear 300ms; }
.js .stage.is-3d .poster { opacity: 0; transition: none; }
.js .stage.is-3d.fade-in .poster { transition: opacity 0s linear 420ms; }

.stage-copy {
  position: relative;
  z-index: 2;
  max-inline-size: var(--max);
  margin-inline: auto;
  padding: calc(var(--header) + 16px) var(--gutter) 0;
  transition: opacity 240ms ease, visibility 240ms;
}

.stage-copy > * { max-inline-size: 36rem; }

.hero-open {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 16px;
  padding: 6px 14px 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
  font-size: 0.875rem;
  font-weight: 600;
}

.hero-open .dot { background: #4cf0a2; box-shadow: 0 0 0 3px rgba(76, 240, 162, 0.25); }

.stage h1 {
  font-size: clamp(2.5rem, 1.2rem + 6.2vw, 5.4rem);
  line-height: var(--lh-xl);
  letter-spacing: var(--track-xl);
  font-weight: 800;
  text-wrap: balance;
}
:lang(ar) .stage h1 { font-weight: 700; font-size: clamp(2.2rem, 1.1rem + 5.4vw, 4.6rem); }

.lede {
  margin: 16px 0 0;
  font-size: 1.0625rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.86);
  max-inline-size: 31rem;
  text-wrap: pretty;
}

.hero-actions, .end-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-block-start: 22px; }

.hero-facts {
  list-style: none;
  margin: 22px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.78);
}
.hero-facts li { display: inline-flex; align-items: center; gap: 8px; }
.hero-facts li::before { content: ""; inline-size: 5px; block-size: 5px; border-radius: 50%; background: var(--sun); }

.stage-end {
  display: none;
  position: absolute;
  z-index: 3;
  inset-inline: 0;
  inset-block-start: 0;
  max-inline-size: var(--max);
  margin-inline: auto;
  padding: calc(var(--header) + 22px) var(--gutter) 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 240ms ease, transform 300ms var(--ease-out), visibility 240ms;
}
.js .stage-end { display: block; }

.end-title {
  margin: 0;
  max-inline-size: 14ch;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.1rem, 1.1rem + 4.6vw, 4.4rem);
  line-height: var(--lh-xl);
  letter-spacing: var(--track-xl);
  text-wrap: balance;
}
:lang(ar) .end-title { font-weight: 700; max-inline-size: 16ch; }
.end-title [data-end-sum] { white-space: nowrap; }

.stage.is-end .stage-end { opacity: 1; visibility: visible; transform: none; }
.stage.is-end .stage-copy { opacity: 0; visibility: hidden; }

.tally {
  position: absolute;
  z-index: 2;
  inset-block-end: max(18px, env(safe-area-inset-bottom));
  inset-inline-start: var(--gutter);
  margin: 0;
  display: none;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--white);
  color: var(--ink);
  font-weight: 600;
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 10px 24px -12px rgba(10, 16, 60, 0.6);
}
.tally span { display: grid; place-items: center; min-inline-size: 22px; block-size: 22px; border-radius: 999px; background: var(--tomato); color: var(--white); font-size: 0.8rem; font-weight: 700; }
.tally b { color: var(--cobalt); font-weight: 700; }
.js .drop:not(.is-static) .stage.is-3d .tally { display: inline-flex; }
@media (prefers-reduced-motion: no-preference) {
  .tally.bump span { animation: tally-bump 260ms var(--ease-out); }
}
@keyframes tally-bump { 40% { transform: scale(1.22); } }

.scroll-cue {
  position: absolute;
  z-index: 2;
  inset-block-end: max(24px, env(safe-area-inset-bottom));
  inset-inline-end: var(--gutter);
  margin: 0;
  display: none;
  font-weight: 600;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.8);
  transition: opacity 200ms ease;
}
.scroll-cue::after { content: " ↓"; }
.stage.is-moving .scroll-cue { opacity: 0; }

@media (max-width: 899px) {
  /* Phones: the headline block on top, the crate in its own zone below it. The copy and the
     closing line share one grid cell, so the crate clears whichever is taller. */
  .stage { display: flex; flex-direction: column; min-block-size: 540px; }
  .stage-head { position: relative; z-index: 2; display: grid; flex: none; pointer-events: none; }
  .stage-head > * { grid-area: 1 / 1; pointer-events: auto; }
  .stage-end { position: relative; inset: auto; margin: 0; padding-block-start: calc(var(--header) + 12px); }
  .stage-floor {
    flex: 1 1 auto;
    min-block-size: 0;
    container-type: size;
    display: grid;
    place-items: end center;
    padding-block: 14px calc(64px + env(safe-area-inset-bottom));
  }
  /* May be a little wider than the screen (the shadow side bleeds off); centred by translate
     so overflow can't push it to one side in either direction. */
  .slot { inline-size: min(110cqw, 100cqh * 1.72, 600px); justify-self: start; margin-inline-start: 50%; translate: -50% 0; }
  [dir="rtl"] .slot { translate: 50% 0; }
  .stage-copy { padding-block-start: calc(var(--header) + 12px); }
  .stage h1 { font-size: clamp(2.3rem, 1rem + 7.6vw, 3.4rem); }
  :lang(ar) .stage h1 { font-size: clamp(2rem, 0.9rem + 7vw, 3rem); }
  .lede { font-size: 1rem; margin-block-start: 12px; }
  .hero-actions { margin-block-start: 18px; }
  .hero-actions .btn { min-block-size: 48px; padding-inline: 20px; }
  .hero-facts { display: none; }
  /* Items fall through the top half on phones, so the headline steps aside while they do. */
  .stage.is-3d.is-moving .stage-copy { opacity: 0; visibility: hidden; }
}

@media (max-height: 760px) and (max-width: 899px) {
  .lede { display: none; }
}

@media (min-width: 900px) {
  /* Wide: the crate sits beside the headline, centred at 74% across and 52% down. */
  .stage-head { display: contents; }
  .stage-floor { position: absolute; inset: 0; }
  .slot {
    --elev: 31; --dist: 10.3; --small: 0;
    --floor-y: 0.253; --floor-rx: 0.816; --floor-ry: 0.474;
    position: absolute;
    inset-inline-start: 74%;
    inset-block-start: 52%;
    inline-size: 51vw;
    translate: -50% -50%;
  }
  [dir="rtl"] .slot { translate: 50% -50%; }
  .stage-copy { padding-block-start: calc(var(--header) + 11vh); }
  .stage-copy h1 { max-inline-size: 10.5ch; }
  :lang(ar) .stage-copy h1 { max-inline-size: 12ch; }
  .stage-copy .lede { font-size: 1.125rem; max-inline-size: 29rem; }
  .stage-end { padding-block-start: calc(var(--header) + 14vh); }
  .js .drop:not(.is-static) .scroll-cue { display: block; inset-inline-end: auto; inset-inline-start: var(--gutter); inset-block-end: 28px; }
  .js .drop:not(.is-static) .stage.is-3d .tally { inset-inline-start: auto; inset-inline-end: var(--gutter); }
  .stage.is-moving .tally { opacity: 1; }
}

/* ---------- Shop ---------- */

.shop { padding-block: 64px 80px; }

.shop-head { display: grid; max-inline-size: 44rem; }
.shop-head p:last-child { margin: 14px 0 0; color: var(--ink-2); font-size: 1.0625rem; text-wrap: pretty; }

.aisles {
  position: sticky;
  inset-block-start: var(--header);
  z-index: 20;
  display: flex;
  gap: 8px;
  margin: 26px calc(var(--gutter) * -1) 0;
  padding: 10px var(--gutter);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  background: rgba(244, 245, 250, 0.86);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  backdrop-filter: blur(14px) saturate(1.4);
  box-shadow: 0 1px 0 var(--line);
}
.aisles::-webkit-scrollbar { display: none; }

@media (prefers-reduced-transparency: reduce) {
  .aisles { background: var(--paper); backdrop-filter: none; -webkit-backdrop-filter: none; }
}

.aisles a {
  flex: none;
  display: inline-flex;
  align-items: center;
  min-block-size: 44px;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--white);
  box-shadow: inset 0 0 0 1px var(--line-strong);
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 160ms ease, color 160ms ease, transform 160ms var(--ease-out);
}
.aisles a:active { transform: scale(0.97); }
.aisles a[aria-current="true"] { background: var(--ink); color: var(--white); box-shadow: none; }

@media (hover: hover) and (pointer: fine) {
  .aisles a:not([aria-current="true"]):hover { box-shadow: inset 0 0 0 1px var(--ink); }
}

.shop-layout { display: grid; gap: 32px; margin-block-start: 8px; }

.shelf { padding-block-start: 32px; }

.shelf-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 14px; margin-block-end: 16px; }
.shelf-head p { margin: 0; color: var(--ink-3); font-size: 0.9375rem; }

.items {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

/* One card style for every product */
.item {
  display: flex;
  flex-direction: column;
  padding: 8px 8px 14px;
  border-radius: var(--r-lg);
  background: var(--white);
  box-shadow: var(--sh-1), inset 0 0 0 1px var(--line);
  transition: box-shadow 200ms ease;
}
.item.is-added { box-shadow: var(--sh-1), inset 0 0 0 2px var(--cobalt); }

.ph {
  position: relative;
  aspect-ratio: 1;
  border-radius: 15px;
  overflow: hidden;
  background: var(--tile);
}

.ph img {
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
  filter: saturate(1.04);
}

/* A soft inner edge so light and dark photos sit as one set */
.ph::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 71, 0.06);
  background: linear-gradient(to top, rgba(15, 23, 71, 0.14), transparent 34%);
  pointer-events: none;
}

.badge {
  position: absolute;
  z-index: 1;
  inset-block-start: 8px;
  inset-inline-start: 8px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.4;
  box-shadow: 0 2px 8px -2px rgba(15, 23, 71, 0.25);
}
.badge-new { background: var(--ink); color: var(--white); }
:lang(ar) .badge { font-size: 0.8rem; }

.item-name {
  margin: 12px 6px 0;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0;
}
.item-size { margin: 2px 6px 0; font-size: 0.8125rem; line-height: 1.35; color: var(--ink-3); }
.price {
  margin: auto 6px 0;
  padding-block-start: 8px;
  font-weight: 700;
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
}
:lang(ar) .item-name { font-weight: 600; line-height: 1.5; }
:lang(ar) .item-size { font-size: 0.875rem; }

/* Stepper: a round + on the photo that grows into − n + */
.ph .stepper {
  position: absolute;
  z-index: 2;
  inset-block-end: 8px;
  inset-inline-end: 8px;
  border-radius: 999px;
  background: var(--white);
  box-shadow: 0 6px 16px -6px rgba(15, 23, 71, 0.45);
}

.stepper { display: flex; align-items: center; }

.step {
  display: grid;
  place-items: center;
  inline-size: 44px;
  block-size: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 140ms var(--ease-out), background-color 140ms ease;
}
.step svg { inline-size: 18px; block-size: 18px; }
.step:active { transform: scale(0.9); }
.step-plus { background: var(--cobalt); color: var(--white); }

.step-count {
  min-inline-size: 22px;
  text-align: center;
  font-weight: 700;
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
}

.item:not(.is-added) .ph .step-minus,
.item:not(.is-added) .ph .step-count { display: none; }

@media (hover: hover) and (pointer: fine) {
  .step-plus:hover { background: var(--cobalt-deep); }
  .step-minus:hover { background: var(--paper); }
}

@media (min-width: 640px) {
  .items { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
}

@media (min-width: 1000px) {
  .shop-layout { grid-template-columns: minmax(0, 1fr) 372px; gap: 40px; align-items: start; }
  .basket { position: sticky; inset-block-start: calc(var(--header) + 82px); align-self: start; }
  .items { grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: 16px; }
  .item-name { font-size: 1rem; }
}

/* ---------- Basket ---------- */

.basket-card {
  padding: 22px;
  border-radius: var(--r-lg);
  background: var(--white);
  box-shadow: var(--sh-2), inset 0 0 0 1px var(--line);
}

.basket-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.basket-card h3 { font-size: 1.5rem; }
.basket-count { margin: 0; color: var(--ink-3); font-size: 0.9375rem; font-weight: 500; }
.basket-empty { margin: 10px 0 0; color: var(--ink-2); }

.lines { list-style: none; margin: 10px 0 0; padding: 0; display: grid; max-block-size: 360px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(15, 23, 71, 0.3) transparent; }
.lines::-webkit-scrollbar { inline-size: 8px; }
.lines::-webkit-scrollbar-thumb { background: rgba(15, 23, 71, 0.25); border-radius: 8px; }

.line {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  grid-template-areas: "img name price" "img step step";
  align-items: center;
  gap: 2px 12px;
  padding-block: 12px;
  border-block-end: 1px solid var(--line);
}
.line img { grid-area: img; align-self: start; inline-size: 48px; block-size: 48px; border-radius: 12px; object-fit: cover; background: var(--tile); }
.line-name { grid-area: name; display: grid; font-weight: 600; line-height: 1.3; font-size: 0.9375rem; }
.line-name small { font-weight: 500; color: var(--ink-3); font-size: 0.8125rem; }
.line-price { grid-area: price; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.line .stepper { grid-area: step; justify-self: start; margin-block-start: 6px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line-strong); }
.line .step-plus { background: transparent; color: var(--ink); }

.minimum { margin-block-start: 16px; }
.minimum p { margin: 8px 0 0; font-size: 0.875rem; font-weight: 500; color: var(--ink-2); }

.meter { block-size: 6px; border-radius: 999px; background: var(--tile); overflow: hidden; }
.meter span {
  display: block;
  block-size: 100%;
  background: var(--sun);
  border-radius: inherit;
  transform-origin: left center;
  transform: scaleX(0);
  transition: transform 300ms var(--ease-out), background-color 200ms ease;
}
[dir="rtl"] .meter span { transform-origin: right center; }
.minimum.is-met .meter span { background: var(--mint); }

.sum { margin: 16px 0 0; display: grid; gap: 4px; }
.sum div { display: flex; justify-content: space-between; gap: 12px; }
.sum dt { color: var(--ink-2); }
.sum dd { margin: 0; font-weight: 600; }
.sum-total { padding-block-start: 6px; }
.sum-total dt { color: var(--ink); font-weight: 600; font-size: 1.0625rem; }
.sum-total dd { font-family: var(--font-display); font-size: 1.6rem; font-weight: 700; line-height: 1.1; letter-spacing: var(--track-m); font-variant-numeric: tabular-nums; }

.where {
  margin: 18px 0 0;
  padding: 18px 0 0;
  border: 0;
  border-block-start: 1px solid var(--line);
  display: grid;
  gap: 12px;
  min-inline-size: 0;
}
.where legend { padding: 0; margin-block-end: 2px; font-weight: 600; font-size: 1.0625rem; float: inline-start; inline-size: 100%; }

.field-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.field-row:has(.field-small) { grid-template-columns: minmax(0, 1fr) 96px; }
.field { display: grid; gap: 5px; min-inline-size: 0; }
.field label { font-weight: 600; font-size: 0.8125rem; color: var(--ink-2); }
.opt { font-weight: 400; color: var(--ink-3); }

.field input, .field select {
  inline-size: 100%;
  min-block-size: 46px;
  padding: 8px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--white);
  font-size: 16px;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
.field input::placeholder { color: #a0a5c4; }
.field input:focus, .field select:focus { border-color: var(--cobalt); outline: none; box-shadow: 0 0 0 3px rgba(36, 67, 255, 0.16); }
.field [aria-invalid="true"] { border-color: var(--tomato); box-shadow: 0 0 0 3px rgba(255, 74, 46, 0.14); }

.basket-card .btn-wa { margin-block-start: 18px; }
.hint { margin: 10px 0 0; font-size: 0.875rem; color: var(--ink-2); }

.link-btn {
  margin-block-start: 2px;
  min-block-size: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink-3);
  font-weight: 500;
  font-size: 0.875rem;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

/* Sticky basket summary on phones and tablets */
.basket-bar {
  position: fixed;
  z-index: 40;
  inset-inline: 10px;
  inset-block-end: max(10px, env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px;
  padding-inline-start: 18px;
  border-radius: 20px;
  background: rgba(15, 23, 71, 0.94);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  color: var(--white);
  box-shadow: 0 16px 34px -12px rgba(15, 23, 71, 0.6);
  transition: transform 260ms var(--ease-out), opacity 200ms ease;
}
.basket-bar.is-off { transform: translateY(130%); opacity: 0; pointer-events: none; }

.bar-sum { margin: 0; display: grid; grid-template-columns: auto auto; justify-content: start; align-items: baseline; column-gap: 8px; line-height: 1.25; font-size: 0.8125rem; color: rgba(255, 255, 255, 0.72); font-variant-numeric: tabular-nums; }
.bar-sum strong { font-size: 1.125rem; color: var(--white); font-weight: 700; }
.bar-sum small { grid-column: 1 / -1; font-size: 0.75rem; color: var(--sun); font-weight: 600; }
.basket-bar .btn { min-block-size: 48px; padding-inline: 18px; box-shadow: none; }

@media (min-width: 1000px) {
  .basket-bar { display: none !important; }
}

/* ---------- Delivery ---------- */

.delivery { padding-block: 80px; background: var(--sun-soft); }
.delivery .eyebrow { color: #9a6a00; }
.delivery-grid { display: grid; gap: 40px; align-items: center; }
.delivery h2 { max-inline-size: 15ch; }
.delivery-lede { margin: 16px 0 0; font-size: 1.0625rem; color: var(--ink-2); max-inline-size: 34rem; }

.facts { margin: 28px 0 0; display: grid; gap: 12px; }
.facts div {
  padding: 16px 18px;
  border-radius: var(--r);
  background: var(--white);
  box-shadow: var(--sh-1), inset 0 0 0 1px rgba(154, 106, 0, 0.1);
}
.facts dt { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 1rem; }
.facts dt svg { inline-size: 20px; block-size: 20px; color: var(--cobalt); flex: none; }
.facts dd { margin: 4px 0 0; color: var(--ink-2); font-size: 0.9375rem; }

.radius { margin: 0; }
.radius svg {
  inline-size: 100%;
  max-inline-size: 500px;
  margin-inline: auto;
  border-radius: 24px;
  box-shadow: var(--sh-2);
}
.radius figcaption { margin: 16px auto 0; max-inline-size: 500px; font-size: 0.875rem; color: var(--ink-3); }

@media (min-width: 900px) {
  .delivery { padding-block: 112px; }
  .delivery-grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 64px; }
  .facts { grid-template-columns: 1fr 1fr; }
}

/* ---------- Visit ---------- */

.visit { padding-block: 80px; background: var(--white); }
.visit-grid { display: grid; gap: 48px; }
.visit h2 { max-inline-size: 12ch; }

.clock {
  margin: 20px 0 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 14px;
  background: #e2f6ec;
  font-weight: 600;
  color: #0b5a37;
  line-height: 1.4;
}

.hours { margin-block-start: 24px; inline-size: 100%; max-inline-size: 30rem; border-collapse: collapse; }
.hours th, .hours td { padding: 14px 0; border-block-end: 1px solid var(--line); text-align: start; vertical-align: top; }
.hours th { font-weight: 500; color: var(--ink-2); padding-inline-end: 16px; }
.hours td { font-weight: 600; text-align: end; white-space: nowrap; }

address { font-style: normal; font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; line-height: 1.3; letter-spacing: var(--track-m); }
.small-note { margin: 12px 0 0; color: var(--ink-2); max-inline-size: 32rem; }
.visit-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-block-start: 24px; }

@media (min-width: 900px) {
  .visit { padding-block: 112px; }
  .visit-grid { grid-template-columns: 1fr 1fr; gap: 64px; }
  .visit-col:last-child { padding-block-start: 6px; }
}

/* ---------- Footer ---------- */

.site-footer {
  padding-block: 40px 44px;
  background: var(--ink);
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.9375rem;
}
.has-bar .site-footer { padding-block-end: 116px; }

.footer-row { display: grid; gap: 10px; }
.footer-row p { margin: 0; }
.foot-brand { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; color: var(--white); }
.foot-brand svg { inline-size: 22px; block-size: 22px; fill: var(--sun); }
.footer-links { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 18px; }
.footer-links a { display: inline-flex; align-items: center; justify-content: center; min-block-size: 44px; min-inline-size: 44px; font-weight: 600; color: var(--white); text-underline-offset: 3px; }

@media (hover: hover) and (pointer: fine) {
  .footer-links a:hover { color: var(--sun); }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .step, .basket-pill, .aisles a, .basket-bar, .stage-end, .meter span { transition-property: opacity, background-color, box-shadow, visibility; }
  .btn:active, .step:active, .basket-pill:active, .aisles a:active { transform: none; }
  .basket-pill.bump .pill-n { animation: none; }
  .basket-bar.is-off { transform: none; }
  .stage-end { transform: none; }
}
