/* Rahatek — KSA storefront.
   Brand: navy + terracotta, sampled from the supplied logo files.
   Mobile-first; the phone layout is the real design since every TikTok click
   lands there. */

/* Tajawal, self-hosted. Arabic system fonts (Tahoma et al) are the single
   biggest giveaway of a cheap store — a proper Arabic typeface changes
   perceived quality more than any other one change. Arabic and Latin subsets
   are split so a Latin-only page never downloads the Arabic file.
   font-display:swap so text is readable before the font lands. */
@font-face{font-family:Tajawal;font-style:normal;font-weight:400;font-display:swap;
  src:url(fonts/tajawal-400-ar.woff2) format('woff2');
  unicode-range:U+0600-06FF,U+0750-077F,U+0870-088E,U+08A0-08FF,U+FB50-FDFF,U+FE70-FEFF}
@font-face{font-family:Tajawal;font-style:normal;font-weight:400;font-display:swap;
  src:url(fonts/tajawal-400-latin.woff2) format('woff2');
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+2000-206F,U+2192,U+2212,U+2215}
@font-face{font-family:Tajawal;font-style:normal;font-weight:500;font-display:swap;
  src:url(fonts/tajawal-500-ar.woff2) format('woff2');
  unicode-range:U+0600-06FF,U+0750-077F,U+0870-088E,U+08A0-08FF,U+FB50-FDFF,U+FE70-FEFF}
@font-face{font-family:Tajawal;font-style:normal;font-weight:500;font-display:swap;
  src:url(fonts/tajawal-500-latin.woff2) format('woff2');
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+2000-206F,U+2192,U+2212,U+2215}
@font-face{font-family:Tajawal;font-style:normal;font-weight:700;font-display:swap;
  src:url(fonts/tajawal-700-ar.woff2) format('woff2');
  unicode-range:U+0600-06FF,U+0750-077F,U+0870-088E,U+08A0-08FF,U+FB50-FDFF,U+FE70-FEFF}
@font-face{font-family:Tajawal;font-style:normal;font-weight:700;font-display:swap;
  src:url(fonts/tajawal-700-latin.woff2) format('woff2');
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+2000-206F,U+2192,U+2212,U+2215}
@font-face{font-family:Tajawal;font-style:normal;font-weight:800;font-display:swap;
  src:url(fonts/tajawal-800-ar.woff2) format('woff2');
  unicode-range:U+0600-06FF,U+0750-077F,U+0870-088E,U+08A0-08FF,U+FB50-FDFF,U+FE70-FEFF}
@font-face{font-family:Tajawal;font-style:normal;font-weight:800;font-display:swap;
  src:url(fonts/tajawal-800-latin.woff2) format('woff2');
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+2000-206F,U+2192,U+2212,U+2215}

:root {
  /* Brand, exact from Asset 2/10 */
  --navy:        #0A2342;
  --terra:       #E0A382;   /* accent — legible ON navy (~7:1), NOT under white text */
  --terra-deep:  #B85F33;   /* interactive: passes contrast with white text */
  --terra-dark:  #994C26;   /* hover/active */

  --sand:        #FBF7F4;   /* warm off-white page tint */
  --sand-2:      #F3EBE5;
  --ink:         #0A2342;
  --ink-soft:    #5C6A7D;
  --line:        #E7DED7;
  --white:       #FFFFFF;
  --ok:          #1E7A4C;

  --radius:      14px;
  --radius-sm:   10px;
  --pad:         16px;
  --maxw:        520px;
  --shadow:      0 2px 14px rgba(10,35,66,.08);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--sand);
  color: var(--ink);
  font-family: Tajawal, "Segoe UI", Tahoma, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  padding-bottom: 88px;
}

.wrap { max-width: var(--maxw); margin: 0 auto; background: var(--white); }

h1, h2, h3 { line-height: 1.4; margin: 0 0 10px; font-weight: 800; }
h1 { font-size: 1.4rem; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1.02rem; }
p  { margin: 0 0 12px; }

/* --- header ------------------------------------------------------------- */

.masthead {
  background: var(--navy);
  padding: 10px var(--pad);
  display: flex;
  align-items: center;
  justify-content: center;
}
.masthead img { height: 30px; width: auto; display: block; }

.trustbar {
  background: var(--navy);
  color: var(--terra);
  border-top: 1px solid rgba(224,163,130,.25);
  display: flex;
  justify-content: center;
  gap: 14px;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 7px var(--pad);
  text-align: center;
}

