/* السراي للمفروشات — ورقة نمط واحدة (W-10: لا Tailwind ولا إطار).
   الميزانية (W3): الحمولة بعد نزع التعليقات ≤ 60 ك.ب، والمنقول gzip ≤ 20 ك.ب —
   يقيسهما `website/src/ui/themeAssets.test.ts`. التعليقات وثائقُ مطوّرٍ لا حمولةَ زائر.

   (الموجة O · إعادة التصميم) لوحةُ **صالة السراي** كما في صورة المالك: رخامٌ كريمي
   وبيجٌ دافئ أرضيةً، جوزٌ عميق للمشاهد الداكنة، وذهبٌ هادئ للنداء وحده — بلمسةٍ
   برتقالية من الشعار لا تُكتب نصًّا أبدًا. التصميم في **الرموز** فتتبعه المواسم
   الثمانية بقيمها وتحتفظ بهويتها (`css/themes/*.css` تعيد تعريف هذه الأسماء وحدها).
   خطٌّ عربيّ مستضافٌ ذاتيًّا فقط — لا خطوط جوجل (التكليف). RTL أساسًا. */

/* ══ الخطّان (W3) — Noto Naskh للعرض وNoto Sans للمتن، OFL-1.1، المقاطع المستعملة وحدها ══ */
@font-face {
  font-family: "Saray Display";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/noto-naskh-arabic-arabic-700-normal.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+FB50-FDFF, U+FE70-FEFF, U+102E0-102FB, U+10E60-10E7E, U+10EFD-10EFF, U+1EE00-1EEFF;
}
@font-face {
  font-family: "Saray Text";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/noto-sans-arabic-arabic-400-normal.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+FB50-FDFF, U+FE70-FEFF, U+102E0-102FB, U+10E60-10E7E, U+10EFD-10EFF, U+1EE00-1EEFF;
}
@font-face {
  font-family: "Saray Text";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/noto-sans-arabic-arabic-700-normal.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+FB50-FDFF, U+FE70-FEFF, U+102E0-102FB, U+10E60-10E7E, U+10EFD-10EFF, U+1EE00-1EEFF;
}
@font-face {
  font-family: "Saray Text";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/noto-sans-arabic-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Saray Text";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/noto-sans-arabic-latin-700-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* ══ طبقةُ الرموز الواحدة (W2) — والمواسم تعيد تعريف هذه الأسماء وحدها ══
     التباين مقيسٌ لا مقدَّر: كل زوجٍ يقرؤه `colorContrastDec121.test.ts` (كتلة
     الموقع) على هذا الملف وعلى الثيمات الثمانية — 4.5:1 للنص و3:1 للحدود.
     (الموجة O) القيمُ من صورة الصالة: رخامٌ كريمي، بيج، جوز، ذهبٌ هادئ. */

  /* الأرضيات — الفاتحة ثم المشاهد الداكنة */
  --bg: #F6F1E8;
  --panel: #FFFCF7;
  --panel-2: #EDE4D5;
  --bg-deep: #26190F;
  --bg-deep-2: #36271B;
  --bg-deep-3: #4A382A;

  /* الحبر */
  --ink: #22170F;
  --ink-soft: #5C4E43;
  --placeholder: #5C4E43;
  --on-deep: #FBF5EB;
  --on-deep-soft: #D2C3AF;

  /* التمييز — ذهبُ السراي بثلاث وظائف:
     --accent عنصرٌ كبير وحدٌّ على الفاتح (4.40:1) · --accent-deep نصٌّ على الفاتح
     وملءُ الزر الأساسي (6.23:1) · --accent-bright حدٌّ على الداكن (7.54:1)
     · --accent-on-dark نصٌّ على الداكن (10.88:1). الذهب اللامع لا يُكتب نصًّا على الفاتح. */
  --accent: #8E6A26;
  --accent-deep: #725417;
  --accent-soft: #F2E5CB;
  --accent-bright: #D6A448;
  --accent-on-dark: #EBCB7C;
  --on-accent: #FFFFFF;

  /* الحدود والتركيز — --line خطُّ شعرٍ للفواصل لا حدُّ عنصر تحكّم (س-ح-45) */
  --line: #E3D6C2;
  --line-deep: #5A4634;
  --control-border: #7A6856;
  --focus: #1D4ED8;

  /* الدلالات */
  --ok: #256B41;
  --ok-bg: #E4F3E9;
  --danger: #B3352C;
  --danger-bg: #FBE7E4;

  /* مرادفات الرئيسية: تُحيل ولا تُعرَّف بقيمٍ ثانية */
  --h-ink: var(--ink);
  --h-ink-soft: var(--ink-soft);
  --h-ivory: var(--bg);
  --h-ivory-warm: var(--panel-2);
  --h-char: var(--bg-deep);
  --h-char-2: var(--bg-deep-2);
  --h-char-3: var(--bg-deep-3);
  --h-gold: var(--accent-bright);
  --h-gold-lit: var(--accent-on-dark);
  --h-gold-deep: var(--accent-deep);
  --h-on-dark: var(--on-deep);
  --h-on-dark-soft: var(--on-deep-soft);

  /* الشكل والحركة والخط */
  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 22px;
  --shadow: 0 1px 2px rgba(38, 25, 15, 0.05), 0 12px 32px -14px rgba(38, 25, 15, 0.22);
  --shadow-pop: 0 2px 6px rgba(38, 25, 15, 0.06), 0 24px 48px -16px rgba(38, 25, 15, 0.32);
  --trans: 0.22s ease;
  --h-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --h-gap: clamp(64px, 9vw, 120px);
  --h-hair: rgba(214, 164, 72, 0.42);
  --font: "Saray Text", "Segoe UI", Tahoma, Arial, sans-serif;
  --font-display: "Saray Display", "Saray Text", "Segoe UI", Tahoma, serif;
  --header-h: 72px;
  --bottom-nav-h: 66px;
  --container-w: 1280px;

  /* زخرفةٌ خفيفة — رسمٌ مُدرَجٌ بيانًا لا موردًا خارجيًا (CSP: `img-src 'self' data:`) */
  --motif: url("/brand/hero-silhouette.svg");
  --h-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23g)' opacity='0.5'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; }
html { font-size: 18px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  line-height: 1.65;
  min-height: 100vh;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.3; margin: 0 0 0.5em; font-family: var(--font-display); font-weight: 700; }
p { margin: 0 0 1em; }
ul { margin: 0; padding-inline-start: 1.2em; }
button { font-family: inherit; }

