/* Storefront styles.
 *
 * Rule 14: logical properties ONLY — margin-inline, padding-inline, inset-inline, text-align:
 * start/end — because the same markup renders left-to-right on /en and right-to-left on /ar. Anything
 * written as "left" or "right" would need a second, divergent stylesheet.
 *
 * Bootstrap's own mirrored build (bootstrap.rtl.min.css) handles the framework's grid and spacing;
 * these rules only cover what the store adds on top.
 */

:root {
  /* Cairo is self-hosted (see fonts.css) so an Arabic page never depends on the visitor's device
     fonts, and Latin digits inside Arabic text stay in the same typeface (rule 9). */
  --store-font: 'Cairo', system-ui, sans-serif;
  --store-ink: #1b1b1b;
  --store-muted: #5c5c5c;
  --store-line: #e3e3e3;

  /* Nour Mobile's cyan needs two values, because one hex cannot do both jobs (D-50).
     --store-brand is the FILL: #03c2fc carries near-black text at 8.3:1. Anything that has to be
     READ on a white ground, or that a keyboard user must be able to see, uses --store-accent
     instead: the same hue darkened to 5.6:1. #03c2fc on white is 2.1:1, which fails WCAG for
     body text and for focus indicators alike, so the bright value is never a foreground colour. */
  --store-brand: #03c2fc;
  --store-brand-strong: #02a5d7;
  --store-brand-tint: #e9f9ff;
  --store-accent: #00718f;
  --store-accent-strong: #005872;

  /* T-130, the promotional look. --store-deep is the logo tile's own colour and the ground for
     the promise strip, the hero and the footer: white text on it is 14.9:1. --store-promo is the
     one "look here" colour — badges and the savings nudge — and, like the brand cyan, it is a FILL
     that carries near-black text (12.6:1), never a text colour on white. */
  --store-deep: #0e2a33;
  --store-deep-soft: #b9dbe6;
  --store-promo: #ffcf33;
  --store-promo-tint: #fff6d6;
  --store-promo-line: #b88a00;
  --store-surface: #f3f6f7;
  /* T-249: the ground behind every product photograph (cards, the product page, pictured tiles)
     and behind the drawn icons and the no-photo placeholder. A portrait phone shot in a square box
     (D-68) leaves bars either side of it; on white they looked like a photo that had not filled
     its frame, on this soft tint they read as the frame itself. Never a text ground. */
  --store-media-ground: linear-gradient(160deg, #f8fbfc 0%, #ecf2f4 100%);
  --store-radius: 0.75rem;
  --store-shadow: 0 1px 2px rgba(14, 42, 51, 0.06), 0 4px 14px rgba(14, 42, 51, 0.07);
  --store-shadow-lift: 0 8px 24px rgba(14, 42, 51, 0.16);
}

/* Bootstrap's own primary is its default blue. Overriding the framework's variables (5.3 exposes
   them per component) rebrands every button, link and focus ring from one place — site.css loads
   after bootstrap, so these win — instead of a growing list of rules chasing each component. */
:root {
  --bs-primary: var(--store-brand);
  --bs-primary-rgb: 3, 194, 252;
  --bs-link-color: var(--store-accent);
  --bs-link-hover-color: var(--store-accent-strong);
  /* Bootstrap builds link colour from the -rgb triples, so these carry the same two values. */
  --bs-link-color-rgb: 0, 113, 143;
  --bs-link-hover-color-rgb: 0, 88, 114;
  --bs-focus-ring-color: rgba(3, 194, 252, 0.4);
}

/* The call to action keeps the exact brand cyan and darkens its TEXT instead: white on #03c2fc
   is 2.1:1, which is unreadable on the one button the whole checkout depends on. */
.btn-primary {
  --bs-btn-color: var(--store-ink);
  --bs-btn-bg: var(--store-brand);
  --bs-btn-border-color: var(--store-brand);
  --bs-btn-hover-color: var(--store-ink);
  --bs-btn-hover-bg: var(--store-brand-strong);
  --bs-btn-hover-border-color: var(--store-brand-strong);
  --bs-btn-active-color: var(--store-ink);
  --bs-btn-active-bg: var(--store-brand-strong);
  --bs-btn-active-border-color: var(--store-brand-strong);
  --bs-btn-disabled-color: var(--store-ink);
  --bs-btn-disabled-bg: var(--store-brand);
  --bs-btn-disabled-border-color: var(--store-brand);
  --bs-btn-focus-shadow-rgb: 3, 194, 252;
}

html {
  font-size: 14px;
  position: relative;
  min-height: 100%;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

body {
  font-family: var(--store-font);
  color: var(--store-ink);
  /* A soft ground, so the white panels and cards read as raised surfaces (T-130). */
  background: var(--store-surface);
  /* Arabic ascenders and descenders need more room than Latin at the same size. */
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Deliberately no letter-spacing anywhere: it breaks connected Arabic letterforms. */

.store-skip {
  position: absolute;
  inset-block-start: -3rem;
  inset-inline-start: 0.5rem;
  z-index: 1000;
  padding: 0.5rem 0.75rem;
  background: #fff;
  border: 1px solid var(--store-line);
  border-radius: 0.25rem;
  transition: inset-block-start 0.15s ease-in-out;
}

.store-skip:focus {
  inset-block-start: 0.5rem;
}

/* The promise strip above the header (T-130). One line: below `sm` only the first promise shows,
   because three do not fit a phone and a wrapped strip pushes the whole page down. */
.store-topstrip {
  background: var(--store-deep);
  color: #fff;
  font-size: 0.8rem;
}

.store-topstrip-list {
  display: flex;
  justify-content: center;
  gap: 0.25rem 2rem;
  margin-block: 0;
  padding-block: 0.35rem;
  list-style: none;
}

@media (max-width: 575.98px) {
  .store-topstrip-list li + li {
    display: none;
  }
}

/* T-249 (D-229): the header bar is WHITE, with the brand cyan as a 3px rule along its foot. Until
   T-249 the whole bar was the cyan fill — the loudest thing on every page, and the same colour as
   Add to cart and Place order, so the one button a shopper must find competed with the furniture
   around it. Now the big cyan areas on a page are its primary actions. Everything read on the bar
   is ink (#1b1b1b on white, 17.2:1); the marks and hover use the darkened accent (5.6:1 / 8.0:1
   on white — D-50: the bright cyan is never a text colour on white). */
.store-navbar {
  background: #fff;
  --bs-navbar-color: var(--store-ink);
  --bs-navbar-hover-color: var(--store-accent-strong);
  --bs-navbar-active-color: var(--store-accent-strong);
  --bs-navbar-toggler-border-color: var(--store-line);
  border-block-end: 3px solid var(--store-brand);
  box-shadow: 0 2px 10px rgba(14, 42, 51, 0.08);
}

.store-navbar .nav-link {
  font-weight: 600;
}

.store-navbar .store-nav-icon,
.store-navbar .store-search-link {
  color: var(--store-accent);
}

.store-navbar .nav-link:hover .store-nav-icon,
.store-navbar .nav-link:focus .store-nav-icon {
  color: var(--store-accent-strong);
}

.store-navbar a:focus-visible,
.store-navbar button:focus-visible {
  outline-color: var(--store-accent);
}

/* On white the box needs an edge of its own (it was borderless on the cyan); the soft surface fill
   marks it as a field without a heavy frame. */
.store-navbar .store-search .form-control {
  border-color: #c9d5d9;
  background-color: var(--store-surface);
}

.store-navbar .store-search .form-control:focus {
  background-color: #fff;
}

.store-navbar .store-search .btn {
  --bs-btn-color: #fff;
  --bs-btn-bg: var(--store-deep);
  --bs-btn-border-color: var(--store-deep);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: #000;
  --bs-btn-hover-border-color: #000;
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: #000;
  --bs-btn-active-border-color: #000;
}

.store-brand,
.store-brand:hover,
.store-brand:focus {
  color: var(--store-ink);
}

.store-brand {
  font-weight: 700;
  font-size: 1.2rem;
  /* Mark and name as one flex row: the gap mirrors with the document, so the mark sits at the
     inline start of the name in both directions with no rtl counterpart (rule 14, T-56a). */
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.store-brand-mark {
  flex: none;
  inline-size: 2rem;
  block-size: 2rem;
}

.store-nav-end {
  flex-direction: row;
  align-items: center;
}

/* Brand on one side, search + hamburger on the other. Flex with a gap rather than a margin, so it
   mirrors with the document and needs no rtl counterpart (rule 14). */
.store-nav-compact {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* The narrow-screen search link. Sized as a touch target rather than as text, and deliberately in
   rem so it tracks the type scale: `html` is 14px below 768px (see above), so this measures 39x39 on
   a phone and 44x44 from the tablet breakpoint up. Both were measured. 39px is left alone rather
   than pinned to 44 in px for two reasons — it is already TALLER than the Bootstrap hamburger beside
   it (35px at 375px, and the two are centred on the same line), so pinning would make the search
   icon the odd one out; and a px minimum would stop following the phone type scale the whole
   stylesheet is built on. It is comfortably above the 24x24 WCAG 2.5.8 floor either way.
   `d-lg-none` in the markup is what removes it once the real search box is on the row. */
.store-search-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-inline-size: 2.75rem;
  min-block-size: 2.75rem;
  line-height: 1;
  text-decoration: none;
}

/* The header's drawn marks — the search magnifier and the cart basket. One class, so the two cannot
   drift apart in size. rem, like the touch target above, so they follow the same 14px/16px type
   scale and need no breakpoint of their own: 17.5px on a phone, 20px from the tablet breakpoint up.
   `flex: none` because the cart link is a flex row and the mark must not be squeezed by a long
   label. */
.store-nav-icon {
  flex: none;
  inline-size: 1.25rem;
  block-size: 1.25rem;
  /* One colour for all three marks. The darkened hue, not the fill cyan, because these are read on
     white (D-50) — and on the icon rather than on each link, so the labels keep Bootstrap's own nav
     colour and only the marks are branded. */
  color: var(--store-accent);
}

.nav-link:hover .store-nav-icon,
.nav-link:focus .store-nav-icon {
  color: var(--store-accent-strong);
}

.store-lang {
  white-space: nowrap;
  /* Same flex row as the cart link: the gap replaces the whitespace the emoji sat in, and it mirrors
     with the document rather than needing an rtl counterpart (T-57). */
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.store-main {
  /* Pushes the footer down on short pages without a fixed height. */
  flex: 1 0 auto;
  padding-block: 1.5rem 3rem;
}

/* The footer (T-130): the deep ground, three columns that stack on a phone. Text is white or
   --store-deep-soft (10.4:1 on the deep ground); the bright cyan is legible here, so it is the
   hover colour — the one place it may be a text colour, because the ground is dark (D-50). */
.store-footer {
  margin-block-start: auto;
  padding-block: 2rem 1rem;
  background: var(--store-deep);
  color: var(--store-deep-soft);
  font-size: 0.9rem;
}

.store-footer-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

/* T-249: two columns on a tablet, four (the shop, categories, help, contact) from 992px. */
@media (min-width: 576px) {
  .store-footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }

  .store-footer-about {
    grid-column: 1 / -1;
  }
}

@media (min-width: 992px) {
  .store-footer-inner {
    grid-template-columns: 2fr 1fr 1fr 1.3fr;
  }

  .store-footer-about {
    grid-column: auto;
  }
}

.store-footer-about p {
  margin-block: 0 0.25rem;
  max-inline-size: 26rem;
}

.store-footer-name {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-block-end: 0.6rem;
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem;
}

/* On the deep ground the mark's own tile would vanish into it; a hairline keeps its edge. */
.store-footer .store-brand-mark {
  border-radius: 0.45rem;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.store-footer-heading {
  margin-block: 0 0.6rem;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
}

.store-footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.store-footer-links a {
  color: var(--store-deep-soft);
  text-decoration: none;
}

.store-footer-links a:hover,
.store-footer-links a:focus {
  color: var(--store-brand);
  text-decoration: underline;
}

.store-footer a:focus-visible {
  outline-color: var(--store-brand);
}

/* T-249: the promise strip's three titles under the shop's name, each after a small cyan tick —
   the bright cyan may be a mark here, the ground is dark (D-50). */
.store-footer-promises {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.1rem;
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
  color: #fff;
  font-weight: 600;
}

.store-footer-promises li {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.store-footer-promises li::before {
  content: "";
  flex: none;
  inline-size: 0.5rem;
  block-size: 0.5rem;
  border-radius: 50%;
  background: var(--store-brand);
}

/* T-249: WhatsApp as a pill on the deep ground — WhatsApp's green fill with near-black text
   (#0b1f17 on #25d366 is 8.7:1, on the hover green 9.9:1), the one bright button in the footer. */
.store-footer-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-block-size: 2.75rem;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  background: #25d366;
  color: #0b1f17;
  font-weight: 700;
  text-decoration: none;
}

.store-footer-whatsapp:hover,
.store-footer-whatsapp:focus {
  background: #3ee07a;
  color: #0b1f17;
}

.store-footer-whatsapp .store-wa-glyph {
  flex: none;
  inline-size: 1.3rem;
  block-size: 1.3rem;
}

.store-footer-legal {
  margin-block-start: 1.5rem;
  padding-block-start: 1rem;
  border-block-start: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 0.8rem;
}

/* Visible focus for keyboard users, on both sides of the document. */
a:focus-visible,
button:focus-visible,
.form-control:focus-visible {
  outline: 2px solid var(--store-accent);
  outline-offset: 2px;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem var(--store-brand);
}

/* Money and other figures are Latin runs that must not be reordered inside Arabic prose (BR-22). */
.store-figure {
  unicode-bidi: isolate;
  direction: ltr;
  white-space: nowrap;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* ---------------------------------------------------------------------------
   Catalog: hero, category tiles, product cards, filters, pager (T-28).

   Still logical properties only (rule 14) — these blocks are shared by /en and /ar, and the RTL
   page gets its mirroring from the direction of the document plus Bootstrap's rtl build.
   --------------------------------------------------------------------------- */

/* The home hero (T-130): the words over a drawn banner. The banner is a ::before so it can be
   mirrored on /ar by a transform without mirroring the text — safe only because the artwork has no
   text and no reading direction. Its position is written as percentages, not a side keyword, so
   this file still names no physical side (rule 14); the mirror is what moves the artwork to the
   other end. The deep background is what shows while the file loads, and behind the phone layout. */
.store-hero {
  position: relative;
  display: flex;
  align-items: center;
  /* T-152: 21rem before. The banner was a full screen of a laptop before any product; this is
     enough for the name, the two lines under it and the buttons. */
  min-block-size: 14rem;
  margin-block-end: 1.25rem;
  padding: 1.5rem 2rem;
  overflow: hidden;
  border-radius: var(--store-radius);
  background: var(--store-deep);
  color: #fff;
  box-shadow: var(--store-shadow);
}

.store-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url('../img/hero-banner.svg') 100% 50% / cover no-repeat;
}

[dir="rtl"] .store-hero::before {
  transform: scaleX(-1);
}

.store-hero-body {
  position: relative;
  max-inline-size: 31rem;
}

.store-hero-title {
  font-size: 2.4rem;
  font-weight: 700;
  line-height: 1.25;
  margin-block-end: 0.5rem;
}

.store-hero-lead {
  font-size: 1.15rem;
  margin-block-end: 0.25rem;
}

.store-hero-note {
  color: var(--store-deep-soft);
  margin-block-end: 0;
}

.store-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-block-start: 1.1rem;
}

/* T-152: the "look here" button — the promo fill with near-black text (12.6:1), the badge's own
   colours, for the one link that goes to the offers. Bootstrap's button variables, so hover,
   active and focus all follow from here. */
.store-btn-promo {
  --bs-btn-color: var(--store-ink);
  --bs-btn-bg: var(--store-promo);
  --bs-btn-border-color: var(--store-promo);
  --bs-btn-hover-color: var(--store-ink);
  --bs-btn-hover-bg: #ffdb66;
  --bs-btn-hover-border-color: #ffdb66;
  --bs-btn-active-color: var(--store-ink);
  --bs-btn-active-bg: #f2c020;
  --bs-btn-active-border-color: #f2c020;
  --bs-btn-focus-shadow-rgb: 255, 207, 51;
}

@media (max-width: 767.98px) {
  /* On a phone the words take the top and the artwork sits under them, faded in at its top edge
     so the banner's own background meets the hero's without a seam. */
  /* T-152: 29rem before — most of a phone screen. The artwork is now a faint band behind the
     lower edge rather than a picture with its own half of the hero, and the payment note (which
     the strip at the top of every page already says) is left to wider screens. */
  .store-hero {
    align-items: flex-start;
    min-block-size: 0;
    padding: 1.25rem;
  }

  .store-hero::before {
    background-size: auto 60%;
    background-position: 100% 100%;
    opacity: 0.35;
    -webkit-mask-image: linear-gradient(to bottom, transparent 40%, #000 90%);
    mask-image: linear-gradient(to bottom, transparent 40%, #000 90%);
  }

  .store-hero-title {
    font-size: 1.6rem;
  }

  .store-hero-lead {
    font-size: 1rem;
  }

  .store-hero-note {
    display: none;
  }

  .store-hero-actions .btn {
    --bs-btn-padding-y: 0.45rem;
    --bs-btn-padding-x: 0.9rem;
    --bs-btn-font-size: 1rem;
  }
}

/* T-155 (D-180): the owner's promotional banners, in the hero's place. A scroll-snap row like
   .store-rail, one banner to a view. The box is three wide to one tall at every width — the
   shape the admin asks for, so artwork made to it fills the box exactly (a height cap was tried
   and put dark bars beside correctly-shaped artwork on a wide screen). The picture is fitted
   INSIDE the box, never cropped (D-68's rule), so artwork of another shape shows the deep ground
   at its sides rather than losing an edge. Sized TO the box for the reasons .store-card-media img
   gives. */
.store-banners {
  margin-block-end: 1.25rem;
}

.store-banner-track {
  display: flex;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  border-radius: var(--store-radius);
  background: var(--store-deep);
  box-shadow: var(--store-shadow);
}

.store-banner-track::-webkit-scrollbar {
  display: none;
}

.store-banner {
  flex: 0 0 100%;
  scroll-snap-align: start;
  aspect-ratio: 3 / 1;
  min-block-size: 0;
  overflow: hidden;
}

/* On a phone there are no arrows, so the edge of the next banner shows — the only thing that says
   there is one. A banner on its own keeps the full width. */
@media (max-width: 767.98px) {
  .store-banner {
    flex-basis: 92%;
  }

  .store-banner:only-child {
    flex-basis: 100%;
  }
}

.store-banner-link {
  display: block;
  inline-size: 100%;
  block-size: 100%;
}

.store-banner img {
  display: block;
  inline-size: 100%;
  block-size: 100%;
  object-fit: contain;
}

/* T-156: a banner with a phone picture is a <picture>; it fills the box exactly as the <img> does. */
.store-banner picture {
  display: block;
  inline-size: 100%;
  block-size: 100%;
}

/* T-156: when any banner in the strip has a phone picture, the box on a phone takes THAT shape —
   two wide to one tall — for every banner, so the row keeps one height; a banner with only a wide
   picture is then fitted inside it with the deep ground above and below. */
@media (max-width: 767.98px) {
  .store-banners-tall .store-banner {
    aspect-ratio: 2 / 1;
  }
}

/* T-156: the pause button of a strip that moves by itself — the arrows' own look, smaller, in the
   banner's block-end / inline-end corner by logical insets. One button, two icons: bars while the
   banners are moving, a triangle once they are paused (aria-pressed). White on --store-deep is
   14.9:1. Hidden in the markup; shown by script only while something actually moves. */
.store-banner-pause {
  position: absolute;
  inset-block-end: 0.6rem;
  inset-inline-end: 0.6rem;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  inline-size: 2rem;
  block-size: 2rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--store-deep);
  color: #fff;
  box-shadow: var(--store-shadow-lift);
  cursor: pointer;
}

.store-banner-pause[hidden] {
  display: none;
}

.store-banner-pause svg {
  inline-size: 1rem;
  block-size: 1rem;
}

.store-banner-pause[aria-pressed="true"] .store-banner-pause-bars,
.store-banner-pause[aria-pressed="false"] .store-banner-pause-play {
  display: none;
}

.store-banner-pause:hover,
.store-banner-pause:focus-visible {
  background: var(--store-accent-strong);
}

.store-banner-pause:focus-visible {
  outline: 3px solid var(--store-promo);
  outline-offset: 2px;
}

/* The keyboard's way in: the link is the banner, so the ring is drawn inside its edge where the
   track's own overflow cannot clip it. */
.store-banner-link:focus-visible {
  outline: 3px solid var(--store-promo);
  outline-offset: -3px;
}

/* The arrows sit INSIDE the banner's two ends and at its middle, not hanging off a row of cards. */
.store-banners .store-rail-arrow {
  inset-block-start: calc(50% - 1.25rem);
}

.store-banners .store-rail-arrow-prev {
  inset-inline-start: 0.6rem;
}

.store-banners .store-rail-arrow-next {
  inset-inline-end: 0.6rem;
}

/* The trust row under the hero (T-130): four promises, two-up on a phone. */
.store-trust {
  margin-block-end: 2rem;
}

.store-trust-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 992px) {
  .store-trust-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.store-trust-item {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.9rem;
  border-radius: var(--store-radius);
  background: #fff;
  box-shadow: var(--store-shadow);
}

.store-trust-icon {
  flex: none;
  inline-size: 2.5rem;
  block-size: 2.5rem;
  padding: 0.5rem;
  border-radius: 50%;
  background: var(--store-brand-tint);
  color: var(--store-accent);
}

.store-trust-title {
  font-weight: 700;
  line-height: 1.35;
}

.store-trust-text {
  color: var(--store-muted);
  font-size: 0.85rem;
  line-height: 1.5;
}

@media (max-width: 575.98px) {
  /* Two narrow columns have no room for icon AND sentence side by side. */
  .store-trust-item {
    flex-direction: column;
    gap: 0.5rem;
  }
}

.store-section {
  margin-block-end: 2.25rem;
}

.store-section-title,
.store-page-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.35rem;
  font-weight: 700;
  margin-block-end: 0.9rem;
}

/* The cyan tab before every section heading: a flex item, so it sits at the inline start in both
   directions with no rtl counterpart. */
.store-section-title::before,
.store-page-title::before {
  content: "";
  flex: none;
  inline-size: 0.35rem;
  block-size: 1.3em;
  border-radius: 0.2rem;
  background: var(--store-brand);
}

/* T-152: a section heading with a "see all" link at its inline end. */
.store-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-block-end: 0.9rem;
}

.store-section-head .store-section-title {
  margin-block-end: 0;
}

.store-section-more {
  flex: none;
  font-weight: 700;
  white-space: nowrap;
}

/* T-152: the Offers row sits on the promo tint with a promo tab on its heading — the one section
   of the home page that is meant to be louder than the rest. --store-ink on the tint is 15.6:1,
   and the link keeps --store-accent (5.2:1 on the tint). */
.store-section-offers {
  padding: 1rem;
  border-radius: var(--store-radius);
  background: var(--store-promo-tint);
  border: 1px solid var(--store-promo);
}

.store-section-offers .store-section-title::before {
  background: var(--store-promo-line);
}

/* T-152: a product row that SCROLLS SIDEWAYS. Four rows of two cards pushed the next section a
   whole screen away; one row shows a few cards and the edge of the next — which is what says
   "there is more" — and the next section is right under it. Scroll-snap in CSS, and a real scroll
   container, so a swipe, a trackpad, the scrollbar, a keyboard, a screen reader and RTL all work
   with no script at all (rule 16).
   T-153: at every width, not only on a phone. The card widths below leave the edge of one more
   card showing at each breakpoint; the arrows (below) are the pointer's way to move it. */
.store-rail {
  flex-wrap: nowrap;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  /* Room for the cards' own shadow, which the scroll container would otherwise clip. */
  padding-block-end: 0.75rem;
  scrollbar-width: thin;
}

.store-rail > .col {
  flex: 0 0 44%;
  scroll-snap-align: start;
}

@media (min-width: 768px) {
  .store-rail > .col {
    flex-basis: 30%;
  }
}

@media (min-width: 992px) {
  .store-rail > .col {
    flex-basis: 23.5%;
  }
}

/* T-153: the arrows of a scrolling row. The wrapper is their containing block; they sit over the
   row's two inline edges by logical insets (rule 14), so "previous" is on the right on /ar with no
   counterpart rule, and the chevrons — drawn for left-to-right — are mirrored there. Hidden in the
   markup and shown by script only when the row overflows; never shown on a phone, where a thumb
   does the job and a button would cover a card. White on --store-deep is 14.9:1. */
.store-rail-wrap {
  position: relative;
}

.store-rail-arrow {
  position: absolute;
  inset-block-start: 38%;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  inline-size: 2.5rem;
  block-size: 2.5rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--store-deep);
  color: #fff;
  box-shadow: var(--store-shadow-lift);
  cursor: pointer;
}

.store-rail-arrow[hidden] {
  display: none;
}

.store-rail-arrow svg {
  inline-size: 1.25rem;
  block-size: 1.25rem;
}

[dir="rtl"] .store-rail-arrow svg {
  transform: scaleX(-1);
}

.store-rail-arrow-prev {
  inset-inline-start: -0.75rem;
}

.store-rail-arrow-next {
  inset-inline-end: -0.75rem;
}

.store-rail-arrow:hover,
.store-rail-arrow:focus-visible {
  background: var(--store-accent-strong);
}

.store-rail-arrow:focus-visible {
  outline: 3px solid var(--store-brand);
  outline-offset: 2px;
}

/* At an end of the row the arrow that leads nowhere fades and stops taking presses. */
.store-rail-arrow:disabled {
  opacity: 0.3;
  cursor: default;
}

@media (max-width: 767.98px) {
  .store-rail-arrow {
    display: none;
  }
}

/* A raised white surface — the cart table, both checkout columns, the summary, the done page. */
.store-panel {
  padding: 1rem;
  border-radius: var(--store-radius);
  background: #fff;
  box-shadow: var(--store-shadow);
}

@media (min-width: 768px) {
  .store-panel {
    padding: 1.25rem 1.5rem;
  }
}

.btn {
  --bs-btn-border-radius: 0.6rem;
  --bs-btn-font-weight: 600;
}

.btn-lg {
  --bs-btn-border-radius: 0.7rem;
}

.btn-primary {
  --bs-btn-font-weight: 700;
}

.breadcrumb {
  font-size: 0.9rem;
}

/* English prose on an Arabic page takes its OWN direction (T-34).

   BR-20 lets an Arabic page show English words — a product with no Arabic description. Left in the
   rtl container, the whole English paragraph is laid out right-to-left: the trailing full stop
   lands at the far end, so "...rather than a blank." rendered as ".a blank" on its own line.
   `unicode-bidi: plaintext` is the CSS form of dir="auto" — the paragraph takes its direction from
   its own first strong character, so English reads left-to-right and an Arabic description still
   reads right-to-left. Left-aligning a block of English prose is also correct typography.

   Deliberately NOT applied to the short labels (product and category names, variant and pack
   labels, zone names). Measured, those already order correctly inside the rtl container — "Bleach
   2L", "Soap (2L)", "Refill - 500ml" all render as typed — and plaintext would align each English
   name to the opposite edge from its Arabic neighbours, leaving the product grid ragged and every
   English-named card with its title at one side and its price at the other. The one case it would
   fix is a name ENDING in punctuation ("Cleaner 5L." renders ".Cleaner 5L"), which is cosmetic,
   rare, and inside staff control at the point the name is typed. In-sentence runs are a different
   problem again, solved by BidiText. */
.store-product-desc {
  unicode-bidi: plaintext;
  text-align: start;
}

/* Long-form text: the returns and privacy pages. A reading measure rather than the full grid
   width, because a 1200px line of policy text is unreadable in either script. Logical
   properties throughout (rule 14), so the measure and the spacing mirror themselves on /ar. */
.store-prose {
  max-inline-size: 42rem;
  margin-block-end: 2.25rem;
  /* A white sheet on the soft ground, like every other reading surface (T-130). */
  padding: 1.25rem 1.5rem;
  border-radius: var(--store-radius);
  background: #fff;
  box-shadow: var(--store-shadow);
}

.store-prose h2 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-block: 1.6rem 0.5rem;
}

/* Subsections, which only "how to order" has so far (T-66). Without this they inherit the browser
   default of about 1.17rem and render BIGGER than the h2 above them — the heading hierarchy upside
   down on the page, in both scripts. Every numeric check in the QA harness passed while that was
   true; it was caught by looking at the screenshot, which is why that step is in the rtl-qa skill. */
.store-prose h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-block: 1.15rem 0.35rem;
}