/* --- hero --------------------------------------------------------------- */

.hero { padding: 18px var(--pad) 4px; }

.hero__kicker {
  display: inline-block;
  background: var(--sand-2);
  color: var(--terra-dark);
  font-size: 0.74rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 8px;
}
.hero__title { font-size: 1.32rem; }
.hero__title em { font-style: normal; color: var(--terra-deep); }

.gallery {
  margin: 14px 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--sand-2);
}
.gallery__main {
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  color: var(--ink-soft);
  font-size: .9rem;
}
.gallery__main img, .gallery__main video { width: 100%; height: 100%; object-fit: cover; display: block; }

/* --- price + offer ------------------------------------------------------ */

.offer {
  background: var(--sand);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  margin: 14px 0;
  text-align: center;
}
.offer__label { font-size: .8rem; font-weight: 800; color: var(--terra-deep); margin-bottom: 4px; }

.price { display: flex; align-items: baseline; justify-content: center; gap: 10px; flex-wrap: wrap; }
.price__now { font-size: 2.1rem; font-weight: 900; color: var(--navy); }
.price__cur { font-size: .95rem; font-weight: 700; }
.price__was { color: var(--ink-soft); text-decoration: line-through; font-size: 1rem; }
.price__save {
  background: var(--terra); color: var(--navy);
  font-size: .76rem; font-weight: 800;
  padding: 2px 9px; border-radius: 999px;
}

/* Honest countdown: bound to a real deadline. When it expires the offer
   actually ends — it does not silently reset on reload. */
.countdown { display: flex; justify-content: center; gap: 6px; margin-top: 12px; }
.cd {
  background: var(--navy); color: var(--white);
  border-radius: var(--radius-sm);
  min-width: 54px; padding: 6px 4px;
}
.cd__n { display: block; font-size: 1.15rem; font-weight: 900; line-height: 1.2; font-variant-numeric: tabular-nums; }
.cd__l { display: block; font-size: .64rem; opacity: .75; }
.countdown--ended { color: var(--ink-soft); font-size: .85rem; }

.stocknote {
  margin-top: 10px; font-size: .85rem; font-weight: 700; color: var(--terra-deep);
}

/* --- buttons ------------------------------------------------------------ */

