/* =========================================
   ONE STEP — style.css
   Colors: White #ffffff (60%) | Navy #05173e (30%) | Green #78c767 (10%)
========================================= */

/* ===== THMANYAH FONT (Arabic) ===== */
@font-face { font-family: "Thmanyah"; src: url("https://framerusercontent.com/assets/Lh8puxCFq405qBv7dKpg9NsHZNk.woff2") format("woff2"); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: "Thmanyah"; src: url("https://framerusercontent.com/assets/x6EBzvXf1Fi35XhsRoHxePDVo.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Thmanyah"; src: url("https://framerusercontent.com/assets/oE98mOPE28KTzUeptOLRIaqW1I.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Thmanyah"; src: url("https://framerusercontent.com/assets/JUv6rms2ye2kYL3UI3O9YyExQcQ.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Thmanyah"; src: url("https://framerusercontent.com/assets/ulQLGTktcl2Qq4AmD6RuVgELZKg.woff2") format("woff2"); font-weight: 900; font-style: normal; font-display: swap; }

:root {
  --navy:   #05173e;
  --navy-2: #0a2350;
  --green:  #78c767;
  --green-d:#5fae4f;
  /* ⚠️ قرار مالكٍ صريح (2026-08-24، جولة الاستعادة): يعود **النصّ الأبيض**
     فوق كل سطحٍ أخضر مالئ — وهو الأصل المنشور في جدول رموز DESIGN.md
     (primary button ⇒ backgroundColor: fresh-green، textColor: white).
     تاريخ القرار بالكامل، كي لا تُعاد الدورة مرّةً ثالثة:
       ١) الأصل            : خلفية ‎--green‎ + نصّ أبيض   (الهوية المعتمَدة)
       ٢) «Visual System Calibration V1» : قُلب النصّ إلى الكحليّ لأن الأبيض
          فوق ‎--green‎ يقيس ‎2.07:1‎ ويسقط في AA.
       ٣) جولة مالكٍ سابقة : جُرِّب أخضر أعمق (‎--green-cta‎) مع نصّ أبيض ثم
          رُفض — الأخضر الفاتح نفسه جزءٌ من الهوية ولا يُغمَّق.
       ٤) هذه الجولة       : المالك يطلب استعادة الأبيض على الأخضر الفاتح.
     القياس لم يتغيّر ولا يُدّعى خلافه: أبيض على ‎#78c767‎ = ‎2.07:1‎، والكحليّ
     عليه = ‎8.48:1‎. الاختيار هنا **هوية بصرية مُقدَّمة على عتبة AA** بقرار
     مالكٍ موثَّق، لا سهوٌ ولا قياسٌ خاطئ. مقابلُه المخفِّف قائم: كل نصٍّ أخضر
     المكوّن كبير (‎≥15px‎ وزن ‎500+‎) وتحته حدٌّ/ظلٌّ يفصله عن الخلفية.
     ⚠️ ‎--on-green‎ هو الرمز الوحيد لأي نصٍّ أو أيقونة فوق أخضر مالئ في كل
     ملفات CSS. تغييرُ سطرٍ واحد هنا يقلب النظام كلّه — فلا تكتب ‎#fff‎ ولا
     ‎var(--navy)‎ حرفياً في أي موضعٍ أخضر جديد.
     ‎--green-cta/--green-cta-d‎ يبقيان معرَّفين (غير مُستهلَكين): السطح الأعمق
     المحسوب جاهزٌ بلا إعادة اشتقاق إن عاد قرارٌ لاحق يطلب اجتياز AA. */
  --green-cta:   #367029; /* أبيض فوقها = 5.99:1 — S12: شريط تعديل الطلب الأخضر (css/orders.css، تصميم المالك) */
  --green-cta-d: #2c5d22; /* حالة hover الأعمق — غير مُستعمَلة حالياً */
  --on-green: #ffffff;
  --white:  #ffffff;
  --gray:   #f5f7fa;
  --gray-2: #eef1f6;
  --text:   #1a2238;
  --muted:  #6b7280;
  --border: #e6e9f0;
  --shadow: 0 4px 24px rgba(5,23,62,0.08);
  --radius: 16px;
  /* ===== مرحلة صورة المنتج =====
     الرمز الوحيد لخلفية **كل** سطحٍ يحمل تصويراً حقيقياً للمنتج: البطاقة،
     نتيجة البحث، المعاينة السريعة، ومعرض صفحة المنتج.
     ⚠️ ليس تفضيل ألوان: تصوير المنتجات المعتمَد خلفيته بيضاء نقية، ومرحلةٌ
     رمادية (‎--gray‎) كانت تُظهر **مستطيلاً أبيض داخل مستطيل رمادي** فيبدو
     المنتج ملصوقاً لا مصوَّراً. توحيدها هنا يجعل المصدر والمرحلة سطحاً أبيض
     واحداً متّصلاً.
     ولماذا رمزٌ مستقلّ لا ‎--white‎: ‎--gray‎ يخدم ثلاثين موضعاً ليس فيها صورة
     منتج (أزرار، شرائح، حالات مرور المؤشّر)، وتبييضه كان سيُسطّح الواجهة
     كلها. وهذا الرمز يحمل معناه صراحةً فلا يُخلط بغيره لاحقاً.
     ⚠️ الخلفية وحدها. الحدود، والاستدارة، والظلال، والأبعاد لا يمسّها هذا
     الرمز إطلاقاً — الإطار المستدير القائم يبقى كما هو حرفياً. */
  --photo-stage: #ffffff;
  /* ⚠️ لا عامّ (sans-serif) داخل الرمزين — العامّ في **آخر** كل مكدّس فقط.
     سبب رياضيّ لا تفضيل تنسيق: العامّ يُحلّ دائماً إلى خطّ نظامٍ موجود، فأي
     خطّ يأتي بعده لا يُبلَغ أبداً. حين كان الرمز ‎'Poppins', sans-serif‎ صار
     مكدّس body حرفياً: ‎Poppins, sans-serif, Thmanyah, sans-serif‎ — وThmanyah
     خلف العامّ. على macOS ينجو الأمر مصادفةً (العامّ هناك بلا عربية فيسقط
     الحرف العربي إلى Thmanyah)، أما حيث يغطّي العامُّ العربية (Arial على
     ويندوز، Noto/Droid على أندرويد) فتُرسم كل العربية بخطّ النظام وThmanyah
     مُحمَّل ولا يُستعمل. القياس: عرض «ضمان جودة على جميع المنتجات» عند
     13px/600 = 172.55px بـThmanyah مقابل 135.19px حين يفوز العامّ — أي مقاييس
     كلمة/مسافة مختلفة كلياً، وهو ما يظهر للعين تباعداً غير متّسق بين
     الكلمات. الرمزان الآن اسمُ خطٍّ واحد، والعامّ يُضاف في مواقع الاستعمال. */
  --font-ar: 'Thmanyah';
  --font-en: 'Poppins';
  /* ===== VISUAL SYSTEM CALIBRATION V1 — weight + spacing tokens =====
     Only the weights genuinely loaded and genuinely used by the selectors
     below (400/500/700 — 800/900 stay as pre-existing literal values on
     hero/price displays, untouched by this pass). Spacing values are not
     new numbers: they are DESIGN.md's already-documented spacing scale
     (xs/sm/md/lg/xl), promoted here to real custom properties so future
     spacing work extends one mechanism instead of re-typing raw px. */
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-bold: 700;
  --space-xs: 8px;
  --space-sm: 14px;
  --space-md: 18px;
  --space-lg: 24px;
  --space-xl: 28px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-en), var(--font-ar), sans-serif;
  background: var(--white);
  color: var(--text);
  direction: rtl;
  line-height: 1.6;
}

[lang="ar"], [dir="rtl"] {
  font-family: var(--font-ar), var(--font-en), sans-serif;
}

a { text-decoration: none; color: inherit; }


.anim-item {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.anim-item.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== أساس اللفّة السلسة — المُحرِّك المشترك للشريطين =====
   ⚠️ «مشترك» هنا تعني البدائية الرياضية وحدها: إطاراتٌ تُزيح المسار بمقدار
   ‎--marquee-shift‎ بالضبط (عرض تتابُع واحد كامل). كل ما هو **سلوكيّ** يبقى
   مستقلاً لكل شريط: السرعة، المسافات، التوقّف بالتركيز، وقواعد تقليل الحركة.
   توحيد الإطارات مقصود: نسختان متطابقتان بأسمين مختلفين كانتا تُغريان بتعديل
   إحداهما وحدها فينحرف الشريطان.

   ── لماذا الإزاحة متغيّرٌ لا ‎-50%‎ ──────────────────────────────────────
   ‎-50%‎ يساوي «تتابُعاً واحداً» فقط حين يحمل المسار نسختين بالضبط. وعدد
   النسخ لا يجوز أن يكون ثابتاً: التغطية بعد الإزاحة تحتاج ‎(n−1)·S > V‎،
   و‎V‎ عرضُ نافذةٍ يتغيّر بين ٣٩٠px و١٩٢٠px. js/marquee.js يقيس ‎S‎ مرّة
   ويحسب ‎n‎ ويكتب ‎--marquee-shift‎؛ وتبقى الحركة CSS خالصة بعدها.
   القيمة الافتراضية ‎50%‎ هي سلوك «نسختان» — احتياطٌ سليم بلا JS.

   ── الاتجاه ─────────────────────────────────────────────────────────────
   ‎translateX‎ لا يتأثر بـ‎direction‎ إطلاقاً: من ‎−S‎ إلى ‎0‎ حركةٌ نحو
   اليمين فيزيائياً في RTL وLTR معاً ⇒ دخولٌ من اليسار وخروجٌ من اليمين.
   أما **إرساء** المسار فيتأثر: صندوقٌ أعرض من حاويته يُثبَّت في RTL من حافته
   اليمنى، فتنكسر اللفّة (فراغٌ بعرض ‎S‎ يميناً عند بداية كل دورة — وهو عطب
   «الانبعاث من المنتصف» المُبلَّغ عنه). لذلك تُثبَّت **نافذة** كل شريط على
   ‎direction: ltr‎ ويعود محتوى التتابُع إلى ‎rtl‎. */
@keyframes marquee-ltr {
  from { transform: translate3d(calc(-1 * var(--marquee-shift, 50%)), 0, 0); }
  to   { transform: translate3d(0, 0, 0); }
}

/* ===== شريط الإعلانات المتحرّك (أعلى الرئيسية) =====
   ⚠️ هذا ليس شريط الشركات (.brand-carousel) — الشريطان مستقلّان في السرعة
   والمسافات وسلوك التوقّف، ولا يشتركان إلا في إطارات ‎marquee-ltr‎ أعلاه.

   ⚠️ لا gap على المسار ولا على التتابُع إطلاقاً — شرط رياضيّ لا تفضيل تنسيق:
   مع gap يصير عرض المسار ‎n·S + (n−1)·g‎ فلا تعود الإزاحة ‎S‎ تُطابق نسخةً
   على أختها، فتظهر إزاحة فجوة عند كل لفّة. المسافات تأتي من هوامش العناصر
   داخل التتابُع، فتتساوى المسافة عند حدّ اللفّة مع أي مسافة أخرى
   (٩px + ٩px = ١٨px) — ولا نقطة فاصلة مكرّرة ولا مسافة شاذّة. */
.top-banner {
  background: var(--navy);
  color: #fff;
  white-space: nowrap;
  min-height: 38px;
  display: flex;
  align-items: center;
}
/* نافذة القصّ منفصلة عن الشريط: الشريط يمتصّ حشوة النوتش (iOS) بينما تبقى
   النافذة هي وحدها ما يقصّ المسار — فلا يُقصّ ارتفاع الحشوة معه.
   ‎direction: ltr‎ إرساءٌ فيزيائيّ لا لغويّ (انظر ملاحظة الاتجاه أعلاه). */
.banner-viewport {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  direction: ltr;
}
/* ⚠️ مكدّس عربيّ أولاً هنا وحده — تصحيح مسافة لا تغيير خطّ: رسائل الشريط
   عربية بحتة، لكن مكدّس body لاتينيٌّ أولاً فيأتي **محرف المسافة** من
   Poppins بينما تأتي الحروف من Thmanyah. المسافة إذن مقاسٌ لاتينيّ غريب عن
   الحروف المجاورة (0.238em مقابل 0.249em الأصلية)، وهذا ما يجعل حدود الكلمات
   تُقرأ متفاوتة: تبدو مقبولة بعد حروفٍ لها كأسٌ يسارية (ن ة ى ع) كما في
   «ضمان جودة على جميع المنتجات»، وضيّقة بعد الحروف القائمة (ا ل ط ت أ) كما
   في «واستقبل الانتعاش» و«وأهدأ وي». تثبيت المسافة على الخطّ العربي نفسه
   يجعل كل العبارات بمقاسٍ واحد هو مقاس العبارة المرجعية. لا حجم ولا وزن ولا
   سرعة ولا اتجاه ولا بنية لفّة تتغيّر. */
.banner-track {
  display: flex;
  width: max-content;
  align-items: center;
  font-family: var(--font-ar), var(--font-en), sans-serif;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  will-change: transform;
  transform: translate3d(calc(-1 * var(--marquee-shift, 50%)), 0, 0);
  /* ⚠️ ‎26s‎ ليست رقماً سحرياً بل **الاحتياط**: هي مدّة الشريط اليوم بالضبط،
     وتبقى سارية ما لم يكتب محرّك اللفّة ‎--marquee-duration‎ (وهو لا يكتبها إلا
     حين تُضبط سرعة في «إعدادات الموقع»). فموقعٌ بلا مستند إعدادات يتحرّك
     بنفس المدّة السابقة حرفياً — توافقٌ رجعيّ بالمطابقة لا بالتقريب.
     القيمة تُشتقّ من السرعة وعرض التتابُع في js/marquee.js — ولا تُحسب هنا. */
  animation: marquee-ltr var(--marquee-duration, 26s) linear infinite;
}
/* شريطٌ أطفأه المالك من «إعدادات الموقع» (أو أخلاه من كل عبارة): يُزال من
   التدفّق كلياً لا يُخفى بصرياً — بقاؤه بارتفاعٍ فارغ يترك شريطاً كحلياً
   بلا محتوى أعلى الصفحة، وهو أظهر من غيابه. */
.top-banner[hidden] { display: none; }
.banner-seq { display: flex; align-items: center; direction: rtl; }
/* رابط داخل عبارة الشريط: يبقى بنفس مقاس النصّ ولونه — العبارة سطرٌ واحد
   متحرّك، وتمييز الرابط بلون أو تسطير دائم يكسر انتظام الشريط. التسطير عند
   التحويم/التركيز يبقى (وهو ما يحتاجه المستخدم فعلاً). */
.banner-seq a { color: inherit; text-decoration: none; }
.banner-seq a:hover, .banner-seq a:focus-visible { text-decoration: underline; }
.banner-seq > span { margin-inline: 9px; }
.banner-track .dot { color: var(--green); }
/* تقليل الحركة: لا تشغيل تلقائي إطلاقاً — الرسائل تلتفّ في أسطر مقروءة،
   والنسخ المكرَّرة تختفي كي لا تتكرّر أمام من أوقف الحركة (وmarquee.js لا
   يولّد نسخاً أصلاً في هذه الحالة — القاعدة هنا تغطّي نسخة الترميز الثابتة). */
@media (prefers-reduced-motion: reduce) {
  .top-banner { white-space: normal; padding-block: 7px; }
  .banner-viewport { overflow: visible; direction: rtl; }
  .banner-track {
    animation: none;
    transform: none;
    width: auto;
    flex-wrap: wrap;
    justify-content: center;
  }
  .banner-track > [aria-hidden="true"] { display: none; }
  .banner-seq { flex-wrap: wrap; justify-content: center; }
}

.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.3s ease;
}
.navbar.scrolled { box-shadow: 0 4px 30px rgba(5,23,62,0.12); }

.nav-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 12px 28px;
  display: flex;
  align-items: center;
  gap: 24px;
}

/* ===== LOGO (هوية الشركة الأم — مروج السلام) =====
   العمل الأصلي شعارٌ عَرْضيّ شفّاف بنسبة ‎768×560‎ (‎≈1.371:1‎): شارة MS فوق
   تلال، ثم الاسم اللاتيني، ثم العربي. الارتفاع وحده مقيَّد و width:auto
   إلزاميّ: وسمتا width/height على الوسم تحجزان النسبة الصحيحة قبل التحميل
   فلا تقع قفزة تخطيط، لكنهما تُقرآن أيضاً تلميحَ عرضٍ (٧٦٨px) لولا
   width:auto — فيُمطّ الشعار أفقياً. ارتفاع الهيدر لم يتغيّر (٤٨px كما كان).
   ⚠️ خلفية الهيدر بيضاء فلا يحتاج الشعار لوحةً هنا؛ الأسطح الداكنة (التذييل،
   الشريط الجانبي للوحة) تُعالَج عند قاعدتيهما. */
.logo { display: flex; align-items: center; flex-shrink: 0; }
.logo-img {
  height: 48px;
  width: auto;
  display: block;
  object-fit: contain;
  transition: transform 0.3s ease;
}
.logo:hover .logo-img { transform: scale(1.05); }

/* ===== SEARCH BOX & LIVE DROPDOWN ===== */
.search-wrapper {
  flex: 1;
  position: relative;
}
.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--gray);
  border: 1.5px solid var(--border);
  border-radius: 30px;
  padding: 10px 18px;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.search-box:focus-within {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(120,199,103,0.15);
}
.search-ico { font-size: 15px; opacity: 0.6; flex-shrink: 0; }
.search-box input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
}
.search-clear {
  border: none;
  background: none;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  color: var(--muted);
  display: flex;
  align-items: center;
}
.search-clear.active {
  opacity: 1;
  pointer-events: auto;
}
.search-clear:hover { color: var(--navy); }