.store-prose p {
  /* Arabic at the same size sits visually smaller than Latin, and this is a page people read
     rather than scan, so both scripts get a slightly taller line. */
  line-height: 1.75;
  margin-block-end: 0.75rem;
}

/* The numbered steps on "how to order" (T-66). `decimal` is pinned rather than inherited so the
   markers are Latin digits in BOTH scripts (rule 9) whatever a browser would otherwise choose for
   an Arabic page, and the padding is logical so the numbers sit on the correct side on /ar
   (rule 14). */
.store-steps {
  list-style-type: decimal;
  padding-inline-start: 1.4rem;
  margin-block-end: 0.75rem;
}

.store-steps li {
  line-height: 1.75;
  margin-block-end: 0.4rem;
}

/* T-152: the home page's categories as ONE compact strip. On a phone it scrolls sideways (the
   same scroll-snap row as .store-rail); from a tablet up it wraps into small tiles, as many to a
   row as fit. The tiles inside are the tiles below, only smaller — see the overrides after them. */
.store-tile-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr));
  gap: 0.75rem;
}

@media (max-width: 767.98px) {
  .store-tile-strip {
    display: flex;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    padding-block-end: 0.75rem;
    scrollbar-width: thin;
  }

  .store-tile-strip-item {
    flex: 0 0 7.75rem;
    scroll-snap-align: start;
  }
}

