/* ============================================================================
   Chic Theme — Shell
   شريط الإعلان · الهيدر (ديسكتوب/جوال) · الميجا مينيو · القائمة المنزلقة · طبقة
   البحث · مودال السلة · شريط المزايا · الفوتر · البانر المستقل · النوافذ المنبثقة ·
   التنبيه العائم · ورقة تثبيت التطبيق. القيم من Handoff §٤–§٩ ولوحات Header/Footer/
   Storefront حرفيًا. خصائص منطقية فقط؛ تبديل الهيدر عند 992px (Handoff §٧).
   ========================================================================= */

html.chic-scroll-locked, html.chic-scroll-locked body { overflow: hidden; }

.chic-skip-link {
  position: absolute; inset-inline-start: 8px; top: -100px; z-index: 2000;
  background: rgb(var(--chic-ink-max)); color: rgb(var(--chic-on-dark));
  padding: 12px 18px; font-size: var(--chic-fs-secondary);
}
.chic-skip-link:focus { top: 8px; }
.chic-main:focus { outline: none; }

/* ── رأس الصفحة المشترك: مسار تنقّل (15px ink-soft، فاصل «/» sep، فاصل 9) ← عنوان متمركز 28/600
   (22 جوال) — نفس النمط في كل لوحات Storefront 1/2/3 (الكتالوج، السلة، الدفع، الحساب، الثابتة). ── */
.chic-page-head { padding: 22px var(--chic-page-pad) 0; text-align: center; }
.chic-breadcrumb ol {
  list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 9px;
  font-size: 15px; line-height: 1.5; color: rgb(var(--chic-ink-soft)); text-align: start;
}
.chic-breadcrumb li { display: flex; align-items: center; gap: 9px; }
.chic-breadcrumb li + li::before { content: '/'; color: rgb(var(--chic-sep)); }
.chic-breadcrumb a { color: inherit; }
.chic-breadcrumb a:hover { text-decoration: underline; text-underline-offset: 3px; }
.chic-theme .chic-page-title { margin-top: 26px; font-size: var(--chic-fs-page-title); font-weight: var(--chic-fw-semibold); line-height: var(--chic-lh-heading); text-align: center; }
.chic-page-head .chic-breadcrumb + .chic-page-title, .chic-page-head > .chic-page-title:first-child { margin-top: 26px; }
.chic-page-head > .chic-page-title:first-child { margin-top: 0; }
.chic-theme .chic-page-sub { margin: 14px 0 0; font-size: 15px; line-height: 1.5; color: rgb(var(--chic-ink-soft)); text-align: center; }
@media (max-width: 767px) {
  .chic-page-head { padding: 18px 16px 0; }
  .chic-breadcrumb ol { font-size: 13px; }
  .chic-theme .chic-page-sub { margin-top: 10px; font-size: 14px; }
}

/* عناصر الصفحة التي يُخفيها الأدمن من «إخفاء عناصر الصفحات» (نفس أسماء كلاسات body في Classic) */
/* مطابقة Classic: hide-page-title يخفي «شريط العنوان» كله (العنوان + سطره الفرعي/العدد)، وhide-page-content
   يخفي كتلة المحتوى الرئيسية التي تحمل .chic-page-content في كل صفحة. */
body.hide-breadcrumbs .chic-breadcrumb,
body.hide-page-title .chic-page-title,
body.hide-page-title .chic-page-sub,
body.hide-page-title .chic-catalog-count,
body.hide-page-content .chic-page-content { display: none !important; }

/* شريط «أنت تعاين قالب» (للأدمن أثناء المعاينة فقط، من preview-bar.css بـz-index:2000) — نُنزله
   تحت الطبقات المنبثقة (1055+) حتى لا يغطي رأس طبقة البحث أو المودال أثناء المعاينة. */
body.chic-theme .mm-preview-bar { z-index: 1000; }

/* ── الغلاف العلوي (شريط الإعلان + الهيدر + ظلّه) ── */
.chic-shell-top { position: relative; z-index: 60; }
/* «هيدر ثابت أثناء التمرير» للجوال والكمبيوتر بنفس الزرّ: fixed مع حشوة بارتفاعه الفعلي (--chic-shell-h يقيسه
   سكربت صغير بعد الهيدر مباشرة). sticky كان يتعطّل في متصفحات الجوال بسبب overflow-x على html. */
body.chic-sticky-header .chic-shell-top { position: fixed; top: 0; inset-inline: 0; }
body.chic-sticky-header { padding-top: var(--chic-shell-h, 0px); }
html:has(body.chic-sticky-header) { scroll-padding-top: var(--chic-shell-h, 0px); }

/* ============================================================================
   شريط الإعلان
   ========================================================================= */
.chic-announce {
  height: var(--chic-announce-h); background: rgb(var(--chic-ink-max)); color: rgb(var(--chic-on-dark));
  display: flex; align-items: center; justify-content: center; padding-inline: var(--chic-page-pad); overflow: hidden;
}
.chic-announce-msg {
  font-size: var(--chic-fs-announce); line-height: 1.3; color: inherit;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}