/* Live Search Dropdown */
.search-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(5,23,62,0.14);
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-8px);
  transition: max-height 0.35s ease, opacity 0.3s ease, transform 0.3s ease;
  z-index: 150;
}
.search-dropdown.open {
  max-height: 380px;
  opacity: 1;
  transform: translateY(0);
  overflow-y: auto;
}
.search-results {
  padding: 8px;
}
.search-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
}
.search-result-item:hover {
  background: var(--gray);
  transform: translateX(-4px);
}
.search-result-icon {
  width: 42px;
  height: 42px;
  background: var(--photo-stage);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.search-result-info { flex: 1; min-width: 0; }
.search-result-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.search-result-cat {
  font-size: 11px;
  color: var(--muted);
}
.search-result-price {
  font-size: 13px;
  font-weight: 700;
  color: var(--green-d);
  flex-shrink: 0;
}
.search-result-add {
  background: var(--navy);
  color: #fff;
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.15s;
  flex-shrink: 0;
}
.search-result-add:hover {
  background: var(--green);
  transform: scale(1.1);
}

.search-no-results {
  text-align: center;
  padding: 32px 20px;
  color: var(--muted);
}
.search-no-results svg { margin-bottom: 10px; opacity: 0.5; }
.search-no-results p {
  font-size: 16px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 4px;
}
.search-no-results span { font-size: 13px; }

/* ===== NAV RIGHT ===== */
.nav-right { display: flex; align-items: center; gap: var(--space-xs); flex-shrink: 0; }
/* M25 · CLS — js/nav-menu.js (mountToggleButton) appends the menu button #menuToggle, a 42×42 .nav-icon, to this row only
   after the scripts run. At phone width that one extra icon wrapped the row under the logo AFTER the first paint and the
   whole header grew by 50 px (real Chrome, 412 px: layout shift 0.07). Hold the button's exact box until the real one
   exists; the placeholder is gone the moment it mounts. Browsers without :has() skip the rule (today's behaviour). */
#navbar .nav-right:not(:has(> #menuToggle))::after { content: ''; flex: 0 0 42px; width: 42px; height: 42px; }
.nav-icon {
  position: relative;
  width: 42px;
  height: 42px;
  border: none;
  background: transparent;
  border-radius: 12px;
  font-size: 19px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--navy);
  transition: background 0.25s ease, transform 0.2s ease, color 0.25s ease;
}
.nav-icon:hover {
  background: var(--gray-2);
  transform: translateY(-2px);
  color: var(--green-d);
}
.cart-count {
  position: absolute;
  top: 4px;
  left: 4px;
  background: var(--green);
  color: var(--on-green);
  font-size: 10px;
  font-weight: 700;
  min-width: 17px;
  height: 17px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  transition: transform 0.3s ease;
}
.cart-count.bump { animation: cartBump 0.4s ease; }
@keyframes cartBump {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.35); }
  100% { transform: scale(1); }
}

.nav-sep { width: 1px; height: 26px; background: var(--border); margin: 0 4px; }
.social-ico {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: var(--navy);
  transition: all 0.25s ease;
}
.social-ico:hover {
  background: var(--navy);
  color: #fff;
  transform: translateY(-2px);
}

/* ===== HERO CAROUSEL ===== */
.hero { position: relative; max-width: 1280px; margin: 20px auto 0; padding: 0 28px; }
.carousel {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  height: 380px;
}
.slide {
  position: absolute;
  inset: 0;
  background: var(--slide-bg, var(--navy));
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 60px;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 0.7s ease, transform 0.7s ease;
  pointer-events: none;
}
.slide::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 75% 50%, rgba(120,199,103,0.18), transparent 60%);
}
.slide.active { opacity: 1; transform: scale(1); pointer-events: auto; }
.slide-text { position: relative; z-index: 2; max-width: 480px; }
.slide-eyebrow {
  display: inline-block;
  background: rgba(120,199,103,0.18);
  border: 1px solid rgba(120,199,103,0.4);
  color: var(--green);
  font-size: 13px;
  font-weight: 700;
  padding: 5px 16px;
  border-radius: 20px;
  margin-bottom: 18px;
}
/* الشرائح ٢ و٣ عناوينها h2 (شريحة واحدة فقط تحمل h1 الصفحة) — نفس التنسيق
   بالضبط عبر توسيع المُحدِّد، فلا فرق بصري إطلاقاً، والتراتب الدلالي سليم. */
.slide-text h1,
.slide-text h2 {
  color: #fff;
  font-size: 44px;
  font-weight: var(--fw-medium);
  line-height: 1.15;
  margin-bottom: 14px;
}
.slide-text h1 .hl,
.slide-text h2 .hl { color: var(--green); }
.slide-text p { color: rgba(255,255,255,0.75); font-size: 16px; margin-bottom: 26px; }
.slide-visual {
  position: relative;
  z-index: 2;
  font-size: 150px;
  filter: drop-shadow(0 20px 40px rgba(0,0,0,0.3));
  animation: float 3.5s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-16px); }
}

.btn-primary {
  /* Foreground on a filled-green surface: --on-green only.
     Value + full decision history live in css/style.css :root — never inline a
     literal here, a second literal is exactly how the two surfaces diverged. */
  background: var(--green);
  color: var(--on-green);
  border: none;
  padding: 14px 32px;
  border-radius: 12px;
  font-family: inherit;
  font-size: 15px;
  font-weight: var(--fw-medium);
  cursor: pointer;
  transition: all 0.25s ease;
}
.btn-primary:hover {
  background: var(--green-d);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(120,199,103,0.3);
}
.btn-primary:active { transform: translateY(0); }

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 9px;
  margin-top: 18px;
}
/* M25 · CLS — the dots are drawn by js/script.js; the empty row held 0 px and the hero grew 9 px after the first paint.
   9 px = .dot-btn height. */
.carousel-dots:empty { min-height: 9px; }
.dot-btn {
  width: 9px; height: 9px;
  border-radius: 50%;
  border: none;
  background: var(--border);
  cursor: pointer;
  transition: all 0.3s ease;
}
.dot-btn.active { background: var(--green); width: 28px; border-radius: 5px; }

.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px; height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.9);
  color: var(--navy);
  font-size: 26px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  transition: all 0.25s ease;
  box-shadow: 0 4px 14px rgba(0,0,0,0.15);
}
.carousel-arrow:hover {
  background: #fff;
  transform: translateY(-50%) scale(1.1);
}
.carousel-arrow.prev { right: 44px; }
.carousel-arrow.next { left: 44px; }

/* ===== SECTIONS ===== */
.section { padding: 64px 0; }
.section-gray { background: var(--gray); }
.container { max-width: 1280px; margin: 0 auto; padding: 0 28px; }

.section-head {
  text-align: center;
  margin-bottom: 40px;
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
}
.eyebrow {
  display: inline-block;
  color: var(--muted);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 0.5px;
  margin-top: 6px;
}
/* Stage 3 (owner round، أغسطس ٢٠٢٦) — يُصحِّح جزئياً قرار "Visual System
   Calibration V1" أعلاه بتوجيه مالكٍ جديد صريح ومحدود بهذا المكوّن وحده:
   عناوين الأقسام («الأقسام الرئيسية»، «الشركات»، «مواقع فروعنا»...) بدت
   ضعيفة الوزن على ٣٢px بعد الانتقال إلى ‎--fw-medium‎ (500) — هرمٌ بصري غير
   كافٍ لعنوان قسمٍ كامل الصفحة. الرجوع إلى ‎--fw-bold‎ (700) هنا فقط، لا في
   أي عنوانٍ آخر ذكرته الكتلة أعلاه (البطل الرئيسي، cat-block-head،
   عنوان المنتج...) — هذا هو المكوّن الكانوني الوحيد المُعاد استخدامه لكل
   عنوان قسمٍ حالي أو مستقبلي (‎.section-head h2‎)، فأي قسمٍ جديد يرث القوة
   نفسها تلقائياً دون أي تعديل خاص بالصفحة. الحجم على الموبايل (٢٠px أدناه)
   يرث الوزن الجديد تلقائياً لعدم وجود وزن مستقلّ هناك — نفس التدرّج الهرمي
   على كل مقاس. */
.section-head h2 {
  font-size: 32px;
  font-weight: var(--fw-bold);
  color: var(--navy);
  letter-spacing: -0.01em;
}
.section-sub { color: var(--muted); font-size: 14px; margin-top: 6px; }

/* ===== EMOJI REMOVAL (global) ===== */
.cat-icon, .cat-block-icon, .slide-visual, .prod-img, .cart-item-icon, .search-result-icon {
  font-family: var(--font-ar), var(--font-en), sans-serif;
}

/* ===== MAP PIN ICON COLOR (global) =====
   S11: the footer selectors left this rule with the footer redesign — the new footer is navy and draws its icons in green
   (.footer-list svg); forcing navy there would hide them. */
.location-card h3 svg {
  stroke: var(--navy) !important;
  color: var(--navy) !important;
}

/* ===== CATEGORIES ===== */
.cats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}
.cat-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 18px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
}
.cat-card:hover {
  border-color: var(--green);
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(5,23,62,0.1);
}
.cat-card .cat-icon {
  font-size: 40px;
  display: block;
  margin-bottom: 12px;
  transition: transform 0.3s ease;
}
.cat-card:hover .cat-icon { transform: scale(1.15) rotate(-5deg); }
/* Stage 4 (owner restore round، ٢٤ أغسطس ٢٠٢٦) — يُصحِّح «Visual System
   Calibration V1» في هذا المكوّن وحده: اسم القسم هو **مِقوَد** بطاقة الدليل
   (تحته عدّادٌ رماديّ ١٢px وفوقه أيقونة)، وعلى ٥١px وزن ٥٠٠ سقط هرمُه أمام
   العدّاد فبدت البطاقة بلا رأس. الرجوع إلى ‎--fw-bold‎ (٧٠٠ — قيمة ما قبل
   المعايرة حرفياً) هنا وفي ‎.cat-block-head‎ أدناه فقط، لا في بقيّة ما
   لمسته المعايرة (البطل الرئيسي، ‎.product-title‎، الأزرار…). */
.cat-card .cat-name { font-size: 15px; font-weight: var(--fw-bold); color: var(--navy); margin-bottom: 4px; }
.cat-card .cat-count { font-size: 12px; color: var(--muted); }

/* Active filter state (company-first browsing) */
.cat-card-active { border-color: var(--green); background: rgba(120,199,103,0.06); }
.cat-card-active .cat-count { color: var(--green-d); font-weight: 700; }

/* ===== شعار الشركة بدل الرمز التعبيري (data/companies.js → logo) =====
   الارتفاع وحده محدَّد و width:auto — النسبة الأصلية للصورة محفوظة بلا أي
   تمدد؛ و object-fit: contain حارس إضافي لو فرض سياق ما أبعاداً. */
.company-logo-img {
  width: auto;
  max-width: 100%;
  object-fit: contain;
  display: block;
}
.cat-card .cat-icon.company-logo-img {
  height: 64px;
  margin: 0 auto 14px;
}
/* الشعار لا يدور مع تأثير البطاقة — تدوير علامة تجارية يبدو غير احترافي */
.cat-card:hover .cat-icon.company-logo-img { transform: scale(1.06); }
.cat-block-icon.company-logo-img { height: 34px; }
.cat-block:hover .cat-block-icon.company-logo-img { transform: scale(1.06); }
.company-nav-pill .pill-icon.company-logo-img { height: 20px; flex-shrink: 0; }

/* شبكة ببطاقة واحدة (وضع علامة واحدة): تُوسَّط بدل ترك فراغ جانبي.
   الوزن الأعلى مقصود كي تتقدم على قاعدة الموبايل repeat(2, 1fr). */
.cats-grid.cats-grid-single {
  grid-template-columns: minmax(0, 300px);
  justify-content: center;
}

/* ===== BRAND CAROUSEL (شريط العلامات — حركة مستمرة يسار ← يمين) =====
   نفس بدائية اللفّة المشروحة عند ‎@keyframes marquee-ltr‎ أعلاه: المسار يحمل
   تتابُعاً أصلياً (.brand-seq) ونسخاً مولَّدة منه، والإزاحة عرضُ تتابُعٍ واحد
   بالضبط (‎--marquee-shift‎)، فتنطبق كل نسخة على أختها بكسل ببكسل ويصير حدّ
   اللفّة غير قابل للرؤية. transform وحده يتحرّك (بلا left/margin) فتبقى
   الحركة على المُركِّب — بلا إعادة تخطيط في أي إطار.

   ⚠️ عدد النسخ محسوب في js/marquee.js لا مثبَّت هنا: أربع علامات تعني تتابُعاً
   بعرض ‎912px‎ على سطح المكتب، وهو أضيق من شاشة ‎1440‎ أو ‎1920‎ — فنسختان
   تتركان فراغاً يمينياً بعرض تتابُع كامل عند بداية كل دورة (قِيس ‎868–883px‎
   قبل الإصلاح). القاعدة: ‎(n−1)·S > V‎ عند أي مقاس.

   ⚠️ الاتجاه: translateX لا يتأثر بـdirection، لكن **إرساء** المسار يتأثر —
   لذلك ‎.brand-carousel‎ نفسها ‎ltr‎ (إرساء من اليسار) ومحتوى كل بطاقة ‎rtl‎. */
.brand-carousel {
  position: relative;
  overflow: hidden;            /* يمنع أي فيض أفقي للصفحة مهما طال المسار */
  padding: 6px 0;
  direction: ltr;
  /* تلاشٍ عند الحافتين: البطاقة تدخل وتخرج بهدوء بدل أن تُقصّ فجأة */
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
}
.brand-track {
  display: flex;
  width: max-content;
  will-change: transform;
  transform: translate3d(calc(-1 * var(--marquee-shift, 50%)), 0, 0);
  animation: marquee-ltr 33.5s linear infinite;
}
.brand-seq { display: flex; }
/* ⚠️ لا gap على المسار ولا على التتابُع — شرط رياضيّ لا تفضيل تنسيق.
   مع gap يصير عرض المسار ‎n·S + (n−1)·g‎ فلا تعود الإزاحة ‎S‎ تُطابق نسخةً
   على أختها، ويظهر انزياحُ فجوة **قفزةً مرئية عند كل لفّة**. المسافة تأتي من
   هامش البطاقة نفسها: عندئذٍ عرض التتابُع ‎N·(w+18)‎ بالضبط، والمسافة عند حدّ
   اللفّة (٩+٩) تساوي أي مسافة أخرى — فلا يكشف الحدُّ نفسه.

   ⚠️ ولا توقّف عند التمرير (طلب المالك): لا قاعدة hover ولا
   animation-play-state هنا إطلاقاً. التوقّف الوحيد الباقي هو عند وصول تركيز
   لوحة المفاتيح إلى بطاقة — وهو مسار الوصول لا مسار الفأرة: بدونه تنزلق
   البطاقة المركَّزة من تحت المستخدم فور وصوله إليها بـTab. زائر الفأرة لا
   يبلغ هذه الحالة أبداً، فالحركة لا تتوقّف له في أي موضع من الشريط. */