/* Category tile on the home page. */
.store-tile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  height: 100%;
  padding: 1rem 1.1rem;
  border: 1px solid transparent;
  border-radius: var(--store-radius);
  /* White fading into the brand tint at the far corner: enough colour to make the row of tiles
     read as a feature of the page, not a list. */
  background: linear-gradient(135deg, #fff 55%, var(--store-brand-tint));
  box-shadow: var(--store-shadow);
  color: var(--store-ink);
  text-decoration: none;
}

.store-tile:hover,
.store-tile:focus-visible {
  border-color: var(--store-brand);
  color: var(--store-accent-strong);
  box-shadow: var(--store-shadow-lift);
}

.store-tile-name {
  font-weight: 700;
}

/* The count as a pill on the deep ground: white on --store-deep is 14.9:1. */
.store-tile-count {
  flex: none;
  min-inline-size: 1.75rem;
  padding: 0.05rem 0.5rem;
  border-radius: 999px;
  background: var(--store-deep);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  text-align: center;
}

/* T-134 (D-173): the home page's "Shop by brand" row — one wrapping line of chips, each the brand's
   name and the category tile's own count pill. A list, so a screen reader announces how many there
   are; logical properties only (rule 14), so the row starts at the right on /ar by itself. */
.store-brand-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.store-brand-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-block-size: 2.75rem;
  padding-block: 0.4rem;
  padding-inline: 1rem 0.6rem;
  border: 1px solid var(--store-line);
  border-radius: 999px;
  background: #fff;
  box-shadow: var(--store-shadow);
  color: var(--store-ink);
  font-weight: 700;
  text-decoration: none;
}