a.chic-announce-msg:hover { text-decoration: underline; text-underline-offset: 3px; }
.chic-announce-msg:lang(en) { letter-spacing: .02em; }

/* ============================================================================
   الهيدر
   ========================================================================= */
.chic-header { position: relative; }
.chic-header-row { display: flex; background: rgb(var(--chic-surface-band)); }
.chic-header-desktop { height: var(--chic-header-h); align-items: stretch; padding-inline: 32px; }
.chic-header-mobile {
  display: none; height: var(--chic-header-h-mobile); align-items: center; justify-content: space-between; padding-inline: 16px;
}
.chic-header-shadow { height: var(--chic-header-shadow-h); background: var(--chic-header-shadow); pointer-events: none; }

.chic-logo { display: flex; align-items: center; flex: 0 0 auto; color: rgb(var(--chic-ink)); }
.chic-logo-img { height: 70px; width: auto; max-width: 240px; object-fit: contain; }
.chic-logo-text { font-size: 20px; font-weight: var(--chic-fw-semibold); white-space: nowrap; }
.chic-logo-mobile .chic-logo-img { height: 52px; max-width: 180px; }
.chic-logo-mobile .chic-logo-text { font-size: 18px; }

/* القائمة الرئيسية — فاصل 26، 14/500، العنصر يمتدّ بكامل ارتفاع الهيدر (ضروري لبقاء
   التمرير حيًّا أثناء نزول المؤشّر إلى لوح الميجا مينيو المتداخل مع أسفل الهيدر) */
.chic-nav { flex: 1; display: flex; justify-content: center; min-width: 0; }
.chic-nav-list { display: flex; align-items: stretch; gap: 26px; }
/* خطوة احتياطية قبل الهيدر المختصر: إن لم تتسع القائمة بفاصل 26 المقيس نجرّب فاصل الشبكات
   16 (--chic-gutter) أولًا، ثم نتحوّل للصفّ المختصر فقط إن لم يكفِ ذلك (chic.js يقيس). */
body.chic-nav-tight .chic-nav-list { gap: var(--chic-gutter); }
.chic-nav-item { position: relative; display: flex; align-items: center; }
.chic-nav-link {
  display: flex; align-items: center; gap: 6px; line-height: 1.5; white-space: nowrap;
  font-size: var(--chic-fs-nav-link); font-weight: var(--chic-fw-medium); color: rgb(var(--chic-ink));
  letter-spacing: var(--chic-ls-arabic-nav);
}
.chic-nav-link:lang(en) { letter-spacing: var(--chic-ls-latin-nav); text-transform: uppercase; }
/* الرابط الأب لا يتغيّر مرئيًا عند فتح اللوح، ولا ينقلب السهم (Handoff «Mega Menu») */

/* الميجا مينيو — 428 ثابت · عمودان 239.5/1fr · حشوة 27/25/24 · y=98 ← top:66 من عنصر
   القائمة · إزاحة −8 عن الحافة البادئة · أبيض بلا حدّ ولا ظلّ ولا تعتيم · يفتح بالتمرير
   (أو focus-within للوحة المفاتيح) بلا تأخير وبلا حركة. */
.chic-mega {
  position: absolute; top: 66px; inset-inline-start: -8px; z-index: 80;
  width: 428px; padding: 27px 25px 24px; background: rgb(var(--chic-surface-card));
  display: none; grid-template-columns: 239.5px 1fr;
}
.chic-nav-item.has-mega:hover > .chic-mega,
.chic-nav-item.has-mega:focus-within > .chic-mega { display: grid; }
.chic-nav-item.has-mega.is-suppressed > .chic-mega { display: none; }
.chic-mega-col { min-width: 0; }
.chic-mega-group { margin-bottom: 20px; }
.chic-mega-col > .chic-mega-group:last-child { margin-bottom: 0; } /* الحشوة السفلية المقيسة 24 وليست 44 */
.chic-mega-title {
  display: block; margin-bottom: 5px; line-height: 27px;
  font-size: var(--chic-fs-mega-title); font-weight: var(--chic-fw-semibold); color: rgb(var(--chic-ink));
}
.chic-mega-link { display: block; line-height: 27px; font-size: var(--chic-fs-mega-link); color: rgb(var(--chic-ink-soft)); }