.brand-carousel:focus-within .brand-track { animation-play-state: paused; }

.brand-card {
  direction: rtl;
  flex: 0 0 auto;
  width: 210px;
  margin-inline: 9px;
  min-height: 132px;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}
.brand-card:hover {
  border-color: var(--green);
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(5,23,62,0.1);
}
.brand-card:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 3px;
}
/* الشعار بنسبته الأصلية: الارتفاع وحده محدَّد و width:auto */
.brand-card .brand-logo {
  height: 46px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
  display: block;
}
.brand-card .brand-emoji { font-size: 40px; line-height: 1; }
.brand-card .brand-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
  text-align: center;
}
/* علامة أُعلنت ولم تصل منتجاتها: بطاقة هادئة بلا وعد بوجهة غير موجودة.
   S11: على صفحة ترسم كتل العلامات صار لكل علامة كتلتها («يتوفر قريباً»)، فالبطاقة رابطٌ صالح ([data-scroll]) وتحتفظ بحركتها؛
   الهدوء الكامل يبقى للبطاقة التي لا وجهة لها فقط. */
.brand-card-soon:not([data-scroll]) { cursor: default; }
.brand-card-soon:not([data-scroll]):hover {
  border-color: var(--border);
  transform: none;
  box-shadow: none;
}
.brand-card .brand-soon {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  background: var(--gray);
  border-radius: 999px;
  padding: 3px 10px;
}

/* تقليل الحركة: لا تشغيل تلقائي إطلاقاً — صفٌّ ثابت قابل للتمرير يدوياً،
   والنسخة المكرَّرة تختفي كي لا تتكرّر العلامات أمام من أوقف الحركة. */
@media (prefers-reduced-motion: reduce) {
  .brand-track {
    animation: none;
    transform: none;
    width: auto;
    justify-content: center;
    flex-wrap: wrap;
  }
  .brand-track > [aria-hidden="true"] { display: none; }
  .brand-seq { flex-wrap: wrap; justify-content: center; }
  .brand-carousel {
    overflow-x: auto;
    direction: rtl;
    -webkit-mask-image: none;
            mask-image: none;
  }
}

/* ===== PRODUCTS GRID ===== */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 18px;
}
.prod-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}
.prod-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(5,23,62,0.1);
  border-color: rgba(120,199,103,0.4);
}
.prod-img {
  background: var(--photo-stage);
  height: 130px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 52px;
  transition: transform 0.4s ease;
  overflow: hidden;
  position: relative;
}
/* صورة المنتج الحقيقية (من Firestore) — تغطي الأيقونة الرمزية خلفها؛
   لو فشل تحميلها تُزال فيظهر الرمز (onerror في productPhotoHTML) */
/* ⚠️ ‎contain‎ لا ‎cover‎: صور المنتجات مربّعة تقريباً (١٢٠٠×١٢٠٠) وصندوق
   البطاقة ٢١٨×١٣٠ — أي نسبة ١٫٦٨. مع ‎cover‎ يُقتطع نحو ٤٠٪ من ارتفاع كل صورة،
   فيُقصّ رأس العبوة أو قاعدتها في كل بطاقة وكل نتيجة بحث. والمنتج المقصوص
   يفقد بالضبط ما يميّزه: الغطاء، والمضخّة، والملصق العلوي.
   الحشوة تمنع ملامسة الحواف، والخلفية الرمادية الفاتحة (--gray) تملأ الفراغ
   بنفس عائلة خلفية الصورة المعتمَدة فلا يظهر الاحتواء «فارغاً». */
.prod-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 8px;
}
.prod-card:hover .prod-img { transform: scale(1.05); }
.prod-body { padding: 14px; display: flex; flex-direction: column; flex: 1; }
/* سطر تعريف البطاقة: صفّان منفصلان — العلامة وحدها ثم القسم (2026-08-23،
   يفكّ الدمج السابق؛ انظر تعليق metaRowHTML في js/shared.js للسبب الكامل).
   هامش سفلي صغير على كل صفّ بدل هامش واحد مضاعف على الحاوية المدموجة سابقاً. */
.prod-brand-row { display: flex; margin-bottom: 3px; }
.prod-cat {
  font-size: 10px;
  color: var(--green-d);
  font-weight: 700;
  margin-bottom: 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ===== شارة العلامة التجارية — مشتركة بين البطاقة/المعاينة/صفحة المنتج =====
   ⚠️ الارتفاع وحده مفروض و width:auto، فالشعار يحتفظ بنسبته الأصلية مهما
   اختلفت أبعاد ملفه (٩٦٧×٧٠٦ لـONE STEP مقابل ٨٠٠×١٦٣ لـHAODA). وسما
   width/height في الترميز يحجزان المساحة قبل فكّ الترميز فلا تقفز البطاقة. */
.brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: none;
  min-width: 0;
}
.brand-badge-logo {
  width: auto;
  object-fit: contain;
  display: block;
}
.brand-badge-name {
  font-weight: var(--fw-bold);
  color: var(--navy);
  white-space: nowrap;
}
.brand-badge--inline .brand-badge-logo { height: 12px; }
.brand-badge--inline .brand-badge-name { font-size: 10px; }
.brand-badge--inline .brand-badge-icon { font-size: 11px; }
.brand-badge--header .brand-badge-logo { height: 22px; }
.brand-badge--header .brand-badge-name { font-size: 13px; }
.brand-badge--header .brand-badge-icon { font-size: 15px; }
.brand-badge--detail .brand-badge-logo { height: 26px; }
.brand-badge--detail .brand-badge-name { font-size: 14px; }
.brand-badge--detail .brand-badge-icon { font-size: 16px; }
.prod-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 4px;
  line-height: 1.4;
  min-height: 40px;
}
.prod-size { font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.prod-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}
/* M23: السعر قيد التحديد — يحلّ محلّ الرقم (لا «٠ د.ع») في البطاقة والمعاينة وصفحة المنتج والبحث. التوكن الوحيد: --muted */
.price-pending { font-size: 0.82em; font-weight: 600; color: var(--muted); white-space: nowrap; }

.prod-price { font-size: 16px; font-weight: 800; color: var(--navy); }
.prod-price span { font-size: 11px; font-weight: 500; color: var(--muted); }
/* تسمية «سعر القطعة» — الجملة فقط (المفرد لا يُصدر العنصر إطلاقاً).
   سطر مستقل فوق الرقم كي لا يزاحمه على ٣٩٠px. */
.prod-price-label {
  display: block; font-size: 10px; font-weight: 600;
  color: var(--muted); letter-spacing: .2px; margin-bottom: 1px;
}
.add-btn {
  background: var(--navy);
  color: #fff;
  border: none;
  width: 38px; height: 38px;
  border-radius: 11px;
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
  line-height: 1;
}
.add-btn:hover {
  background: var(--green);
  color: var(--on-green);
  transform: scale(1.1) rotate(90deg);
}
.add-btn.done {
  background: var(--green);
  color: var(--on-green);
  font-size: 16px;
  transform: scale(1.1);
  animation: addPop 0.3s ease;
}
@keyframes addPop {
  0%   { transform: scale(0.8); }
  50%  { transform: scale(1.2); }
  100% { transform: scale(1.1); }
}

.no-results { text-align: center; padding: 50px 20px; color: var(--muted); }
.no-results-icon { font-size: 56px; margin-bottom: 12px; }

/* رمز العطل في حالة الكتالوج الفارغ: يقرؤه الزبون للدعم، فيجب أن يكون
   واضحاً ومنفصلاً عن النصّ بلا أن يبدو رسالة خطأ مخيفة. */
.empty-code { font-size: 12px; color: var(--muted); margin-top: 10px; }
.empty-code code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  background: #eef1f6; color: #05173e; padding: 2px 8px;
  border-radius: 6px; font-weight: 700; direction: ltr; display: inline-block;
}
.no-results h3 { font-size: 22px; color: var(--navy); margin-bottom: 6px; }
.no-results p { font-size: 15px; }

/* ===== CATEGORY BLOCKS (horizontal carousels) ===== */
.cat-block { padding: 48px 0; }
.cat-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.cat-block-head > div { display: flex; align-items: center; gap: 12px; }
.cat-block-icon { font-size: 32px; transition: transform 0.3s ease; }
.cat-block:hover .cat-block-icon { transform: scale(1.15) rotate(-8deg); }
/* عنوان الكاروسيل صار <h3> (تحته عنوان الشركة <h2>) — التنسيق واحد.
   لولا ضمّ h3 هنا لسقط عن العنوان حجمُه ووزنه ولونه بمجرد تصحيح المستوى
   الدلالي: تسلسلٌ صحيح لقارئ الشاشة وانحدارٌ بصري للزبون في آنٍ واحد. */
.cat-block-head h2, .cat-block-head h3 { font-size: 24px; font-weight: 800; color: var(--navy); }
.cat-block-count {
  font-size: 13px;
  font-weight: 600;
  /* عدّاد القسم أخضر على طبقة خضراء ١٢٪ — الشكل المعتمَد، أُعيد بقرار مالكٍ
     صريح (٢٤ أغسطس ٢٠٢٦) بعد قلبه إلى الكحليّ لأسباب تباين.
     القياس مذكور صراحةً ولا يُدّعى خلافه: ‎--green-d‎ (#5fae4f) على هذه الطبقة
     (≈ #f4fbf3) = ‎2.53:1‎ ويسقط في AA للنصّ الصغير. مقابلُه المخفِّف: العدّاد
     **بيانات وصفية مكرَّرة** لا معلومةً وحيدة — العدد نفسه يظهر في بطاقة القسم
     بلون ‎--muted‎ المطابق لـAA، وحالة ‎:hover‎ ترفعه إلى أخضر مالئ + ‎--on-green‎.
     أي قرار لاحق باجتياز AA هنا = سطر لونٍ واحد في هذه القاعدة. */
  color: var(--green-d);
  background: rgba(120,199,103,0.12);
  padding: 5px 14px;
  border-radius: 16px;
  transition: all 0.25s ease;
}
.cat-block-count:hover {
  background: var(--green);
  color: var(--on-green);
}

/* ===== ONE STEP SECTION HEADER (أقسام ONE STEP) =====
   صار أول كتلة محتوى بعد شريط العلامات (بعد إزالة كتلة «الأقسام الرئيسية»)،
   فيستحقّ حضوراً أوضح من عنوان كاروسيل عادي — بلا زخرفة زائدة.
   الاتجاه: الحاوية RTL، فأول عنصر (الشعار ثم العنوان) يقع يميناً طبيعياً
   وعدّاد الأقسام يسارياً. لا تموضع مطلق ولا هوامش سالبة. */
.company-block .cat-block-head {
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;          /* الشاشات الضيّقة تلتف بدل أن تفيض */
}
.company-block .cat-block-head > div { min-width: 0; flex: 1 1 auto; }
.company-block .cat-block-head h2 {
  font-size: 26px;
  line-height: 1.35;
  min-width: 0;
  overflow-wrap: anywhere;  /* اسم علامة طويل لا يكسر التخطيط */
}
/* الشعار بنسبته الأصلية دائماً: الارتفاع وحده محدَّد، والعرض تلقائي */
.company-block .cat-block-icon.company-logo-img {
  height: 42px;
  flex-shrink: 0;
}

/* ===== COMPANY GROUP — الهيكل المتمحور حول الشركة =====
   الكتلة تضمّ: عنوان الشركة + شعارها ← بطاقات أقسامها ← كاروسيلات منتجاتها.
   التباعد وحده يُضبَط هنا؛ لا تغيير في تنسيق البطاقات ولا في نظام الألوان.
   السبب: الدليل والكاروسيل كلاهما ‎.section‎ بحشوة ‎48px‎ رأسياً، فتلاصقهما كان
   يفتح فجوة ‎96px‎ بين «ما تبيعه الشركة» وأول منتج فعليّ — وهي بالضبط المسافة
   التي تجعل الزبون يظنّ أنه غادر كتلة الشركة. الشركات تبقى منفصلة لأن حشوة
   ‎48px‎ الكاملة باقية بين آخر كاروسيل وعنوان الشركة التالية. */
.company-group > .company-block { padding-bottom: 20px; }
.company-group > .company-block + .cat-block { padding-top: 20px; }
/* S11 — علامة معروضة بلا منتجات قابلة للبيع في هذه الواجهة: رأس الكتلة نفسه (الشعار + الاسم) ثم لوحة «يتوفر قريباً» هادئة.
   لا أقسام ولا كاروسيل ولا سعر ولا زرّ سلة — والعرض تامّ (block) في كل مقاس بلا فيض أفقي. */
.company-group-soon > .company-block { padding-bottom: 48px; }
.company-soon-text {
  margin: 0;
  padding: 26px 20px;
  border: 1px dashed var(--border);
  border-radius: 16px;
  background: var(--gray);
  color: var(--navy);
  font-size: 17px;
  font-weight: 700;
  text-align: center;
}
.section-gray .company-soon-text { background: #fff; }
@media (max-width: 640px) {
  .company-group-soon > .company-block { padding-bottom: 32px; }
  .company-soon-text { padding: 20px 16px; font-size: 16px; }
}

.hcarousel-wrap { position: relative; }
.hcarousel {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 6px 2px 14px;
  scrollbar-width: thin;
  scrollbar-color: var(--green) transparent;
}
.hcarousel::-webkit-scrollbar { height: 6px; }
.hcarousel::-webkit-scrollbar-track { background: transparent; }
.hcarousel::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
.hcarousel:hover::-webkit-scrollbar-thumb { background: var(--green); }
.hcarousel .prod-card {
  flex: 0 0 220px;
  width: 220px;
}
.hcarousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--navy);
  font-size: 26px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  box-shadow: var(--shadow);
  transition: all 0.25s ease;
  opacity: 0;
}
.hcarousel-wrap:hover .hcarousel-arrow { opacity: 1; }
.hcarousel-arrow:hover {
  background: var(--navy);
  color: #fff;
  transform: translateY(-50%) scale(1.1);
}
.hcarousel-arrow.h-prev { right: -14px; }
.hcarousel-arrow.h-next { left: -14px; }

/* ===== LOCATIONS ===== */
.locations-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.location-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: all 0.3s ease;
}
.location-card:hover {
  box-shadow: 0 8px 30px rgba(5,23,62,0.1);
  transform: translateY(-4px);
}
.location-card h3 { color: var(--navy); font-size: 18px; margin-bottom: 4px; }
.location-card p { color: var(--muted); font-size: 14px; margin-bottom: 14px; }
.location-card iframe, .location-map { border: 0; border-radius: 12px; }
/* S12-12 · reserved, quiet box while js/lazy-map-embed.js has not given the iframe its src yet (no layout shift) */
.location-map { display: block; background: var(--gray-2); }
/* دبّوس الموقع في عنوان بطاقة الفرع (كان style سطرياً في ثلاث صفحات) */
.loc-pin { vertical-align: middle; margin-left: 6px; }

/* ===== FOOTER — S11 (owner): full redesign =====
   Markup: partials/site-footer.html (one canonical copy, written into every page at build time by scripts/build-site-footer.js).
   Why it was redesigned: the owner found the old footer visually exhausting — four dense columns, a long vision paragraph, a
   website link and a help sentence in the legal row. Now: one brand column (logo, one-line description, social), then three short,
   clearly titled groups (quick links · contact · branches), and a clean copyright + legal row.
   Navy surface, white text, green accents only (DESIGN.md: navy structure, green = brand moments). Every text ≥ 14px on phones,
   ≥ 44px touch rows, visible focus, no horizontal overflow at any width (minmax(0, …) columns + overflow-wrap). */
.footer {
  background: var(--navy);
  color: #fff;
  padding: 64px 0 0;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.footer-main {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr));
  gap: 40px 48px;
  padding-bottom: 48px;
  align-items: start;
}
.footer-col { min-width: 0; }

/* brand column */
.footer-logo-link { display: inline-block; border-radius: 8px; }
.footer-logo-img {
  height: auto;
  width: 140px;
  max-width: 100%;
  margin: 0 0 18px;
  object-fit: contain;
  display: block;
}
.footer-brand-text {
  font-size: 14.5px;
  line-height: 1.85;
  color: rgba(255,255,255,0.8);
  max-width: 340px;
  margin: 0;
}