.store-brand-chip:hover,
.store-brand-chip:focus-visible {
  border-color: var(--store-brand);
  color: var(--store-accent-strong);
  box-shadow: var(--store-shadow-lift);
}

/* T-133 (D-172): a tile with the category's picture. The picture on top in a square box, then the
   same name-and-count row as a text tile, with the text tile's own padding and tint — so the two
   kinds read as one family and their text rows line up. White behind the picture for the reason
   .store-card-media gives. */
.store-tile-pictured {
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 0;
  padding: 0;
  overflow: hidden;
  background: #fff;
}

/* The box is .store-card-media's, for the same reasons, and the comments there record the bugs:
   a FIXED square so the grid cannot reflow as pictures load, `contain` so nothing is cropped (D-68),
   and min-block-size: 0 because this is a flex item too — without it the content-based minimum
   lets a portrait picture stretch the square into a slab. flex: none keeps a tile stretched by a
   neighbour's two-line name from growing or shrinking the box; the extra height goes to the row
   below it instead. */
.store-tile-media {
  flex: none;
  aspect-ratio: 1 / 1;
  min-block-size: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  /* T-249: the photographs' ground (see --store-media-ground), shared with the drawn icons. */
  background: var(--store-media-ground);
  border-block-end: 1px solid var(--store-line);
  overflow: hidden;
}

/* Sized TO the box, not capped by it — the .store-card-media img rule and its reasons, exactly. */
.store-tile-media img {
  inline-size: 100%;
  block-size: 100%;
  object-fit: contain;
}

/* The text tile's row, rebuilt under the picture: same gap, same padding, same tint. It grows to
   fill a tile stretched by a taller neighbour, and its name and count sit at its block end, so
   every tile in a row ends on its text. */
.store-tile-label {
  display: flex;
  flex: 1 0 auto;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 1rem 1.1rem;
  background: linear-gradient(135deg, #fff 55%, var(--store-brand-tint));
}

/* T-249 (D-230): a category with no picture gets the SAME square, holding a drawn icon on the
   media ground instead of a photograph (_CategoryIcon). Until T-249 such a tile was text only and,
   beside pictured tiles, a tall sheet with a pale disc where the picture would be — five of seven
   tiles on the home page looked unfinished. The icon is in the darkened accent (non-text contrast
   4.9:1 even on the ground's darker end), sized from the box so it scales with the strip. */
.store-tile-media-drawn {
  color: var(--store-accent);
}

.store-tile-icon {
  inline-size: 44%;
  block-size: 44%;
}

.store-tile-drawn:hover .store-tile-media-drawn,
.store-tile-drawn:focus-visible .store-tile-media-drawn {
  color: var(--store-accent-strong);
}

/* T-152: the tiles inside the compact strip — tighter padding and smaller type, so a category is
   a chip-sized target rather than a card. After the tile rules above, so these win on equal
   specificity without !important. */
.store-tile-strip .store-tile {
  padding: 0.6rem 0.7rem;
  font-size: 0.9rem;
}

.store-tile-strip .store-tile-pictured {
  padding: 0;
}

.store-tile-strip .store-tile-label {
  padding: 0.5rem 0.6rem;
}

/* Product card. The whole card is one link, so the image, the name and the price are a single
   target on a phone. */
.store-card {
  /* The containing block for the corner badge. */
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid transparent;
  border-radius: var(--store-radius);
  background: #fff;
  box-shadow: var(--store-shadow);
  color: var(--store-ink);
  text-decoration: none;
  overflow: hidden;
}

.store-card:hover,
.store-card:focus-visible {
  border-color: var(--store-brand);
  box-shadow: var(--store-shadow-lift);
}

/* The corner badge (T-130): the promo fill with near-black text, pinned to the inline-start top
   corner by logical insets, so it sits on the correct side on /ar with no counterpart rule. */
.store-card-badge {
  position: absolute;
  inset-block-start: 0.6rem;
  inset-inline-start: 0.6rem;
  z-index: 1;
  padding: 0.05rem 0.6rem;
  border-radius: 999px;
  background: var(--store-promo);
  color: var(--store-ink);
  font-size: 0.78rem;
  font-weight: 700;
}

/* A fixed box keeps the grid from reflowing as images load, whatever aspect ratio the
   photography arrives in; contain (not cover) means nothing is cropped out of a product shot.

   Square, by the owner's call (D-68, reversed 2026-08-31). T-81 had made it 3:4 to match the
   photography — 33 of the catalog's 34 photos are portrait phone shots — and the accepted cost of
   coming back is exactly what that bought, given away: a portrait shot renders smaller here, with
   grey either side of it. Nothing is CROPPED by the change (contain still letterboxes) and the
   grid still cannot reflow. If this is ever revisited, this ratio and .store-product-photo's are
   the two places to move together.

   min-block-size is load-bearing, not tidying, at any ratio. This box is a flex item of
   .store-card, so its automatic minimum size is its CONTENT's height — the photo's — which
   quietly outranked aspect-ratio and stretched the square into a 176x313 slab for every portrait
   photo in the catalog (which, so far, is all of them). overflow is the second belt: if any
   engine ever fails to letterbox the photo, it is clipped at the media box rather than painted
   over the price. */
.store-card-media {
  aspect-ratio: 1 / 1;
  min-block-size: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  /* T-130 made this white, to hide the letterboxing of shots taken on white. The catalog's shots
     are portrait phone photos, so the white bars beside them read as a photo too small for its
     frame. T-249: the soft media ground instead, which turns the bars into a deliberate frame —
     still `contain`, nothing cropped (D-68). */
  background: var(--store-media-ground);
  border-block-end: 1px solid var(--store-line);
  overflow: hidden;
}

/* Sized TO the box, not merely capped by it, so object-fit does the letterboxing. max-*: 100% left
   the photo's own dimensions in charge and made the result depend on how an engine resolves a
   percentage against an aspect-ratio height: a double-height card in one, a photo cropped by the
   box's own overflow in another. This is the shape .store-thumb img has always used. */
.store-card-media img {
  inline-size: 100%;
  block-size: 100%;
  object-fit: contain;
}

/* T-249: the drawn "no photo yet" picture (_NoPhoto) — a box filling whatever holds it (the card's
   square, the product page's photo, the cart's 4rem figure) on the media ground, with a parcel
   drawn at 40% in a quiet tint of the accent. It was a 3rem empty square outline, which on a card
   read as a broken image. Decorative: never the only carrier of meaning. */
.store-nophoto {
  display: flex;
  align-items: center;
  justify-content: center;
  inline-size: 100%;
  block-size: 100%;
  background: var(--store-media-ground);
  color: #8fb3bf;
}

.store-nophoto svg {
  inline-size: 40%;
  block-size: 40%;
}

.store-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.75rem;
}