.btn {
  display: inline-block; border: 0; border-radius: var(--radius);
  font: inherit; font-weight: 800; text-align: center; text-decoration: none;
  cursor: pointer; padding: 14px 22px;
  transition: background .15s ease, transform .05s ease;
}
.btn:active { transform: translateY(1px); }
.btn--cta { background: var(--terra-deep); color: var(--white); }
.btn--cta:hover { background: var(--terra-dark); }
.btn--navy { background: var(--navy); color: var(--white); }
.btn--block { display: block; width: 100%; }
.btn--lg { font-size: 1.06rem; padding: 16px 22px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* --- features ----------------------------------------------------------- */

.section { padding: 24px var(--pad); }
.section--tint { background: var(--sand); }
.section__head { text-align: center; margin-bottom: 16px; }
.section__head p { color: var(--ink-soft); font-size: .92rem; margin: 0; }

.feature {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 0; border-bottom: 1px solid var(--line);
}
.feature:last-child { border-bottom: 0; }
.feature__icon {
  flex: 0 0 42px; height: 42px; border-radius: 12px;
  background: var(--sand-2); color: var(--terra-deep);
  display: grid; place-items: center; font-size: 1.2rem;
}
.feature__body h3 { margin: 0 0 3px; }
.feature__body p { margin: 0; color: var(--ink-soft); font-size: .92rem; }

/* --- guarantee ---------------------------------------------------------- */

.guarantee {
  background: var(--navy); color: var(--white);
  border-radius: var(--radius); padding: 18px; text-align: center;
}
.guarantee h3 { color: var(--terra); margin-bottom: 6px; }
.guarantee p { margin: 0; opacity: .85; font-size: .92rem; }

/* --- faq ---------------------------------------------------------------- */

details { border-bottom: 1px solid var(--line); padding: 12px 0; }
details summary { cursor: pointer; font-weight: 700; list-style: none; }
details summary::-webkit-details-marker { display: none; }
details summary::after { content: "+"; float: left; color: var(--terra-deep); font-weight: 900; }
details[open] summary::after { content: "−"; }
details p { margin: 8px 0 0; color: var(--ink-soft); font-size: .93rem; }

/* --- bundles ------------------------------------------------------------ */

.bundles { display: grid; gap: 10px; }
.bundle {
  position: relative; display: block; cursor: pointer;
  border: 2px solid var(--line); border-radius: var(--radius);
  background: var(--white); padding: 14px;
}
.bundle input { position: absolute; opacity: 0; pointer-events: none; }
.bundle--on { border-color: var(--terra-deep); background: #FFF8F3; }
.bundle__row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.bundle__name { font-weight: 800; }
.bundle__price { font-weight: 900; font-size: 1.15rem; color: var(--navy); white-space: nowrap; }
.bundle__unit { display: block; font-size: .8rem; color: var(--ink-soft); font-weight: 600; }
.bundle__tag {
  position: absolute; top: -10px; inset-inline-start: 12px;
  background: var(--terra-deep); color: var(--white);
  font-size: .7rem; font-weight: 800; padding: 2px 9px; border-radius: 999px;
}

/* --- form --------------------------------------------------------------- */

.field { display: block; margin-bottom: 14px; }
.field__label { display: block; font-size: .87rem; font-weight: 700; margin-bottom: 6px; }
.field__opt { font-weight: 400; color: var(--ink-soft); }

.field input, .field select, .field textarea {
  width: 100%; font: inherit;
  padding: 13px 14px;
  border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  background: var(--white); color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--terra-deep);
  box-shadow: 0 0 0 3px rgba(184,95,51,.13);
}
.field textarea { resize: vertical; }
.field select:disabled { background: var(--sand-2); color: var(--ink-soft); }
.field--invalid input, .field--invalid select, .field--invalid textarea { border-color: #C0392B; }
.field__error { display: none; color: #C0392B; font-size: .81rem; margin-top: 5px; }
.field--invalid .field__error { display: block; }

.pay {
  display: flex; gap: 10px; align-items: center;
  border: 2px solid var(--terra-deep); background: #FFF8F3;
  border-radius: var(--radius); padding: 13px; margin-bottom: 14px;
}
.pay__icon { font-size: 1.3rem; }
.pay strong { display: block; }
.pay span { font-size: .85rem; color: var(--ink-soft); }

.summary {
  background: var(--sand); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px; margin: 16px 0;
}
.summary__row { display: flex; justify-content: space-between; margin-bottom: 7px; font-size: .95rem; }
.summary__row--total {
  border-top: 1px solid var(--line); padding-top: 10px; margin: 10px 0 0;
  font-weight: 900; font-size: 1.12rem;
}
.reassure { text-align: center; font-size: .85rem; color: var(--ink-soft); margin: 10px 0 0; }

.thanks { text-align: center; padding: 26px 0; }
.thanks__tick { font-size: 2.6rem; }

/* --- sticky bar --------------------------------------------------------- */

.stickybar {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 30;
  display: flex; align-items: center; gap: 12px;
  max-width: var(--maxw); margin: 0 auto;
  padding: 10px var(--pad);
  padding-bottom: calc(10px + env(safe-area-inset-bottom));
  background: var(--white); border-top: 1px solid var(--line);
  box-shadow: 0 -4px 18px rgba(10,35,66,.1);
}
.stickybar__price { font-weight: 900; font-size: 1.15rem; color: var(--navy); white-space: nowrap; }
.stickybar .btn { flex: 1; padding: 13px 14px; }

.footer { background: var(--navy); color: rgba(255,255,255,.75); text-align: center; padding: 22px var(--pad); font-size: .84rem; }
.footer img { height: 26px; margin-bottom: 10px; }
.footer__links a { color: var(--terra); text-decoration: none; }
.footer__links a:hover { text-decoration: underline; }

@media (min-width: 560px) {
  body { padding-bottom: 0; }
  .stickybar { display: none !important; }
  .wrap { box-shadow: var(--shadow); }
}

/* =========================================================================
   STORE SHELL — homepage, category and product pages.
   The landing pages above stay narrow and single-column on purpose; store
   pages are for browsing and get a wider container.
   ========================================================================= */

.site { max-width: 1100px; margin: 0 auto; background: var(--white); min-height: 100vh; }
body.store { padding-bottom: 0; }
/* Pages carrying a sticky buy bar need room so it never covers the last row. */
body.store.has-sticky { padding-bottom: 84px; }

/* --- announcement ticker ------------------------------------------------ */

.ticker {
  background: var(--terra); color: var(--navy);
  font-size: .8rem; font-weight: 700;
  overflow: hidden; white-space: nowrap; padding: 7px 0;
}
.ticker__track { display: inline-block; padding-inline-start: 100%; animation: ticker 26s linear infinite; }
.ticker span { margin: 0 22px; }
@keyframes ticker { to { transform: translateX(100%); } }
/* Honour reduced-motion: a permanently moving strip is a real accessibility
   problem for some readers. */
@media (prefers-reduced-motion: reduce) {
  .ticker__track { animation: none; padding-inline-start: 0; text-align: center; display: block; }
}

/* --- navbar ------------------------------------------------------------- */

.navbar {
  background: var(--navy);
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px var(--pad);
  position: sticky; top: 0; z-index: 40;
}
/* Logo enlarged — it was competing with the icons either side of it and
   reading as a utility bar rather than a storefront. */
.navbar { padding: 14px var(--pad); }
.navbar__logo img { height: 46px; display: block; }
.navbar__btn {
  background: transparent; border: 0; color: var(--terra);
  cursor: pointer; padding: 8px; line-height: 0; border-radius: 10px;
  transition: background .2s ease;
}
.navbar__btn svg { width: 24px; height: 24px; }
.navbar__btn:hover { background: rgba(224,163,130,.14); }

/* --- category icons ----------------------------------------------------- */

/* Replaces emoji. Emoji render differently per OS, can't take the brand
   colour, and are called out as an anti-pattern by the design system. */
.cat-ico { display: inline-flex; align-items: center; justify-content: center; }
.cat-ico svg { width: 1.15em; height: 1.15em; }
.chip .cat-ico { color: var(--terra-deep); }
.chip .cat-ico svg { width: 17px; height: 17px; }
.section-bar h2 .cat-ico { color: var(--terra-deep); margin-inline-end: 8px; vertical-align: -3px; }
.card__ph .cat-ico svg { width: 42px; height: 42px; opacity: .45; }
.drawer__panel .cat-ico { color: var(--terra-deep); margin-inline-end: 8px; vertical-align: -3px; }
.drawer__panel .cat-ico svg { width: 18px; height: 18px; }

/* --- interaction polish ------------------------------------------------- */

/* Checklist items: visible focus for keyboard users, pointer on everything
   clickable, and no instant (0ms) state changes. */
a, button, select, [role="button"], .bundle, label.bundle { cursor: pointer; }
a, button { transition: color .2s ease, background-color .2s ease, border-color .2s ease; }

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--terra-deep);
  outline-offset: 2px;
  border-radius: 4px;
}

/* --- scroll reveal ------------------------------------------------------ */

/* Subtle tier from the design system: ~350ms, small rise, fires on entry.
   Done with IntersectionObserver + CSS rather than pulling in an animation
   library for one effect on a mobile-first store. */
.reveal { opacity: 0; transform: translateY(12px); }
.reveal.is-in {
  opacity: 1; transform: none;
  transition: opacity .35s ease-out, transform .35s ease-out;
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

.searchbar {
  display: flex; gap: 8px; padding: 10px var(--pad);
  background: var(--sand); border-bottom: 1px solid var(--line);
}
.searchbar input {
  flex: 1; font: inherit; padding: 11px 14px;
  border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: var(--white);
}
.searchbar input:focus { outline: none; border-color: var(--terra-deep); }
.searchbar .btn { padding: 11px 18px; }

/* Horizontal chips beat a long dropdown on a phone: everything stays one
   thumb-swipe away no matter how many categories exist. */
.chips {
  display: flex; gap: 8px; overflow-x: auto;
  padding: 12px var(--pad); background: var(--white);
  border-bottom: 1px solid var(--line);
  scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto; white-space: nowrap;
  background: var(--sand); color: var(--navy);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 7px 14px; font-size: .86rem; font-weight: 700; text-decoration: none;
}
.chip:hover { background: var(--sand-2); border-color: var(--terra); }
.chip--on { background: var(--navy); color: var(--terra); border-color: var(--navy); }

/* --- drawer ------------------------------------------------------------- */

.drawer { position: fixed; inset: 0; z-index: 60; background: rgba(10,35,66,.5); }
.drawer__panel {
  position: absolute; inset-block: 0; inset-inline-end: 0;
  width: min(80vw, 320px); background: var(--white);
  padding: 18px; overflow-y: auto;
}
.drawer__close {
  background: transparent; border: 0; font-size: 1.2rem;
  cursor: pointer; color: var(--ink-soft); float: left;
}
.drawer__panel h3 { font-size: .95rem; color: var(--terra-deep); margin: 14px 0 6px; }
.drawer__panel ul { list-style: none; padding: 0; margin: 0 0 10px; }
.drawer__panel li a {
  display: block; padding: 9px 0; color: var(--ink);
  text-decoration: none; border-bottom: 1px solid var(--line); font-weight: 600;
}

/* --- hero carousel ------------------------------------------------------ */

/* Scroll-snap rather than a JS slider: it's native, works with a thumb swipe,
   survives no-JS, and has no library weight. */
.hero-c { position: relative; }
.hero-track {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.hero-track::-webkit-scrollbar { display: none; }

.slide {
  position: relative; flex: 0 0 100%; scroll-snap-align: start;
  min-height: 380px; display: flex; align-items: flex-end;
  background: var(--navy); overflow: hidden;
}
.slide img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center;
}
/* The scrim does two jobs: guarantees text contrast, and covers the English
   placeholder text baked into some of the source artwork. */
.slide::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(10,35,66,.92) 0%, rgba(10,35,66,.72) 42%, rgba(10,35,66,.30) 100%);
}
.slide__body { position: relative; z-index: 2; padding: 26px var(--pad) 30px; color: #fff; }
.slide__eyebrow {
  display: inline-block; background: var(--terra); color: var(--navy);
  font-size: .72rem; font-weight: 800; padding: 4px 11px;
  border-radius: 999px; margin-bottom: 10px;
}
.slide h2 { font-size: 1.6rem; line-height: 1.3; margin: 0 0 8px; color: #fff; }
.slide h2 em { font-style: normal; color: var(--terra); }
.slide p { color: rgba(255,255,255,.86); margin: 0 0 16px; font-size: .95rem; }

.hero-dots { display: flex; justify-content: center; gap: 7px; padding: 12px 0; background: var(--white); }
.hero-dots button {
  width: 8px; height: 8px; padding: 0; border: 0; border-radius: 50%;
  background: var(--line); cursor: pointer; transition: all .2s;
}
.hero-dots button[aria-current="true"] { background: var(--terra-deep); width: 22px; border-radius: 4px; }

/* --- trust emblems ------------------------------------------------------ */

.emblems {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px;
  background: var(--line); border-block: 1px solid var(--line);
}
.emblem {
  background: var(--white); padding: 16px 12px; text-align: center;
}
.emblem svg { width: 30px; height: 30px; margin-bottom: 7px; }
.emblem strong { display: block; font-size: .86rem; font-weight: 800; color: var(--navy); }
.emblem span { display: block; font-size: .74rem; color: var(--ink-soft); line-height: 1.45; }

/* Compact inline version, used beside the buy button */
.emblems--inline {
  display: flex; gap: 8px; background: transparent; border: 0; margin: 14px 0 0;
}
.emblems--inline .emblem {
  flex: 1; border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 11px 6px; background: var(--sand);
}
.emblems--inline svg { width: 22px; height: 22px; margin-bottom: 4px; }
.emblems--inline strong { font-size: .76rem; }

/* --- product gallery ---------------------------------------------------- */

.pgal__main {
  position: relative; aspect-ratio: 1/1; background: var(--sand-2);
  border-radius: var(--radius); overflow: hidden;
}
.pgal__main img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pgal__thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; scrollbar-width: none; }
.pgal__thumbs::-webkit-scrollbar { display: none; }
.pgal__thumbs button {
  flex: 0 0 62px; height: 62px; padding: 0; cursor: pointer;
  border: 2px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--sand-2);
}
.pgal__thumbs button[aria-current="true"] { border-color: var(--terra-deep); }
.pgal__thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* --- section heading ---------------------------------------------------- */