/* group titles — one scale for every column */
.footer-title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  color: #fff;
  margin: 0 0 18px;
  padding-bottom: 12px;
  position: relative;
}
.footer-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  inset-inline-start: 0;
  width: 32px;
  height: 3px;
  border-radius: 2px;
  background: var(--green);
}

/* quick links */
.footer-links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  font-size: 14.5px;
  color: rgba(255,255,255,0.82);
  transition: color 0.2s ease;
}
.footer-links a:hover,
.footer-links a[aria-current="page"] { color: var(--green); }

/* contact + branches */
.footer-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.footer-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14.5px;
  line-height: 1.75;
  color: rgba(255,255,255,0.82);
  min-width: 0;
}
.footer-list li svg { flex-shrink: 0; margin-top: 4px; color: var(--green); stroke: var(--green); }
.footer-list li a,
.footer-list li span { min-width: 0; overflow-wrap: anywhere; }
.footer-list li a { color: rgba(255,255,255,0.82); transition: color 0.2s ease; }
.footer-list li a:hover { color: var(--green); }

/* social */
.footer-social { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.footer-social-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.85);
  transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}
.footer-social-icon:hover {
  background: var(--green);
  border-color: var(--green);
  color: var(--on-green);
  transform: translateY(-2px);
}

/* focus — visible on the dark surface */
.footer a:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
  border-radius: 6px;
}

/* copyright + legal row */
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.12); }
.footer-bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 24px;
  padding-top: 20px;
  padding-bottom: 24px;
}
.footer-copy { margin: 0; font-size: 13.5px; color: rgba(255,255,255,0.7); }
.footer-legal { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.footer-legal a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  font-size: 13.5px;
  color: rgba(255,255,255,0.82);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.footer-legal a:hover { color: var(--green); }

/* tablet: brand row on top (logo beside the text), then the three groups */
@media (max-width: 1024px) {
  .footer-main { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px 32px; }
  .footer-brand {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas: "logo text" "logo social";
    column-gap: 28px;
    align-items: center;
    padding-bottom: 28px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }
  .footer-logo-link { grid-area: logo; }
  .footer-logo-img { width: 120px; margin: 0; }
  .footer-brand-text { grid-area: text; max-width: 560px; }
  .footer-social { grid-area: social; margin-top: 14px; }
}
/* phones: one column in RTL reading order, compact but never tiny */
@media (max-width: 640px) {
  .footer { padding-top: 40px; }
  .footer-main { grid-template-columns: minmax(0, 1fr); gap: 28px; padding-bottom: 32px; }
  .footer-brand { grid-template-columns: minmax(0, 1fr); grid-template-areas: "logo" "text" "social"; row-gap: 14px; padding-bottom: 24px; }
  .footer-logo-img { width: 104px; }
  .footer-social { margin-top: 0; }
  .footer-title { margin-bottom: 12px; padding-bottom: 10px; }
  .footer-bottom-inner { flex-direction: column; align-items: flex-start; padding-top: 16px; padding-bottom: 22px; }
  .footer-copy, .footer-legal a { font-size: 14px; }
}

/* ===== CART DRAWER ===== */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5,23,62,0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  z-index: 200;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.cart-overlay.open { opacity: 1; pointer-events: auto; }
.cart-drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: 380px;
  max-width: 90vw;
  height: 100%;
  background: #fff;
  z-index: 201;
  transform: translateX(-100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  box-shadow: 4px 0 30px rgba(0,0,0,0.15);
}
.cart-drawer.open { transform: translateX(0); }
.cart-header {
  padding: 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.cart-header h3 { font-size: 18px; color: var(--navy); }
.cart-close {
  border: none;
  background: var(--gray);
  width: 34px; height: 34px;
  border-radius: 10px;
  font-size: 22px;
  cursor: pointer;
  color: var(--muted);
  transition: all 0.2s;
}
.cart-close:hover { background: #fee; color: #e00; }
.cart-body { flex: 1; overflow-y: auto; padding: 16px 20px; }
.cart-empty { text-align: center; color: var(--muted); padding: 40px 0; }
.cart-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  animation: slideIn 0.3s ease;
}
@keyframes slideIn {
  from { opacity: 0; transform: translateX(-20px); }
  to   { opacity: 1; transform: translateX(0); }
}
.cart-item-icon { font-size: 30px; }
/* صورة المنتج الحقيقية في سطر السلة — تغطي الرمز خلفها (نفس نمط .search-photo)؛ فشل تحميلها يعيد الرمز.
   الصندوق ثابت المقاس كي لا يهتزّ السطر عند وصول الصورة، و contain كي لا تُقصّ العبوة. */
.cart-item-icon:has(.cart-item-photo), .cart-item-icon:has(.neutral-product-svg) {
  position: relative;
  overflow: hidden;
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--photo-stage);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.cart-item-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 3px;
}
.cart-item-info { flex: 1; }
.cart-item-name { font-size: 13px; font-weight: 700; color: var(--navy); }
.cart-item-price { font-size: 13px; color: var(--green-d); font-weight: 600; }

/* سطر الكراتين/القطع — الجملة فقط (يُرجع '' في المفرد فلا يوجد عنصر أصلاً).
   flex-wrap ضروري: على ٣٩٠px يلتفّ الجزآن سطرين بدل أن يدفعا عرض الدرج. */
.cart-item-units {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px;
  font-size: 11px; color: var(--muted); margin: 3px 0 2px;
}
.cart-item-units strong { color: var(--dark); font-weight: 700; }
.cart-item-units .ciu-sep { opacity: .5; }

/* هوية سطر السلة: الشركة + الموديل (الجملة وحدها).
   ثانويٌّ بصرياً بقصد — الاسم يبقى العنصر الأول، وهذا سطر تحقّق لا عنوان.
   flex-wrap ونفس مقاسات ‎.cart-item-units‎: موديل طويل يلتفّ سطراً ثانياً
   داخل عرض الدرج بدل أن يدفعه. و‎dir="ltr"‎ على الرمز وحده (في الترميز) كي
   يُقرأ ‎G130116‎ بترتيبه الصحيح داخل سطر عربي. */
.cart-item-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 3px 6px;
  font-size: 11px; color: var(--muted); margin: 2px 0;
  overflow-wrap: anywhere;
}
.cart-item-meta .cli-company { font-weight: 600; color: var(--dark); }
.cart-item-meta .cli-sep { opacity: .5; }
.cart-qty { display: flex; align-items: center; gap: 8px; }
.qty-btn {
  width: 26px; height: 26px;
  border: 1px solid var(--border);
  background: var(--white);
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  color: var(--navy);
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.qty-btn:hover { background: var(--green); color: var(--on-green); border-color: var(--green); }
/* زرّ الإزالة عند العتبة الدنيا (2026-08-23): لون مختلف عمداً عن تكبير/تصغير
   الكمّية العادي — أحمر لا أخضر — كي لا يُقرأ كخطوةٍ إضافية من نفس التفاعل،
   بل فعلاً مختلفاً بوضوح. راجع cartRefreshUI (js/shared.js) لشرط البناء. */
.qty-btn-remove { color: #c0392b; border-color: rgba(192,57,43,0.3); }
.qty-btn-remove:hover { background: #c0392b; color: #fff; border-color: #c0392b; }
.qty-val { font-size: 14px; font-weight: 700; min-width: 20px; text-align: center; }
.cart-footer { padding: 20px; border-top: 1px solid var(--border); }
/* ===== شريط تحفيز الولاء — نقاط متوقّعة، لا رصيد فعلي (Workstream G) =====
   حالة نصّية دائماً مع الشريط — لا اعتماد على اللون وحده (G6). */
.loyalty-progress { margin-bottom: 16px; }
.loyalty-progress-text { font-size: 12.5px; font-weight: 700; color: var(--navy); margin-bottom: 6px; }
.loyalty-progress-bar {
  height: 6px; border-radius: 3px; background: var(--gray-2); overflow: hidden;
}
.loyalty-progress-fill {
  height: 100%; border-radius: 3px; background: var(--green);
  transition: width .25s ease;
}
/* Owner Round 4 (Workstream C7) */
@media (prefers-reduced-motion: reduce) {
  .loyalty-progress-fill { transition: none; }
}
.loyalty-progress-compact .loyalty-progress-text { font-size: 11.5px; margin-bottom: 4px; }
.loyalty-progress-compact .loyalty-progress-bar { height: 5px; }

/* ===== ورقة تحفيز الولاء العائمة (bottom sheet) — Owner Round 4، تصحيح ما بعد
   الإغلاق: ليست كتلة دائمة داخل السلة، بل إشعارٌ مصغّر ينزلق من الأسفل عند
   تغيّر حالة السلة (تجزئة فقط). عنصر واحد ثابت على مستوى الصفحة — لا يتكرّر
   داخل الدرج. حدّ أقصى صريح للارتفاع (25vh) والعرض (كارت عائم مضغوط لا شريط
   بعرض الشاشة). لا خلفية معتمة، لا حجب تركيز، لا يمنع تفاعل السلة. ==== */
.loyalty-sheet {
  position: fixed;
  left: 50%;
  bottom: calc(96px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%) translateY(16px);
  width: min(92vw, 400px);
  max-height: 25vh;
  overflow: auto;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: 0 10px 40px rgba(5,23,62,0.18), 0 2px 8px rgba(5,23,62,0.06);
  padding: 14px 18px;
  z-index: 260; /* فوق درج السلة (201) — يبقى مرئياً سواء كان الدرج مفتوحاً أم لا */
  opacity: 0;
  pointer-events: none;
  transition: transform .32s cubic-bezier(0.4, 0, 0.2, 1), opacity .28s ease;
}
.loyalty-sheet[hidden] { display: none; }
/* M39: informational only (no control inside) — it never takes a tap, so it can never sit on top of «أضف للسلة» or checkout */
.loyalty-sheet.is-visible {
  opacity: 1;
  pointer-events: none;
  transform: translateX(-50%) translateY(0);
}
/* M39 mobile: compact, above the bottom navigation (≈ 64px + safe area), never full width */
@media (max-width: 640px) {
  .loyalty-sheet {
    width: min(calc(100vw - 32px), 360px);
    padding: 10px 14px;
    bottom: calc(76px + env(safe-area-inset-bottom, 0px));
    max-height: 20vh;
  }
}
/* M39 laptop / desktop: larger and more readable, horizontal proportions, no bottom navigation to clear */
@media (min-width: 1024px) {
  .loyalty-sheet {
    width: min(560px, 44vw);
    padding: 18px 26px;
    bottom: calc(28px + env(safe-area-inset-bottom, 0px));
  }
  .loyalty-sheet .loyalty-progress-compact .loyalty-progress-text { font-size: 15px; margin-bottom: 8px; }
  .loyalty-sheet .loyalty-progress-compact .loyalty-progress-bar { height: 7px; }
}
.loyalty-sheet .loyalty-progress { margin-bottom: 0; }
/* الدرج مثبَّت على اليسار وقد يبلغ 90vw على الجوال — تذييله (الإجمالي + إتمام
   الطلب) يقع أسفل الشاشة أيضاً؛ يجب ألّا تغطّيه الورقة. ترتفع الورقة فوقه
   بدل الاختفاء كي يبقى التحفيز مرئياً حتى أثناء مراجعة السلة. القيمة تكفي
   لتذييل درج قياسي (إجمالي + زرّ) بأي عرض — قِيست واقعياً E5 (راجع تقرير الإغلاق). */
body.cart-drawer-open .loyalty-sheet { bottom: calc(220px + env(safe-area-inset-bottom, 0px)); }
@media (prefers-reduced-motion: reduce) {
  .loyalty-sheet { transition: opacity .2s ease; }
  .loyalty-sheet:not(.is-visible) { transform: translateX(-50%) translateY(0); }
}

.cart-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  font-size: 18px;
  font-weight: 800;
  color: var(--navy);
}
.btn-checkout {
  width: 100%;
  background: var(--green);
  color: var(--on-green);
  border: none;
  padding: 15px;
  border-radius: 12px;
  font-family: inherit;
  font-size: 16px;
  font-weight: var(--fw-medium);
  cursor: pointer;
  transition: all 0.25s ease;
}
.btn-checkout:hover {
  background: var(--green-d);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(120,199,103,0.3);
}

/* ===== TOAST ===== */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--navy);
  color: #fff;
  padding: 13px 26px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  border-right: 4px solid var(--green);
  opacity: 0;
  pointer-events: none;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 300;
  white-space: nowrap;
  box-shadow: 0 8px 30px rgba(5,23,62,0.25);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ===== LIVE SEARCH — إضافات المحرك الموحّد (js/search.js) ===== */
/* صورة المنتج الحقيقية داخل نتيجة البحث — تغطي الأيقونة الرمزية خلفها
   (نفس نمط .prod-photo)؛ فشل تحميلها يعيد إظهار الرمز */
.search-result-icon { position: relative; overflow: hidden; }
.search-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;   /* نفس سبب .prod-photo — لا قصّ للمنتج */
  padding: 3px;
}
.search-hl { color: var(--green); }
/* العنصر المحدد بالأسهم ↑↓ — نفس خلفية الـ hover */
.search-result-item.active { background: var(--gray); }
.search-view-all {
  display: block;
  width: calc(100% - 16px);
  margin: 2px auto 8px;
  padding: 11px;
  border: none;
  background: var(--gray);
  color: var(--navy);
  border-radius: 10px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.search-view-all:hover,
.search-view-all.active { background: var(--navy); color: #fff; }
.search-more-note {
  text-align: center;
  padding: 8px;
  color: var(--muted);
  font-size: 12px;
}
/* نص للقارئات الشاشية فقط (إعلان عدد النتائج) */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ===== COMPANY QUICK NAV (شريط التنقل السريع للشركات) ===== */
.company-quicknav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
}
.company-nav-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 30px;
  padding: 10px 18px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
  cursor: pointer;
  transition: all 0.3s ease;
}
.company-nav-pill:hover:not(:disabled) {
  border-color: var(--green);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(5,23,62,0.08);
}
.company-nav-pill:disabled { opacity: 0.55; cursor: default; }
.company-nav-pill .pill-icon { font-size: 18px; font-family: var(--font-ar), var(--font-en), sans-serif; }
.company-nav-pill .pill-count {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  background: var(--gray);
  border-radius: 12px;
  padding: 2px 8px;
}
/* الشركة التي يمر قسمها بالشاشة الآن (IntersectionObserver) */
.company-nav-pill.company-nav-active {
  border-color: var(--green);
  background: rgba(120,199,103,0.06);
}
.company-nav-pill.company-nav-active .pill-count { color: var(--green-d); }

/* وجهات التمرير تفتح تحت النافبار اللاصق بدل الاختباء خلفه. الإزاحة تُقاس
   ديناميكياً في JS (updateStickyOffset) وتُحقَن في ‎--sticky-offset‎؛ 90px قيمة
   احتياطية قبل تشغيل JS. يشمل أقسام الشركات/الفئات وأي قسم/حاوية هدفاً للتنقّل. */
.company-block, .cat-block, .section,
#companySections, #categorySections {
  scroll-margin-top: var(--sticky-offset, 90px);
}
/* M25 · CLS — #companySections is empty in the HTML and drawn by buildCompanyBlocks (js/script.js). At the first paint the
   brand strip (#companies) and the branches (#locations) sat inside a phone's viewport and were then thrown ~8,000 px down
   when the company blocks arrived (real Chrome, 412 px: layout shift 0.75 — the largest on the site). Holding one screen
   while it is empty keeps them below the fold until then. buildCompanyBlocks runs at load and always writes the (possibly
   hidden) container of every visible company, so :empty is released in every state — empty or gated catalogue included. */
#companySections:empty { min-height: 100vh; }

/* بطاقات الأقسام داخل دليل الشركات أزرار حقيقية (وصول لوحة مفاتيح) —
   ترث كل مظهر .cat-card الحالي */
button.cat-card { font-family: inherit; width: 100%; }
button.cat-card .cat-name, button.cat-card .cat-count { display: block; }
.company-nav-pill:focus-visible,
.cat-card:focus-visible {
  outline: 3px solid rgba(120,199,103,0.55);
  outline-offset: 2px;
}

/* ===== COMPANY QUICK NAV BAR (أعلى الصفحة تحت الهيدر) ===== */
.company-quicknav-bar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
}
.company-quicknav-bar .company-quicknav {
  margin-top: 0;
  flex-wrap: nowrap;
  justify-content: flex-start;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 4px 2px;
  scroll-snap-type: x proximity;
}
/* M25 · CLS — the company pills are drawn by buildCompanyBlocks after the scripts run; the empty row was 8 px and pushed the
   hero 40 px down once filled. 48 px = 4 px padding + one pill row (40 px) + 4 px. Released as soon as the first pill exists. */