.store-card-name {
  font-weight: 600;
  /* Two lines, then ellipsis: long Arabic and English names must not make cards different
     heights in the same row. */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* T-134 (D-173): the maker above the name — small, muted, one line. --store-muted on white is 6.6:1. */
.store-card-brand {
  margin-block-end: -0.2rem;
  overflow: hidden;
  color: var(--store-muted);
  font-size: 0.8rem;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.store-card-price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem;
  margin-block-start: auto;
}

.store-card-from {
  color: var(--store-muted);
  font-size: 0.85rem;
}

/* The price is what a wholesale buyer scans a grid for, so it is the largest thing in the card
   body, in the darkened accent (7.9:1 on white — the bright cyan is a fill only, D-50). */
.store-card-usd {
  color: var(--store-accent-strong);
  font-size: 1.2rem;
  font-weight: 700;
}

/* T-249 (BR-62, D-228): the wholesale line under the price — "$2.97 each at 50+". The shop's selling
   point, so it is marked: a small tag on the promo tint, near-black text (#1b1b1b on #fff6d6 is 15.9:1).
   Small, so the "From" figure stays the largest thing in the card body. align-self keeps the tag
   its own width in the column. A modest radius, not a pill: on a phone's two-up rail the Arabic
   line can wrap to two lines, and a pill then turns into a blob. */
.store-card-volume {
  align-self: flex-start;
  padding: 0.1rem 0.45rem;
  border-radius: 0.4rem;
  line-height: 1.4;
  background: var(--store-promo-tint);
  box-shadow: inset 0 0 0 1px rgba(184, 138, 0, 0.35);
  color: var(--store-ink);
  font-size: 0.8rem;
  font-weight: 600;
}

/* T-249: a short home row (1-3 products where a wide screen fits 4) as wide cards: the photo at the
   inline start, the text beside it — so two featured products share the row instead of leaving
   60% of it blank. The photo keeps its fixed square and `contain` (D-68); only where it sits moves.
   flex-direction: row follows the document, so on /ar the photo is on the right by itself.
   A container query on the column, not a media query: three cards on a tablet are each too narrow
   to sit side by side (measured at 800px: a 70px photo and a wrapped name), so a column under
   300px keeps the ordinary upright card. A browser without container queries shows the upright
   card everywhere — the old look, never a broken one. */
.store-short-row > .col {
  container-type: inline-size;
}

@container (min-width: 300px) {
  .store-card-wide {
    flex-direction: row;
    align-items: stretch;
  }

  .store-card-wide .store-card-media {
    flex: 0 0 40%;
    max-inline-size: 15rem;
    align-self: center;
    border-block-end: 0;
    border-inline-end: 1px solid var(--store-line);
  }

  .store-card-wide .store-card-body {
    flex: 1 1 auto;
    min-inline-size: 0;
    justify-content: center;
    padding: 1rem 1.1rem;
  }

  .store-card-wide .store-card-price {
    margin-block-start: 0.25rem;
  }
}

@container (min-width: 480px) {
  .store-card-wide .store-card-name {
    font-size: 1.1rem;
  }

  .store-card-wide .store-card-usd {
    font-size: 1.45rem;
  }
}

/* Filter + sort toolbar. */
.store-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: flex-end;
  padding: 0.9rem 1rem;
  border-radius: var(--store-radius);
  background: #fff;
  box-shadow: var(--store-shadow);
  margin-block-end: 1rem;
}

.store-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem;
}