/* الأدوات — فاصل 12 · زرّا اللغة والعملة 34 بحدّ tool-border · أيقونات 34 · حساب دائرة 38 */
.chic-tools { flex: 0 0 auto; display: flex; align-items: center; gap: 12px; }
.chic-tool-btn {
  display: inline-flex; align-items: center; gap: 7px; height: 34px; padding-inline: 11px;
  border: 1px solid rgb(var(--chic-tool-border)); background: transparent; color: rgb(var(--chic-ink));
  font-size: 13px; line-height: 1; white-space: nowrap; cursor: pointer;
}
.chic-dd { position: relative; }
.chic-dd-menu {
  position: absolute; top: calc(100% + 6px); inset-inline-end: 0; z-index: 85; min-width: 150px;
  background: rgb(var(--chic-surface-card)); border: 1px solid rgb(var(--chic-border)); padding-block: 6px;
}
.chic-dd-menu a {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 10px 14px; font-size: 13px; color: rgb(var(--chic-ink));
}
.chic-dd-menu a:hover, .chic-dd-menu a[aria-current="true"] { background: rgb(var(--chic-surface-page)); }
.chic-dd-menu a[aria-current="true"] { font-weight: var(--chic-fw-semibold); }
.chic-dd-sym { color: rgb(var(--chic-muted)); font-weight: var(--chic-fw-regular); }

.chic-icon-btn {
  position: relative; width: 34px; height: 34px; padding: 0; border: 0; background: transparent;
  display: inline-flex; align-items: center; justify-content: center; color: rgb(var(--chic-ink)); cursor: pointer;
}
.chic-icon-btn-lg { width: 44px; height: 44px; }
.chic-cart-badge {
  /* دائري بالكامل (طلب المالك): كان بلا border-radius فيظهر مربّعًا رغم أن باقي شارات/أزرار
     الهيدر الدائرية (مثل chic-account-btn) تستخدم نفس متغيّر --chic-radius-circle أصلًا */
  position: absolute; top: -2px; inset-inline-end: -4px; min-width: 17px; height: 17px; padding-inline: 4px;
  border-radius: var(--chic-radius-circle);
  background: rgb(var(--chic-ink-max)); color: rgb(var(--chic-on-dark));
  font-size: 11px; font-weight: var(--chic-fw-semibold); line-height: 1;
  display: flex; align-items: center; justify-content: center;
}
.chic-header-mobile .chic-cart-badge { top: 2px; inset-inline-end: 0; }
.chic-account-btn {
  width: 38px; height: 38px; border-radius: var(--chic-radius-circle); background: rgb(var(--chic-account-bg));
  color: rgb(var(--chic-ink)); display: inline-flex; align-items: center; justify-content: center;
}

.chic-burger {
  width: 44px; height: 44px; padding: 0; border: 0; background: transparent; color: rgb(var(--chic-ink));
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.chic-burger .chic-ico-close,
.chic-burger[aria-expanded="true"] .chic-ico-burger { display: none; }
.chic-burger[aria-expanded="true"] .chic-ico-close { display: block; }

@media (max-width: 991.98px) {
  .chic-header-desktop { display: none; }
  .chic-header-mobile { display: flex; }
}
/* الصفّ المختصر فوق 992 عندما لا تتسع القائمة فعليًا (يحدّده chic.js بالقياس) */
body.chic-header-compact .chic-header-desktop { display: none; }
body.chic-header-compact .chic-header-mobile { display: flex; }

/* ============================================================================
   القائمة المنزلقة (جوال)
   ========================================================================= */
/* ============================================================================
   درج السلة — يفتح من جهة نهاية السطر (يسار في RTL، يمين في LTR) ويترك 30px من الصفحة
   ظاهرة خلفه، تمامًا كدرج القائمة. المحتوى يُجلب من store.cart.drawer (قالب Chic).
   ========================================================================= */
.chic-cd-backdrop { position: fixed; inset: 0; z-index: 1069; background: var(--chic-modal-backdrop); }
.chic-cd {
  /* الهامش المقابل 60px بدل 30px (ضِعف السابق بطلب المالك) */
  position: fixed; inset-block: 0; inset-inline-end: 0; z-index: 1070;
  width: min(420px, 100% - 60px); display: flex; flex-direction: column;
  background: rgb(var(--chic-surface-card)); box-shadow: var(--chic-drawer-shadow);
}
.chic-cd-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  height: 56px; padding-inline: 20px 8px; border-bottom: 1px solid rgb(var(--chic-border-soft));
}
.chic-theme .chic-cd-title { margin: 0; font-size: var(--chic-fs-section-title); font-weight: var(--chic-fw-semibold); line-height: 1.4; }
.chic-cd-close {
  width: 44px; height: 44px; flex: 0 0 44px; padding: 0; border: 0; background: transparent;
  color: rgb(var(--chic-ink)); display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.chic-cd-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; }