.rail { display: flex; gap: 12px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
.rail::-webkit-scrollbar { display: none; }
.rail .card { flex: 0 0 46%; }

/* --- sort control ------------------------------------------------------- */

.toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.toolbar select {
  font: inherit; padding: 9px 12px; border: 1.5px solid var(--line);
  border-radius: var(--radius-sm); background: #fff; color: var(--ink); font-weight: 600;
}

/* --- skeletons ---------------------------------------------------------- */

@keyframes shimmer { 100% { background-position: -200% 0; } }
.skeleton {
  background: linear-gradient(90deg, var(--sand-2) 25%, #ece2da 37%, var(--sand-2) 63%);
  background-size: 200% 100%; animation: shimmer 1.3s infinite linear;
  border-radius: var(--radius);
}
.sk-card { height: 240px; }

@media (min-width: 640px) {
  .slide { min-height: 460px; }
  .slide h2 { font-size: 2.2rem; }
  .slide__body { padding: 40px 32px 44px; max-width: 620px; }
  .emblems { grid-template-columns: repeat(4, 1fr); }
  .rail .card { flex: 0 0 30%; }
}
@media (min-width: 900px) {
  .slide { min-height: 520px; }
  .rail .card { flex: 0 0 23%; }
}

/* --- home sections ------------------------------------------------------ */

.home-section { padding: 22px var(--pad); }
.home-section:nth-of-type(even) { background: var(--sand); }
.section-bar {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 10px; margin-bottom: 14px;
}
.section-bar h2 { margin: 0; }
.section-bar a { color: var(--terra-deep); font-weight: 700; font-size: .88rem; text-decoration: none; }

/* --- product grid ------------------------------------------------------- */

.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }

.card {
  display: block; text-decoration: none; color: inherit;
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  transition: box-shadow .15s ease, transform .05s ease;
}
.card:hover { box-shadow: var(--shadow); }
.card:active { transform: translateY(1px); }

.card__media {
  position: relative; aspect-ratio: 1 / 1;
  background: var(--sand-2); display: grid; place-items: center;
}
.card__ph { font-size: 2.4rem; opacity: .5; }
.card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card__off, .card__low {
  position: absolute; top: 8px; font-size: .68rem; font-weight: 800;
  padding: 3px 8px; border-radius: 999px;
}
.card__off { inset-inline-start: 8px; background: var(--terra-deep); color: var(--white); }
.card__low { inset-inline-end: 8px; background: var(--navy); color: var(--terra); }

.card__body { padding: 10px 11px 12px; }
.card__cat { font-size: .7rem; color: var(--ink-soft); font-weight: 700; }
.card__name {
  font-size: .9rem; margin: 3px 0 8px; line-height: 1.45;
  /* Two lines keeps every card the same height; a ragged grid reads as broken. */
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.card__price { display: flex; align-items: baseline; gap: 8px; }
.card__price strong { font-size: 1.02rem; color: var(--navy); font-weight: 900; }
.card__price s { color: var(--ink-soft); font-size: .82rem; }

.empty { text-align: center; color: var(--ink-soft); padding: 30px 0; }

/* --- simple content pages ---------------------------------------------- */

.page { padding: 24px var(--pad); }
.page h1 { font-size: 1.35rem; margin-bottom: 14px; }
.page h2 { font-size: 1.05rem; margin-top: 22px; }
.page ul { padding-inline-start: 20px; }
.page li { margin-bottom: 7px; }
.breadcrumb { font-size: .84rem; color: var(--ink-soft); padding: 12px var(--pad) 0; }
.breadcrumb a { color: var(--terra-deep); text-decoration: none; }

/* --- footer ------------------------------------------------------------- */

.footer__top {
  display: grid; grid-template-columns: 1fr; gap: 22px;
  padding: 26px var(--pad) 18px; text-align: center;
}
.footer__brand img { height: 30px; margin-bottom: 8px; }
.footer__brand p { color: var(--terra); margin: 0; font-weight: 700; }
.footer__col h4 { color: var(--white); font-size: .95rem; margin: 0 0 8px; }
.footer__col ul { list-style: none; padding: 0; margin: 0; }
.footer__col li { margin-bottom: 6px; }
.footer__col a { color: rgba(255,255,255,.75); text-decoration: none; font-size: .88rem; }
.footer__col a:hover { color: var(--terra); }
.footer__bottom {
  border-top: 1px solid rgba(255,255,255,.15);
  padding: 14px var(--pad); text-align: center; font-size: .8rem;
}
.footer__bottom p { margin: 3px 0; }

@media (min-width: 640px) {
  .grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .footer__top { grid-template-columns: 1.4fr 1fr 1fr; text-align: start; }
  .banner { padding: 46px var(--pad); }
  .banner h1 { font-size: 2rem; }
}
@media (min-width: 900px) {
  .grid { grid-template-columns: repeat(4, 1fr); }
  .home-section { padding: 30px 24px; }
}