.store-filter-field {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.store-filter-field .form-label {
  margin-block-end: 0;
  font-size: 0.85rem;
  color: var(--store-muted);
}

/* Wide enough for "1,000.00" and no wider — these are small numbers, not a search box. */
.store-filter-field .form-control {
  inline-size: 7.5rem;
}

.store-filter-actions {
  display: flex;
  gap: 0.5rem;
}

.store-sort {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.6rem;
  font-size: 0.9rem;
}

.store-sort-label {
  color: var(--store-muted);
}

.store-sort-current {
  font-weight: 700;
}

.store-results {
  color: var(--store-muted);
  font-size: 0.9rem;
}

.store-empty {
  padding-block: 1.5rem;
  color: var(--store-muted);
}

.store-pager {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-block-start: 1.5rem;
}

.store-pager-status {
  color: var(--store-muted);
  font-size: 0.9rem;
}

/* Category rows in the header dropdown: name at the inline start, count at the inline end. */
.store-nav-category {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

/* T-216: a parent's subcategories, a nested list indented under it. Logical properties only
   (rule 14), so the indent is on the right on /ar by itself. */
.store-nav-subcategories {
  margin: 0;
  padding: 0;
  list-style: none;
}

.store-nav-subcategory {
  padding-inline-start: 2rem;
  font-size: 0.925rem;
}

/* T-216: the row of subcategory links on a parent category's page, between the heading and the
   filters. */
.store-subcategories {
  margin-block-end: 1rem;
}

/* T-219 (D-211): the tag buttons over a listing or a search, and a product page's tag links — the
   brand chips again, a size smaller, under a short label. A picked tag is filled with the deep ground
   (white on --store-deep is 14.9:1) and carries a remove mark; an unpicked one that would list nothing
   is plain text, dimmed. Logical properties only (rule 14), so the row starts at the right on /ar. */
.store-tag-filter,
.store-product-tags {
  margin-block-end: 1rem;
}

.store-product-tags {
  margin-block-start: 1rem;
}

.store-tag-filter-label {
  margin-block-end: 0.4rem;
  font-weight: 700;
}

.store-tag-chip {
  font-weight: 600;
}

.store-tag-chip-selected,
.store-tag-chip-selected:hover,
.store-tag-chip-selected:focus-visible {
  border-color: var(--store-deep);
  background: var(--store-deep);
  color: #fff;
}

.store-tag-chip-remove {
  font-size: 1.1rem;
  line-height: 1;
}

.store-tag-chip-empty {
  box-shadow: none;
  color: var(--store-muted);
  font-weight: 400;
}

.store-tag-chip-empty .store-tile-count {
  background: var(--store-line);
  color: var(--store-ink);
}

/* ---------------------------------------------------------------------------
   Product page (T-29): gallery, choices, price panel, tier table.
   Logical properties only (rule 14) — the same markup is mirrored on /ar.
   --------------------------------------------------------------------------- */

.store-product {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-block-end: 2rem;
}

@media (min-width: 768px) {
  .store-product {
    /* Photo and buying panel side by side once there is room for both. */
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}

/* Same ratio as the grid card above, and for the same reason it has always been the same: a
   shopper who taps a card should not land on a differently-shaped photo. The two move together
   (D-68). */
.store-product-photo {
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  /* The card's own radius and shadow, and since T-249 its media ground, for the same reason as
     .store-card-media — a shopper who taps a card lands on the same framed photo. */
  background: var(--store-media-ground);
  border-radius: var(--store-radius);
  box-shadow: var(--store-shadow);
  overflow: hidden;
}

/* The buying column as one raised panel (T-130). align-self keeps it its own height beside a
   taller gallery instead of stretching to match it. */
.store-product-buy {
  align-self: start;
  padding: 1.1rem;
  border-radius: var(--store-radius);
  background: #fff;
  box-shadow: var(--store-shadow);
}

@media (min-width: 768px) {
  .store-product-buy {
    padding: 1.5rem;
  }
}

/* Sized to the box for the same reason as .store-card-media img above — and it matters more
   here, because this box already clips (overflow: hidden), so a photo the engine declines to
   shrink is shown with its bottom cut off rather than merely making the page tall. */
.store-product-photo img {
  inline-size: 100%;
  block-size: 100%;
  object-fit: contain;
}

.store-product-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-block: 0.5rem 0;
  padding: 0;
  list-style: none;
}

.store-thumb {
  display: block;
  inline-size: 4.5rem;
  block-size: 4.5rem;
  padding: 0.15rem;
  border: 1px solid var(--store-line);
  border-radius: 0.3rem;
  background: #fff;
}

.store-thumb img {
  inline-size: 100%;
  block-size: 100%;
  object-fit: contain;
}

.store-thumb.is-selected {
  border-color: var(--store-accent);
  border-width: 2px;
}

.store-product-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-block-end: 0.25rem;
}

/* T-134 (D-173): the brand above the product's name, linked to the brand's own page. */
.store-product-brand {
  margin-block-end: 0.15rem;
  font-size: 0.95rem;
  font-weight: 600;
}

.store-product-sku {
  color: var(--store-muted);
  font-size: 0.9rem;
}

.store-product-choices {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem;
  padding-block: 0.75rem;
  border-block: 1px solid var(--store-line);
}

.store-product-field {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.store-product-field .form-label {
  margin-block-end: 0;
  font-size: 0.85rem;
  color: var(--store-muted);
}

.store-product-field .form-select {
  min-inline-size: 10rem;
}

.store-product-field .form-control[type="number"] {
  inline-size: 6.5rem;
}

/* T-176: the only unit's pack label where a "sold as" select would stand — same label above, and
   the value padded to the height of the controls beside it so the row's baselines still line up. */
.store-product-soldas-value {
  padding-block: 0.375rem;
  font-weight: 600;
}

.store-product-hint {
  font-size: 0.8rem;
  color: var(--store-muted);
}

/* F-7: the same courtesy the cart's own .store-cart-adjusted gives when BR-9 snaps a quantity. */
.store-product-adjusted {
  display: block;
  font-size: 0.8rem;
  color: var(--store-accent);
}

/* The price block as a tinted box: the figures the page exists to show, set apart from the
   controls above and the actions below. */
.store-product-price {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.5rem;
  margin-block: 1rem;
  padding: 0.9rem 1rem;
  border-radius: 0.6rem;
  background: var(--store-brand-tint);
}

.store-product-unitprice,
.store-product-total {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  font-size: 0.85rem;
}

.store-product-unitprice-value {
  font-size: 1.1rem;
  font-weight: 600;
}

/* T-131: the unit price and, while the unit is on sale, its base price struck through beside it.
   A row that wraps rather than overflows at 375px; gap is direction-neutral, so /ar needs nothing. */
.store-product-unitprice-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem;
}

/* The struck-through "was" figure, on the card and the product page alike: muted and smaller, so the
   price a shopper actually pays stays the loudest number. No display rule here on purpose — the
   product page toggles this element with `hidden`, and a display value would fight it. */
.store-product-was,
.store-card-was {
  color: var(--store-muted);
  font-size: 0.9rem;
  font-weight: 400;
}

/* T-154: when a dated sale ends — a small line under the price, on the card and on the product
   page. Inline by default, so the `hidden` attribute on the box and on each of its three faces
   works with no display rule to fight. The countdown uses tabular figures so the line does not
   jitter as the seconds change. --store-ink on --store-promo-tint is 15.6:1. */
.store-card-ends,
.store-product-ends {
  font-size: 0.8rem;
  line-height: 1.4;
}

.store-product-ends {
  font-size: 0.95rem;
  margin-block-start: 0.35rem;
}

.store-sale-ends {
  display: inline-block;
  padding: 0.05rem 0.45rem;
  border-radius: 0.35rem;
  background: var(--store-promo-tint);
  color: var(--store-ink);
}

.store-sale-ends[hidden],
.store-sale-ends [hidden] {
  display: none;
}

.store-countdown {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* T-157: a sale that is COMING — the same box on the brand tint instead of the promo tint, so
   "starts soon" does not read as "on sale now", with the coming price on a line of its own.
   --store-ink on --store-brand-tint is 15.9:1. */
.store-sale-starts {
  background: var(--store-brand-tint);
}

.store-sale-starts-price {
  display: block;
  font-weight: 700;
}

.store-product-starts {
  margin-block-start: 0.25rem;
}

/* T-152: the saving beside the struck-through price ("-7%") — the promo fill with near-black
   text, the badge's own colours, so the two read as one offer. */
.store-card-saving {
  padding: 0 0.4rem;
  border-radius: 0.35rem;
  background: var(--store-promo);
  color: var(--store-ink);
  font-size: 0.8rem;
  font-weight: 700;
}

/* T-152: the header's Offers link — the accent colour and weight, so it is the one nav item that
   is not plain; --store-accent-strong on white is 7.6:1. */
.store-navbar .store-nav-offers {
  color: var(--store-accent-strong);
  font-weight: 700;
}

.store-product-total-usd {
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1.2;
}

.store-product-total-lbp {
  color: var(--store-muted);
}

/* "Add N more, save $X" is the page's one real offer, so it wears the promo colour: near-black
   on the pale promo tint is 15.6:1, and the dashed edge is the darker promo line so the box is
   still a box for someone who cannot tell the tint from white. */
.store-nudge {
  padding: 0.6rem 0.75rem;
  border: 1px dashed var(--store-promo-line);
  border-radius: 0.6rem;
  background: var(--store-promo-tint);
  font-weight: 600;
}

.store-nudge a {
  color: var(--store-ink);
  text-decoration: none;
}

.store-nudge a:hover,
.store-nudge a:focus-visible {
  text-decoration: underline;
}

.store-stock {
  font-size: 0.9rem;
  margin-block-end: 0.5rem;
}

.store-stock-in {
  color: #146c43;
}

/* "Not enough in stock for that quantity" is an error the shopper can fix right now, by asking
   for fewer, so it keeps the danger red. "Available soon" (T-102) is not an error at all — it is
   the shop saying wait — so it takes the accent, which is the token D-50 set aside for text that
   has to be READ on white (the brand cyan itself is 2.1:1 and is a fill colour only). */
.store-stock-low {
  color: #b02a37;
  font-weight: 600;
}

.store-stock-out {
  color: var(--store-accent);
  font-weight: 600;
}

.store-product-add {
  margin-block: 0.5rem 0.75rem;
}

.store-product-bulk {
  font-size: 0.9rem;
}

/* The one button this page exists for fills the panel's width, on every screen (T-130). */
.store-product-add .btn {
  inline-size: 100%;
}

/* The three promises under the button (T-130). The tick is a CSS shape, not a character, so no
   font decides what it looks like; it is drawn with logical borders and so needs no mirroring. */
.store-product-promises {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-block: 1rem 0;
  padding: 0.9rem 0 0;
  border-block-start: 1px solid var(--store-line);
  list-style: none;
  color: var(--store-muted);
  font-size: 0.9rem;
}

.store-product-promises li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.store-product-promises li::before {
  content: "";
  flex: none;
  inline-size: 0.5rem;
  block-size: 0.5rem;
  border-radius: 50%;
  background: var(--store-brand);
}

/* Sits where Add to cart would be, so it takes that element's spacing rather than a link's. */
.store-product-restock {
  margin-block: 0.5rem 0.75rem;
}

/* T-191: the ask button under Add to cart — outline and normal size, so Add to cart stays the
   page's one primary action. */
.store-product-ask {
  margin-block: 0.5rem 0.75rem;
}

/* T-249: the WhatsApp buttons (ask about this product, ask when it is back) — WhatsApp's green so a
   shopper knows at a glance where it leads, as an OUTLINE so Add to cart stays the page's one filled
   action. It was btn-outline-secondary, whose grey read as disabled. Text #075e54 on white is
   7.7:1, on the hover tint 7.0:1; the glyph #128c7e on white 4.1:1 (non-text needs 3:1); the
   border is WhatsApp's own #25d366 — decoration, the words carry the meaning. */
.store-btn-whatsapp {
  --bs-btn-color: #075e54;
  --bs-btn-bg: #fff;
  --bs-btn-border-color: #25d366;
  --bs-btn-hover-color: #075e54;
  --bs-btn-hover-bg: #e8f8ee;
  --bs-btn-hover-border-color: #1ebe5b;
  --bs-btn-active-color: #075e54;
  --bs-btn-active-bg: #d4f3e0;
  --bs-btn-active-border-color: #1ebe5b;
  --bs-btn-focus-shadow-rgb: 37, 211, 102;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border-width: 1.5px;
  font-weight: 600;
}

.store-btn-whatsapp .store-wa-glyph {
  flex: none;
  inline-size: 1.25rem;
  block-size: 1.25rem;
  color: #128c7e;
}

/* T-205: the category warranty sits directly under Add to cart (D-200 q1) — space above it so it
   is not flush against the button, and the same small gap below as the lines that follow it. */
.store-product-warranty {
  margin-block: 0.75rem 0.5rem;
}

/* Tier table: quantities and prices are figures, so they get the isolating wrapper; the table
   itself is narrow because two columns of numbers do not need the full page width. */
.store-tiers {
  max-inline-size: 28rem;
  /* A white sheet with rounded corners; overflow clips the rows' own backgrounds to the radius. */
  border-radius: var(--store-radius);
  background: #fff;
  box-shadow: var(--store-shadow);
  overflow: hidden;
}

.store-tiers th,
.store-tiers td {
  padding-inline: 1rem;
}

.store-tiers tbody tr:last-child td {
  border-block-end: 0;
}

/* Bootstrap paints cells from --bs-table-bg, which would cover the row's own tint. */
.store-tier-current td {
  --bs-table-bg: var(--store-brand-tint);
}

.store-tiers th,
.store-tiers td {
  padding-block: 0.4rem;
}

.store-tier-current {
  font-weight: 700;
  background: var(--store-brand-tint);
}

/* Staff type plain text in the editor; keep their line breaks without allowing markup. */
/* T-209: the product's specifications — a narrow two-column table, the names in the muted
   colour so the values carry the eye; start-aligned in both directions (logical, rule 14). */
/* T-210: the "Fits" line above the specifications table. */
.store-product-fits {
  margin-block: 0 0.75rem;
  overflow-wrap: break-word;
}

.store-specs {
  max-inline-size: 40rem;
  margin-block-end: 0;
}

.store-specs th {
  inline-size: 40%;
  font-weight: 500;
  color: var(--store-muted);
  text-align: start;
}

.store-specs td {
  text-align: start;
  overflow-wrap: break-word;
}

.store-product-desc {
  white-space: pre-line;
  max-inline-size: 48rem;
}

/* Search box (T-30). In the header it is compact; on the results page it is the main control.
   Logical properties only, so it mirrors with the document. */
.store-search {
  display: flex;
  gap: 0.4rem;
  align-items: center;
}

.store-search-input {
  inline-size: 12rem;
}

/* T-159: the brand menu is one more item on the header row, and between the width where the row
   first appears and 1200px it no longer fitted on one line (measured: 109px tall at 992 against
   58). The search box gives up the room — it grows back from 1200 up. */
@media (min-width: 992px) and (max-width: 1199.98px) {
  .store-navbar .store-search-input {
    inline-size: 7rem;
  }
}

@media (max-width: 575.98px) {
  /* Inside the collapsed navbar there is a whole row to use. */
  .store-search {
    padding-block: 0.5rem;
  }

  .store-search-input {
    inline-size: 100%;
  }
}

.store-search-page {
  max-inline-size: 32rem;
  margin-block-end: 1rem;
}

.store-search-page .form-control {
  flex: 1 1 auto;
}

/* The shopper's own words, quoted back to them: bolder than the label around it, and carrying its
   own direction (dir="auto" in the markup) because it may be in either script. */
.store-search-term {
  font-weight: 600;
}

/* Cart (T-31). Bootstrap's rtl build mirrors the table itself; everything added here uses logical
   properties (rule 14), so the same rules serve both directions. */
.store-cart-link {
  white-space: nowrap;
  /* A flex row rather than an inline mark plus text: the gap replaces the whitespace the emoji used
     to sit in, and it mirrors with the document instead of needing an rtl counterpart (T-57). */
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

/* T-180: the phone-width cart mark beside the search mark — the same touch target as
   .store-search-link, with the count as a badge on the basket's inline-end shoulder. Logical
   properties only (rule 14), so the badge sits at the top right in English and the top left in
   Arabic with no rtl counterpart. The badge is position: absolute inside the link, so a two-digit
   count never widens the row. */
.store-cart-compact {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-inline-size: 2.75rem;
  min-block-size: 2.75rem;
  line-height: 1;
  text-decoration: none;
}

.store-cart-count {
  position: absolute;
  inset-block-start: 0.15rem;
  inset-inline-end: 0.05rem;
  min-inline-size: 1.15rem;
  padding-inline: 0.25rem;
  border-radius: 999px;
  background: var(--store-deep);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.15rem;
  text-align: center;
}

.store-cart-count[hidden] {
  display: none;
}

.store-cart-notice {
  max-inline-size: 48rem;
}

.store-cart td {
  vertical-align: middle;
}

/* Picture and names side by side, wrapping to two rows on a phone rather than squeezing the name. */
.store-cart-product {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  min-inline-size: 12rem;
}

.store-cart-figure {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  inline-size: 4rem;
  block-size: 4rem;
  overflow: hidden;
  border-radius: 0.3rem;
}

/* 4rem is a definite size, so this one was never at risk — it is written the same way as its two
   neighbours so the store has ONE way of fitting a photo into a box. */
.store-cart-figure img {
  inline-size: 100%;
  block-size: 100%;
  object-fit: contain;
}

.store-cart-names {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  line-height: 1.35;
}

.store-cart-name {
  font-weight: 600;
}

.store-cart-variant,
.store-cart-unit,
.store-cart-sku,
.store-cart-price-inline {
  font-size: 0.85rem;
  color: var(--store-muted);
}

/* T-251: the option and the pack read as one line, "White · Piece". Each is its own isolate so an
   English option on an Arabic page cannot reorder around the dot; the dot is decoration, drawn only
   when there is an option before the pack. */
.store-cart-options > span {
  unicode-bidi: isolate;
}

.store-cart-options > .store-cart-variant::after {
  content: "·";
  content: "·" / "";
  margin-inline: 0.35em;
}

/* T-251: the phone's unit price, with its heading beside it (shown below `sm` only, where the Unit
   price column is folded away — T-112). */
.store-cart-price-row {
  display: none;
}

.store-cart-price-label {
  font-size: 0.8rem;
  color: var(--store-muted);
}

.store-cart-sku {
  font-size: 0.78rem;
}

/* T-112: `.store-figure` (rule 9/BR-22) forces white-space: nowrap so a money figure never breaks
   mid-number — but a SKU is not a number a reader parses digit by digit, and its hyphens are
   normal break points. Left as nowrap, the SKU's own unbroken width (not the column's declared
   min-inline-size, which is a floor a wider child can already exceed) was the real reason the row
   could not shrink below ~193px — the product-cell floor below was fixed for the same finding but
   changes nothing while this stays the binding constraint. Wrapping it here does not affect any
   width where the column already has room: a browser only wraps when it must.

   T-182 (customer walk): but a SKU split at its own hyphens inside an Arabic line came out as
   "-DEMO / CSE-GLASS-B25" — each line of an isolate is reordered on its own, so the broken-off
   "DEMO-" read as belonging to the label beside it. The SKU is now its OWN left-to-right box
   (inline-block, direction ltr from .store-figure): it starts on its own line under the "SKU"
   label and is never broken around it. From `sm` up it is also one unbroken piece. Below `sm` the
   cart table's product column is measured NARROWER than the longest SKUs (about 55px at 320, 125px
   at 390, against ~137px for "DEMO-CSE-CLEAR-IP15"), and an unbroken SKU there pushed the Line total
   column off the phone again — the exact T-112 defect (82px of hidden table at 320). So on a phone
   the box may still wrap, but only inside itself, as a small left-to-right paragraph: its pieces
   always read in order, top to bottom, and never interleave with Arabic text. */
.store-cart-sku .store-figure {
  display: inline-block;
  max-inline-size: 100%;
  vertical-align: top;
  white-space: nowrap;
}

@media (max-width: 575.98px) {
  .store-cart-sku .store-figure {
    white-space: normal;
  }
}

/* T-182 (customer walk): long unbroken text a SHOPPER typed — a 90-character name with no spaces
   scrolled the order-placed page sideways at 320px — breaks where it must instead of widening the
   page. `anywhere` because it also lowers the box's min-content width, which is what the summary
   grid's columns size from; `min-inline-size: 0` lets the grid's tracks shrink to it. Scoped to
   the boxes that carry shopper-typed text (the summary values, the transfer account).
   T-195 (re-walk): NOT the product names in a table. There `anywhere` let the table's own layout
   shrink the product column below a word's width, so at 320px "Wired earpho/nes" and "سماعا/ت"
   broke mid-word. Product names wrap at their spaces (`break-word` leaves min-content alone) and
   still break a genuinely unbroken string rather than overflow its cell. */
.store-cart-totals > dd,
.store-checkout-transfer-account {
  overflow-wrap: anywhere;
  min-inline-size: 0;
}

.store-cart-names,
.store-checkout-done-items td:first-child {
  overflow-wrap: break-word;
}

/* T-112 (B-1): the cart table is fixed-width and sits in Bootstrap's .table-responsive
   (overflow-x: auto), so below `sm` the table is wider than its container and the browser hides
   the overflowing Line total column — invisible to a viewport-overflow measurement, because the
   *container* never overflows the viewport (see the rtl-qa skill's "Measure overflow" note). The
   fix folds the Unit price column into the product cell instead of shrinking anything: both
   copies are pre-rendered by the server (rule 16), and these two media rules only choose which
   one is shown. */
.store-cart-price-inline {
  display: none;
}

@media (min-width: 576px) {
  .store-cart-price-inline {
    display: none;
  }
}

@media (max-width: 575.98px) {
  .store-cart-price-inline {
    display: block;
  }

  .store-cart-price {
    display: none;
  }

  /* Folding the Unit price column away is not enough on its own at the narrowest phones (320,
     360px): the row's other two floors — this 12rem product-cell minimum and the Quantity
     column's fixed-width stepper — still summed past a 320px container's ~299px of content
     room. D-85 records this as a residual found while verifying B-1, not part of the original
     finding. 9rem still leaves room for the 4rem photo plus a readable wrapped name/variant/unit
     column at 320px. */
  .store-cart-product {
    min-inline-size: 9rem;
  }
}

.store-cart-qty {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  flex-wrap: wrap;
}

.store-cart-qty .form-control[type="number"] {
  inline-size: 5.5rem;
}

/* T-195: on a phone the quantity box gives the product column back 21px. With product names
   wrapping at spaces again (not mid-word), the column needs that room at 320px or the Line total
   column slips off the side of the table (T-112) — measured 20px hidden at 320 without it, 1px
   with it. Four digits still fit, and the 44px tap height below is unchanged. */
@media (max-width: 575.98px) {
  .store-cart-qty .form-control[type="number"] {
    inline-size: 4rem;
  }
}

.store-cart-remove {
  text-decoration: underline;
}

.store-cart-adjusted {
  display: block;
  font-size: 0.8rem;
  color: var(--store-accent);
}

/* T-113 (BR-35): the same red the product page's own not-enough-stock line uses (.store-stock-low),
   for the same reason — this is an error the shopper can fix right now, by reducing the quantity. */
.store-cart-short {
  color: #b02a37;
}

/* T-249: the phone's headings for the Quantity and Line total cells — only shown once the line
   stacks (below). */
.store-cart-cell-label {
  display: none;
}

/* T-249: on a phone each cart line STACKS — the product (photo, name, option, pack, unit price, SKU)
   across the full width, then the quantity form and the line total side by side under it, each with
   its own small heading. As a three-column table at 375px the product column was squeezed to ~110px
   and the name and SKU broke into fragments (the T-112/T-182/T-195 fixes kept the table inside the
   phone; this gives the name its width back). Every cell, form and button is the same markup as on
   a wide screen — Update still submits without script (D-89) — only the boxes are laid out
   differently. The Unit price column is already folded into the product cell below `sm` (T-112). */
@media (max-width: 575.98px) {
  .store-cart thead {
    display: none;
  }

  .store-cart,
  .store-cart tbody,
  .store-cart td {
    display: block;
  }

  .store-cart tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "product product"
      "qty total";
    gap: 0.6rem 1rem;
    padding-block: 0.9rem;
    border-block-end: 1px solid var(--store-line);
  }

  .store-cart tbody tr:last-child {
    border-block-end: 0;
  }

  .store-cart td {
    padding: 0;
    border-block-end-width: 0;
  }

  /* `.store-cart td` above outranks the single-class rules, so the product cell's flex row and the
     folded Unit price cell (T-112) are restated at its weight. */
  .store-cart td.store-cart-product {
    display: flex;
    grid-area: product;
    min-inline-size: 0;
  }

  .store-cart td.store-cart-price {
    display: none;
  }

  /* T-251: heading and figure on one line, the figure in the body colour so it reads as a price,
     not as one more grey caption. */
  .store-cart-price-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.4rem;
  }

  .store-cart-price-row .store-cart-price-inline {
    color: var(--store-ink);
    font-weight: 600;
    font-size: 0.9rem;
  }

  .store-cart-qty-cell {
    grid-area: qty;
  }

  .store-cart-total {
    grid-area: total;
    text-align: end;
  }

  .store-cart-cell-label {
    display: block;
    margin-block-end: 0.2rem;
    color: var(--store-muted);
    font-size: 0.8rem;
  }

  .store-cart-total .store-figure {
    font-size: 1.1rem;
    font-weight: 700;
  }

  /* The quantity box gets its desktop width back (T-195 narrowed it for the old table). The SKU
     keeps T-182's wrap-inside-itself rule: rarely needed at this width, harmless when it is. */
  .store-cart-qty .form-control[type="number"] {
    inline-size: 5.5rem;
  }
}

/* The summary sits at the inline end on a wide screen and stacks under the table on a phone. */
.store-cart-summary {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-inline-size: 26rem;
  margin-inline-start: auto;
}

.store-cart-zone {
  display: flex;
  gap: 0.4rem;
  align-items: flex-end;
  flex-wrap: wrap;
}

.store-cart-zone .form-select {
  inline-size: auto;
  flex: 1 1 10rem;
}

/* T-247 (BR-61): "How do you want to get your order?" — on the cart a row of its own above the
   area select (the form is a wrapping flex row); on checkout an ordinary field group. */
.store-cart-how {
  flex: 1 1 100%;
}

/* Bootstrap draws a <legend> at heading size; this one is a field label, like "Delivery area". */
.store-cart-how > legend {
  font-size: inherit;
}

.store-checkout-how .btn {
  margin-block-start: 0.35rem;
}

/* The shop's pick-up place (_PickupPlace): the owner's own text, isolated per line so a Latin
   street number or "9:00–19:00" inside Arabic keeps its order, and an English address shown on an
   Arabic page (BR-20's fallback) reads left to right. Breaks rather than widening a phone page. */
.store-pickup-place p {
  margin-block: 0 0.35rem;
}

.store-pickup-heading {
  font-weight: 600;
}

.store-pickup-place bdi {
  unicode-bidi: plaintext;
  overflow-wrap: anywhere;
}

.store-cart-totals {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.35rem 1rem;
  margin-block: 0;
}

.store-cart-totals dd {
  margin-block-end: 0;
  text-align: end;
}

/* Both currencies on the payable line, one under the other, so neither is mistaken for the other. */
.store-cart-lbp {
  display: block;
  font-size: 0.9rem;
  color: var(--store-muted);
}

.store-cart-total {
  font-weight: 700;
  font-size: 1.25rem;
}

/* The total row is ruled off from the rows above it; both the term and the figure carry the
   class, so the rule runs the full width of the grid. */
.store-cart-totals .store-cart-total {
  margin-block-start: 0.35rem;
  padding-block-start: 0.6rem;
  border-block-start: 1px solid var(--store-line);
}

/* T-130: the cart table sits in a panel, so the gap to the summary under it is the panel's. */
.table-responsive.store-panel {
  margin-block-end: 1rem;
}

.store-panel > .table,
.store-panel .table-responsive > .table {
  margin-block-end: 0;
}

.store-cart-summary .btn-lg {
  flex: 1 1 auto;
}

/* The order steps (T-130): cart, details, WhatsApp. A row of numbered pills; the current one is
   the brand fill, the finished ones the deep ground, the rest outlined. Colour is never the only
   signal — aria-current marks the current step and the order of the list carries the rest. */
.store-progress {
  margin-block-end: 1.25rem;
}

.store-progress-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.store-progress-step {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--store-muted);
  font-size: 0.9rem;
}