/* (S83 — مقيسٌ في متصفح) السمة تُفرَض مرةً واحدة لكل عنصر — `.btn` كان يغلبها بـinline-flex */
[hidden] { display: none !important; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; inset-inline-start: 12px; top: -60px; background: var(--accent-deep);
  color: #fff; padding: 12px 18px; border-radius: var(--radius-sm); z-index: 100;
  transition: top var(--trans);
}
.skip-link:focus { top: 12px; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* ── لافتة الموسم (W1/W2) — لا توجد إطلاقًا حين تُطفأ ──────────────────── */
.site-banner {
  margin: 0; padding: 10px 16px; text-align: center; font-weight: 700; font-size: 0.95rem;
  background: var(--accent-soft); color: var(--ink); border-bottom: 1px solid var(--line);
}

/* ── القشرة: رأسٌ زجاجيّ كريمي بخيطٍ ذهبيّ، فوتر جوزيّ، وشريط سفلي ─────────── */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: var(--panel);
  background: color-mix(in srgb, var(--panel) 84%, transparent);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 1px 0 var(--h-hair), 0 6px 24px -18px rgba(38, 25, 15, 0.3);
}
.site-header-inner {
  max-width: var(--container-w); margin: 0 auto; height: var(--header-h);
  display: flex; align-items: center; gap: 20px; padding: 0 16px;
}
.site-logo {
  display: flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0;
  font-family: var(--font-display); font-weight: 700; font-size: 1.12rem; color: var(--ink);
}
.site-logo img {
  width: 40px; height: 40px; border-radius: 50%; background: var(--panel);
  box-shadow: 0 0 0 1px var(--h-hair), 0 2px 8px rgba(38, 25, 15, 0.12);
}
.site-nav { display: none; gap: 26px; margin-inline-start: 10px; }
.site-nav a {
  position: relative; text-decoration: none; font-weight: 600; padding: 10px 2px; color: var(--ink);
  transition: color var(--trans);
}
.site-nav a::after {
  content: ""; position: absolute; inset-inline: 0; bottom: 4px; height: 2px;
  background: var(--accent); transform: scaleX(0); transform-origin: 100% 50%;
  transition: transform var(--trans);
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--accent-deep); }
.site-nav a:hover::after, .site-nav a[aria-current="page"]::after { transform: scaleX(1); }
.site-header-cart {
  margin-inline-start: auto; display: flex; align-items: center; gap: 8px; text-decoration: none;
  font-weight: 700; padding: 10px 16px; border-radius: 999px; min-height: 48px;
  border: 1.5px solid var(--control-border); color: var(--ink); background: var(--panel);
  transition: border-color var(--trans), color var(--trans), background var(--trans);
}
.site-header-cart:hover { border-color: var(--accent); color: var(--accent-deep); background: var(--accent-soft); }

.site-footer { background: var(--bg-deep); color: var(--on-deep); margin-top: 64px; box-shadow: inset 0 1px 0 var(--h-hair); }
.site-footer-inner { max-width: var(--container-w); margin: 0 auto; padding: 40px 16px calc(36px + var(--bottom-nav-h)); text-align: center; }
.site-footer p { margin: 0 0 8px; color: var(--on-deep-soft); }
.site-footer-note { font-weight: 700; color: var(--on-deep); }
.site-footer nav { display: flex; justify-content: center; gap: 22px; flex-wrap: wrap; margin-top: 16px; }
.site-footer nav a { color: var(--on-deep); text-decoration: none; font-weight: 600; }
.site-footer nav a:hover { color: var(--accent-on-dark); }

.bottom-nav {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 50; display: flex;
  background: var(--panel); border-top: 1px solid var(--line); box-shadow: 0 -6px 24px -14px rgba(38, 25, 15, 0.3);
  height: var(--bottom-nav-h);
}
.bottom-nav-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; text-decoration: none; color: var(--ink-soft); font-size: 0.78rem; font-weight: 600;
  min-height: 48px;
}
.bottom-nav-item.is-active { color: var(--accent-deep); }

@media (min-width: 768px) {
  .site-nav { display: flex; }
  .site-nav a { white-space: nowrap; }
  .bottom-nav { display: none; }
  .site-footer-inner { padding-bottom: 36px; }
}
/* بين 768 و1023 الرأس يحمل الشعار وأربعة روابط والسلة في 736 بكسلًا صافية — فتضيق الفجوات لا تلتفّ الروابط */
@media (min-width: 768px) and (max-width: 1023px) {
  .site-header-inner { gap: 12px; }
  .site-nav { gap: 14px; margin-inline-start: 2px; }
  .site-nav a { font-size: 0.92rem; }
  .site-logo { font-size: 1rem; }
  .site-header-cart { padding: 8px 12px; }
}
@media (max-width: 767px) {
  body { padding-bottom: var(--bottom-nav-h); }
}

/* ── تخطيط عام ─────────────────────────────────────────────────────────── */
/* توسيط كل كتلة مباشرة تحت main: قواعد المكوّنات تضبط الهوامش الرأسية بـmargin-block لا بالاختصار margin
   (الاختصار يصفّر الهامش الأفقي فيزحف العنصر إلى حافة البداية — `pages/layoutInvariants.test.ts`). */
.container, main > * { max-width: var(--container-w); margin-inline: auto; padding-inline: 16px; }
main { display: block; padding-top: 20px; }
.page-title { font-size: clamp(1.7rem, 2.6vw, 2.3rem); }
.page-subtitle { color: var(--ink-soft); font-size: 1.05rem; max-width: 60ch; }
.section-title { font-size: clamp(1.4rem, 2.2vw, 1.9rem); margin-bottom: 16px; }
.empty-note { color: var(--ink-soft); background: var(--panel-2); border-radius: var(--radius); padding: 22px; text-align: center; }
.prose p { max-width: 65ch; }
.eyebrow { display: flex; align-items: center; gap: 12px; margin: 0 0 12px; font-weight: 700; font-size: 0.86rem; color: var(--accent-deep); }
.eyebrow-rule { display: block; flex: none; width: 34px; height: 2px; background: var(--h-gold); }

/* ── أزرار ─────────────────────────────────────────────────────────────── */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 24px; border-radius: 999px; font-weight: 700;
  font-size: 1rem; text-decoration: none; border: 2px solid transparent; cursor: pointer;
  transition: background var(--trans), color var(--trans), border-color var(--trans), transform var(--trans), box-shadow var(--trans);
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
/* accent-deep لا accent: أبيض فوق accent دون 4.5:1 — والوهجُ طبقةٌ فوقه لا تمسّ التباين */
.btn-primary {
  background: var(--accent-deep); color: var(--on-accent);
  background-image: linear-gradient(135deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0) 55%);
  box-shadow: 0 10px 26px -12px rgba(38, 25, 15, 0.5);
}
.btn-primary:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 16px 32px -12px rgba(38, 25, 15, 0.55); }
.btn-secondary { background: var(--panel); color: var(--ink); border-color: var(--control-border); }
.btn-secondary:hover:not(:disabled) { border-color: var(--accent); color: var(--accent-deep); background: var(--accent-soft); }
.btn-ghost { background: transparent; color: var(--accent-deep); }
.btn-ghost:hover:not(:disabled) { background: var(--accent-soft); }
.btn-lg { min-height: 56px; padding: 0 32px; font-size: 1.1rem; }
.btn-block { width: 100%; }