.company-quicknav-bar .company-quicknav:empty { min-height: 48px; }
.company-quicknav-bar .company-quicknav::-webkit-scrollbar { display: none; }
.company-quicknav-bar .company-nav-pill {
  flex-shrink: 0;
  scroll-snap-align: start;
  padding: 8px 16px;
  font-size: 13px;
}

/* ===== PRODUCT CARD: دوائر الألوان ===== */
/* لا تنسيقات خصم هنا: شارة النسبة (.prod-badge) والسعر المشطوب
   (.prod-old-price) أُزيلا مع نظام الخصم — سعر نهائي واحد فقط لكل منتج.
   الشارة الحمراء الوحيدة الباقية هي .prod-oos-badge (غير متوفر حالياً)
   وهي حالة مخزون لا علاقة لها بالأسعار. */
/* ===== شرائح اختيار الحجم داخل البطاقة (js/variants.js) =====
   تظهر فقط للعائلات ذات أكثر من حجم. أزرار حقيقية ⇒ لمس مريح على الموبايل
   ووصول كامل بلوحة المفاتيح، وتلتفّ سطرياً بلا كسر تخطيط البطاقة. */
.prod-sizes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}
.prod-size-chip {
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--muted);
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 999px;
  padding: 4px 11px;
  min-height: 28px;
  cursor: pointer;
  transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
}
.prod-size-chip:hover { border-color: var(--green); color: var(--navy); }
.prod-size-chip.active {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}
.prod-size-chip:focus-visible {
  outline: 3px solid rgba(120,199,103,0.55);
  outline-offset: 2px;
}
/* حجم نفد مخزونه: يبقى ظاهراً ومختاراً (الزبون يرى أن الحجم موجود لكنه
   غير متوفر الآن) — منع الشراء يتم بزر الإضافة وحارس quickAdd */
.prod-size-chip.unavailable {
  opacity: 0.5;
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}

/* دوائر اللون/العطر = مجموعة radiogroup من أزرار حقيقية.
   تلتفّ في أسطر بدل السقف «+٤»: متغيّرٌ مخفيّ خلف رقم غير تفاعلي لا يمكن
   الوصول إليه بلوحة المفاتيح إطلاقاً. */
.prod-scents {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 8px;
}
/* =========================================
   نظام دوائر اللون/العطر الموحّد  (.scent-swatch)
   مصدر واحد لكل دائرة لون في الموقع: بطاقة المنتج (.prod-scent-dot)،
   المعاينة السريعة (.qv-scent-circle)، صفحة المنتج (.scent-circle)، ولوحة
   الإدارة (.ap-color-chip) — الأربعة تحمل الصنف .scent-swatch.

   ── قرار المالك: لا حدّ خارجي أسود على أي دائرة، بلا استثناء ─────────────
   الحدّ الخارجي (border) أُلغي تماماً: ‎border: 0‎. لكن اللون وحده لا يكفي
   للتمييز — دائرة بيضاء على خلفية بيضاء تختفي، وحالة «مختار» التي تعتمد
   اللون فقط تسقط لمن لا يميّز الألوان (WCAG 1.4.1). البديل كله **داخليّ**:
     • حدّ شعري داخلي (inset) خافت يفصل الفاتح عن الخلفية بلا حلقة سوداء.
     • حالة الاختيار: حلقة بيضاء داخلية + تكبير طفيف + هالة خضراء ناعمة
       (لون العلامة) — لا أسود ولا كحليّ.
     • الفاتح جداً (أبيض/أصفر/حيادي) يأخذ حلقة داخلية كحلية شفافة بدل البيضاء
       لأن البيضاء تذوب فيه.
   التركيز بلوحة المفاتيح يستعمل الأخضر الداكن (نظام تركيز العلامة) لا الحلقة
   السوداء الافتراضية — و outline لا يُلغى أبداً. */
.scent-swatch {
  -webkit-appearance: none;
  appearance: none;
  border: 0;                       /* ← لا حدّ خارجي إطلاقاً */
  padding: 0;
  border-radius: 50%;
  position: relative;
  flex-shrink: 0;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(5,23,62,0.10);
  transition: transform .14s ease, box-shadow .14s ease;
  /* ⚠️ Stage 2 (owner round، أغسطس ٢٠٢٦): كان تمييز اللمس الافتراضي للمتصفّح
     (أسود شبه شفّاف على أزرار اللمس) يظهر كطبقة داكنة فوق الدائرة عند الضغط
     الحقيقي على الشاشة — رصدٌ حقيقي بفحص الأنماط المحوسبة
     (‎-webkit-tap-highlight-color: rgba(0,0,0,0.18)‎ الافتراضية)، لا تخمين.
     هذا هو مصدر شكوى "علامة داكنة فوق الدائرة الخضراء المختارة" على اللمس —
     تُحيَّد هنا صراحةً على كل دائرة لون في الموقع. */
  -webkit-tap-highlight-color: transparent;
}
.scent-swatch:hover:not(.is-unavailable) { transform: scale(1.10); }

/* ⚠️ أُزيلت «شريحة الرائحة المحايدة» (.scent-chip) بقرار المالك.
   كانت تعرض العطور بلا لونٍ متعارف عليه كمستطيلاتٍ نصّية بدل دوائر، فانقسمت
   خيارات المنتج الواحد إلى شكلين. القرار: **كل** خيار لون/عطر دائرةٌ ملوّنة،
   بلا استثناء. ما كان يبرّر الشريحة (اسمٌ بلا لون ⇒ لا نخترع له لوناً) عولج
   في مصدره: كل اسمٍ حيّ صار له رمزٌ صريح في SCENT_COLOR_RULES بلا استثناء —
   لا سقوط إلى الحيادي — والاسم نفسه يبقى في aria-label و title معاً.
   لا تُعِد إضافة أي مسار مستطيل هنا؛ فحص tests/variant-controls.test.js يمنعه. */

/* Stage 2 (owner round، أغسطس ٢٠٢٦) — يُصحِّح قراراً سابقاً (Owner Round 4
   Workstream D2) بتوجيه مالكٍ جديد صريح ومحدود لهذا المكوّن فقط: الحلقة
   الخضراء المفردة فوق دائرة اللون كانت تفقد تباينها الحقيقي على الألوان
   الفاتحة/المتوسطة (لا حدّ فاصل بين لون العطر ولون العلامة) وتترك تمييز
   "مُختار" معتمداً على اللون وحده تقريباً (WCAG 1.4.1). الحلّ المتّبع في كل
   نظام دوائر ألوان تجاري راقٍ: حلقة **بيضاء** داخلية رفيعة تفصل قرص اللون
   عن حلقة العلامة الخضراء الخارجية — بياضٌ نظيف بدل أي علامة داكنة، ويبقى
   التكبير الطفيف (scale) إشارة هندسية ثانية مستقلّة عن اللون. */