.chic-cd-items { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 18px; }
.chic-cd-item { display: flex; gap: 14px; align-items: flex-start; }
.chic-cd-media { flex: 0 0 72px; width: 72px; aspect-ratio: 1 / 1; overflow: hidden; background: rgb(var(--chic-surface-page)); }
.chic-cd-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.chic-cd-body { min-width: 0; flex: 1; }
.chic-cd-name { display: block; font-size: 15px; line-height: 1.5; color: rgb(var(--chic-ink)); }
.chic-cd-name:hover { text-decoration: underline; text-underline-offset: 3px; }
.chic-theme .chic-cd-meta { margin: 4px 0 0; font-size: 14px; line-height: 1.6; color: rgb(var(--chic-muted)); }
.chic-theme .chic-cd-line { display: flex; align-items: baseline; gap: 6px; margin: 6px 0 0; font-size: 14px; line-height: 1.6; color: rgb(var(--chic-ink-soft)); }
.chic-cd-foot { flex: 0 0 auto; padding: 18px 20px; border-top: 1px solid rgb(var(--chic-border-soft)); }
.chic-cd-subtotal { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: 15px; color: rgb(var(--chic-ink)); }
.chic-cd-subtotal strong { font-weight: var(--chic-fw-semibold); }
.chic-cd-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.chic-cd-actions .chic-btn { width: 100%; }
.chic-cd-empty { padding-block: 20px; }
.chic-cd-empty .chic-empty { padding: 40px 18px; }
@media (max-width: 767px) { .chic-cd-items, .chic-cd-foot { padding-inline: 16px; } }

.chic-drawer-backdrop { position: fixed; inset: 0; z-index: 1055; background: var(--chic-modal-backdrop); }
.chic-drawer {
  /* طلب المالك: بطول الشاشة كاملًا مثل درج السلة، ويُترك 60px من الجهة المقابلة ليبقى جزء من الصفحة ظاهرًا (ضِعف الهامش السابق 30px بطلب المالك) */
  position: fixed; inset-block: 0; inset-inline-start: 0; z-index: 1060;
  width: min(420px, 100% - 60px);
  background: rgb(var(--chic-surface-card)); box-shadow: var(--chic-drawer-shadow);
  overflow-y: auto; overscroll-behavior: contain;
}
.chic-drawer-search {
  display: flex; align-items: center; gap: 6px; height: 56px; padding-inline: 16px;
  border-bottom: 1px solid rgb(var(--chic-border-drawer));
}
/* زرّ الإغلاق الداخلي: مرئي فقط حين يبدأ اللوح من أعلى الشاشة (الهيدر خارجها)؛ وإلا فالهامبرغر
   المتحوّل إلى × فوقه مباشرة يكفي بصريًا (كما في اللوحة) ويبقى الزرّ متاحًا للوحة المفاتيح
   وقارئ الشاشة، ويظهر عند التركيز عليه بلوحة المفاتيح. */
.chic-drawer.is-detached .chic-drawer-search { padding-inline-end: 4px; }
.chic-drawer:not(.is-detached) .chic-drawer-close:not(:focus-visible) {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.chic-drawer-search-btn {
  flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; background: transparent; cursor: pointer;
  display: flex; align-items: center; gap: 10px; text-align: start; font-size: 15px; color: rgb(var(--chic-muted));
}
.chic-drawer-close {
  flex: 0 0 44px; width: 44px; height: 44px; padding: 0; border: 0; background: transparent; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; color: rgb(var(--chic-ink));
}
.chic-drawer-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 48px;
  padding-inline: 16px; border: 0; border-bottom: 1px solid rgb(var(--chic-border-soft)); background: transparent;
  font-size: 15px; font-weight: var(--chic-fw-medium); color: rgb(var(--chic-ink)); text-align: start; cursor: pointer;
}
.chic-drawer-list > li:last-child > .chic-drawer-row { border-bottom: 0; }
.chic-drawer-row[aria-current] { font-weight: var(--chic-fw-semibold); }
.chic-drawer-back { justify-content: flex-start; color: rgb(var(--chic-ink-soft)); }
.chic-drawer-all { font-weight: var(--chic-fw-semibold); }
.chic-drawer-sub { padding-inline-start: 32px; font-weight: var(--chic-fw-regular); color: rgb(var(--chic-ink-soft)); }
/* الأسهم الاتجاهية فقط تُقلب (Handoff §٨): السهم الأصلي «<» يشير للحافة الخاتمة في RTL */
.chic-chev-end, .chic-chev-back { flex: 0 0 auto; }
[dir="ltr"] .chic-chev-end { transform: scaleX(-1); }
[dir="rtl"] .chic-chev-back { transform: scaleX(-1); }

/* ============================================================================
   طبقة البحث
   ========================================================================= */