/* ══════════════════════════════════════════════════════════════════════════
   الصفحة الرئيسية — صالةُ السراي (الموجة O). كتلةٌ مقيَّدة بـ`.page-home` على
   `<body>` أو بأصنافٍ خاصة بالواجهة — فلا يتغيّر شيء في بقية الصفحات.
   الإيقاع: بطلٌ مضيء بلوحٍ جوزيّ ⇄ فاتح (تصنيفات · مختارات) ⇄ داكن (الطقم)
   ⇄ فاتح (قصة الصالة) ⇄ بيج (الثقة) ⇄ داكن (الختام + الفوتر).
   ══════════════════════════════════════════════════════════════════════════ */

.page-home {
  /* (W2) لا لوحَ ألوانٍ ثانٍ هنا — الأسماء مرادفاتٌ في `:root`؛ لهذه الكتلة أرضيةُ الصفحة وحبرُها */
  background: var(--bg);
  color: var(--ink);
}
.page-home main { padding-top: 0; }
.hero, .bundle-band, .trust-band, .closing-band { max-width: none; margin-inline: 0; padding-inline: 0; }

/* ── الرأس فوق البطل: زجاجٌ كريمي دائمًا (لا شفافيةَ كاملة فوق صورةٍ مضيئة)، ثابتٌ حين يعمل السكربت ── */
.js-hero .page-home .site-header {
  position: fixed; inset-inline: 0; top: 0;
  box-shadow: 0 1px 0 var(--h-hair);
  transition: box-shadow 0.3s var(--h-ease), background 0.3s var(--h-ease);
}
.js-hero .page-home .site-header.is-solid { box-shadow: 0 1px 0 var(--h-hair), 0 10px 30px -18px rgba(38, 25, 15, 0.45); }
/* الفوتر امتدادٌ لشريط الختام هنا لا كتلة ثالثة مستقلة */
.page-home .site-footer { margin-top: 0; }

/* ── البطل: صورةُ الصالة بعرض الشاشة، لوحٌ جوزيّ زجاجيّ يحمل النداء ─────────── */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  min-height: 100vh; min-height: 100svh;
  display: flex; align-items: flex-end;
  background: var(--h-char); color: var(--h-on-dark);
  padding: calc(var(--header-h) + 16px) 0 calc(var(--bottom-nav-h) + 28px);
}
@media (min-width: 768px) { .hero { padding-bottom: clamp(56px, 10vh, 104px); } }

/* صورةٌ مصغَّرة مضمَّنة (174 بايت) تحت الصورة الكبيرة — فلا فراغَ جوزيًّا قبل وصولها */
.hero-stage {
  position: absolute; inset: -14%; z-index: 0; will-change: transform;
  background: url("data:image/webp;base64,UklGRqYAAABXRUJQVlA4IJoAAADQBACdASogABIAPu1krFAppSQisBgIATAdiWMAuwAI0faK+OpQBcNjl/QCwNKhIAD+ACfRNIYzQWnZc8IqBw/KfmSJza5hVPPIvuCv8GboDp1ZAFOgkqCMlpPEPlRU75diQSOz/xR+r93terwRQM9fcj+IKC81wcmHYmP2q+PKRRn/UynRaHp0YGMz1N+uZL4M2T/y2O2GaIAA") center / cover no-repeat;
}
.hero-photo {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 42%;
  transform-origin: 50% 40%; animation: kenBurns 36s ease-in-out infinite alternate;
}
.hero-scrim {
  position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(to bottom, rgba(38, 25, 15, 0.34) 0%, rgba(38, 25, 15, 0.06) 22%, transparent 40%),
    linear-gradient(to top, rgba(38, 25, 15, 0.82) 0%, rgba(38, 25, 15, 0.42) 32%, rgba(38, 25, 15, 0.06) 60%, transparent 78%);
}
.hero-grain, .bundle-grain, .closing-grain {
  position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background-image: var(--h-grain); background-size: 180px 180px;
  opacity: 0.32; mix-blend-mode: soft-light;
}
.hero-inner {
  position: relative; z-index: 3; width: 100%;
  max-width: var(--container-w); margin-inline: auto; padding-inline: 16px;
}
.hero-panel {
  max-width: 640px;
  background: rgba(38, 25, 15, 0.80);
  backdrop-filter: blur(18px) saturate(120%);
  -webkit-backdrop-filter: blur(18px) saturate(120%);
  border: 1px solid rgba(251, 245, 235, 0.16);
  border-radius: var(--radius-lg); padding: 30px 26px 34px;
  box-shadow: inset 0 1px 0 rgba(251, 245, 235, 0.14), 0 30px 80px rgba(20, 12, 6, 0.5);
}
.hero-title {
  font-size: clamp(2.2rem, 6.4vw, 4.2rem); line-height: 1.18; font-weight: 700;
  margin: 0 0 12px; color: var(--h-on-dark);
}
.hero-tagline {
  font-size: clamp(1.05rem, 2.2vw, 1.28rem); color: var(--h-on-dark-soft);
  margin: 0 0 28px; max-width: 34ch; line-height: 1.75;
}
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; margin: 0; }
.hero-scroll {
  display: none; position: absolute; z-index: 3; bottom: 20px; inset-inline-start: 50%;
  width: 1px; height: 56px; overflow: hidden;
  background: linear-gradient(to bottom, transparent, rgba(251, 245, 235, 0.45));
}
.hero-scroll::after {
  content: ""; position: absolute; inset-inline: 0; top: -56px; height: 56px;
  background: linear-gradient(to bottom, transparent, var(--h-gold-lit));
  animation: scrollCue 2.8s ease-in-out infinite;
}
@media (min-width: 768px) { .hero-scroll { display: block; } }
@media (min-width: 1024px) {
  .hero-scrim {
    background:
      linear-gradient(to bottom, rgba(38, 25, 15, 0.28) 0%, transparent 24%),
      linear-gradient(to left, rgba(38, 25, 15, 0.62) 0%, rgba(38, 25, 15, 0.22) 40%, transparent 72%),
      linear-gradient(to top, rgba(38, 25, 15, 0.7) 0%, transparent 50%);
  }
  .hero-panel { background: rgba(38, 25, 15, 0.74); padding: 46px 44px 50px; }
}
@keyframes kenBurns { from { transform: scale(1.02); } to { transform: scale(1.12) translate3d(0, -1.2%, 0); } }
@keyframes scrollCue { from { transform: translateY(0); } to { transform: translateY(112px); } }

