/*
 * ═══════════════════════════════════════════════════════════════════════════
 *  موقع جمعية سلوى — ورقةُ التنسيق الوحيدة
 * ═══════════════════════════════════════════════════════════════════════════
 *  الألوانُ من `salwa-mobile/src/lib/theme.ts` نفسِه: الكحليّ للبنية والنصّ،
 *  والسماويّ للفعل وحده (أضف، البحث، العدّاد). والخطّان خطّا التطبيق:
 *  Montserrat للّاتينيّ والأرقام، والمراعي للعربيّ.
 *
 *  الفكرةُ الواحدة: **الرفّ**. كلُّ صفٍّ من المنتجات يستند إلى خطٍّ كحليٍّ
 *  عريضٍ تحته كحافّة رفّ الجمعية، وكلُّ بطاقةٍ تنتهي بـ«بطاقة سعر» مثقوبة
 *  الحافّة (الخطّ المتقطّع) والسعرُ فيها بخطٍّ عريضٍ كما يُطبع على الرفّ.
 *  وما عدا ذلك هادئ: لا ظلالَ على البطاقات، ولا تدرّجات، ولا حركةَ بلا سبب.
 * ═══════════════════════════════════════════════════════════════════════════
 */

/* ─── الخطوط ───────────────────────────────────────────────────────────── */
@font-face { font-family: 'Almarai'; font-weight: 400; font-display: swap; src: url('/fonts/almarai-400.woff2') format('woff2'); }
@font-face { font-family: 'Almarai'; font-weight: 700; font-display: swap; src: url('/fonts/almarai-700.woff2') format('woff2'); }
@font-face { font-family: 'Almarai'; font-weight: 800; font-display: swap; src: url('/fonts/almarai-800.woff2') format('woff2'); }
@font-face { font-family: 'Montserrat'; font-weight: 400; font-display: swap; src: url('/fonts/montserrat-400.woff2') format('woff2'); }
@font-face { font-family: 'Montserrat'; font-weight: 600; font-display: swap; src: url('/fonts/montserrat-600.woff2') format('woff2'); }
@font-face { font-family: 'Montserrat'; font-weight: 700; font-display: swap; src: url('/fonts/montserrat-700.woff2') format('woff2'); }
@font-face { font-family: 'Montserrat'; font-weight: 800; font-display: swap; src: url('/fonts/montserrat-800.woff2') format('woff2'); }

/* ─── الرموز ───────────────────────────────────────────────────────────── */
:root {
  --navy: #263a7a;
  --navy-dark: #203168;
  --navy-deep: #1a2753;
  --navy-50: #f0f1f6;
  --navy-100: #e3e5ee;
  --navy-200: #c2c8da;
  --navy-400: #7885ad;
  --sky: #19a7e1;
  --sky-hover: #3cb6e8;
  --sky-50: #e6f4fb;
  --ink: #1a2333;
  --ink-soft: #4a4f59;
  --muted: #5d6472;
  --line: #e9edf2;
  --mist: #f5f7fa;
  --red: #c8333c;
  --green: #25845a;
  --font: 'Montserrat', 'Almarai', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;
  --num: 'Montserrat', system-ui, sans-serif;
  --gutter: 16px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
a { color: var(--navy); }
h1, h2, h3 { line-height: 1.3; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; border-radius: 4px; }
main:focus { outline: none; }

.wrap { width: 100%; max-width: 1280px; margin-inline: auto; padding-inline: var(--gutter); }
.sr {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; inset-inline-start: 12px; top: -60px; z-index: 100;
  background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 8px; font-weight: 700;
}
.skip:focus { top: 12px; }

/* ─── الترويسة ─────────────────────────────────────────────────────────── */
.site-header { position: sticky; top: 0; z-index: 30; background: #fff; }
.bar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas: 'brand search tools';
  align-items: center;
  gap: 12px 20px;
  padding-block: 10px;
}
.brand { grid-area: brand; display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--navy); }
.brand img { display: block; width: 44px; height: auto; }
.brand-name { font-weight: 800; font-size: 19px; line-height: 1.1; white-space: nowrap; }
.brand-name span { display: block; margin-top: 3px; font-size: 12px; font-weight: 700; color: var(--navy-400); }
.search {
  grid-area: search;
  display: flex;
  height: 46px;
  border: 2px solid var(--navy);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  max-width: 720px;
}
.search:focus-within { border-color: var(--sky); box-shadow: 0 0 0 3px var(--sky-50); }
.search input {
  flex: 1; min-width: 0; border: 0; padding-inline: 14px; font-size: 16px; background: transparent;
}
.search input:focus { outline: none; }
.search input::-webkit-search-cancel-button { cursor: pointer; }
.search button {
  flex: none; width: 54px; border: 0; background: var(--navy); color: #fff; cursor: pointer;
  display: grid; place-items: center;
}
.search button:hover { background: var(--navy-dark); }
.tools { grid-area: tools; display: flex; align-items: center; gap: 2px; }
.tool {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  min-width: 52px; padding: 4px 8px; border-radius: 8px;
  font-size: 12px; font-weight: 700; color: var(--navy); text-decoration: none;
}
.tool:hover { background: var(--navy-50); }
.cart-count {
  position: absolute; top: -2px; inset-inline-end: 4px;
  min-width: 20px; height: 20px; padding-inline: 5px; border-radius: 10px;
  background: var(--sky); color: var(--navy-deep);
  font: 800 12px/20px var(--num); text-align: center;
}
.lang-switch {
  margin-inline-end: 6px; padding: 6px 10px; border-radius: 6px;
  border: 1px solid var(--navy-100); font-size: 14px; font-weight: 700;
  color: var(--navy); text-decoration: none; white-space: nowrap;
}
.lang-switch:hover { background: var(--navy-50); }