.store-progress-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  inline-size: 1.7rem;
  block-size: 1.7rem;
  border: 1px solid #8a9aa0;
  border-radius: 50%;
  background: #fff;
  font-weight: 700;
}

.store-progress-step.is-current {
  color: var(--store-ink);
  font-weight: 700;
}

.store-progress-step.is-current .store-progress-number {
  border-color: var(--store-brand);
  background: var(--store-brand);
  color: var(--store-ink);
}

.store-progress-step.is-done .store-progress-number {
  border-color: var(--store-deep);
  background: var(--store-deep);
  color: #fff;
}

/* Checkout (T-130): the form and the order summary as two panels, side by side once there is
   room. The summary comes first in the markup — a phone shows what is being ordered before asking
   for an address — and `order` moves it to the inline end on a wide screen, where a summary
   conventionally sits. Grid order follows the document direction, so /ar mirrors by itself. */
.store-checkout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

@media (min-width: 992px) {
  .store-checkout {
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    gap: 1.5rem;
  }

  .store-checkout-summary {
    order: 2;
  }
}

.store-checkout-place {
  inline-size: 100%;
}

.store-checkout-lines .store-cart-name,
.store-checkout-lines .store-cart-options,
.store-checkout-lines .store-cart-sku {
  display: block;
}