.chic-search {
  position: fixed; inset: 0; z-index: 1090; background: rgb(var(--chic-surface-card));
  overflow-y: auto; overscroll-behavior: contain;
}
.chic-search-head {
  display: flex; align-items: center; gap: 16px; height: 94px; padding-inline: 32px;
  border-bottom: 1px solid rgb(var(--chic-border-soft));
}
.chic-search-field {
  flex: 1; min-width: 0; margin: 0; height: 52px; padding-inline: 16px;
  display: flex; align-items: center; gap: 12px; background: rgb(var(--chic-surface-page));
}
.chic-search-field:focus-within { box-shadow: inset 0 0 0 1px rgb(var(--chic-ink)); } /* نفس تركيز الحقول: حدّ ink 1px */
.chic-search-icon { flex: 0 0 auto; color: rgb(var(--chic-muted)); }
.chic-search-input {
  flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; outline: none;
  font-size: 16px; color: rgb(var(--chic-ink));
}
.chic-search-input::-webkit-search-cancel-button { -webkit-appearance: none; }
.chic-search-input:focus-visible { outline: none; }
.chic-search-cam {
  flex: 0 0 auto; width: 36px; height: 36px; padding: 0; border: 0; background: transparent; cursor: pointer;
  display: flex; align-items: center; justify-content: center; color: rgb(var(--chic-muted));
}
.chic-search-close {
  flex: 0 0 44px; width: 44px; height: 44px; padding: 0; border: 0; cursor: pointer;
  background: rgb(var(--chic-surface-page)); color: rgb(var(--chic-ink));
  display: inline-flex; align-items: center; justify-content: center;
}
.chic-search-body { padding: 30px 32px; }
.chic-search-inner { max-width: 1076px; margin-inline: auto; }
/* عناوين/فقرات داخل المكوّنات: البادئة .chic-theme ضرورية لتتغلّب على قاعدتي h2/p العامتين في base.css */
.chic-theme .chic-search-label { margin: 0 0 16px; font-size: 14px; font-weight: var(--chic-fw-regular); line-height: 1.5; color: rgb(var(--chic-muted)); }
.chic-search-label:lang(en) { letter-spacing: .06em; }
.chic-search-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 34px; }
.chic-search-chip {
  height: 40px; padding-inline: 20px; display: flex; align-items: center;
  background: rgb(var(--chic-surface-page)); font-size: 15px; color: rgb(var(--chic-ink));
}
.chic-search-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
.chic-search-card { display: block; color: rgb(var(--chic-ink)); }
.chic-search-card-media { display: block; aspect-ratio: 1 / 1; overflow: hidden; background: rgb(var(--chic-surface-page)); }
.chic-search-card-media img { width: 100%; height: 100%; object-fit: cover; }
.chic-search-card-title { display: block; margin-top: 9px; font-size: 14px; line-height: 1.5; }
.chic-search-card-price { display: block; margin-top: 3px; font-size: 14px; font-weight: var(--chic-fw-semibold); }
.chic-search-all {
  display: block; text-align: center; margin-top: 28px; padding-top: 20px;
  border-top: 1px solid rgb(var(--chic-border-soft)); font-size: 15px; color: rgb(var(--chic-ink));
}
.chic-theme .chic-search-empty { margin: 8px 0 0; font-size: 15px; line-height: 1.6; color: rgb(var(--chic-muted)); }
.chic-search-grid.is-loading { opacity: .55; }

@media (max-width: 991.98px) {
  .chic-search-head { height: 74px; padding-inline: 16px; gap: 10px; }
  .chic-search-field { height: 48px; padding-inline: 12px; gap: 10px; }
  .chic-search-icon { width: 18px; height: 18px; }
  .chic-search-input { font-size: 16px; } /* 16 لا 15: أقل من 16 يُكبّر iOS الصفحة عند التركيز */
  .chic-search-cam { width: 32px; height: 32px; }
  .chic-search-close { flex-basis: 44px; width: 44px; height: 44px; }
  .chic-search-body { padding: 20px 16px; }
  .chic-theme .chic-search-label { font-size: 13px; margin-bottom: 12px; }
  .chic-search-chips { gap: 8px; margin-bottom: 26px; }
  .chic-search-chip { height: 38px; padding-inline: 16px; font-size: 14px; }
  .chic-search-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .chic-search-grid-default > :nth-child(n+5) { display: none; }
  .chic-search-card-title { margin-top: 8px; font-size: 13px; }
  .chic-search-card-price { font-size: 13px; }
}

/* ============================================================================
   مودال تأكيد السلة
   ========================================================================= */
.chic-modal { position: fixed; inset: 0; z-index: 1100; display: flex; align-items: center; justify-content: center; padding: 16px; }
.chic-modal-backdrop { position: absolute; inset: 0; background: var(--chic-modal-backdrop); }
.chic-modal-panel {
  position: relative; width: 620px; max-width: 100%; max-height: calc(100dvh - 32px); overflow-y: auto;
  background: rgb(var(--chic-surface-card)); padding: 40px 36px;
}
.chic-modal-close {
  position: absolute; top: 16px; inset-inline-end: 16px; width: 32px; height: 32px; padding: 0; border: 0;
  background: transparent; color: rgb(var(--chic-ink)); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.chic-modal-content { display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; }
.chic-success-circle {
  width: 58px; height: 58px; border-radius: var(--chic-radius-circle); background: rgb(var(--chic-success));
  display: flex; align-items: center; justify-content: center;
}
.chic-theme .chic-modal-title { margin: 0; font-size: 19px; font-weight: var(--chic-fw-medium); line-height: 1.5; }
.chic-theme .chic-modal-question { margin: 0; font-size: 15px; font-weight: var(--chic-fw-semibold); color: rgb(var(--chic-ink)); line-height: 1.5; }
.chic-modal-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 6px; }
.chic-modal-actions .chic-btn { height: 52px; }
.chic-modal-actions .chic-btn-primary { padding-inline: 34px; }
.chic-modal-actions .chic-btn-secondary { padding-inline: 30px; gap: 10px; }
.chic-modal-suggest { width: 100%; margin-top: 4px; padding-top: 22px; border-top: 1px solid rgb(var(--chic-border)); }
.chic-modal-suggest-title { margin: 0 0 14px; font-size: 14px; font-weight: var(--chic-fw-semibold); color: rgb(var(--chic-ink)); }
.chic-modal-suggest-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.chic-modal-suggest-card { display: flex; flex-direction: column; align-items: center; gap: 8px; text-decoration: none; color: rgb(var(--chic-ink)); }
.chic-modal-suggest-card img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; background: rgb(var(--chic-surface-card)); }
.chic-modal-suggest-card span { font-size: 12.5px; font-weight: var(--chic-fw-medium); text-align: center; line-height: 1.4; }
@media (max-width: 520px) {
  .chic-modal-panel { padding: 36px 20px 24px; }
  .chic-modal-close { top: 6px; inset-inline-end: 6px; width: 44px; height: 44px; }
  .chic-modal-actions { flex-direction: column; align-self: stretch; }
  .chic-modal-actions .chic-btn { width: 100%; }
}