.hero-panel .eyebrow, .bundle-body .eyebrow, .closing-inner .eyebrow { color: var(--h-gold-lit); }
.page-home .section-title {
  font-size: clamp(1.7rem, 3.4vw, 2.5rem); line-height: 1.28; font-weight: 700;
  margin: 0; color: var(--h-ink);
}
.section-head { margin-bottom: clamp(24px, 3vw, 38px); }
.section-head-split { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.link-quiet {
  display: inline-flex; align-items: center; min-height: 48px; font-weight: 600;
  color: var(--h-on-dark); text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1px;
}
.link-quiet:hover { color: var(--h-gold-lit); }
.link-arrow {
  display: inline-flex; align-items: center; gap: 8px; min-height: 48px; font-weight: 700;
  color: var(--h-gold-deep); text-decoration: none; border-bottom: 2px solid var(--h-hair);
  transition: color var(--trans), border-color var(--trans);
}
.link-arrow:hover { color: var(--h-ink); border-bottom-color: var(--h-gold); }
.btn-gold {
  background: var(--h-gold); color: var(--h-char); border-color: var(--h-gold);
  background-image: linear-gradient(135deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0) 60%);
  box-shadow: 0 14px 34px -10px rgba(214, 164, 72, 0.55), 0 2px 6px rgba(20, 12, 6, 0.3);
}
.btn-gold:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 22px 44px -12px rgba(214, 164, 72, 0.6); }
.btn-gold:active { transform: translateY(0); }
.btn-xl { min-height: 60px; padding: 0 40px; font-size: 1.12rem; }
.page-home .price { color: var(--h-gold-deep); font-size: 1.05rem; }
.price-from-label { font-weight: 600; color: var(--h-ink-soft, var(--ink-soft)); font-size: 0.78em; margin-inline-end: 4px; }

/* اللوحة البديلة حين لا صورة: نقشة الأثاث فوق تدرّجٍ جوزيّ — لا مستطيل فارغ */
.tile-art {
  display: block; position: absolute; inset: 0; width: 100%; height: 100%;
  background-image:
    var(--motif),
    radial-gradient(66% 62% at 24% 10%, rgba(214, 164, 72, 0.22), transparent 70%),
    linear-gradient(155deg, var(--h-char-3) 0%, var(--h-char-2) 46%, var(--h-char) 100%);
  background-repeat: no-repeat; background-position: center bottom; background-size: cover, auto, auto;
}
.bento-tile:nth-child(3n+2) .tile-art, .showcase-card:nth-child(3n+2) .tile-art { background-position: 24% bottom; }
.bento-tile:nth-child(3n) .tile-art, .showcase-card:nth-child(3n) .tile-art { background-position: 76% bottom; }

/* ── شريط رقائق التصنيفات تحت البطل ──────────────────────────────────────── */
.cat-rail { background: var(--panel); box-shadow: 0 1px 0 var(--line); }
.cat-rail-list {
  max-width: var(--container-w); margin-inline: auto; padding: 14px 16px;
  list-style: none; display: flex; gap: 10px; overflow-x: auto;
}
.cat-chip {
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  min-height: 44px; padding: 0 16px; border-radius: 999px; text-decoration: none;
  border: 1.5px solid var(--control-border); color: var(--ink); font-weight: 600;
  transition: border-color var(--trans), background var(--trans);
}
.cat-chip:hover { border-color: var(--accent); background: var(--accent-soft); }
.cat-chip-count { color: var(--ink-soft); font-size: 0.85rem; }

/* ── شبكة «بينتو» للتصنيفات ──────────────────────────────────────────────── */
.collections { margin-top: var(--h-gap); }
.bento { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.bento-tile {
  position: relative; display: block; overflow: hidden; border-radius: 18px;
  aspect-ratio: 1 / 1; text-decoration: none; color: var(--h-on-dark);
  background: var(--h-char-2); box-shadow: var(--shadow);
  transition: box-shadow var(--trans), transform var(--trans);
}
.bento-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-pop), inset 0 0 0 1px var(--h-hair); }
.bento-n1 > .bento-tile, .bento.has-lead > .bento-tile:first-child { grid-column: 1 / -1; aspect-ratio: 16 / 10; }
@media (max-width: 899px) {
  .bento-n4 > .bento-tile:last-child, .bento-n6 > .bento-tile:last-child { grid-column: 1 / -1; aspect-ratio: 16 / 10; }
}
.bento-media { position: absolute; inset: 0; display: block; }
.bento-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s var(--h-ease); }
.bento-tile:hover .bento-media img { transform: scale(1.06); }
.bento-veil { position: absolute; inset: 0; background: linear-gradient(to top, rgba(20, 12, 6, 0.86) 0%, rgba(20, 12, 6, 0.36) 46%, rgba(20, 12, 6, 0.04) 80%); }
.bento-body { position: absolute; inset-inline: 0; bottom: 0; padding: 18px 20px; display: flex; flex-direction: column; gap: 4px; }
.bento-icon { display: block; color: var(--h-gold-lit); margin-bottom: 4px; }
.bento-name { font-family: var(--font-display); font-size: 1.22rem; font-weight: 700; }
.bento-count { color: var(--h-on-dark-soft); font-size: 0.9rem; }
.bento.has-lead > .bento-tile:first-child .bento-name { font-size: clamp(1.4rem, 2.6vw, 1.9rem); }
@media (min-width: 900px) {
  .bento { grid-template-columns: repeat(6, minmax(0, 1fr)); grid-auto-rows: 224px; gap: 20px; }
  .bento-tile { aspect-ratio: auto; grid-column: span 2; }
  .bento-n1 > .bento-tile { grid-column: span 6; grid-row: span 2; }
  .bento-n2 > .bento-tile { grid-column: span 3; grid-row: span 2; }
  .bento.has-lead > .bento-tile:first-child { grid-column: span 4; grid-row: span 2; }
  .bento-n4 > .bento-tile:nth-child(4) { grid-column: span 6; }
  .bento-n5 > .bento-tile:nth-child(4), .bento-n5 > .bento-tile:nth-child(5) { grid-column: span 3; }
  .bento-body { padding: 24px 26px; }
}

/* ── مختارات ───────────────────────────────────────────────────────────── */
.featured { margin-top: var(--h-gap); }
.showcase-grid { display: grid; gap: 22px 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 639px) {
  .showcase-n1 > .showcase-card, .showcase-n3 > .showcase-card:first-child { grid-column: 1 / -1; }
  .showcase-n1 > .showcase-card .showcase-media, .showcase-n3 > .showcase-card:first-child .showcase-media { aspect-ratio: 16 / 11; }
}
.showcase-card { display: flex; flex-direction: column; gap: 14px; text-decoration: none; color: var(--h-ink); }
.showcase-media {
  position: relative; display: block; overflow: hidden; border-radius: 16px;
  aspect-ratio: 4 / 5; background: var(--h-ivory-warm); box-shadow: var(--shadow);
  transition: box-shadow var(--trans);
}
.showcase-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s var(--h-ease); }
.showcase-card:hover .showcase-media { box-shadow: var(--shadow-pop), inset 0 0 0 1px var(--h-hair); }
.showcase-card:hover .showcase-media img { transform: scale(1.05); }
.showcase-card:hover .showcase-name { color: var(--h-gold-deep); }
.showcase-body { display: flex; flex-direction: column; gap: 4px; padding-inline: 2px; }
.showcase-name { font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; transition: color var(--trans); }
@media (min-width: 640px) {
  .showcase-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px 20px; }
  .showcase-n1 { grid-template-columns: minmax(0, 420px); justify-content: center; }
  .showcase-n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) { .showcase-grid { gap: 34px 26px; } }