.depts { background: var(--navy); }
.depts ul {
  display: flex; gap: 2px; margin: 0 auto; list-style: none;
  overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain;
}
.depts ul::-webkit-scrollbar { display: none; }
.depts a {
  display: block; padding: 11px 12px; white-space: nowrap;
  color: #fff; font-size: 14px; font-weight: 700; text-decoration: none;
}
.depts a:hover { background: var(--navy-dark); }
.depts a:focus-visible { outline-color: #fff; outline-offset: -3px; }
.depts .offers-link { background: var(--sky); color: var(--navy-deep); }
.depts .offers-link:hover { background: var(--sky-hover); }

@media (max-width: 860px) {
  .bar { grid-template-columns: 1fr auto; grid-template-areas: 'brand tools' 'search search'; padding-block: 8px 10px; }
  .search { max-width: none; }
  .brand-name { font-size: 16px; }
  .brand-name span { display: none; }
  .brand img { width: 38px; }
  .tool { min-width: 44px; padding: 6px; }
  .tool > span:not(.cart-count) {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
  }
  .lang-switch { font-size: 13px; padding: 5px 8px; }
}

/* ─── الرئيسيّة ────────────────────────────────────────────────────────── */
.hero { padding-top: 16px; }
.banners {
  display: grid; grid-auto-flow: column; grid-auto-columns: 100%; gap: 12px;
  margin: 0; padding: 0; list-style: none;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin;
  overscroll-behavior-x: contain;
}
.banners li { scroll-snap-align: start; }
.banners a { display: block; border-radius: 12px; }
.banners img { display: block; width: 100%; height: auto; aspect-ratio: 5 / 2; object-fit: cover; border-radius: 12px; background: var(--navy-50); }
@media (min-width: 1000px) { .banners { grid-auto-columns: calc(50% - 6px); } }

.intro { padding-block: 24px 6px; }
.intro h1 { margin: 0 0 6px; font-size: clamp(25px, 3.6vw, 34px); font-weight: 800; color: var(--navy); }
.intro > p { margin: 0; max-width: 68ch; color: var(--ink-soft); }
.facts { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 14px 0 0; padding: 0; list-style: none; }
.facts li { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: var(--navy); }
.facts svg { flex: none; color: var(--sky); }

.block { padding-top: 26px; }
.block-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.block-head h2 { margin: 0; font-size: 21px; font-weight: 800; color: var(--navy); }
.more {
  flex: none; font-size: 14px; font-weight: 700; color: var(--navy);
  text-decoration: underline; text-decoration-color: var(--sky); text-decoration-thickness: 2px; text-underline-offset: 5px;
}

/* ─── الرفّ وبطاقةُ السعر ──────────────────────────────────────────────── */
.shelf {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0; padding: 0; list-style: none;
  border-inline-start: 1px solid var(--line);
  border-top: 1px solid var(--line);
}
@media (min-width: 640px) { .shelf { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 900px) { .shelf { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1180px) { .shelf { grid-template-columns: repeat(6, minmax(0, 1fr)); } }

.card {
  container-type: inline-size;
  position: relative;
  display: flex; flex-direction: column;
  min-width: 0;
  padding: 12px 12px 0;
  background: #fff;
  border-inline-end: 1px solid var(--line);
  /* حافّةُ الرفّ: تتّصل من بطاقةٍ إلى جارتها فتصير خطّاً واحداً تحت الصفّ. */
  border-bottom: 6px solid var(--navy-100);
  box-shadow: 0 1px 0 var(--navy-200);
}
.card-link { flex: 1; display: flex; flex-direction: column; gap: 8px; color: inherit; text-decoration: none; }
.card-img { display: block; aspect-ratio: 1; overflow: hidden; } /* بلا overflow تمدّ صورةٌ غيرُ مربّعةٍ الصفَّ كلَّه */
.card-img img { display: block; width: 100%; height: 100%; object-fit: contain; }
.card-name {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 3em; font-size: 14px; line-height: 1.5; font-weight: 700;
}
.card-link:hover .card-name { color: var(--navy); text-decoration: underline; text-underline-offset: 3px; }
.card-off, .gallery .card-off {
  position: absolute; top: 10px; inset-inline-start: 10px; z-index: 1;
  padding: 2px 8px; border-radius: 4px;
  background: var(--red); color: #fff; font-size: 12px; font-weight: 800; line-height: 1.6;
}

.tag {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 0 8px;
  margin-top: 10px;
  padding: 8px 0 12px;
  border-top: 2px dashed var(--navy-100);
}
.tag-price { grid-column: 1; margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 8px; }
.price { white-space: nowrap; }
.price data {
  font-family: var(--num); font-weight: 800; font-size: 18px; color: var(--navy);
  font-variant-numeric: tabular-nums; letter-spacing: -0.01em;
}
.cur { margin-inline-start: 4px; font-size: 12px; font-weight: 700; color: var(--muted); }
.tag-price:has(.was) .price data { color: var(--red); }
.was { font-family: var(--num); font-size: 13px; color: var(--muted); }
.unit { grid-column: 1; margin: 0; font-size: 12px; color: var(--muted); }
.out { grid-column: 1 / -1; margin: 4px 0 0; font-size: 13px; font-weight: 700; color: var(--muted); }
.is-out .card-img img { opacity: 0.45; }

.add {
  grid-column: 2; grid-row: 1 / span 2; align-self: end;
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  min-height: 40px; min-width: 40px; padding: 0 12px; border: 0; border-radius: 6px;
  background: var(--sky); color: var(--navy-deep);
  font-size: 14px; font-weight: 800; text-decoration: none; cursor: pointer;
}
.add:hover { background: var(--sky-hover); }
.stepper {
  grid-column: 2; grid-row: 1 / span 2; align-self: end;
  display: inline-flex; align-items: center; height: 40px;
  border: 2px solid var(--sky); border-radius: 6px; background: #fff;
}
.stepper button {
  width: 34px; height: 100%; border: 0; background: none; color: var(--navy); cursor: pointer;
  display: grid; place-items: center;
}
.stepper output { min-width: 24px; text-align: center; font: 800 15px var(--num); color: var(--navy); }
/* بطاقةٌ ضيّقة (رفُّ الجوّال): الزرُّ أيقونةٌ وحدها، والسعرُ يأخذ السطر كاملاً. */
@container (max-width: 250px) {
  .add span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .add { padding: 0; width: 40px; }
  .price data { font-size: 17px; }
  .was { font-size: 12px; }
}

/* رفٌّ أفقيٌّ واحد في الرئيسيّة */
.shelf-row {
  grid-template-columns: none !important;
  grid-auto-flow: column;
  grid-auto-columns: minmax(150px, 46%);
  overflow-x: auto;
  scroll-snap-type: x proximity;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
}
.shelf-row .card { scroll-snap-align: start; }
@media (min-width: 640px) { .shelf-row { grid-auto-columns: 30%; } }
@media (min-width: 900px) { .shelf-row { grid-auto-columns: 23%; } }
@media (min-width: 1180px) { .shelf-row { grid-auto-columns: calc(100% / 6); } }

/* ─── الأقسام والماركات ────────────────────────────────────────────────── */
.depts-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 12px;
  margin: 0; padding: 0; list-style: none;
}
@media (min-width: 640px) { .depts-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 900px) { .depts-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
@media (min-width: 1180px) { .depts-grid { grid-template-columns: repeat(8, minmax(0, 1fr)); } }
.depts-grid a {
  display: flex; flex-direction: column; gap: 8px; text-align: center; text-decoration: none;
  color: var(--ink); font-size: 13px; font-weight: 700; line-height: 1.4;
}
.dept-img { display: block; aspect-ratio: 1; overflow: hidden; border-radius: 12px; background: var(--navy-50); }
.dept-img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.depts-grid a:hover .dept-name { color: var(--navy); text-decoration: underline; text-underline-offset: 3px; }

.brand-row { display: flex; gap: 14px; margin: 0; padding: 0 0 6px; list-style: none; overflow-x: auto; scrollbar-width: thin; }
.brand-row a {
  display: flex; flex-direction: column; align-items: center; gap: 6px; width: 112px;
  text-decoration: none; color: var(--ink); font-size: 13px; font-weight: 700; text-align: center;
}
.brand-row img { width: 96px; height: 96px; object-fit: contain; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.listing-head + .wrap .brand-row, .wrap > .brand-row { flex-wrap: wrap; }

.app-strip { margin-top: 36px; padding-block: 26px; background: var(--navy-50); }
.app-strip h2 { margin: 0 0 4px; font-size: 21px; color: var(--navy); }
.app-strip p { margin: 0; color: var(--ink-soft); }
.app-strip .stores { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }

/* ─── عناصر عامّة ──────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 20px; border: 0; border-radius: 8px;
  background: var(--navy); color: #fff; font-size: 15px; font-weight: 800; text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--navy-dark); }
.btn-quiet { background: #fff; color: var(--navy); box-shadow: inset 0 0 0 2px var(--navy-100); }
.btn-quiet:hover { background: var(--navy-50); }

.crumbs ol { display: flex; flex-wrap: wrap; gap: 2px 6px; margin: 0; padding: 14px 0 0; list-style: none; font-size: 13px; color: var(--muted); }
.crumbs li + li::before { content: '‹'; margin-inline-end: 6px; color: var(--navy-200); }
[dir='ltr'] .crumbs li + li::before { content: '›'; }
.crumbs a { color: var(--navy); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }

.listing-head { padding-block: 10px 14px; }
.listing-head h1, .page-body h1, .banner-page h1, .notice h1 {
  margin: 0; font-size: clamp(23px, 3.2vw, 31px); font-weight: 800; color: var(--navy);
}
.lede { margin: 6px 0 0; max-width: 68ch; color: var(--ink-soft); }
.chips ul { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; padding: 0; list-style: none; }
.chips a {
  display: block; padding: 6px 12px; border: 1px solid var(--navy-100); border-radius: 6px;
  font-size: 14px; font-weight: 700; color: var(--navy); text-decoration: none;
}
.chips a:hover { background: var(--navy-50); border-color: var(--navy-200); }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; }
.count { margin: 0; font-size: 14px; font-weight: 700; color: var(--ink-soft); }
.sort { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.sort label { font-weight: 700; color: var(--ink-soft); }
.sort select { height: 40px; padding-inline: 10px; border: 1px solid var(--navy-200); border-radius: 6px; background: #fff; }
.js .js-hide { display: none; }

.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; padding-block: 26px 6px; }
.pager ol { display: flex; gap: 6px; margin: 0; padding: 0; list-style: none; }
.pager a, .pager li[aria-current] {
  display: grid; place-items: center; min-width: 42px; height: 42px; padding-inline: 12px;
  border: 1px solid var(--navy-100); border-radius: 6px;
  font-family: var(--num); font-weight: 700; color: var(--navy); text-decoration: none;
}
.pager > a { font-family: var(--font); }
.pager a:hover { background: var(--navy-50); }
.pager li[aria-current] { background: var(--navy); border-color: var(--navy); color: #fff; }

.directory { columns: 3 250px; column-gap: 36px; padding-bottom: 12px; }
.directory section { break-inside: avoid; margin-bottom: 22px; }
.directory h2 { margin: 0 0 4px; font-size: 18px; }
.directory h2 a { color: var(--navy); text-decoration: none; }
.directory h2 a:hover { text-decoration: underline; }
.directory ul { margin: 0; padding: 0; list-style: none; }
.directory li a { color: var(--ink-soft); text-decoration: none; line-height: 2; }
.directory li a:hover { color: var(--navy); text-decoration: underline; }

/* ─── صفحةُ المنتج ─────────────────────────────────────────────────────── */
.product { display: grid; gap: 22px 40px; padding-block: 14px 8px; }
@media (min-width: 900px) { .product { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; } }
.gallery { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.gallery-track {
  display: grid; grid-auto-flow: column; grid-auto-columns: 100%;
  margin: 0; padding: 0; list-style: none; overflow-x: auto; scroll-snap-type: x mandatory;
}
.gallery-track li { scroll-snap-align: start; aspect-ratio: 1; overflow: hidden; }
.gallery-track img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; }
.gallery-empty { aspect-ratio: 1; background: var(--navy-50); }

.buy h1 { margin: 0; font-size: clamp(22px, 2.8vw, 29px); font-weight: 800; line-height: 1.4; }
.alt-name { margin: 4px 0 0; font-family: var(--num); font-size: 14px; color: var(--muted); }
.buy-tag {
  display: inline-flex; flex-direction: column; gap: 2px;
  margin-top: 16px; padding: 10px 18px 12px;
  border: 1px solid var(--navy-100); border-inline-start: 6px solid var(--sky); border-radius: 8px;
}
.price-big data { font-size: 34px; }
.price-big .cur { font-size: 15px; }
.buy-form { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.options { flex-basis: 100%; display: grid; gap: 8px; margin: 0; padding: 0; border: 0; }
.options legend { margin-bottom: 6px; padding: 0; font-weight: 800; color: var(--navy); }
.opt {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  border: 2px solid var(--navy-100); border-radius: 8px; cursor: pointer;
}
.opt:has(input:checked) { border-color: var(--sky); background: var(--sky-50); }
.opt.is-out { opacity: 0.5; cursor: not-allowed; }
.opt input { accent-color: var(--navy); width: 18px; height: 18px; }
.opt-label { flex: 1; font-weight: 700; }
.opt-price { font-family: var(--num); font-weight: 800; color: var(--navy); }
.qty { display: inline-flex; align-items: center; height: 54px; border: 2px solid var(--navy-100); border-radius: 8px; }
.qty button { width: 48px; height: 100%; border: 0; background: none; color: var(--navy); cursor: pointer; display: grid; place-items: center; }
.qty button:hover { background: var(--navy-50); }
.qty input {
  width: 52px; height: 100%; border: 0; text-align: center;
  font: 800 18px var(--num); color: var(--navy); background: transparent; -moz-appearance: textfield; appearance: textfield;
}
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.btn-add { flex: 1 1 200px; min-height: 54px; background: var(--sky); color: var(--navy-deep); font-size: 17px; }
.btn-add:hover { background: var(--sky-hover); }
.out-big { margin-top: 18px; font-size: 16px; }
.delivery-note { display: flex; align-items: center; gap: 10px; margin: 18px 0 0; font-size: 14px; font-weight: 700; color: var(--navy); }
.delivery-note svg { flex: none; color: var(--sky); }
.facts-list {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 18px;
  margin: 18px 0 0; padding-top: 14px; border-top: 1px solid var(--line); font-size: 14px;
}
.facts-list dt { color: var(--muted); }
.facts-list dd { margin: 0; font-weight: 700; }
.desc { grid-column: 1 / -1; padding-top: 6px; border-top: 1px solid var(--line); }
.desc h2 { margin: 12px 0 4px; font-size: 19px; color: var(--navy); }

.prose { max-width: 72ch; }
.prose p, .prose li { line-height: 1.9; }
.prose h2 { margin: 30px 0 8px; font-size: 20px; color: var(--navy); }
.prose h3, .prose h4 { margin: 22px 0 6px; font-size: 17px; color: var(--navy); }
.prose hr { margin: 26px 0; border: 0; border-top: 1px solid var(--line); }
.prose ul, .prose ol { padding-inline-start: 22px; }

.page-body { padding-block: 10px 20px; }
.updated { margin: 6px 0 0; font-size: 13px; color: var(--muted); }
.banner-page { padding-block: 10px 20px; }
.banner-page img { display: block; max-width: 720px; width: 100%; height: auto; margin-block: 16px; border-radius: 12px; }

.notice { max-width: 680px; padding-block: 56px 40px; }
.notice p { color: var(--ink-soft); }
.notice-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }

/* ─── التذييل ──────────────────────────────────────────────────────────── */
.site-footer { margin-top: 44px; padding-block: 34px 18px; background: var(--navy-deep); color: #dde2f0; font-size: 14px; }
.foot-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 26px; }
.site-footer h2 { margin: 0 0 8px; font-size: 15px; color: #fff; }
.site-footer p { margin: 0 0 4px; }
.site-footer ul { margin: 0; padding: 0; list-style: none; }
.site-footer li { padding-block: 3px; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer a:focus-visible { outline-color: #fff; }
.foot-brand { font-size: 17px; font-weight: 800; color: #fff; }
.foot-base {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px;
  margin-top: 26px; padding-top: 14px; border-top: 1px solid rgb(255 255 255 / 0.16); color: #b9c1da;
}
.foot-base ul { display: flex; gap: 18px; }

/* ─── إشعارُ «أُضيف إلى السلة» ─────────────────────────────────────────── */
.toast {
  position: fixed; inset-inline: 16px; bottom: 16px; z-index: 60;
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  max-width: 440px; margin-inline: auto; padding: 12px 16px;
  border-radius: 10px; background: var(--navy-deep); color: #fff; font-weight: 700;
  box-shadow: 0 10px 28px rgb(26 39 83 / 0.28);
  transition: transform 0.18s ease-out, opacity 0.18s ease-out;
}
.toast[hidden] { display: flex; visibility: hidden; opacity: 0; transform: translateY(12px); }
.toast a { color: var(--sky); font-weight: 800; white-space: nowrap; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* ─── الجوّال الضيّق ───────────────────────────────────────────────────── */
@media (max-width: 860px) {
  /* الأقسامُ الفرعيّة شريطٌ يُمرَّر لا خمسةُ أسطرٍ تدفع المنتجاتِ إلى أسفل. */
  .chips ul { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); }
  .chips ul::-webkit-scrollbar { display: none; }
  .chips a { white-space: nowrap; }
}
@media (max-width: 420px) {
  .tools .tool-orders { display: none; } /* «طلباتي» من «حسابي» على الشاشة الضيّقة */
  .lang-switch { margin-inline-end: 2px; padding: 4px 7px; font-size: 12px; }
  .brand { gap: 8px; }
  .brand-name { font-size: 15px; }
}

/* ─── جداولُ صفحات السياسات واقتباساتُها (Markdown من اللوحة) ─────────────── */
.table-wrap { overflow-x: auto; margin: 16px 0; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; }
.prose th, .prose td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: start; vertical-align: top; }
.prose th { color: var(--navy); font-weight: 800; background: var(--navy-50); }
.prose blockquote {
  margin: 16px 0; padding: 10px 16px; border-inline-start: 4px solid var(--sky);
  background: var(--sky-50); border-radius: 6px; color: var(--ink-soft);
}
.prose blockquote p { margin: 0; }