/* ============================================================================
   شريط المزايا
   ========================================================================= */
.chic-usp { background: rgb(var(--chic-surface-band)); border-top: 1px solid rgb(var(--chic-border-band)); }
.chic-usp-list {
  display: grid; grid-template-columns: repeat(var(--chic-usp-count, 4), 1fr); align-items: center; height: 78px;
}
.chic-usp-item { text-align: center; font-size: 14px; color: rgb(var(--chic-ink)); padding-inline: 12px; }
.chic-usp-item + .chic-usp-item { border-inline-start: 1px solid rgb(var(--chic-border)); }
.chic-usp-item:lang(en) { letter-spacing: .08em; text-transform: uppercase; }
@media (max-width: 767px) { .chic-usp { display: none; } }

/* ============================================================================
   الفوتر
   ========================================================================= */
.chic-footer { background: rgb(var(--chic-surface-band)); padding: 44px 32px 0; }
.chic-footer-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 32px; text-align: start;
}
.chic-footer-logo { display: inline-block; margin-bottom: 22px; color: rgb(var(--chic-ink)); }
.chic-footer-logo img { display: inline-block; height: 64px; width: auto; max-width: 240px; object-fit: contain; }
.chic-footer-contacts { margin-bottom: 22px; }
.chic-footer-contact { display: flex; justify-content: flex-start; align-items: center; gap: 9px; font-size: 15px; color: rgb(var(--chic-ink)); }
.chic-footer-contact + .chic-footer-contact { margin-top: 10px; }
.chic-footer-contact svg { flex: 0 0 auto; }
/* flex-wrap: ٦ دوائر (38 + فاصل 11) = 283px تتجاوز عمود الفوتر عند التابلت (231px عند 820) فتتداخل مع العمود المجاور */
.chic-footer-social { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 11px; }
.chic-footer-social a {
  width: 38px; height: 38px; border: 1px solid rgb(var(--chic-ink)); border-radius: var(--chic-radius-circle);
  display: flex; align-items: center; justify-content: center; color: rgb(var(--chic-ink)); font-size: 16px;
}
.chic-theme .chic-footer-title { margin: 0 0 18px; font-size: 16px; font-weight: var(--chic-fw-semibold); line-height: 1.5; color: rgb(var(--chic-ink)); }
.chic-footer-links li + li { margin-top: 11px; }
.chic-footer-links a { font-size: 15px; color: rgb(var(--chic-ink)); }
.chic-footer-links a:hover, .chic-footer-contact:hover { text-decoration: underline; text-underline-offset: 3px; }
/* ارتفاع الحقل والزرّ موحّد صراحة (44px) مع align-items:center لضمان محاذاة عمودية
   متطابقة تمامًا (كان الزرّ يرث height:52px من chic-btn-primary قبل هذا التخصيص) */
.chic-footer-newsletter-row { display: flex; align-items: center; gap: 8px; }
.chic-footer-newsletter-row .chic-input { flex: 1; min-width: 0; height: 44px; }
.chic-footer-newsletter-row .chic-btn { height: 44px; padding-inline: 20px; flex: 0 0 auto; }
.chic-theme .chic-footer-msg, .chic-theme .chic-popup-msg { margin: 10px 0 0; font-size: 14px; line-height: 1.6; color: rgb(var(--chic-ink)); }
.chic-theme .chic-footer-msg:empty, .chic-theme .chic-popup-msg:empty { display: none; }
.chic-theme .chic-footer-msg.is-error, .chic-theme .chic-popup-msg.is-error { color: rgb(var(--chic-danger)); }
.chic-footer-bottom {
  margin-top: 40px; padding: 22px 0; border-top: 1px solid rgb(var(--chic-border-band));
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 8px;
  font-size: 14px; color: rgb(var(--chic-ink)); text-align: center;
}
.chic-sep { color: rgb(var(--chic-sep)); }
.chic-footer-payments { display: inline-flex; align-items: center; gap: 6px; vertical-align: middle; }
/* رقعة بيضاء ثابتة خلف كل شعار (بدون ظلال/انحناء - هوية Chic المسطّحة) لأن ملفات
   storage/payment خلفيتها بيضاء أصلًا، فتبرز بوضوح فوق خلفية الفوتر البيج */