/* ── شريط الطقم (داكن، بعمقٍ خفيف على الصورة) ─────────────────────────────── */
.bundle-band {
  position: relative; overflow: hidden; margin-top: var(--h-gap);
  background: var(--h-char); color: var(--h-on-dark); padding: clamp(50px, 8vw, 100px) 0;
}
.bundle-band::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(62% 70% at 78% 18%, rgba(214, 164, 72, 0.18), transparent 68%);
}
.bundle-inner {
  position: relative; z-index: 3; max-width: var(--container-w); margin-inline: auto;
  padding-inline: 16px; display: grid; gap: clamp(28px, 4vw, 54px); align-items: center;
}
.bundle-frame {
  position: relative; overflow: hidden; border-radius: 20px; aspect-ratio: 16 / 11;
  background: var(--h-char-2); box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45), inset 0 0 0 1px var(--h-hair);
}
.bundle-photo { position: absolute; inset: -16% 0; width: 100%; height: 132%; object-fit: cover; will-change: transform; }
.page-home .bundle-band .section-title { color: var(--h-on-dark); }
.bundle-desc { color: var(--h-on-dark-soft); margin: 14px 0 0; max-width: 46ch; line-height: 1.85; }
.bundle-price { font-size: 1.2rem; font-weight: 700; margin: 18px 0 26px; color: var(--h-on-dark); }
.page-home .bundle-band .price { color: var(--h-gold-lit); }
@media (min-width: 900px) { .bundle-inner { grid-template-columns: 1.1fr 0.9fr; } }

/* ── قصة الصالة ────────────────────────────────────────────────────────── */
.story { margin-top: var(--h-gap); }
.story-layout { display: grid; gap: clamp(26px, 4vw, 54px); align-items: center; }
.story-media {
  position: relative; margin: 0; overflow: hidden; border-radius: 20px;
  aspect-ratio: 4 / 3; background: var(--h-char-2); box-shadow: var(--shadow-pop);
}
.story-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.story-media-edge {
  position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(20, 12, 6, 0.1), inset 0 -120px 110px -90px rgba(20, 12, 6, 0.5);
}
.story-list { list-style: none; margin: clamp(20px, 3vw, 30px) 0 0; padding: 0; display: grid; gap: 26px; }
.story-item { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px; align-items: start; padding-top: 26px; border-top: 1px solid var(--line); }
.story-item:first-child { padding-top: 0; border-top: 0; }
.story-num { font-size: 1rem; font-weight: 700; color: var(--h-gold-deep); direction: ltr; padding-top: 4px; }
.story-item-title { font-size: 1.3rem; margin: 0 0 8px; }
.story-item-body { color: var(--h-ink-soft); margin: 0; line-height: 1.85; }
.story-body > .link-arrow { margin-top: 26px; }
@media (min-width: 900px) {
  .story-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .story-media { aspect-ratio: 3 / 2; }
}

/* ── شريط الثقة (نصٌّ وحقائق — لا تقييمات ولا أرقام مُختلَقة) ────────────── */
.trust-band {
  margin-top: var(--h-gap); background: var(--h-ivory-warm);
  border-block: 1px solid var(--line); padding: clamp(46px, 7vw, 88px) 0;
}
.trust-inner { max-width: var(--container-w); margin-inline: auto; padding-inline: 16px; }
.trust-title { text-align: center; margin-bottom: clamp(26px, 4vw, 40px); }
.trust-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 28px; }
.trust-item { text-align: center; padding-inline: 6px; }
.trust-icon {
  display: inline-flex; align-items: center; justify-content: center; width: 64px; height: 64px;
  border-radius: 50%; color: var(--h-gold-deep); border: 1px solid var(--h-hair);
  background: var(--panel); margin-bottom: 14px; box-shadow: var(--shadow);
}
.trust-item-title { font-size: 1.16rem; margin: 0 0 6px; }
.trust-item-body { color: var(--h-ink-soft); margin: 0; line-height: 1.8; max-width: 34ch; margin-inline: auto; }
@media (min-width: 768px) { .trust-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 34px; } }

/* ── شريط الختام ───────────────────────────────────────────────────────── */
.closing-band {
  position: relative; overflow: hidden; background: var(--h-char); color: var(--h-on-dark);
  text-align: center; padding: clamp(64px, 10vw, 124px) 16px;
}
.closing-band::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(70% 62% at 50% 0%, rgba(214, 164, 72, 0.2), transparent 68%),
    linear-gradient(180deg, var(--h-char-2) 0%, var(--h-char) 60%, var(--h-char) 100%);
}
.closing-inner { position: relative; z-index: 3; max-width: 720px; margin-inline: auto; display: flex; flex-direction: column; align-items: center; }
.closing-inner .eyebrow { justify-content: center; }
.closing-title { font-size: clamp(1.9rem, 5vw, 3.2rem); line-height: 1.24; margin: 0 0 26px; }
.closing-actions { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.closing-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 26px; }
.pill-link {
  display: inline-flex; align-items: center; min-height: 48px; padding: 0 22px;
  border-radius: 999px; border: 1px solid rgba(251, 245, 235, 0.28); color: var(--h-on-dark-soft);
  text-decoration: none; font-weight: 600; transition: color var(--trans), border-color var(--trans);
}
.pill-link:hover { border-color: var(--h-gold); color: var(--h-gold-lit); }
@media (min-width: 640px) { .closing-actions { flex-direction: row; gap: 28px; } }

/* حلقة التركيز الزرقاء العامة دون 3:1 على الجوز — فوق المشاهد الداكنة وحدها تُبدَّل بالعاجية */
.hero :focus-visible, .bundle-band :focus-visible, .closing-band :focus-visible,
.bento-tile:focus-visible, .site-footer :focus-visible {
  outline-color: var(--h-on-dark, #FBF5EB);
}

/* ── احترام تقليل الحركة: يسكن كل شيء، ولا يبقى شيء مخفيًا ─────────────── */
@media (prefers-reduced-motion: reduce) {
  .hero-stage, .bundle-photo { transform: none !important; }
  .hero-photo, .hero-scroll::after { animation: none; }
  .hero-scroll { display: none; }
  .hero-panel > *, [data-reveal].is-in, [data-reveal].is-in .story-item,
  [data-reveal].is-in .bento-tile, [data-reveal].is-in .showcase-card, [data-reveal].is-in .trust-item {
    animation: none; opacity: 1; transform: none;
  }
  .js-reveal [data-reveal]:not(.is-in) { opacity: 1; }
  .bento-tile:hover, .btn-gold:hover:not(:disabled), .btn-primary:hover:not(:disabled) { transform: none; }
  .bento-tile:hover .bento-media img, .showcase-card:hover .showcase-media img { transform: none; }
}
/* ══════════════════════ نهاية كتلة الصفحة الرئيسية ══════════════════════ */

/* ── ظهور الأقسام عند بلوغها (main.js يضيف `js-reveal` ثم `is-in`) ───────── */
.js-reveal [data-reveal]:not(.is-in) { opacity: 0; transform: translateY(18px); }
[data-reveal].is-in { animation: rise 0.6s var(--h-ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* ── شبكة المنتجات وبطاقاتها ───────────────────────────────────────────── */
.product-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 24px; }
.product-card {
  display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; text-decoration: none; color: var(--ink);
  box-shadow: var(--shadow); transition: box-shadow var(--trans), transform var(--trans), border-color var(--trans);
}
.product-card:hover { box-shadow: var(--shadow-pop); transform: translateY(-3px); border-color: var(--accent); }
.product-card-img { aspect-ratio: 1 / 1; background: var(--panel-2); display: block; overflow: hidden; }
.product-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s var(--h-ease); }
.product-card:hover .product-card-img img { transform: scale(1.04); }
.img-placeholder { display: block; width: 100%; height: 100%; background: linear-gradient(135deg, var(--panel-2), var(--line)); }
.product-card-body { padding: 14px 16px 18px; display: flex; flex-direction: column; gap: 6px; }
.product-card-name { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; line-height: 1.45; }
.card-generic-note { font-size: 0.82rem; color: var(--ink-soft); line-height: 1.35; }
.product-card-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }

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