.scent-swatch.is-selected {
  transform: scale(1.12);
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--green, #78c767);
}
.scent-swatch.is-unavailable {
  cursor: not-allowed;
  opacity: .35;
}
/* شطبة «غير متوفر» — داخل القرص تماماً كي لا تصنع حدّاً خارجياً */
.scent-swatch.is-unavailable::after {
  content: '';
  position: absolute;
  inset: 50% 8% auto 8%;
  height: 1.5px;
  background: rgba(5,23,62,0.55);
  transform: rotate(-45deg);
}
.scent-swatch:focus-visible {
  outline: 2px solid var(--green-d, #5fae4f);
  outline-offset: 5px; /* يتّسع مع حلقة "مُختار" الجديدة (أبيض+أخضر حتى 4px) بلا تراكب */
}
@media (prefers-reduced-motion: reduce) {
  .scent-swatch { transition: none; }
  .scent-swatch:hover:not(.is-unavailable), .scent-swatch.is-selected { transform: none; }
}

.prod-scent-dot {
  width: 14px;
  height: 14px;
}
/* تركيز ظاهر بوضوح (مطلب وصول) — لا يُلغى بـoutline:none */
.prod-size-chip:focus-visible {
  outline: 2px solid var(--navy, #05173e);
  outline-offset: 2px;
}

/* لوحة ألوان مغلقة: الرمز يأتي من scentColorToken() في js/shared.js، فلا
   يدخل أي نصّ مشتقّ من Firestore داخل سمة style. */
/* ألوان مُعيَّنة بالاسم من المالك — تُقابل الرموز الثلاثة في رأس
   SCENT_COLOR_RULES (js/variants.js). كل رمز هنا وفي css/admin.css معاً،
   وإلا ظهرت الدائرة بلا خلفية في أحد السطحين. */
.scent-swatch--tulip    { background: #7f3e76; }
.scent-swatch--aqua     { background: #0e19e5; }
.scent-swatch--oudamber { background: #4c341e; }

/* درجاتٌ تفصل خيارَين كانا متطابقَين داخل المنتج نفسه — العائلة تبقى والإضاءة
   وحدها تتغيّر. القياس والمبرّر لكل واحدة في js/variants.js. */
.scent-swatch--bamboo   { background: #2f6d3a; }
.scent-swatch--amber    { background: #d2a15e; }
.scent-swatch--orchid   { background: #6a1b9a; }
.scent-swatch--lavender { background: #b39ddb; }
.scent-swatch--berry    { background: #8e1b4e; }
.scent-swatch--gold     { background: #a9740a; }
.scent-swatch--blossom  { background: #c2185b; }
.scent-swatch--petal    { background: #f79fc4; }
/* عطورٌ كانت بلا لون فتسقط إلى الحيادي — لكلٍّ لونٌ ثابت الآن */
/* الجولة الحيّة 2026-08-22 — فكّ ثلاثة تصادمات مقيسة (انظر SCENT_COLOR_RULES) */
.scent-swatch--indigo    { background: #3f51b5; }
.scent-swatch--rosemagic { background: #8e24aa; }
.scent-swatch--orient    { background: #b06a2c; }
.scent-swatch--fresh    { background: #bfe3ea; }
.scent-swatch--magic    { background: #3d2b8f; }
.scent-swatch--elegance { background: #14746f; }
.scent-swatch--classic  { background: #5d6d7e; }

.scent-swatch--green   { background: #78c767; }
.scent-swatch--yellow  { background: #f4d03f; }
.scent-swatch--red     { background: #e74c3c; }
.scent-swatch--orange  { background: #e67e22; }
.scent-swatch--purple  { background: #9b59b6; }
.scent-swatch--pink    { background: #e84393; }
.scent-swatch--blue    { background: #3498db; }
.scent-swatch--brown   { background: #8b5a2b; }
.scent-swatch--black   { background: #2c3e50; }
.scent-swatch--white   { background: #ecf0f1; }
.scent-swatch--neutral { background: #bdc3c7; }

.prod-scent-more { font-size: 11px; color: var(--muted); font-weight: 600; }

/* البطاقة قابلة للنقر (كانت style="cursor:pointer" سطرية) */
.prod-card[data-qv], .prod-card[data-href] { cursor: pointer; }
.add-btn-static { pointer-events: none; }

/* ===== QUICK VIEW MODAL (المعاينة السريعة) ===== */
.qv-locked, .qv-locked body { overflow: hidden; }
.qv-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5,23,62,0.45);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  z-index: 250;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.qv-overlay.open { opacity: 1; pointer-events: auto; }
.qv-modal {
  position: relative;
  background: var(--white);
  border-radius: 20px;
  width: 860px;
  max-width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: 0 24px 70px rgba(5,23,62,0.3);
  transform: translateY(14px) scale(0.98);
  transition: transform 0.25s ease;
}
.qv-overlay.open .qv-modal { transform: translateY(0) scale(1); }
.qv-close {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 3;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 10px;
  background: var(--gray);
  color: var(--muted);
  font-size: 22px;
  cursor: pointer;
  transition: all 0.2s;
}
.qv-close:hover { background: var(--navy); color: #fff; }
.qv-body {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 26px;
  padding: 26px;
}
.qv-gallery {
  position: relative;
  background: var(--photo-stage);
  border-radius: 16px;
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
/* الحاوية تعرف أبعادها قبل وصول الصورة (inset:0 داخل معرض بارتفاع مضبوط)
   فلا قفزة تخطيط عند وصولها ولا عند تبديل اللون (E3). */
/* ⚠️ ‎contain‎ لا ‎cover‎ — وهذا **إصلاح السبب الجذري** لشكوى «الصورة كبيرة
   جداً/مقصوصة» في المعاينة السريعة، لا تعديل ذوق.
   كانت هذه هي الواجهة الوحيدة في المشروع التي تلائم بـ‎cover‎: يملأ الصندوق
   ويقصّ ما زاد، فصورةٌ مربّعة (١٢٠٠×١٢٠٠) داخل مرحلة عريضة تُكبَّر حتى تملأ
   العرض ويُقتطع رأس العبوة وقاعدتها — وهما ما يميّز المنتج. وبقيت البطاقة
   وصفحة المنتج على ‎contain‎، فبدت الصورة نفسها بثلاثة أحجام في ثلاث شاشات.
   العقد الآن واحد: احتواء قانوني في كل سطح، وأي تكبير يأتي من تركيبة العرض
   المحفوظة (js/image-presentation.js) لا من خوارزمية ملاءمة مختلفة. */
.qv-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: opacity .18s ease;
}
.qv-photo.is-swapping { opacity: 0; }
/* M21: LIAO alone uses the approved rounded photograph and ordered gallery. */
.qv-gallery.qv-gallery-liao {
  flex-direction: column;
  gap: 12px;
  background: transparent;
  border-radius: 0;
  overflow: visible;
  min-width: 0;
}
.qv-gallery-liao .qv-photo {
  position: relative;
  inset: auto;
  aspect-ratio: 1;
  height: auto;
  border-radius: 22px;
  box-shadow: 0 6px 22px rgba(5, 23, 62, .08);
}
.qv-gallery-liao:has(.qv-photo) > svg { display: none; }
.qv-photo-thumbs {
  width: 100%;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 3px 2px 7px;
}
.qv-photo-thumb {
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
  cursor: pointer;
}
.qv-photo-thumb img { width: 100%; height: 100%; object-fit: contain; }
.qv-photo-thumb.is-active,
.qv-photo-thumb:hover { box-shadow: 0 0 0 2px var(--green); }
.qv-photo-thumb:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  .qv-photo { transition: none; }
  .qv-photo.is-swapping { opacity: 1; }
}
.qv-info { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
/* ترويسة العلامة في المعاينة السريعة. :empty تُخفي الصفّ كلياً لمنتجٍ بلا
   شركة معروفة، فلا تبقى فجوة gap داخل عمود qv-info. */
.qv-brand { display: flex; }
.qv-brand:empty { display: none; }
.qv-cat { font-size: 12px; font-weight: 700; color: var(--green-d); }
.qv-name { font-size: 22px; font-weight: 800; color: var(--navy); line-height: 1.4; }
.qv-price-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.qv-price { font-size: 24px; font-weight: 800; color: var(--navy); }
.qv-price span { font-size: 13px; font-weight: 500; color: var(--muted); }
.qv-desc { font-size: 13.5px; color: var(--muted); line-height: 1.9; }
.qv-variant-label { font-size: 13px; font-weight: 700; color: var(--navy); margin-bottom: 10px; }
.qv-variant-label .label-value { color: var(--green-d); }
/* Stage 2 — لوحة مستقلّة لقسم اللون/العطر فقط (#qvVariants دون #qvSizes/
   #qvPacks اللذين يتشاركان صنف .qv-variants نفسه): خلفية محايدة هادئة
   (Panel Gray من DESIGN.md) تفصل قسم الاختيار بصرياً وتمنحه تدرّجاً هرمياً
   واضحاً — بلا لونٍ جديد خارج لوحة الهوية. */
#qvVariants {
  background: var(--gray-2, #eef1f6);
  border-radius: 14px;
  padding: 16px 16px 14px;
}
/* شرائح الحجم في المعاينة السريعة — أكبر من شرائح البطاقة (مساحة لمس مريحة) */
.qv-size-options { display: flex; flex-wrap: wrap; gap: 8px; }
.qv-pack-options { display: flex; flex-wrap: wrap; gap: 8px; }
/* كتل الجملة داخل المعاينة السريعة تستعمل نفس أصناف .ws-* المشتركة */
.qv-ws:empty { display: none; }
.qv-size-chip {
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 8px 16px;
  min-height: 40px;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}
.qv-size-chip:hover { border-color: var(--green); }
.qv-size-chip.active { background: var(--navy); border-color: var(--navy); color: #fff; }
.qv-size-chip.unavailable { opacity: 0.5; text-decoration: line-through; text-decoration-thickness: 1px; }
.qv-size-chip:focus-visible { outline: 3px solid rgba(120,199,103,0.55); outline-offset: 2px; }
/* دفعة أحجام في المعاينة السريعة — يماثل .size-chip-wrap/.size-qty-btn في
   css/product.css بصرياً (تكرارٌ متعمَّد: الملفّان يخدمان صفحتين مختلفتين،
   ونفس نمط التكرار الموثَّق أصلاً لأصناف الألوان/الأسعار في هذا المشروع). */
.qv-size-chip-wrap { display: flex; flex-direction: column; align-items: stretch; gap: 6px; }
.qv-size-chip-qty { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 4px 6px; }
.qv-size-qty-btn { width: 24px; height: 24px; border: 1px solid var(--border); background: var(--white); border-radius: 7px; cursor: pointer; font-size: 14px; color: var(--navy); display: flex; align-items: center; justify-content: center; transition: all 0.18s; }
.qv-size-qty-btn:hover { background: var(--green); color: var(--on-green); border-color: var(--green); }
.qv-size-qty-btn:focus-visible { outline: 3px solid rgba(120,199,103,0.55); outline-offset: 2px; }
.qv-size-qty-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.qv-size-qty-val { font-size: 13px; font-weight: 700; min-width: 16px; text-align: center; color: var(--navy); }
.qv-size-chip-wrap.has-qty .qv-size-chip:not(.active) { border-color: var(--green); }
/* المعاينة السريعة: الحجم وحده هنا — الحدّ/الاختيار/التركيز كلها من
   .scent-swatch الموحّد أعلاه (بلا أي حدّ خارجي أسود). */
.qv-scent-options { display: flex; gap: 14px; flex-wrap: wrap; }
/* Stage 2: كانت ٣٠px — أصغر من هدف اللمس المريح؛ رُفعت إلى ٣٦px على سطح
   المكتب (ثم ٤٤px على الموبايل أدناه، مطابقة لهدف اللمس ≥44px في DESIGN.md). */
.qv-scent-circle {
  width: 36px;
  height: 36px;
  display: inline-block;
}
/* Owner Round 4 (Workstream D2): علامة الصحّ الداخلية أُزيلت بقرار مالك
   صريح — "لا علامة صحّ داخل الدائرة". كانت أصلاً إشارة غير معتمِدة على
   اللون وحده (WCAG 1.4.1)؛ الإشارة غير اللونية الباقية الآن هي التكبير
   الطفيف (transform: scale) على .scent-swatch.is-selected أعلاه — إشارة
   هندسية لا لونية أيضاً، فالمبدأ لم يُهجَر كلياً، لكنه أضعف من علامة صريحة.
   قرارٌ مالكٍ واعٍ بهذا التبادل، لا إغفال. */
.qv-purchase { display: flex; align-items: center; gap: 12px; margin-top: 4px; }
.qv-qty {
  display: flex;
  align-items: center;
  gap: 4px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 4px;
}
/* F-002: display:flex أعلاه (تصريح مؤلّف) يتقدّم على [hidden] الافتراضي من
   ورقة أنماط المتصفّح بصرف النظر عن الخصوصية — لا يكفي ضبط خاصّية hidden
   وحدها لإخفاء الصفّ فعلياً بصرياً. نفس العطب موجود مسبقاً في .qty-selector
   (css/product.css) — يُصحَّح هناك أيضاً بنفس النمط. */
.qv-qty[hidden] { display: none; }
.qv-qty button {
  width: 40px;
  height: 40px;
  border: none;
  background: var(--gray);
  border-radius: 9px;
  font-size: 18px;
  color: var(--navy);
  cursor: pointer;
  transition: all 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.qv-qty button:hover { background: var(--green); color: var(--on-green); }
/* Stage 2: ظاهرية تركيز صريحة — لم توجد قاعدة ‎:focus-visible‎ هنا سابقاً
   (اعتماد كامل على تمييز المتصفّح الافتراضي)؛ الآن نفس حلقة العلامة الخضراء
   المستعملة في ‎.qv-size-chip‎/‎.scent-swatch‎ — مصدر واحد للتركيز المرئي. */
.qv-qty button:focus-visible { outline: 3px solid rgba(120,199,103,0.55); outline-offset: 2px; }
/* Owner Round 4 (Workstream D1/D3): تكافؤ مع .qty-selector button.at-floor في product.css */
.qv-qty button.at-floor { opacity: 0.4; cursor: not-allowed; }
.qv-qty button.at-floor:hover { background: var(--gray); color: var(--navy); }
.qv-qty span { min-width: 34px; text-align: center; font-weight: 700; font-size: 15px; }
.qv-add-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--green);
  color: var(--on-green);
  border: none;
  padding: 14px 18px;
  border-radius: 12px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s ease;
}
.qv-add-btn:hover {
  background: var(--green-d);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(120,199,103,0.3);
}
.qv-trust {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 600;
}
.qv-full-link {
  font-size: 13px;
  font-weight: 700;
  color: var(--green-d);
  transition: color 0.2s;
}
.qv-full-link:hover { color: var(--navy); }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  /* أعمدة الفوتر تُدار في كتلة الفوتر أعلاه — مصدر واحد */
  .locations-grid { grid-template-columns: 1fr; }
  .slide { padding: 0 32px; }
  .slide-text h1, .slide-text h2 { font-size: 32px; }
  .slide-visual { font-size: 90px; }
  .carousel-arrow { display: none; }
}

@media (max-width: 640px) {
  .nav-container { flex-wrap: wrap; gap: 12px; }
  .search-wrapper { order: 3; width: 100%; flex: 1 1 100%; }
  /* ⚠️ كان ‎.social-ico { display: none; }‎ هنا — سطرٌ واحد أخفى فيسبوك
     وإنستغرام وتيك توك عن **كل** زائر موبايل. الروابط والأيقونات وتسمياتها
     موجودة في الترميز أصلاً (index.html) وصحيحة، فلا شيء يُخترع: يكفي رفع
     الإخفاء وضبط المقاس لهدف لمس مقبول. الحسابات الرسمية تبقى كما هي. */
  .social-ico {
    width: 34px; height: 34px;
    display: inline-flex; align-items: center; justify-content: center;
  }
  .social-ico svg { width: 17px; height: 17px; }
  .nav-sep { display: none; }
  .logo-img { height: 38px; }
  .carousel { height: 320px; }
  .slide { flex-direction: column; justify-content: center; text-align: center; gap: 16px; padding: 24px; }
  .slide-visual { font-size: 70px; }
  .slide-text h1, .slide-text h2 { font-size: 26px; }
  .cats-grid { grid-template-columns: repeat(2, 1fr); }
  /* بطاقة العلامة تتقلّص على الموبايل ويبقى الشعار كاملاً بنسبته */
  /* المسافة تبقى على البطاقة لا على المسار — نفس شرط اللفّة السلسة أعلاه */
  .brand-card { width: 156px; min-height: 112px; padding: 16px 14px; margin-inline: 6px; }
  .brand-card .brand-logo { height: 36px; max-width: 120px; }
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .section-head h2 { font-size: 24px; }
  .eyebrow { font-size: 15px; }
  .hcarousel-arrow { display: none; }
  .hcarousel .prod-card { flex: 0 0 160px; width: 160px; }
  .cat-block-head h2 { font-size: 19px; }
  .cat-block-icon { font-size: 26px; }
  /* رأس قسم ONE STEP على الموبايل: شعار أصغر وعنوان متناسب، بلا فجوة كبيرة */
  .company-block .cat-block-head { gap: 10px; padding-bottom: 10px; }
  .company-block .cat-block-head h2 { font-size: 20px; }
  .company-block .cat-block-icon.company-logo-img { height: 32px; }

  /* المعاينة السريعة تتحول للوحة سفلية (Bottom Sheet) — نمط التطبيقات الأصلية */
  .qv-overlay { padding: 0; align-items: flex-end; }
  .qv-modal {
    width: 100%;
    max-height: 92vh;
    border-radius: 22px 22px 0 0;
    transform: translateY(40px);
  }
  .qv-overlay.open .qv-modal { transform: translateY(0); }
  .qv-body { grid-template-columns: 1fr; gap: 16px; padding: 20px 18px 26px; }
  .qv-gallery { min-height: 190px; }
  .qv-name { font-size: 18px; }
  .qv-price { font-size: 20px; }
  /* أهداف لمس ≥ ٤٤px */
  .qv-scent-circle { width: 44px; height: 44px; }
  .qv-qty button { width: 44px; height: 44px; }
  .qv-add-btn { padding: 15px 14px; }

  /* قائمة نتائج البحث لا تتجاوز ثلثي الشاشة على الموبايل */
  .search-dropdown.open { max-height: 62vh; }

  /* بطاقة المنتج: زر إضافة أكبر قليلاً + دوائر ألوان أوضح للمس */
  .add-btn { width: 42px; height: 42px; }
  .prod-scent-dot { width: 16px; height: 16px; }
}


/* =========================================
   iOS SAFE AREA — النوتش والجزيرة الديناميكية (iPhone 14+)
   viewport-fit=cover مضاف بكل الصفحات؛ القواعد هنا تمنح العناصر العلوية
   الثابتة مساحة مقصودة تحت النوتش بلون الهوية بدل تزاحم المحتوى معه.
========================================= */
/* كل الصفحات: النافبار أول عنصر بالصفحة — يمتص حشوة النوتش دائماً */
.navbar { padding-top: env(safe-area-inset-top, 0px); }
/* الرئيسية: الشريط الكحلي فوق النافبار هو من يمتد تحت النوتش (شريط هوية مقصود).
   ⚠️ min-height لا height: مع تفعيل «تقليل الحركة» تلتفّ رسائل الشريط في أكثر
   من سطر، وارتفاعٌ مثبَّت كان سيقصّها. */
.top-banner {
  padding-top: env(safe-area-inset-top, 0px);
  min-height: calc(38px + env(safe-area-inset-top, 0px));
}
.top-banner + .navbar { padding-top: 0; transition: box-shadow 0.3s ease, padding-top 0.25s ease; }
/* عند الالتصاق بعد تجاوز الشريط يستعيد النافبار حشوة النوتش بسلاسة */
.top-banner + .navbar.scrolled { padding-top: env(safe-area-inset-top, 0px); }

/* الدرج الجانبي للسلة: ملء الشاشة — حواف آمنة أعلى/أسفل/يسار */
.cart-drawer {
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  padding-left: env(safe-area-inset-left, 0px);
}
/* التوست فوق شريط السحب السفلي في iOS */
.toast { bottom: calc(28px + env(safe-area-inset-bottom, 0px)); }


/* =========================================
   OUT OF STOCK — العرض الشفاف (قرار العميل: يظهر بمكانه، باهتاً، بلا شراء)
========================================= */
.prod-card-oos { position: relative; }
/* التبهيت على الوسائط والمحتوى فقط — الشارة تبقى كاملة الوضوح فوقهما */
.prod-card-oos .prod-img, .prod-card-oos .prod-body { opacity: 0.55; }
.prod-card-oos:hover { transform: none; box-shadow: none; border-color: var(--border); }
.prod-card-oos:hover .prod-img { transform: none; }
.prod-oos-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  background: #fdecea;
  color: #c0392b;
  border: 1px solid rgba(192,57,43,0.25);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 8px;
  pointer-events: none;
}
.add-btn-oos, .add-btn[disabled] {
  background: var(--gray-2);
  color: var(--muted);
  cursor: not-allowed;
  opacity: 1; /* الزر المعطل لا يتبهّت مرتين فوق تبهيت البطاقة */
}
.add-btn-oos:hover { background: var(--gray-2); transform: none; box-shadow: none; }

/* نتائج البحث: غير المتوفر باهت بوسم أحمر (النقر يفتح التفاصيل، لا زر إضافة) */
.search-result-item-oos .search-result-icon,
.search-result-item-oos .search-result-info,
.search-result-item-oos .search-result-price { opacity: 0.55; }
.search-result-oos {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  color: #c0392b;
  background: #fdecea;
  border: 1px solid rgba(192,57,43,0.25);
  padding: 3px 8px;
  border-radius: 7px;
  white-space: nowrap;
}

/* المعاينة السريعة: إشعار عدم التوفر يحل محل صف الشراء */
.qv-oos-notice {
  background: #fdecea;
  color: #c0392b;
  border: 1px solid rgba(192,57,43,0.25);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 12px;
}
.qv-modal-oos .qv-gallery { opacity: 0.6; }

/* ===== تقليل الحركة — احترام prefers-reduced-motion (PRODUCT.md §الإتاحة) =====
   المستخدم الذي يطلب تقليل الحركة (نظام التشغيل) تصبح كل الانتقالات/الحركات
   لحظية فعلياً بدل إلغائها — لا تُفقد أي وظيفة، فقط تختفي الحركة. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ===== فصل واجهتَي المفرد والجملة ===== */
/* شريط هوية متجر الجملة: يجب ألا يلتبس على الزبون أي متجر يتصفّح */
.wholesale-ribbon{
  display:flex; align-items:center; justify-content:center; gap:12px;
  flex-wrap:wrap; padding:8px 16px;
  background:#0b3d6b; color:#fff; font-size:.9rem;
}
.wholesale-ribbon .wr-badge{
  background:#fff; color:#0b3d6b; font-weight:700;
  padding:2px 10px; border-radius:999px; font-size:.85rem;
}
.wholesale-ribbon .wr-text{ opacity:.92; }
.wholesale-ribbon .wr-link{
  color:#fff; text-decoration:underline; text-underline-offset:3px;
}
.wholesale-ribbon .wr-link:hover{ opacity:.8; }

/* ⚠️ أُزيلت قواعد .retail-to-wholesale بالكامل مع إزالة الرابط نفسه من رئيسية
   المفرد (طلب المالك). إبقاء القواعد بلا عنصر كان سيبقي البابَ موارباً: أول
   من يعيد الوسم لاحقاً يجده منسَّقاً جاهزاً فيبدو أنه «كان مقصوداً».
   شارة متجر الجملة (.wholesale-ribbon أعلاه) تخصّ صفحة الجملة نفسها ولم تُمسّ. */

/* موديل المورد — واجهة الجملة فقط (الحارس في shared.js: storeShowsPackaging).
   مستوى ثانوي عمداً: هو معرِّفٌ تشغيلي لا عنوان. وحدهُ ما يميّز بطاقتين
   متطابقتَي الاسم والسعر والتعبئة حين لا يمنح المورد وصفاً مميِّزاً
   (سبعة أصناف «مفرش سنك» في كتالوج LIAO). الرقم بـdir=ltr كي لا ينقلب
   ترتيب حروفه داخل الفقرة العربية. */
.prod-sku{
  margin-top:2px; font-size:.72rem; color:var(--muted);
  letter-spacing:.02em; font-weight:600;
}
.prod-sku span{ font-weight:700; color:#0b3d6b; }

/* شريحة التعبئة — تُرسم في واجهة الجملة فقط (الحارس في storePackCount) */
.prod-pack{
  margin-top:6px; font-size:.8rem; color:#0b3d6b;
  background:#eaf2fa; border:1px solid #d3e3f2;
  border-radius:6px; padding:2px 8px; display:inline-block;
}

/* ===== واجهة الجملة: سعر الكارتون + التعبئة + المخزون =====
   العائلة اللونية كحلية-معلوماتية عمداً، لا خضراء: الأخضر لهجة الفعل
   (إضافة للسلة) في واجهة المتجر، وصبغُ بياناتٍ به يُنتج لهجتين متنافستين
   في نفس البطاقة (DESIGN.md — قاعدة اللهجة الواحدة). */
.prod-case{
  margin-top:6px; display:flex; align-items:baseline; justify-content:space-between;
  gap:8px; font-size:.8rem; padding:5px 8px; border-radius:8px;
  background:#f4f7fb; border:1px solid #e2eaf3;
}
.prod-case .pc-label{ color:var(--muted); font-weight:600; }
.prod-case .pc-value{ color:var(--navy); font-weight:800; white-space:nowrap; }

/* مُنتقي التعبئة (صفحة المنتج + المعاينة السريعة) */
.pack-options{ display:flex; flex-wrap:wrap; gap:8px; margin-top:8px; }
.pack-chip{
  min-height:44px; padding:8px 14px; border-radius:12px; cursor:pointer;
  background:#fff; border:1px solid var(--border); color:var(--ink);
  font-family:inherit; font-size:.85rem; font-weight:600; text-align:center;
  display:flex; flex-direction:column; gap:2px; transition:border-color .2s, background .2s;
}
.pack-chip:hover{ border-color:#9dbfe3; background:#f7fafd; }
.pack-chip.active{ border-color:var(--navy); background:#eaf2fa; color:var(--navy); }
.pack-chip:focus-visible{ outline:none; box-shadow:0 0 0 3px rgba(5,23,62,.15); }
.pack-chip .pk-count{ font-weight:800; }
.pack-chip .pk-price{ font-size:.78rem; color:var(--muted); font-weight:600; }
.pack-chip.active .pk-price{ color:var(--navy); }
.pack-chip[disabled]{ opacity:.45; cursor:not-allowed; }

/* شارة مخزون الكارتون */
.ws-stock{
  display:inline-flex; align-items:center; gap:6px; margin-top:8px;
  font-size:.82rem; font-weight:600; color:#0b3d6b;
}
.ws-stock .wss-dot{ width:8px; height:8px; border-radius:50%; background:var(--green); }
.ws-stock.ws-stock-low{ color:#8a5a00; }
.ws-stock.ws-stock-low .wss-dot{ background:#e0a800; }
.ws-stock.ws-stock-out{ color:var(--danger,#c0392b); }
.ws-stock.ws-stock-out .wss-dot{ background:var(--danger,#c0392b); }

/* صفّ سعرَي القطعة/الكارتون في صفحة المنتج والمعاينة */
.ws-price-split{
  display:flex; flex-wrap:wrap; gap:10px; margin:10px 0 4px;
}
.ws-price-split .wsp-cell{
  flex:1 1 140px; padding:10px 12px; border-radius:12px;
  background:#f4f7fb; border:1px solid #e2eaf3;
}
.ws-price-split .wsp-label{ display:block; font-size:.78rem; color:var(--muted); font-weight:600; margin-bottom:2px; }
.ws-price-split .wsp-value{ display:block; font-size:1.05rem; color:var(--navy); font-weight:800; }
.ws-price-split .wsp-note{ display:block; font-size:.72rem; color:var(--muted); margin-top:2px; }

@media (prefers-reduced-motion: reduce){
  .pack-chip{ transition:none; }
}

@media (max-width:480px){
  .wholesale-ribbon{ font-size:.8rem; gap:8px; padding:6px 10px; }
  .wholesale-ribbon .wr-text{ display:none; }
}


/* =========================================================================
   ONE STEP — إعادة تصميم الموبايل (متجر التجزئة والجملة)
   =======================================================================
   نطاق مقصود: ≤ 640px فقط. لا قاعدة هنا تمسّ الديسكتوب أو التابلت الكبير،
   ولا لون/خط جديد — كل شيء من متغيّرات الهوية القائمة.

   ── جذور المشكلة التي تعالجها هذه الكتلة ──────────────────────────────
   ١) الإيقاع الرأسي: .section بحشوة 64px و.section-head بهامش 40px لم
      يُخفَّضا قط للموبايل. على شاشة ٣٦٠px يعني ذلك ~١٠٤px فراغاً بين كل
      قسمين — الصفحة تبدو ثقيلة والمنتجات بعيدة.
   ٢) البطاقة: .prod-img مثبَّتة على 130px و.prod-body بحشوة 14px
      و.prod-name بارتفاع أدنى 40px — كلها ثابتة مهما ضاقت الشاشة، فبطاقة
      عرضها 160px تصير أطول من عرضها بكثير وتُظهر منتجين فقط في الشاشة.
   ٣) .container بحشوة 28px جانبية: ٥٦px من ٣٦٠px (١٥٪) تذهب هامشاً.
   ٤) لا تنقّل سفلي: البحث والسلة والحساب كلها في الأعلى، فالوصول إليها
      يتطلّب العودة إلى رأس الصفحة في كل مرة.
   ========================================================================= */

@media (max-width: 640px) {

  /* ===== ١) الإيقاع الرأسي وعرض المحتوى ===== */
  .container { padding: 0 14px; }          /* +28px عرضاً مفيداً */
  .section { padding: 26px 0; }
  .section-head { margin-bottom: 16px; }
  .section-head h2 { font-size: 20px; line-height: 1.3; }
  .eyebrow { font-size: 13px; margin-top: 3px; }
  .section-sub { font-size: 12.5px; margin-top: 4px; }
  .cat-block-head { margin-bottom: 12px; }
  .cat-block-head h2 { font-size: 17px; }
  .cat-block-icon { font-size: 24px; }

  /* الهيرو أقصر: الهدف الوصول إلى المنتجات بأقل تمرير */
  .carousel { height: 244px; }
  .slide { padding: 20px 18px; gap: 12px; }
  .slide-text h1, .slide-text h2 { font-size: 23px; }
  .slide-text p { font-size: 13px; }
  .slide-visual { font-size: 56px; }
  .slide-eyebrow { font-size: 12px; }

  /* ===== ٢) بطاقة المنتج — بصمة أصغر، ترتيب أوضح ===== */
  /* الصورة تتقلّص أولاً: هي أكبر مستهلك للارتفاع بلا معلومة إضافية */
  .prod-img { height: 96px; font-size: 34px; }
  .prod-body { padding: 9px 10px 10px; }
  .prod-cat { font-size: 9px; margin-bottom: 3px; letter-spacing: .1px; }
  /* اسمان بسطرين ثابتين: يمنع اهتزاز ارتفاع الشبكة بين بطاقة وأخرى بلا
     أن يقصّ نصاً مهماً (min-height وحده كان يترك فراغاً في الأسماء القصيرة) */
  .prod-name {
    font-size: 12.5px;
    line-height: 1.35;
    margin-bottom: 3px;
    min-height: 34px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .prod-size { font-size: 11px; margin-bottom: 6px; }
  .prod-price { font-size: 14px; }
  .prod-price span { font-size: 10px; }
  .prod-price-label { font-size: 9px; }
  .prod-scents { gap: 4px; }
  .prod-scent-dot { width: 14px; height: 14px; }

  /* شرائح الحجم: أصغر بصرياً، ومساحة لمس ≥44px عبر الحشوة لا عبر الحجم */
  .prod-sizes { gap: 5px; margin-bottom: 6px; }
  .prod-size-chip { font-size: 11px; padding: 6px 10px; min-height: 32px; }

  /* بيانات الجملة داخل البطاقة تبقى كاملة لكن أهدأ */
  .prod-sku { font-size: 10px; }
  .prod-pack { font-size: 10.5px; }
  .prod-case { font-size: 11px; }

  /* ⚠️ زر الإضافة: أصغر بصرياً (36px) لكن هدف اللمس 44px عبر ::after —
     تصغير الزر وحده كان سيخالف إرشادات اللمس، وتكبيره كان سيُثقل البطاقة.
     الفصل بين «الحجم المرئي» و«مساحة اللمس» يحقّق الاثنين معاً. */
  .add-btn {
    width: 36px; height: 36px;
    border-radius: 10px;
    font-size: 20px;
    position: relative;
  }
  .add-btn::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 44px; height: 44px;
  }

  /* ===== ٣) كثافة العرض — منتجات أكثر في الشاشة ===== */
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .hcarousel { gap: 10px; padding: 2px 2px 10px; }
  /* عرض نسبي: بطاقتان كاملتان + طرف ثالثة يوحي بإمكان السحب أفقياً */
  .hcarousel .prod-card {
    flex: 0 0 43vw;
    width: 43vw;
    min-width: 138px;
    max-width: 178px;
  }

  /* ===== ٤) بطاقات الأقسام والشركات ===== */
  .cats-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .cat-card { padding: 14px 10px; border-radius: 12px; }
  .cat-card .cat-icon { font-size: 27px; margin-bottom: 7px; }
  .cat-card .cat-name { font-size: 13px; margin-bottom: 2px; }
  .cat-card .cat-count { font-size: 11px; }
  .cat-card .cat-icon.company-logo-img { height: 30px; }

  /* ===== ٥) اللمس بدل التحويم =====
     :hover يلتصق على الشاشات اللمسية بعد النقر، فتبقى البطاقة مرفوعة
     وظلّها ظاهراً حتى بعد مغادرة الإصبع. الاستبدال بردّ فعل ضغط لحظي. */
  .prod-card:hover,
  .cat-card:hover {
    transform: none;
    box-shadow: none;
    border-color: var(--border);
  }
  .prod-card:hover .prod-img,
  .cat-card:hover .cat-icon { transform: none; }
  .prod-card:active { transform: scale(0.985); }
  .cat-card:active { transform: scale(0.98); }
  .add-btn:hover { background: var(--navy); transform: none; }
  .add-btn:active { transform: scale(0.92); }
  .add-btn.done, .add-btn.done:hover { background: var(--green); }
}

/* شاشات ضيقة جداً (≤ 360px): تشديد إضافي بلا كسر التخطيط */
@media (max-width: 360px) {
  .container { padding: 0 11px; }
  .products-grid, .cats-grid { gap: 8px; }
  .prod-img { height: 88px; }
  .prod-name { font-size: 12px; }
  .cat-card .cat-name { font-size: 12px; }
}


/* =========================================================================
   ONE STEP — التنقّل السفلي للموبايل (يُحقن من js/mobile-nav.js)
   =======================================================================
   لماذا سفلي؟ الوجهات الأربع الأكثر طلباً (الرئيسية، الأقسام، السلة،
   الحساب) كانت كلها في رأس الصفحة، فالوصول إليها من منتصف كتالوج طويل
   يعني العودة إلى الأعلى في كل مرة. الشريط السفلي يضعها في متناول الإبهام.

   كل وجهة حقيقية وموجودة في المشروع أصلاً — لا رابط مُختلَق:
     الرئيسية → index.html (أو wholesale.html في متجر الجملة)
     الأقسام  → قسم #categories نفسه (تمرير داخلي أو انتقال)
     السلة    → نفس درج السلة القائم (#cartBtn) بلا منطق ثانٍ
     الحساب   → account.html
   ========================================================================= */

.mobile-nav { display: none; }

@media (max-width: 640px) {
  .mobile-nav {
    display: flex;
    position: fixed;
    inset-inline: 0;
    bottom: 0;
    /* أدنى من درج السلة (201) والقائمة الجانبية (250) والمعاينة (250)
       والتوست (300) وقائمة البحث (150) — فكل طبقة تغطّيه كما يجب،
       وأعلى من محتوى الصفحة العادي. */
    z-index: 120;
    background: color-mix(in srgb, var(--white) 88%, transparent);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    backdrop-filter: saturate(180%) blur(14px);
    border-top: 1px solid var(--border);
    box-shadow: 0 -4px 18px rgba(5, 23, 62, 0.07);
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  /* متصفّح بلا color-mix يحصل على خلفية صلبة بدل شفافية منهارة */
  @supports not (background: color-mix(in srgb, white 50%, transparent)) {
    .mobile-nav { background: var(--white); }
  }

  .mn-item {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-height: 56px;               /* هدف لمس مريح لكل عنصر */
    padding: 7px 2px 6px;
    background: none;
    border: 0;
    font-family: inherit;
    color: var(--muted);
    text-decoration: none;
    cursor: pointer;
    position: relative;
    transition: color 0.18s ease;
    -webkit-tap-highlight-color: transparent;
  }
  .mn-item svg { width: 22px; height: 22px; flex-shrink: 0; }
  .mn-label {
    font-size: 10.5px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: .1px;
  }
  .mn-item:active { color: var(--navy); }
  .mn-item.active { color: var(--navy); }
  /* مؤشّر الحالة النشطة: شريط علوي قصير — يُقرأ فوراً بلا الاعتماد على
     اللون وحده (شرط تباين/إتاحة: لا معلومة بلون فقط). */
  .mn-item.active::before {
    content: '';
    position: absolute;
    top: 0;
    inset-inline-start: 50%;
    transform: translateX(50%);
    width: 26px;
    height: 3px;
    border-radius: 0 0 3px 3px;
    background: var(--green);
  }
  .mn-item:focus-visible {
    outline: 3px solid rgba(120, 199, 103, 0.55);
    outline-offset: -3px;
    border-radius: 10px;
  }

  /* شارة عدد السلة — تعكس #cartCount القائم ولا تملك منطقاً خاصاً بها.
     ⚠️ اللون وحده لم يكن يعكسه فعلياً (2026-08-23): #cartCount يستعمل
     رمز ‎--on-green‎ منذ إصلاحٍ سابق، وهذه الشارة بقيت على ‎#fff‎ حرفياً — نفس
     فجوة الانتشار التي أصلحها الرمز في كل الأخضر الآخر. الآن متطابقتان: كلتاهما
     تقرأ الرمز، فأي قرار لونٍ لاحق يصلهما معاً بلا تعديل موضعي. */
  .mn-badge {
    position: absolute;
    top: 4px;
    inset-inline-end: 50%;
    transform: translateX(-140%);
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    border-radius: 999px;
    background: var(--green);
    color: var(--on-green);
    font-size: 10px;
    font-weight: 800;
    line-height: 17px;
    text-align: center;
    pointer-events: none;
  }

  /* ===== المحتوى لا يختفي خلف الشريط ===== */
  /* الحشوة على body: تضمن أن آخر عنصر في أي صفحة (الفوتر، زر، نموذج)
     يبقى قابلاً للوصول والنقر فوق الشريط الثابت. */
  body.has-mobile-nav {
    padding-bottom: calc(58px + env(safe-area-inset-bottom, 0px));
  }
  /* التوست يرتفع فوق الشريط بدل أن يقف خلفه */
  body.has-mobile-nav .toast {
    bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  }
  /* درج السلة يغطّي الشريط (z أعلى)، فزر «اتمام الطلب» يبقى في مكانه
     الطبيعي بلا حشوة زائدة تحته. */
  body.has-mobile-nav .cart-drawer { padding-bottom: env(safe-area-inset-bottom, 0px); }
}

/* الطباعة والحركة المخفّضة */
@media print { .mobile-nav { display: none !important; } }
@media (prefers-reduced-motion: reduce) {
  .mn-item { transition: none; }
}

/* ===== واصف المتغيّر داخل المعاينة السريعة =====
   نفس دلالة صفحة المنتج (css/product.css) — المعاينة لا تحمّل ذلك الملف،
   فتُعرَّف القاعدة هنا للصفحات التي تفتح المودال (الرئيسية ومتجر الجملة). */
.variant-descriptor {
  min-height: 1.4em;
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
}
.variant-descriptor:empty { min-height: 0; }

/* =========================================
   صفوف الاختيارات المتعدّدة — Stage 2 (owner round، أغسطس ٢٠٢٦)
   =========================================
   ⚠️ جذر العطب الحقيقي: كانت ‎.variant-chip‎ وكل ما تحته معرَّفة فقط في
   css/product.css (صفحة المنتج). المعاينة السريعة (js/quickview.js) تبني
   نفس الترميز بالضبط لكن index.html/wholesale.html لا يُحمِّلان ذلك الملف —
   تماماً كسبب وجود ‎.variant-descriptor‎ هنا بالذات (التعليق أعلاه). فالنتيجة
   الحقيقية المُتحقَّق منها بمتصفّح فعلي: هذه الصفوف كانت تُرسَم في المعاينة
   السريعة بلا أي تنسيق إطلاقاً — بلا حدّ ولا حشوة ولا صفّ أفقي — عناصر
   ‎<div>‎ عادية متكدّسة رأسياً، وهو ما قرأه المالك "مكانيكياً/نموذج مطوّر".
   الحلّ: تعريفٌ واحد كانوني هنا (لا نسخة ثانية في product.css) يعمل على كل
   الأسطح الثلاثة معاً (الرئيسية/الجملة عبر المعاينة، وصفحة المنتج مباشرة)،
   مع تصميم أرقى: اسمٌ واضح، صفّ كمّية بخلفية محايدة وأزرار بحجم لمس مريح،
   إزالة لا تُلتبس، وشريط أخضر رفيع على حافّة البداية المنطقية يُعلن هندسياً
   (لا لونياً وحده) أن هذا خيارٌ فعّال — دون أن يُطلق الأخضر على كل الصفّ. */
.variant-selected-chips {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}
.variant-chip {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 56px;
  padding: 10px 16px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  background: var(--white);
  overflow: hidden;
}
.variant-chip::before {
  content: '';
  position: absolute;
  inset-inline-start: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--green, #78c767);
}
.variant-chip-name {
  flex: 1;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--navy);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.variant-chip-qty {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--gray);
  border-radius: 10px;
  padding: 4px;
  flex-shrink: 0;
}
/* عنصرٌ صغيرٌ مستقلٌّ لكل زرّ (نمط Owner Round 4 Workstream D1 نفسه) — نطاق
   نقر فعلي ٤٤px عبر ‎::before‎ دون تكبير الصندوق المرئي المضغوط. */
.variant-chip-qty-btn {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: var(--white);
  border-radius: 8px;
  font-size: 16px;
  font-weight: 700;
  color: var(--navy);
  cursor: pointer;
  position: relative;
  box-shadow: 0 1px 2px rgba(5,23,62,0.08);
  transition: background 0.18s ease, color 0.18s ease;
  -webkit-tap-highlight-color: transparent;
}
.variant-chip-qty-btn::before { content: ''; position: absolute; inset: -5px; }
.variant-chip-qty-btn:hover { background: var(--green); color: var(--on-green); }
.variant-chip-qty-btn:focus-visible { outline: 2px solid var(--green-d, #5fae4f); outline-offset: 2px; }
.variant-chip-qty-btn[aria-disabled="true"] { opacity: 0.4; cursor: not-allowed; }
.variant-chip-qty-num { min-width: 26px; text-align: center; font-size: 14px; font-weight: 700; color: var(--navy); }
.variant-chip-remove {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: var(--gray);
  position: relative;
  font-size: 18px;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
  border-radius: 10px;
  flex-shrink: 0;
  transition: background 0.18s ease, color 0.18s ease;
  -webkit-tap-highlight-color: transparent;
}
.variant-chip-remove::before { content: ''; position: absolute; inset: -3px; }
.variant-chip-remove:hover { background: #fdecea; color: #c0392b; }
.variant-chip-remove:focus-visible { outline: 2px solid var(--green-d, #5fae4f); outline-offset: 2px; }

@media (max-width: 480px) {
  /* أهداف لمس ≥44px، ولا فيض أفقي: الاسم يلتفّ بدل أن يدفع الأزرار خارج العرض. */
  .variant-chip { flex-wrap: wrap; padding: 12px 16px; }
  .variant-chip-name { flex-basis: 100%; white-space: normal; }
  .variant-chip-qty-btn { width: 44px; height: 44px; font-size: 17px; }
  .variant-chip-remove { width: 44px; height: 44px; font-size: 20px; }
}


/* =========================================================================
   M34 · S8.4.1 / S8.4.2 (advanced into S7 by owner directive) — MOBILE ONLY (≤ 640px). Desktop / tablet ≥ 641px untouched.
   ROOT CAUSES
     · categories: a two-column grid of padded cards repeated under EVERY company block — its height grew with the category
       count (≈ 100px × ⌈N/2⌉) and pushed the products several screens down.
     · header: logo, seven icons and the search box wrapped into three rows (logo alone on the first).
   Same tokens, same cards, same markup — only the mobile layout changes. Pattern of .company-quicknav-bar (scroll-snap row).
   ========================================================================= */
@media (max-width: 640px) {
  /* ── category slider: one row per company, swipe, RTL start at the right, partial next card ── */
  .cats-grid:not(.cats-grid-single) {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x proximity;
    overscroll-behavior-x: contain;
    gap: 10px;
    padding-inline: 14px;                 /* = .container padding → the row bleeds to the screen edge, cards keep the gutter */
    scroll-padding-inline: 14px;
    margin-inline: -14px;
    padding-block: 2px 6px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .cats-grid:not(.cats-grid-single)::-webkit-scrollbar { display: none; }
  .cats-grid:not(.cats-grid-single) > .cat-card {
    flex: 0 0 clamp(104px, 29vw, 128px);
    width: auto;
    min-height: 104px;
    padding: 12px 8px;
    box-sizing: border-box;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }
  .cats-grid:not(.cats-grid-single) > .cat-card .cat-icon { font-size: 24px; margin-bottom: 6px; }
  .cats-grid:not(.cats-grid-single) > .cat-card .cat-icon.company-logo-img { height: 28px; margin-bottom: 6px; }
  .cats-grid:not(.cats-grid-single) > .cat-card .cat-name {
    font-size: 13px;
    font-weight: var(--fw-bold);
    line-height: 1.35;
    margin-bottom: 2px;
    max-width: 100%;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
    overflow-wrap: anywhere;
  }
  .cats-grid:not(.cats-grid-single) > .cat-card .cat-count { font-size: 11px; }
  /* a soft fade on the inline-END edge (the left in RTL) while more cards remain — js/script.js toggles .cats-more-end */
  .cats-grid.cats-more-end {
    -webkit-mask-image: linear-gradient(to left, transparent 0, #000 32px);
    mask-image: linear-gradient(to left, transparent 0, #000 32px);
  }
  .cats-grid:not(.cats-grid-single) > .cat-card:focus-visible { outline-offset: -3px; }

  /* ── compact header: row 1 = ☰ · logo · — · location · تابعنا · account · cart (56px) · row 2 = full-width search (52px) ── */
  #navbar .nav-container {
    flex-wrap: wrap;
    align-items: center;
    column-gap: clamp(2px, calc((100vw - 320px) / 10), 8px);   /* M36 · OWN-36-10: 2px only where 320px needs it, up to 8px as room appears */
    row-gap: 0;
    padding: 6px 10px 0;
  }
  #navbar .nav-right { display: contents; }   /* its icons join row 1; the <nav> keeps its label (see report: display:contents a11y note) */
  /* M36.2 (owner): the logo stands alone at the start (right in RTL); ☰ moves to the top-left corner, after the cart */
  #navbar .logo { order: 1; margin-inline-end: auto; padding-inline-start: 2px; }
  #navbar .menu-toggle { order: 7; }
  #navbar .nav-right > a.nav-icon[title="مواقعنا"] { order: 3; }
  #navbar .follow-wrap { order: 4; display: flex; }
  #navbar .nav-right > a.nav-icon[href="account.html"] { order: 5; }
  #navbar .cart-btn { order: 6; }
  #navbar .nav-right:not(:has(> #menuToggle))::after { order: 7; flex: 0 0 44px; width: 44px; height: 44px; }   /* keeps the icon row where ☰ would be */
  #navbar .nav-icon { width: 44px; height: 44px; flex: 0 0 44px; }
  #navbar .nav-right > .social-ico, #navbar .nav-right > .nav-sep { display: none; }   /* reachable in one tap from «تابعنا» */
  #navbar .logo-img { height: 38px; }
  #navbar .search-wrapper { order: 10; flex: 1 1 100%; width: 100%; padding: 4px 0 4px; }
  #navbar .search-box { min-height: 44px; }
  #navbar .search-box input { font-size: 16px; }      /* ≥ 16px: iOS does not zoom the page on focus */
  #navbar .cart-count { top: 3px; left: 3px; }       /* inside the 44px button — never clipped, never over the account icon */
}
/* ≤ 360px the page gutter is 11px (.container) — the slider bleed must match it exactly, or the row pokes 3px past the screen */
@media (max-width: 360px) {
  .cats-grid:not(.cats-grid-single) { padding-inline: 11px; scroll-padding-inline: 11px; margin-inline: -11px; }
}
@media (max-width: 374px) {
  #navbar .follow-btn .follow-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  #navbar .follow-btn { width: 44px; padding: 0; }
  #navbar .logo-img { height: 34px; }
}
/* «تابعنا» — one button for Instagram / TikTok / Facebook (built by js/nav-menu.js from the page's own social links) */
.follow-wrap { display: none; position: relative; }
.follow-btn {
  width: auto; min-width: 44px; height: 44px; padding: 0 8px; gap: 4px;
  font-family: inherit; font-size: 13px; font-weight: var(--fw-bold); color: var(--navy);
}
.follow-btn svg { width: 20px; height: 20px; flex-shrink: 0; }
.follow-btn[aria-expanded="true"] { background: var(--gray-2); }
.follow-popover {
  position: absolute; top: calc(100% + 6px); inset-inline-end: 0; z-index: 120;
  min-width: 188px; padding: 6px; background: var(--white);
  border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 12px 30px rgba(5,23,62,0.14);
}
.follow-popover[hidden] { display: none; }
.follow-link {
  display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; border-radius: 10px;
  color: var(--navy); font-size: 14px; font-weight: var(--fw-bold); text-decoration: none;
}
.follow-link:hover, .follow-link:focus-visible { background: var(--gray-2); }
.follow-link svg { width: 20px; height: 20px; flex-shrink: 0; }
.follow-btn:focus-visible, .follow-link:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }
@media (min-width: 641px) { .follow-wrap { display: none !important; } }

/* =========================================================================
   M36.2 (owner, 2026-11-17) — the category directory is ONE scroll row on laptop / desktop too (≥ 641px).
   ROOT CAUSE: a wrapping auto-fill grid — 11 LIAO categories painted as 6 + 5 rows with an empty slot, which the owner found jarring.
   Same cards and tokens as before; the phone layout (≤ 640px, block above) is untouched. Arrows: the product carousels' own
   .hcarousel-arrow (hover-revealed, hidden ≤ 768px), shown only while the row overflows (.cats-overflow, js/script.js updateCatFade).
   ========================================================================= */
@media (min-width: 641px) {
  .cats-grid:not(.cats-grid-single) {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x proximity;
    overscroll-behavior-x: contain;
    scroll-behavior: smooth;
    gap: 16px;
    padding: 8px 2px 16px;          /* room for the cards' hover lift and shadow inside the scroller */
    margin-block: -8px -16px;
    scrollbar-width: none;
  }
  .cats-grid:not(.cats-grid-single)::-webkit-scrollbar { display: none; }
  /* 180–220px: a row that fits (ONE STEP's 6 at a laptop width) fills the line like the old grid, with no arrows; a longer one scrolls */
  .cats-grid:not(.cats-grid-single) > .cat-card { flex: 1 0 180px; max-width: 220px; box-sizing: border-box; scroll-snap-align: start; }
  .cats-grid.cats-more-end {
    -webkit-mask-image: linear-gradient(to left, transparent 0, #000 56px);
    mask-image: linear-gradient(to left, transparent 0, #000 56px);
  }
  .cats-slider-wrap:not(.cats-overflow) > .hcarousel-arrow { display: none; }
  .cats-slider-wrap > .hcarousel-arrow:focus-visible { opacity: 1; outline: 2px solid var(--navy); outline-offset: 2px; }
}
@media (max-width: 640px) {
  .cats-slider-wrap > .hcarousel-arrow { display: none; }   /* phones swipe (M34) */
}

/* =========================================================================================================================
   M39 — category section headers (title + product-count badge), every company, every width.
   Root cause of the oversized mobile titles: the section title became an <h3> (semantic level under the company <h2>), but
   every responsive size rule still targeted `.cat-block-head h2` — so on phones the category title stayed at the 24px desktop
   size and wrapped awkwardly beside the badge. One rule set below sizes the h3 and keeps the badge compact and secondary.
   ========================================================================================================================= */
.cat-block-head { gap: 12px; }
.cat-block-head > div { min-width: 0; flex: 1 1 auto; }
.cat-block-head h3 { line-height: 1.35; min-width: 0; overflow-wrap: anywhere; text-wrap: balance; }
.cat-block-count { flex: 0 0 auto; white-space: nowrap; line-height: 1.25; }
@media (max-width: 900px) {
  .cat-block-head h3 { font-size: 20px; }
  .cat-block-head .cat-block-icon { font-size: 26px; }
}
@media (max-width: 640px) {
  .cat-block-head { margin-bottom: 12px; gap: 10px; }
  .cat-block-head > div { gap: 8px; }
  .cat-block-head h3 { font-size: 17px; }
  .cat-block-head .cat-block-icon { font-size: 22px; }
  .cat-block-count { font-size: 11.5px; padding: 3px 10px; border-radius: 999px; }
}

/* =========================================================================================================================
   M39 — homepage hero on phones: a clean RECTANGULAR banner with the desktop composition (text beside the illustration),
   not the 244px column card that cropped the headline and pushed the gift under it. Stable size from aspect-ratio (no layout
   jump while fonts / images load), moderate radius, the whole title readable, the CTA balanced, the illustration contained.
   ========================================================================================================================= */
@media (max-width: 640px) {
  .hero { padding: 0 14px; margin-top: 12px; }
  .carousel { height: auto; aspect-ratio: 16 / 10; min-height: 188px; max-height: 270px; border-radius: 16px; }
  .slide {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    text-align: start;
    gap: 10px;
    padding: 16px 18px;
  }
  .slide-text { max-width: none; flex: 1 1 auto; min-width: 0; }
  .slide-eyebrow { font-size: 11px; padding: 3px 10px; margin-bottom: 8px; }
  .slide-text h1, .slide-text h2 { font-size: clamp(19px, 5.4vw, 24px); line-height: 1.22; margin-bottom: 6px; }
  .slide-text p {
    font-size: 12.5px; line-height: 1.5; margin-bottom: 10px;
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden;
  }
  .slide-text .btn-primary { padding: 8px 16px; font-size: 13px; min-height: 38px; }
  .slide-visual { flex: 0 0 auto; width: clamp(54px, 18vw, 84px); font-size: 0; }
  .slide-visual svg { width: 100%; height: auto; display: block; }
  .carousel-dots { margin-top: 10px; }
}
@media (max-width: 359px) {
  .slide { padding: 14px; }
  .slide-eyebrow { display: none; }
}

/* =========================================================================================================================
   M39 — categories.html (dynamic, one block per visible company). Reuses the homepage category cards and their slider
   (.cats-grid / .cat-card / .cats-slider-wrap arrows) — only the page head and the company head are new.
   ========================================================================================================================= */
.categories-page { padding-top: 28px; }
.categories-page-head { margin-bottom: 18px; }
.categories-page-head h1 { font-size: 30px; font-weight: 800; color: var(--navy); line-height: 1.25; margin-bottom: 6px; }
.categories-page-head p { color: var(--muted); font-size: 15px; }
.categories-company { padding: 20px 0 24px; border-top: 1px solid var(--border); }
.categories-company:first-child { border-top: 0; padding-top: 6px; }
.categories-company-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.categories-company-head h2 { font-size: 22px; font-weight: 800; color: var(--navy); line-height: 1.3; flex: 1 1 auto; min-width: 0; }
.categories-company-logo { flex: 0 0 auto; height: 36px; width: auto; object-fit: contain; font-size: 30px; }
a.cat-card { text-decoration: none; color: inherit; }
a.cat-card:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }
.categories-page-empty { color: var(--muted); padding: 24px 0; }
@media (min-width: 1024px) {
  .categories-page .cats-grid:not(.cats-grid-single) > .cat-card { flex: 0 0 200px; max-width: 200px; min-height: 160px; }
  .categories-page-slider { padding-inline: 6px; }
}
@media (max-width: 640px) {
  .categories-page { padding-top: 16px; }
  .categories-page-head h1 { font-size: 24px; }
  .categories-page-head p { font-size: 13.5px; }
  .categories-company { padding: 14px 0 16px; }
  .categories-company-head { gap: 10px; margin-bottom: 10px; }
  .categories-company-head h2 { font-size: 18px; }
  .categories-company-logo { height: 28px; font-size: 24px; }
}
/* M39 — tablets (641–1023px): keep the desktop composition but a proportionate height (≈ 2.4 : 1), not the 380px laptop height */
@media (min-width: 641px) and (max-width: 1023px) {
  .carousel { height: 300px; }
}

/* ===== S11.2 · صورة القسم الخاصة بالعلامة («تغيير صورة القسم» — siteSettings.companyCategories) ===== */
.cat-card .cat-icon.cat-photo {
  width: 64px; height: 64px; border-radius: 16px; object-fit: cover; display: block; margin-inline: auto;
  background: var(--photo-stage, var(--gray)); transform: none;
}
.cat-card:hover .cat-icon.cat-photo { transform: scale(1.05); }
.cat-block-icon.cat-photo { width: 40px; height: 40px; border-radius: 12px; object-fit: cover; font-size: 0; }
.cat-block:hover .cat-block-icon.cat-photo { transform: none; }
@media (prefers-reduced-motion: reduce) { .cat-card:hover .cat-icon.cat-photo { transform: none; } }