.chic-pay-chip {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 22px; background: #fff; border: var(--chic-border-width) solid rgb(var(--chic-border));
  padding: 3px 5px; flex-shrink: 0;
}
.chic-pay-chip img { width: 100%; height: 100%; object-fit: contain; }
.chic-pay-chip-wide { width: 58px; }
@media (max-width: 767px) {
  .chic-footer { padding: 36px 16px 0; }
  .chic-footer-grid { gap: 34px; text-align: center; }
  .chic-footer-contact, .chic-footer-social { justify-content: center; }
}

/* ============================================================================
   البانر المستقل (منطقة standalone_before_footer وأخواتها)
   ========================================================================= */
.chic-sab { margin-top: var(--chic-space-section); }
.chic-sab-link { display: block; color: rgb(var(--chic-ink)); }
.chic-sab-img { display: block; width: 100%; height: auto; background: rgb(var(--chic-surface-card)); }
.chic-sab-caption { display: block; padding: 22px var(--chic-page-pad) 0; text-align: center; }
.chic-sab-title { display: block; font-size: var(--chic-fs-section-title); font-weight: var(--chic-fw-semibold); line-height: var(--chic-lh-heading); }
.chic-sab-sub { display: block; max-width: 720px; margin: 10px auto 0; font-size: 15px; line-height: 1.9; color: rgb(var(--chic-ink-soft)); }
.chic-sab-cta { display: inline-block; margin-top: 14px; font-size: 15px; text-decoration: underline; text-underline-offset: 4px; }
@media (max-width: 991.98px) { .chic-vis-desktop { display: none !important; } }
@media (min-width: 992px) { .chic-vis-mobile { display: none !important; } }

/* ============================================================================
   النوافذ المنبثقة (لوحة التحكم ← النوافذ المنبثقة)
   ========================================================================= */