/* ── السعر والشارات ────────────────────────────────────────────────────── */
.price { font-weight: 700; color: var(--accent-deep); font-size: 1.05rem; }
.price-unpublished { color: var(--ink-soft); font-weight: 600; font-size: 0.95rem; }
.badge { display: inline-flex; align-items: center; padding: 4px 12px; border-radius: 999px; font-size: 0.82rem; font-weight: 700; }
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-out { background: var(--danger-bg); color: var(--danger); }
.badge-limited { background: var(--accent-soft); color: var(--accent-deep); }
.stale-badge { background: var(--accent-soft); color: var(--accent-deep); border-radius: var(--radius-sm); padding: 10px 16px; font-size: 0.9rem; margin-bottom: 16px; }

/* ── مسار التصفّح ──────────────────────────────────────────────────────── */
.breadcrumb { margin-block: 16px 6px; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0; font-size: 0.9rem; color: var(--ink-soft); }
.breadcrumb li:not(:last-child)::after { content: "‹"; margin-inline-start: 6px; color: var(--accent); }
.breadcrumb a { text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; color: var(--accent-deep); }

/* ── الحقول العامة (بحث ونماذج) ────────────────────────────────────────── */
.search-box input[type="search"] { width: 100%; min-height: 52px; padding: 0 18px; border-radius: 999px; border: 1.5px solid var(--control-border); font-size: 1.05rem; background: var(--panel); color: var(--ink); }
.checkbox-field { display: flex; align-items: center; gap: 8px; font-weight: 600; min-height: 48px; cursor: pointer; }
.results-count { color: var(--ink-soft); margin-block: 4px 0; font-weight: 600; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label { font-weight: 700; }
.field input, .field select, .field textarea {
  min-height: 48px; padding: 10px 14px; border: 1.5px solid var(--control-border); border-radius: var(--radius-sm);
  font-size: 1rem; font-family: inherit; background: var(--panel); color: var(--ink);
  transition: border-color var(--trans), box-shadow var(--trans);
}
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
/* (ز-ع4/د) `opacity: 1` إلزامي: فايرفوكس يطبّق `.54` من ورقة عميله */
input::placeholder, textarea::placeholder { color: var(--placeholder); opacity: 1; }
.optional-tag { color: var(--ink-soft); font-weight: 500; font-size: 0.85em; }
.field-error { color: var(--danger); font-weight: 600; font-size: 0.9rem; margin: 0; }
.form-error { color: var(--danger); background: var(--danger-bg); border-radius: var(--radius-sm); padding: 12px 16px; font-weight: 600; }
.form-success { color: var(--ok); background: var(--ok-bg); border-radius: var(--radius-sm); padding: 12px 16px; font-weight: 600; }
/* (ن-ج2) جملة تغيّر السعر التي يبنيها `app.js` — تباينها مقيس في `layoutInvariants.test.ts` */
.price-note { color: var(--danger); font-weight: 700; font-size: 0.9rem; margin-block: 6px 0; }

/* ── صفحة المنتج/الطقم ─────────────────────────────────────────────────── */
.product-detail { display: grid; gap: 28px; margin-top: 8px; }
.product-gallery-main { aspect-ratio: 1 / 1; background: var(--panel-2); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow), inset 0 0 0 1px var(--line); }
.product-gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.product-thumbs { display: flex; gap: 10px; margin-top: 12px; overflow-x: auto; padding-bottom: 4px; }
.product-thumb { flex: 0 0 76px; width: 76px; height: 76px; border-radius: var(--radius-sm); overflow: hidden; border: 2px solid var(--line); padding: 0; cursor: pointer; background: var(--panel-2); transition: border-color var(--trans); }
.product-thumb.is-active, .product-thumb:hover { border-color: var(--accent); }
.product-thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-info .price { font-size: 1.5rem; }
.product-info .price, .product-info .badge { margin-inline-end: 8px; }
.product-info > .price, .product-info > .badge { display: inline-flex; margin-bottom: 8px; }
.product-attr { margin: 10px 0; }
.product-sku { color: var(--ink-soft); font-size: 0.9rem; }
.product-description { border-top: 1px solid var(--line); margin-top: 18px; }
.product-description h2 { font-size: 1.1rem; margin-top: 18px; }
/* (0B §7.1) العيّنة **شريحةٌ باسمها الظاهر** لا دائرةٌ صمّاء: صورةٌ 40px ثم الاسم ثم السعر ثم الحالة */
.variant-swatches { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0; }
.swatch {
  display: inline-flex; align-items: center; gap: 8px; min-height: 48px;
  padding-inline: 6px 14px; border-radius: 999px; border: 2px solid var(--line);
  background: var(--panel); text-decoration: none; color: var(--ink);
  transition: border-color var(--trans), box-shadow var(--trans);
}
.swatch:hover { border-color: var(--accent); }
.swatch img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: none; }
.swatch.is-active, .swatch[aria-current] { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
/* الشفافية تخفت ولا تُعمي: النصّ داخل الشريحة يبقى مقروءًا */
.swatch.is-out { opacity: 0.62; }
.swatch:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.swatch-name { font-weight: 600; font-size: 0.95rem; }
.swatch-price { color: var(--ink-soft); font-size: 0.85rem; }
.swatch .badge { font-size: 0.74rem; padding: 2px 8px; }

/* ── صفحة الموديل `/m/:familyCode` ─────────────────────────────────────── */
.model-group { margin-block: 16px; }
.model-group-title { font-size: 1.05rem; margin-block: 0 8px; font-family: var(--font); }
.model-selected-color { margin-block: 12px; }
.model-choose-note {
  color: var(--ink-soft); background: var(--panel-2); border-radius: var(--radius-sm);
  padding: 12px 16px; margin-block: 14px 0; font-weight: 700;
}
.model-image-note { color: var(--ink-soft); font-size: 0.9rem; margin-block: 8px 0; }
.model-all-colors { margin-block: 10px; }
.model-all-colors a { text-decoration: underline; font-weight: 600; }
.price-range { font-size: 1rem; }
.img-generic-note, .img-none-note { color: var(--ink-soft); font-size: 0.9rem; margin-block: 10px 0; }
.product-actions {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 20px;
  padding: 16px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.qty-field { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.qty-field input { width: 76px; min-height: 48px; text-align: center; border: 1.5px solid var(--control-border); border-radius: var(--radius-sm); font-size: 1rem; background: var(--panel); color: var(--ink); }
.added-to-cart-note { color: var(--ok); font-weight: 700; margin-top: 10px; }
.related-section { margin-top: 56px; }

.bundle-contents { margin-top: 36px; }
.bundle-items { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.bundle-item { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 16px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.bundle-item-name { font-weight: 700; flex: 1 1 auto; }
.bundle-total { text-align: end; font-size: 1.15rem; margin-top: 14px; }

@media (min-width: 900px) {
  .product-detail { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; gap: 40px; }
  .product-gallery { position: sticky; top: calc(var(--header-h) + 16px); }
}

/* ── الخطوات (صمّم غرفتك) ──────────────────────────────────────────────── */
.steps { display: grid; gap: 20px; margin-block: 28px; grid-template-columns: minmax(0, 1fr); }
.step { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; text-align: center; box-shadow: var(--shadow); }
.step-icon { display: inline-flex; color: var(--accent-deep); margin-bottom: 10px; }
.room-builder-notice { background: var(--accent-soft); border-radius: var(--radius-lg); padding: 28px 24px; text-align: center; }
.room-builder-form { max-width: 380px; margin: 18px auto 0; text-align: start; }
@media (min-width: 768px) { .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ── السلة ─────────────────────────────────────────────────────────────── */
.cart-asof { color: var(--ink-soft); font-size: 0.9rem; }
.cart-empty { text-align: center; padding: 48px 16px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.cart-line { display: flex; gap: 14px; align-items: center; padding: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 12px; box-shadow: var(--shadow); }
.cart-line img { width: 76px; height: 76px; object-fit: cover; border-radius: var(--radius-sm); flex-shrink: 0; background: var(--panel-2); }
.cart-line-body { flex: 1; min-width: 0; }
.cart-line-name { font-weight: 700; }
.cart-line-actions { display: flex; align-items: center; gap: 10px; margin-top: 6px; flex-wrap: wrap; }
.cart-line-actions input[type="number"] { width: 64px; min-height: 40px; text-align: center; border: 1.5px solid var(--control-border); border-radius: var(--radius-sm); background: var(--panel); color: var(--ink); }
.cart-summary { background: var(--panel-2); border-radius: var(--radius); padding: 18px; margin-top: 20px; display: flex; justify-content: space-between; align-items: center; font-size: 1.15rem; font-weight: 700; }

/* ── إتمام الطلب ───────────────────────────────────────────────────────── */
.checkout-grid { margin-top: 12px; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin: 0 0 20px; background: var(--panel); box-shadow: var(--shadow); }
legend { font-weight: 700; padding: 0 8px; font-size: 1.05rem; font-family: var(--font-display); }
.radio-group { display: flex; gap: 18px; flex-wrap: wrap; margin-bottom: 10px; }
.radio-option { display: flex; align-items: center; gap: 8px; font-weight: 600; min-height: 48px; cursor: pointer; }
.radio-option input { width: 22px; height: 22px; cursor: pointer; accent-color: var(--accent-deep); }
.delivery-fee-note { color: var(--ink-soft); font-size: 0.9rem; }
.payment-field p { background: var(--panel-2); border-radius: var(--radius-sm); padding: 12px 16px; margin: 0; }
.checkout-summary:not(:empty) { background: var(--panel-2); border-radius: var(--radius); padding: 16px; margin: 16px 0; }
/* (P3-5) البضاعة وأجور التوصيل والمجموع الكلي — صفحة الإتمام وصفحة الطلب */
.money-totals { background: var(--panel-2); border-radius: var(--radius); padding: 12px 16px; margin: 16px 0; text-align: start; }
.money-totals dl { margin: 0; }
.money-totals dl > div { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; }
.money-totals dt { color: var(--ink-soft); }
.money-totals dd { margin: 0; font-variant-numeric: tabular-nums; white-space: nowrap; }
.money-totals .money-totals-grand { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 10px; font-weight: 700; }
.money-totals .money-totals-grand dt { color: var(--ink); }
.money-totals-hint { color: var(--ink-soft); font-size: 0.9rem; margin: 4px 0 0; }
.order-status-card .money-totals { max-width: 420px; margin: 16px auto; }

/* ── حالة الطلب ────────────────────────────────────────────────────────── */
.order-status-card { text-align: center; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 44px 20px; margin-top: 12px; box-shadow: var(--shadow); }
.order-reference, .order-number { font-size: 1.3rem; font-weight: 700; direction: ltr; unicode-bidi: embed; }
.cod-notice { color: var(--ink-soft); margin: 14px 0 24px; }
.order-keep-link { color: var(--ink-soft); font-size: 0.95rem; margin: 0 0 22px; }
.order-status-card .btn { margin: 6px; }

/* ── المساعد ──────────────────────────────────────────────────────────── */
.assistant-intro { color: var(--ink-soft); }
.assistant-thread { min-height: 320px; max-height: 55vh; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; padding: 16px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.assistant-placeholder { color: var(--ink-soft); text-align: center; }
.assistant-msg { max-width: 80%; padding: 12px 16px; border-radius: var(--radius); font-size: 1.05rem; line-height: 1.7; white-space: pre-line; overflow-wrap: anywhere; }
.assistant-msg-user { align-self: flex-end; background: var(--accent-soft); }
.assistant-msg-bot { align-self: flex-start; background: var(--panel-2); border: 1px solid var(--line); }
/* (L1 · قرار المالك 6) علامةُ الفقاعة قيد الإرسال — نصٌّ ساكن لا حركة */
.assistant-msg-pending { display: block; margin-block-start: 4px; font-size: 0.82rem; color: var(--ink-soft); }
/* (L1 · قرار المالك 3) بطاقاتُ الردّ — `auto-fill` بحدٍّ أدنى 128px: عمودان داخل 375 */
.assistant-cards { align-self: flex-start; max-width: 80%; display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 10px; list-style: none; margin: 0; padding: 0; }
.assistant-card { display: flex; }
.assistant-card-link { display: flex; flex-direction: column; gap: 4px; width: 100%; padding: 8px; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius); color: inherit; text-decoration: none; }
a.assistant-card-link:hover { border-color: var(--accent); }
.assistant-card img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: calc(var(--radius) / 2); background: var(--panel); }
.assistant-card-name { font-weight: 700; font-size: 0.92rem; line-height: 1.5; }
.assistant-card .price { font-size: 0.95rem; }
.assistant-card-note { font-size: 0.82rem; color: var(--ink-soft); }
.assistant-status { color: var(--ink-soft); font-style: italic; margin-block: 8px; }
.assistant-limit-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 24px; margin: 4px 0 0; }
.assistant-limit-links a { color: var(--accent-deep); font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }
.assistant-composer { display: flex; gap: 10px; margin-top: 16px; align-items: flex-end; }
.assistant-composer textarea { flex: 1; min-height: 56px; padding: 12px 16px; border-radius: var(--radius); border: 1.5px solid var(--control-border); font-size: 1.05rem; font-family: inherit; resize: vertical; background: var(--panel); color: var(--ink); }

/* ── صفحات الخطأ ───────────────────────────────────────────────────────── */
.error-page { text-align: center; padding: 60px 16px; }
.error-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 20px; }

/* ── شاشات كبيرة ───────────────────────────────────────────────────────── */
@media (min-width: 1024px) {
  .checkout-grid { max-width: 760px; margin-inline: auto; }
}
@media (min-width: 1440px) {
  .container, main > * { padding-inline: 0; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
  .js-reveal [data-reveal]:not(.is-in) { opacity: 1; transform: none; }
}

/* ══════════════════════════════════════════════════════════════════════════
   (W3 · الموجة O) التصفّح: عمودُ الوجوه · الرقائق · الأقسام · بلاطات «تسوّق حسب»
   ══════════════════════════════════════════════════════════════════════════
   موضعُ العمود **باليسار** في RTL كما طلب المالك: الطفلُ الثاني في الشبكة، بلا
   `float` ولا خاصيةٍ اتجاهية. (الموجة O) الفاصلُ بينه وبين النتائج أوسع وثابت
   (`clamp(48px, 5vw, 88px)`) وهو لاصقٌ عند التمرير؛ ودون 1024 يصير **درجًا**
   فوق النتائج (`order: -1`) يطويه `main.js` فلا يزاحم الشبكة. */

.shop-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.shop-main { min-width: 0; }

/* ── شريط الأدوات: العدّاد والترتيب ─────────────────────────────────────── */
.shop-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin-block: 8px 12px;
}
.shop-sort { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.shop-sort label { font-weight: 700; }
.shop-sort select {
  min-height: 48px; padding: 0 14px; border-radius: 999px;
  border: 1.5px solid var(--control-border); background: var(--panel);
  color: var(--ink); font-family: inherit; font-size: 1rem; cursor: pointer;
}

/* ── رقائق الفلاتر الفعّالة ──────────────────────────────────────────────── */
.filter-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-block: 4px 16px; }
.filter-chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px;
  padding: 0 14px; border-radius: 999px; text-decoration: none;
  border: 1.5px solid var(--control-border); background: var(--panel);
  color: var(--ink); font-weight: 600; font-size: 0.92rem;
  transition: border-color var(--trans), background var(--trans);
}
.filter-chip:hover { border-color: var(--accent); background: var(--accent-soft); }
.filter-chip-x { font-weight: 700; color: var(--ink-soft); }
.filter-chip-clear { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-deep); }

/* ── عمود الوجوه: درجٌ على الضيّق، لوحٌ لاصق على الواسع ────────────────── */
.shop-facets { order: -1; margin-block: 8px 4px; }
.shop-facets > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px;
  min-height: 52px; padding: 0 20px; border-radius: 999px; font-weight: 700; font-size: 1.02rem;
  border: 1.5px solid var(--control-border); background: var(--panel); color: var(--ink);
  transition: border-color var(--trans), background var(--trans);
}
.shop-facets > summary::-webkit-details-marker { display: none; }
.shop-facets > summary:hover { cursor: pointer; border-color: var(--accent); background: var(--accent-soft); }
.shop-facets[open] {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 12px 16px 16px; box-shadow: var(--shadow);
}
.shop-facets[open] > summary { cursor: pointer; border-color: var(--accent); background: var(--accent-soft); margin-bottom: 14px; }
.facet-form { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.facet-form .search-box input[type="search"] { min-height: 48px; }
.facet { border-top: 1px solid var(--line); padding-block: 10px; }
.facet > summary { cursor: pointer; font-weight: 700; min-height: 44px; display: flex; align-items: center; }
.facet-values { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.facet-value {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  min-height: 44px; padding: 0 10px; border-radius: var(--radius-sm);
  text-decoration: none; color: var(--ink); border: 1.5px solid transparent;
  transition: background var(--trans), border-color var(--trans);
}
.facet-value:hover { background: var(--panel-2); }
.facet-value.is-on { border-color: var(--accent); background: var(--accent-soft); font-weight: 700; }
.facet-count { color: var(--ink-soft); font-size: 0.88rem; }
.facet-more > summary { cursor: pointer; color: var(--accent-deep); font-weight: 600; min-height: 40px; display: flex; align-items: center; padding-inline-start: 10px; }
.facet-clear { margin: 14px 0 0; }

/* ── الأقسام بالتصنيف (العرض الافتراضي) ─────────────────────────────────── */
.shop-groups { display: flex; flex-direction: column; gap: 44px; }
.shop-group-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.shop-group-title { font-size: 1.35rem; margin: 0; }
.shop-group-count { color: var(--ink-soft); font-size: 0.95rem; }
.shop-group-head .link-arrow { margin-inline-start: auto; border-bottom: 0; }
.shop-flat-link { margin-block: 32px 0; text-align: center; }

/* ── بلاطات «تسوّق حسب» على صفحة التصنيف ────────────────────────────────── */
.shopby { margin-block: 20px 28px; }
.shopby-grid { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.shopby-tile {
  display: flex; flex-direction: column; gap: 4px; min-height: 76px;
  justify-content: center; padding: 14px 16px; border-radius: var(--radius);
  border: 1.5px solid var(--control-border); background: var(--panel);
  color: var(--ink); text-decoration: none; font-weight: 700;
  transition: border-color var(--trans), background var(--trans);
}
.shopby-tile:hover { border-color: var(--accent); background: var(--accent-soft); }
.shopby-count { color: var(--ink-soft); font-weight: 600; font-size: 0.9rem; }

/* ── ألوان الموديل على البطاقة ──────────────────────────────────────────── */
.card-colors { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.card-color {
  font-size: 0.78rem; font-weight: 600; color: var(--ink-soft);
  border: 1px solid var(--line); border-radius: 999px; padding: 2px 9px;
}
.card-color-more { color: var(--accent-deep); border-color: var(--accent); }

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

/* ── الشاشات الواسعة: عمودُ الوجوه لاصقٌ **على اليسار** بفاصلٍ أوسع ثابت ─── */
@media (min-width: 1024px) {
  .shop-layout { grid-template-columns: minmax(0, 1fr) 280px; column-gap: clamp(48px, 5vw, 88px); align-items: start; }
  .shop-facets { order: 0; position: sticky; top: calc(var(--header-h) + 16px); margin-block: 0; max-height: calc(100vh - var(--header-h) - 32px); overflow-y: auto; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 20px; box-shadow: var(--shadow); }
  .shop-facets[open] { padding: 20px; }
  .shop-facets > summary { display: none; }
  .shop-main .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .shopby-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 1280px) {
  .shop-main .product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ── تقليل الحركة: لا انتقال في عناصر التصفّح ───────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .filter-chip, .facet-value, .shopby-tile, .cat-chip, .product-card { transition: none; }
  .product-card:hover, .product-card:hover .product-card-img img { transform: none; }
}