/* The done page: one centred sheet, the order number as its headline figure. */
.store-checkout-done {
  max-inline-size: 44rem;
}

.store-order-number {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--store-accent-strong);
}

.store-checkout-whatsapp {
  inline-size: 100%;
}

.store-cart-zonename,
.store-cart-estimate {
  font-weight: 400;
  font-size: 0.85rem;
  color: var(--store-muted);
}

.store-cart-note {
  margin-block: 0;
  font-size: 0.85rem;
  color: var(--store-muted);
}

.store-cart-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

/* T-88: the enhanced add-to-cart's confirmation line, pre-rendered hidden under the button. */
.store-cart-added {
  margin-block: 0.75rem 0;
}

/* T-92: the checkout's field errors. One span per field, ALWAYS rendered: the server fills it on
   a failed POST, jquery.validate manages it inline, and these two classes decide its visibility
   either way — so neither path needs its own markup. Bootstrap's own danger red: an error color
   is a convention, not brand. */
.store-field-error {
  display: block;
  margin-block-start: 0.25rem;
  font-size: 0.875rem;
  color: var(--bs-danger);
}

.store-field-error.field-validation-valid {
  display: none;
}

.input-validation-error {
  border-color: var(--bs-danger);
}

/* P-10 (T-122): the checkout form's own field wrapper, alongside .store-product-field which the
   product page also uses — a shared class kept untouched so this cannot reach that page. The
   error already sits close to its OWN input (.store-field-error's margin-block-start above);
   this is the space on the OTHER side, so the next field's label reads as a new question rather
   than a continuation of this one's error. Logical properties only (rule 14). */
.store-checkout-field {
  margin-block-end: 1.25rem;
}

/* P-5 (T-120): comfortable tap targets below `sm`, the width this shop's customers mostly hold a
   phone at. Selects and number inputs vary a little in rendered height across browsers (measured
   34-35px here), so this pins a floor rather than trusting the default — min-block-size, not
   block-size, so a control that genuinely needs more room (a long option string, browser zoom) is
   never squeezed under it. PX, deliberately, not the 2.75rem the header's own touch target uses
   (.store-search-link, above): `html` is 14px below the 768px breakpoint (see the top of this
   file), so 2.75rem measures 38.5px here — correct for that control's own WCAG 24px floor, but
   short of the 44px this rule exists to guarantee. Logical properties only (rule 14): "block"
   tracks whichever edge is vertical in the reading direction, so nothing needs an RTL
   counterpart. */
@media (max-width: 575.98px) {
  .store-product-field .form-select,
  .store-product-field .form-control[type="number"],
  .store-product-apply .btn,
  .store-product-add .btn,
  .store-product-restock .btn,
  .store-product-ask .btn,
  .store-cart-qty .form-control[type="number"],
  .store-cart-qty .btn {
    min-block-size: 44px;
  }
}

/* T-87: page navigations crossfade instead of flashing white. The default cross-document view
   transition only — no keyframes and no directional motion, so nothing needs RTL mirroring
   (rule 14) and nothing moves for readers who asked for reduced motion. Browsers without the
   feature ignore the whole block. T-230 (seen in Edge): a same-origin navigation crossfades only
   when the old AND the new page load this file — form POSTs included (a wrong password re-shows
   the sign-in page with a crossfade). Into the admin, which loads admin.css instead, the browser
   skips it and logs its own "Transition was aborted because of invalid state. ViewTransition
   opt-in disabled" (signing in, or a storefront link to /admin while signed in): console only,
   nothing on screen, no script of ours involved — expected, nothing to fix. */
@media (prefers-reduced-motion: no-preference) {
  @view-transition {
    navigation: auto;
  }

  /* T-130: cards and tiles lift a little under the pointer. Vertical only, so there is nothing
     to mirror, and inside the same gate as every other animation in the store (D-70). */
  .store-card,
  .store-tile {
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  }

  .store-card:hover,
  .store-tile:hover {
    transform: translateY(-2px);
  }
}

/* T-149: the two-factor setup code. Drawn at a fixed size on the server; on a narrow phone it
   shrinks with the column rather than pushing the page sideways. */
.two-factor-qr svg {
  max-inline-size: 100%;
  block-size: auto;
}

/* ---------------------------------------------------------------------------
   T-162: the pop-up message. A Bootstrap modal; only the picture and the message need rules.
   The picture is shown whole (never cropped), capped so the buttons stay on a phone's screen.
   --------------------------------------------------------------------------- */
.store-popup-media {
  display: block;
  inline-size: 100%;
  max-block-size: 50vh;
  object-fit: contain;
  background: var(--store-brand-tint);
}

.store-popup-message {
  margin: 0;
  white-space: pre-line;
  overflow-wrap: anywhere;
}