.chic-popup { position: fixed; inset: 0; z-index: 1100; display: flex; align-items: center; justify-content: center; padding: 16px; }
.chic-popup-backdrop { position: absolute; inset: 0; background: var(--chic-modal-backdrop); }
.chic-popup-panel {
  position: relative; width: 100%; max-width: 420px; max-height: calc(100dvh - 32px); overflow-y: auto;
  background: rgb(var(--chic-surface-card));
}
.chic-popup-panel.is-wide { max-width: 460px; }
.chic-popup-close {
  position: absolute; top: 10px; inset-inline-end: 10px; z-index: 2; width: 40px; height: 40px; padding: 0;
  border: 1px solid rgb(var(--chic-border)); background: rgb(var(--chic-surface-card)); color: rgb(var(--chic-ink));
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.chic-popup-img { display: block; width: 100%; object-fit: cover; }
.chic-popup-body { padding: 28px 24px 26px; text-align: center; }
.chic-theme .chic-popup-title { margin: 0 0 10px; font-size: 19px; font-weight: var(--chic-fw-semibold); }
.chic-theme .chic-popup-desc { margin: 0 0 18px; font-size: 15px; line-height: 1.9; color: rgb(var(--chic-muted)); }
.chic-popup-desc p { color: inherit; }
.chic-popup-price { margin-bottom: 18px; font-size: 17px; font-weight: var(--chic-fw-semibold); }
.chic-popup-form { display: flex; flex-direction: column; gap: 10px; }
.chic-popup .chic-btn { width: 100%; }

/* ============================================================================
   التنبيه العائم (مقارنة/مفضلة/أخطاء شبكة) — role=status
   ========================================================================= */
.chic-toast {
  position: fixed; inset-inline: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 1200;
  max-width: 440px; margin-inline: auto; padding: 14px 18px; background: rgb(var(--chic-ink-max)); color: rgb(var(--chic-on-dark));
  font-size: 14px; line-height: 1.6; text-align: center;
  opacity: 0; transform: translateY(8px); pointer-events: none; transition: opacity .2s ease, transform .2s ease;
}
.chic-toast.is-visible { opacity: 1; transform: none; }
@media (max-width: 768px) { body.chic-theme:not(.no-bottom-nav) .chic-toast { bottom: calc(92px + env(safe-area-inset-bottom, 0px)); } }

/* ============================================================================
   ورقة تثبيت التطبيق (PWA — نفس منطق Classic، بمظهر Chic: radius 0 وبلا ظلّ)
   ========================================================================= */
.chic-pwa-sheet {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 1150; display: flex; align-items: center; gap: 12px;
  padding: 16px 18px calc(16px + env(safe-area-inset-bottom, 0px));
  background: rgb(var(--chic-surface-card)); border-top: 1px solid rgb(var(--chic-border));
  transform: translateY(110%); transition: transform .3s ease;
}
.chic-pwa-sheet.show { transform: translateY(0); }
.chic-pwa-sheet__icon { width: 52px; height: 52px; flex-shrink: 0; overflow: hidden; background: rgb(var(--chic-surface-band)); display: flex; align-items: center; justify-content: center; }
.chic-pwa-sheet__icon img { width: 100%; height: 100%; object-fit: cover; }
.chic-pwa-sheet__body { flex: 1; min-width: 0; }
.chic-pwa-sheet__title { font-size: 14px; font-weight: var(--chic-fw-semibold); color: rgb(var(--chic-ink)); }
.chic-pwa-sheet__sub { font-size: 13px; color: rgb(var(--chic-muted)); margin-top: 2px; line-height: 1.6; }
.chic-pwa-sheet__actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.chic-pwa-sheet__btn { height: 40px; padding-inline: 16px; border: 0; background: rgb(var(--chic-ink-max)); color: rgb(var(--chic-on-dark)); font-size: 13px; font-weight: var(--chic-fw-medium); cursor: pointer; white-space: nowrap; }
.chic-pwa-sheet__close { width: 40px; height: 40px; border: 0; background: transparent; color: rgb(var(--chic-muted)); font-size: 20px; cursor: pointer; line-height: 1; }
.chic-pwa-ios-steps { display: flex; align-items: center; gap: 6px; font-size: 12px; color: rgb(var(--chic-muted)); margin-top: 4px; }
.chic-pwa-ios-steps svg { width: 14px; height: 14px; flex-shrink: 0; }
@media (min-width: 640px) {
  .chic-pwa-sheet { inset-inline: auto 24px; bottom: 24px; max-width: 380px; border: 1px solid rgb(var(--chic-border)); }
}

/* جرس OneSignal (وضع bell) — نفس إزاحة Classic: بعيدًا عن أسفل الشاشة، وفوق الشريط السفلي على الجوال */
#onesignal-bell-container { bottom: calc(16px + 60px) !important; }
@media (max-width: 768px) {
  body.chic-theme:not(.no-bottom-nav) #onesignal-bell-container { bottom: calc(16px + 78px + 60px) !important; }
}

@media (prefers-reduced-motion: reduce) {
  .chic-toast, .chic-pwa-sheet { transition: none; }
}

/* ── درج السلة مطابق للصورة المرجعية (٢٠٢٦-٠٩-١٦ ب) ── */
.chic-cd-title:lang(en) { text-transform: uppercase; letter-spacing: .06em; }
.chic-cd-items { padding: 18px 20px; gap: 0; }
.chic-cd-item { position: relative; padding-block: 16px; border-bottom: 1px solid rgb(var(--chic-border-soft)); }
.chic-cd-item:first-child { padding-block-start: 0; }
.chic-cd-item.is-removing { opacity: .45; pointer-events: none; }
.chic-cd-media { flex-basis: 80px; width: 80px; }
.chic-cd-body { padding-inline-end: 28px; }
.chic-cd-name {
  font-size: 14px; font-weight: var(--chic-fw-medium); line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.chic-theme .chic-cd-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin-top: 6px; font-size: 13px; color: rgb(var(--chic-ink-soft)); }
.chic-cd-attr { display: inline-flex; align-items: center; gap: 6px; }
.chic-cd-swatch { display: inline-block; width: 14px; height: 14px; border: 1px solid rgba(var(--chic-ink), .2); }
.chic-theme .chic-cd-line { justify-content: flex-start; margin-top: 6px; font-size: 14px; color: rgb(var(--chic-ink)); }
.chic-theme .chic-cd-line:lang(ar) { justify-content: flex-end; } /* السطر dir=ltr: نهايته يمين الصفحة العربية */
.chic-cd-remove-form { position: absolute; top: 12px; inset-inline-end: -10px; margin: 0; }
.chic-cd-item:first-child .chic-cd-remove-form { top: -4px; }
.chic-cd-remove {
  width: 36px; height: 36px; padding: 0; border: 0; background: transparent; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; color: rgb(var(--chic-muted));
}
.chic-cd-remove:hover { color: rgb(var(--chic-ink)); }
.chic-cd-foot { margin-top: auto; position: sticky; bottom: 0; background: rgb(var(--chic-surface-card)); }
.chic-cd-subtotal { font-weight: var(--chic-fw-semibold); }
.chic-cd-subtotal span:lang(en) { text-transform: uppercase; letter-spacing: .06em; }
.chic-cd-actions .chic-btn { height: 48px; }
.chic-cd-view { background: rgb(var(--chic-surface-band)); color: rgb(var(--chic-ink)); border: 0; }
.chic-cd-actions .chic-btn:lang(en) { text-transform: uppercase; }
.chic-cd-empty { padding: 20px; }
.chic-cd-error { margin: 0; padding: 20px; font-size: 14px; color: rgb(var(--chic-danger)); }