/* =====================================================================
   كودو كودو — تنسيقات التطبيق (تبني على base.css)
   ===================================================================== */

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.noscript { padding: 24px; text-align: center; }
.app { min-height: 60dvh; }
.link { text-decoration: underline; text-underline-offset: 3px; }
.block { display: block; }
.arrow { transition: transform var(--fast) var(--ease); }
[dir="rtl"] .arrow { transform: scaleX(-1); }
a:hover > .arrow { transform: translateX(3px); }
[dir="rtl"] a:hover > .arrow { transform: scaleX(-1) translateX(3px); }
html { overflow-x: hidden; }
/* منع التمرير الأفقي بلا تعطيل sticky: hidden يجعل body حاوية تمرير فتسقط لصاقة
   الترويسة وشريط الطلب الجاري، وclip يقصّ الزائد ولا ينشئ حاوية. hidden يبقى
   احتياطاً للمتصفحات الأقدم من دعم clip. */
body { overflow-x: hidden; overscroll-behavior-x: none; touch-action: pan-y pinch-zoom; }
@supports (overflow: clip) { body { overflow-x: clip; } }
.item-rail, .table-wrap, .cat-tabs { touch-action: pan-x pan-y; }

/* ---------- وضع الصيانة ---------- */
.maintenance-bar { background: var(--warn-soft); border-bottom: 2px solid var(--warn); padding: 10px 0; font-size: var(--fs-base); }
.maintenance-bar .icon { color: var(--warn-text); flex: none; }
.is-maintenance .pdp-cta .btn-primary, .is-maintenance .cart-summary .btn-primary, .is-maintenance .drawer-foot .btn-primary { opacity: .5; pointer-events: none; }

/* ---------- شريط الإعلان ---------- */
#announce { background: var(--ink); color: #fff; font-size: var(--fs-sm); font-weight: 600; }
@media (max-width: 599px) { #announce { font-size: var(--fs-xs); } }
.announce-inner { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 36px; position: relative; padding-inline-end: 32px; }
.announce-close { position: absolute; inset-inline-end: 0; color: #fff; opacity: .7; padding: 6px; }
.announce-close:hover { opacity: 1; }

/* ---------- الشريط العلوي ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: #1d1d1f; color: #fff; }
.header-inner { display: flex; align-items: center; gap: 12px; min-height: 66px; }
.order-now { flex: none; display: inline-flex; align-items: center; min-height: 40px; padding: 0 18px; border-radius: 999px; background: var(--brand); color: #fff; font-weight: 600; font-size: var(--fs-base); }
.logo { flex: none; display: flex; align-items: center; gap: 10px; margin-inline: auto; }
.logo-mark { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; }
.logo-text { display: flex; flex-direction: column; align-items: center; line-height: 1; gap: 3px; }
.logo-word { font-size: var(--fs-md); color: #fff; letter-spacing: .02em; direction: ltr; }
.logo-sub { font-family: var(--font-display); font-size: var(--fs-2xs); letter-spacing: .12em; text-transform: uppercase; color: rgba(255, 255, 255, .6); direction: ltr; }
.header-cart { display: none; }
.header-search { display: inline-flex; }
.header-actions .btn-icon { color: #fff; }
.header-actions .btn-icon:hover { background: rgba(255, 255, 255, .1); }
.header-actions .count-badge { border-color: #1d1d1f; }
.main-nav { flex: 1; display: none; }
.main-nav > ul { display: flex; gap: 4px; justify-content: center; }
.main-nav a { display: inline-block; padding: 10px 14px; font-weight: 500; font-size: var(--fs-base); color: rgba(255, 255, 255, .8); border-bottom: 3px solid transparent; transition: border-color var(--fast), color var(--fast); }
.main-nav a:hover { color: #fff; }
.main-nav a.is-active { border-bottom-color: var(--brand); color: #fff; }
.main-nav a.nav-offer { color: #ffb3b8; }
.header-actions { display: flex; align-items: center; gap: 2px; margin-inline-start: auto; }
.has-badge { position: relative; }
.count-badge {
  position: absolute; top: 2px; inset-inline-end: 0;
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: var(--brand); color: #fff; font-size: var(--fs-2xs); font-weight: 600; line-height: 18px; text-align: center;
  border: 2px solid var(--paper);
}
.lang-toggle { flex: none; min-width: 38px; height: 30px; padding: 0 9px; border-radius: 8px; border: 1.5px solid rgba(255, 255, 255, .55); background: transparent; color: #fff; font-family: var(--font-display); font-size: var(--fs-xs); font-weight: 600; letter-spacing: .04em; line-height: 1; display: inline-grid; place-items: center; margin-inline: 2px; cursor: pointer; }
.lang-toggle:hover { background: rgba(255, 255, 255, .12); }
/* القائمة الجانبية: نقطتا اللغة كما هما */
.lang-dot {
  width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid currentColor; background: transparent; color: inherit;
  font-family: var(--font-display); font-size: var(--fs-2xs); font-weight: 500; line-height: 1; display: inline-grid; place-items: center; opacity: .55;
  transition: opacity var(--fast), background var(--fast), color var(--fast);
}
.lang-dot:hover { opacity: .85; }
.lang-dot.is-on { background: var(--brand); border-color: var(--brand); color: #fff; opacity: 1; }
.menu-btn { display: inline-flex; }
.bell-head { display: inline-flex; width: 38px; min-height: 38px; }
.bell-head .icon { width: 20px; height: 20px; }
.header-status { padding-bottom: 8px; display: flex; }
@media (min-width: 960px) {
  .main-nav { display: block; }
  .menu-btn { display: none; }
  .bell-head, .header-search, .header-cart { display: inline-flex; }
  .header-inner { min-height: 74px; }
  .logo { margin-inline: 0; }
  .logo-mark { width: 50px; height: 50px; }
  .logo-word { font-size: 1.4rem; }
  .header-status { display: none; }
}
/* الهاتف: الرأس يجب أن يسع «اطلب الآن» + الاسم + الجرس + اللغة + القائمة بلا قصّ؛ البحث له مكانه في صفحة القائمة */
@media (max-width: 599px) {
  .header-inner { gap: 6px; }
  .header-actions { gap: 0; }
  .header-actions .btn-icon { width: 38px; min-height: 38px; }
  .header-search { display: none; }
  .logo-word { font-size: var(--fs-base); }
  .logo-sub { display: none; }
  .lang-toggle { min-width: 34px; height: 28px; padding: 0 7px; font-size: var(--fs-2xs); }
  .order-now { padding: 0 12px; font-size: var(--fs-sm); min-height: 36px; }
}
@media (max-width: 359px) { .logo-word { font-size: var(--fs-base); } .order-now { padding: 0 9px; font-size: var(--fs-sm); } }
/* الإعلان العلوي: شريط رمادي فاتح رفيع */
#announce { background: var(--paper-2) !important; color: var(--ink) !important; }
.announce-close { color: var(--ink) !important; }
/* القائمة الجانبية على الهاتف: اللغة والإشعارات فيها */
.drawer-lang { display: flex; gap: 6px; align-items: center; }
.drawer-lang .lang-dot { border-color: var(--ink); color: var(--ink); opacity: .6; }
.drawer-lang .lang-dot.is-on { background: var(--brand); border-color: var(--brand); color: #fff; opacity: 1; }

/* شارة حالة الفتح */
.status-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px 4px 10px; border-radius: 6px; font-size: var(--fs-sm); font-weight: 500; background: var(--paper); border: 1px solid var(--paper-3); }
.status-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-4); }
.status-pill.is-open { color: var(--ok-text); border-color: var(--ok-soft); background: var(--ok-soft); }
.status-pill.is-open .dot { background: var(--ok); box-shadow: 0 0 0 3px rgba(47, 125, 79, .18); animation: pulse 2s infinite; }
.status-pill.is-closed { color: var(--ink-2); background: var(--paper-2); }
.status-pill.is-closed .dot { background: var(--danger); }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 3px rgba(47, 125, 79, .18); } 50% { box-shadow: 0 0 0 6px rgba(47, 125, 79, .05); } }

/* ---------- شريط الهاتف السفلي ---------- */
/* شريط عائم على شكل كبسولة، والتبويب النشط داخل كبسولة رمادية */
.bottom-nav {
  --nav-h: 79px;
  position: fixed; bottom: 0; inset-inline: 0; z-index: 60;
  /* الحافّة الآمنة 34px على آيفون، وجمعها كاملةً مع 6 يترك فجوة 40px تحت الكبسولة.
     مؤشّر الشاشة خيط رفيع، فيكفي أن نخلي له نحو 20px: تنزل الكبسولة ولا تلامسه.
     على ما لا حافّة آمنة فيه (متصفّح، أندرويد) يبقى 6px كما كان. */
  padding: 0 10px max(6px, calc(env(safe-area-inset-bottom) - 14px));
  background: transparent;
  border: 0;
  /* الحاوية شفافة وأطول من الكبسولة: بلا هذا تبتلع اللمس في هامشها فوق ما تحته */
  pointer-events: none;
}
.bottom-nav-inner { pointer-events: auto; }
.bottom-nav-inner {
  /* أعمدة بعدد التبويبات مهما تغيّر، بلا رقم ثابت يُنسى عند إضافة تبويب أو حذفه */
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  /* زجاج مائل للبياض: المحتوى يظهر خلفه بضباب خفيف */
  background: rgba(255, 255, 255, .72);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: var(--radius-pill);
  box-shadow: 0 8px 28px rgba(0, 0, 0, .14); padding: 5px;
}
@supports not (backdrop-filter: blur(1px)) { .bottom-nav-inner { background: var(--paper); } }
.bottom-nav-item {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 8px 4px 7px; font-size: var(--fs-2xs); font-weight: 500; color: var(--ink-3);
  border-radius: var(--radius-pill);
}
.bottom-nav-item .icon { width: 22px; height: 22px; }
.bottom-nav-item.is-active { color: var(--ink); background: rgba(0, 0, 0, .06); }
.bottom-nav-item.is-active .icon { color: var(--brand-text); }
.bottom-nav-item .count-badge { top: 2px; inset-inline-end: calc(50% - 22px); }
.bottom-nav-cart-unused { position: relative; }
.bottom-nav-cart .cart-orb { position: absolute; top: -22px; width: 56px; height: 56px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; box-shadow: 0 6px 16px -4px rgba(225, 30, 42, .6), 0 0 0 4px #fff; }
.bottom-nav-cart .cart-orb .icon { width: 26px; height: 26px; }
.bottom-nav-cart > span:not(.count-badge) { margin-top: 30px; }
.bottom-nav-cart .count-badge { top: -26px; inset-inline-end: calc(50% - 30px); background: var(--ink); }
body { padding-bottom: calc(82px + env(safe-area-inset-bottom)); }
@media (min-width: 960px) {
  .bottom-nav { display: none; }
  body { padding-bottom: 0; }
}

/* شريط الطلب الجاري: شريط لاصق تحت الترويسة، لا يغطّي المحتوى ولا يزاحم الشريط السفلي */
/* كبسولة عائمة بعرض محتواها، يسحبها المستخدم إلى أي مكان ويُحفظ موضعها */
.active-bar { position: fixed; z-index: 49; width: max-content; max-width: min(84vw, 330px); animation: pop var(--normal) var(--ease); }
/* touch-action لا يُورَّث: بلا تعميمه على الأبناء يبتلع المتصفحُ اللمسةَ على الرابط والنص
   ليمرّر الصفحة فلا تصل أحداث الحركة، ولا تتحرّك الكبسولة. ومعها منع قائمة iOS
   الطويلة ومعاينة الرابط وسحب الصورة، فكلها تخطف الإصبع أثناء السحب. */
.active-bar, .active-bar * { touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.active-bar img { -webkit-user-drag: none; pointer-events: none; }
.active-bar.is-dragging { animation: none; opacity: .92; }
/* ملتصقة بحافة: تنكمش إلى دائرة بالديك وحده، وتُفتح باللمس */
.active-bar.is-docked { width: 54px; max-width: 54px; }
.active-bar.is-docked .active-bar-inner { padding: 6px; min-height: 0; gap: 0; justify-content: center; }
.active-bar.is-docked .active-bar-inner > .grow, .active-bar.is-docked .active-bar-cta { display: none; }
.active-bar.is-docked .active-bar-icon { width: 42px; height: 42px; }
.active-bar.is-docked .active-bar-icon img { width: 38px; height: 38px; }
.active-bar-inner { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 50px; padding: 6px 12px 6px 6px; border-radius: var(--radius-pill); background: linear-gradient(100deg, var(--brand) 0%, #c2121d 62%, #a50f19 100%); color: #fff; text-decoration: none; box-shadow: 0 8px 22px -8px rgba(225, 30, 42, .55); }
.active-bar-inner:hover { color: #fff; }
.active-bar-icon { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; overflow: hidden; background: #fff6ef; }
.active-bar-icon img { width: 36px; height: 36px; object-fit: contain; }
.active-bar-inner.is-moving .active-bar-icon { background: #fff; }
.active-bar-inner.is-moving .active-bar-icon img { animation: bob 1.2s ease-in-out infinite; }
.active-bar-inner > .grow { min-width: 0; }
.active-bar-inner strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.active-bar-sub { opacity: .8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.active-bar-cta { flex: none; display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-sm); font-weight: 600; color: #fff; opacity: .92; }
@keyframes bob { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(-3px); } }

/* زر الرجوع */
.page-back {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  margin: 10px var(--gutter) 0; background: var(--paper); color: var(--ink); border: 1px solid var(--paper-3);
  box-shadow: var(--shadow-sm);
}
.page-back .icon { width: 20px; height: 20px; }
[dir="ltr"] .page-back .icon { transform: scaleX(-1); }
@media (min-width: 960px) { .page-back { display: none; } }

/* ---------- لافتة التثبيت ---------- */
.install-banner {
  position: fixed; inset-inline: 12px; bottom: calc(72px + env(safe-area-inset-bottom)); z-index: 59;
  background: var(--paper); box-shadow: var(--shadow); border-radius: var(--radius-lg);
  animation: pop var(--normal) var(--ease);
}
.install-inner { display: flex; align-items: center; gap: 12px; padding: 10px 12px; }
.install-icon { border-radius: 12px; }
.ios-steps { display: flex; flex-direction: column; gap: 14px; }
.ios-steps li { display: flex; align-items: center; gap: 12px; font-weight: 600; }
.ios-steps .icon { width: 28px; height: 28px; color: var(--info-text); }
.push-banner-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-text); flex: none; }
.push-banner-icon .icon { width: 22px; height: 22px; }
/* صفحة الصنف: شريط الشراء مثبّت أسفل الشاشة، فيجلس شريط «ثبّت التطبيق» فوقه لا عليه */
body.has-pdp-sticky .install-banner { bottom: calc(145px + env(safe-area-inset-bottom)); }
@media (min-width: 960px) { .install-banner { inset-inline: auto; inset-inline-end: 24px; bottom: 24px; width: 380px; } }
@media (min-width: 900px) { body.has-pdp-sticky .install-banner { bottom: calc(72px + env(safe-area-inset-bottom)); } }

/* ---------- التذييل ---------- */
.site-footer { margin-top: 64px; background: var(--ink); color: rgba(255, 255, 255, .85); }
.footer-inner { padding: 48px 0 28px; display: grid; gap: 32px; }
.footer-brand { display: flex; flex-direction: column; gap: 8px; }
.footer-brand img { border-radius: 50%; }
.footer-brand .muted { color: rgba(255, 255, 255, .6); }
.footer-cols { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.footer-col h3 { margin-bottom: 12px; color: #fff; }
.footer-col li { padding: 4px 0; }
.footer-col a { display: inline-flex; align-items: center; gap: 8px; }
.footer-col a:hover { text-decoration: underline; text-underline-offset: 3px; }
.footer-contact li { display: flex; align-items: flex-start; gap: 8px; font-size: var(--fs-base); }
.footer-contact .muted { color: rgba(255, 255, 255, .6); }
.footer-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; text-align: center; gap: 12px 24px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .12); font-size: var(--fs-sm); }
body:not([data-route="home"]) .footer-bottom { display: none; }
@media (min-width: 720px) { .footer-bottom { justify-content: space-between; text-align: start; } }
.credit-label { color: rgba(255, 255, 255, .55); }
.credit-name { color: #fff; font-weight: 600; }
.dev-credit { margin: 0; text-align: center; font-weight: 500; color: var(--ink-3); font-size: var(--fs-base); }
.dev-credit-name { color: var(--ink); font-weight: 600; text-decoration: none; }
a.dev-credit-name { color: var(--brand-text); }
a.dev-credit-name:hover { color: var(--brand-2); }
.drawer-menu .drawer-foot { background: var(--paper-2); }
.credit-link { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(255, 255, 255, .4); }
.credit-link:hover { color: var(--sun); }
@media (min-width: 960px) {
  .footer-inner { grid-template-columns: 1.1fr 2fr; }
  .footer-cols { grid-template-columns: repeat(3, 1fr); }
  .footer-bottom { grid-column: 1 / -1; }
}

/* ---------- الحالات ---------- */
.state-block { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; padding: 48px 16px; }
.page-state { min-height: 50dvh; justify-content: center; }
.error-list { margin: 6px 0 0; padding-inline-start: 18px; display: flex; flex-direction: column; gap: 4px; font-weight: 600; list-style: disc; }

/* ---------- الرئيسية بترتيب التطبيقات ---------- */
.home-top { background: #1d1d1f; color: #fff; }
.home-top-inner { display: flex; flex-direction: column; gap: 10px; padding: 0 0 14px; }
.home-top .status-pill { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .15); color: #fff; }
.home-top .status-pill.is-open { color: #9be7b5; }
.home-top .status-pill .muted { color: rgba(255, 255, 255, .6); }
.home-top .mode-switch { background: rgba(255, 255, 255, .12); }
.home-top .mode-switch-btn { color: rgba(255, 255, 255, .75); }
.home-top .mode-switch-btn.is-on { background: var(--brand); color: #fff; }
.home-search { display: none; }
.mode-switch { display: inline-flex; padding: 3px; border-radius: 8px; background: var(--paper-2); }
.mode-switch-btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 6px; font-weight: 500; font-size: var(--fs-sm); color: var(--ink-3); transition: all var(--fast); }
.mode-switch-btn.is-on { background: var(--brand); color: #fff; }
.home-search { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 0 14px; border-radius: 8px; background: var(--paper-2); border: 1px solid var(--paper-3); color: var(--ink-3); font-size: var(--fs-base); text-align: start; }
.home-search .icon { color: var(--brand-text); }
.home-banners { position: relative; width: 100%; padding: 0 0 8px; background: linear-gradient(180deg, #1d1d1f 0 42%, var(--paper-2) 42% 100%); }
.home-banners > .banners { width: min(var(--container), 100% - 2 * var(--gutter)); margin-inline: auto; }
.banners { position: relative; }
.banner-track { display: grid; grid-auto-flow: column; grid-auto-columns: 100%; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: var(--radius-lg); }
.banner-track::-webkit-scrollbar { display: none; }
.banner-slide { position: relative; display: block; scroll-snap-align: start; aspect-ratio: 4 / 5; border-radius: 16px; overflow: hidden; background: var(--paper-2); box-shadow: 0 10px 30px rgba(0, 0, 0, .18); }
.banner-slide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.banner-slide.has-title::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0, 0, 0, .7) 0%, transparent 45%); }
.banner-title { position: absolute; inset-inline: 16px; bottom: 12px; z-index: 1; color: #fff; font-size: clamp(1.1rem, 4.5vw, 1.6rem); text-shadow: 0 1px 3px rgba(0, 0, 0, .5); line-height: 1.25; }
.banner-dots { display: flex; justify-content: center; gap: 8px; padding: 18px 0 14px; }
.banner-dot { width: 28px; height: 8px; border-radius: 4px; background: var(--paper-3); transition: all var(--fast); }
.banner-dot.is-on { background: var(--brand); }
@media (min-width: 900px) { .banner-track { grid-auto-columns: calc(33.333% - 8px); } .home-top-inner { flex-direction: row; align-items: center; justify-content: space-between; padding: 12px 0 16px; } }
.home-cats { padding-top: 20px; }
.section-sub { color: var(--ink-3); margin-top: -8px; margin-bottom: 14px; }
.cat-row { display: flex; gap: 14px; overflow-x: auto; scrollbar-width: none; padding: 4px 2px 10px; }
.cat-row::-webkit-scrollbar { display: none; }
.cat-circle { flex: none; width: 88px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.cat-circle-img { width: 84px; height: 84px; border-radius: 12px; overflow: hidden; background: var(--paper-2); border: 1px solid var(--paper-3); transition: border-color var(--fast); }
.cat-circle-img img { width: 100%; height: 100%; object-fit: cover; }
.cat-circle:hover .cat-circle-img { border-color: var(--brand); }
.cat-circle-label { font-size: var(--fs-sm); font-weight: 500; line-height: 1.25; }
@media (min-width: 900px) { .cat-row { justify-content: flex-start; gap: 22px; } .cat-circle { width: 120px; } .cat-circle-img { width: 112px; height: 112px; } .cat-circle-label { font-size: var(--fs-base); } }
.reorder-row { display: grid; gap: 10px; }
@media (min-width: 720px) { .reorder-row { grid-template-columns: repeat(3, 1fr); } }
.reorder-card { display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
.reorder-icon { width: 40px; height: 40px; border-radius: 10px; background: var(--brand-soft); color: var(--brand-text); display: grid; place-items: center; flex: none; }
/* 75px: أعلى كبسولة الشريط السفلي من أسفل الشاشة، +8 فرجة. أقلّ من ذلك يقع طرف زر الشراء تحتها */
.pdp-sticky { position: fixed; bottom: calc(83px + env(safe-area-inset-bottom)); inset-inline: 12px; z-index: 57; display: flex; }
.pdp-sticky .btn { width: 100%; justify-content: space-between; box-shadow: var(--shadow); }
@media (min-width: 900px) { .pdp-sticky { display: none; } }
@media (max-width: 899px) { .pdp-cta { display: none; } .pdp { padding-bottom: 72px; } }
body.kb-open .pdp-sticky { display: none !important; }

/* ---------- الصفحة الرئيسية ---------- */
.hero { position: relative; overflow: hidden; background: radial-gradient(120% 90% at 100% 0%, #b3161f 0%, var(--brand-deep) 55%, #5e0f10 100%); color: #fff; }
.hero::before { content: ''; position: absolute; inset: 0; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); opacity: .06; pointer-events: none; }
.hero-inner { display: grid; gap: 8px; align-items: center; position: relative; z-index: 1; padding: 28px 0 0; }
.hero-status { margin-bottom: 8px; }
.hero-status .status-pill { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .2); color: #fff; }
.hero-status .status-pill .muted { color: rgba(255, 255, 255, .7); }
.hero-status .status-pill.is-open { color: #fff; }
.hero-eyebrow { color: var(--sun); }
.hero-title { margin: 6px 0 10px; color: #fff; text-shadow: 0 2px 0 rgba(0, 0, 0, .25); }
.hero-sub { font-size: var(--fs-md); color: rgba(255, 255, 255, .85); max-width: 44ch; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.hero-ctas .btn-primary { background: var(--sun); border-color: var(--sun); color: var(--ink); box-shadow: 0 10px 24px -8px rgba(244, 167, 29, .6); }
.hero-ctas .btn-primary:hover { background: #ffb72e; border-color: #ffb72e; }
.hero-offers { border-color: rgba(255, 255, 255, .5); color: #fff; }
.hero-offers:hover { background: rgba(255, 255, 255, .1); }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.hero-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: rgba(255, 255, 255, .12); font-size: var(--fs-sm); font-weight: 500; }
.hero-art { display: flex; justify-content: center; align-self: end; margin-top: 8px; }
.hero-art img { width: min(78vw, 360px); height: auto; filter: drop-shadow(0 20px 30px rgba(0, 0, 0, .35)); border-radius: 24px 24px 0 0; }
@media (min-width: 900px) {
  .hero-inner { grid-template-columns: 1.2fr 1fr; padding: 40px 0 0; gap: 32px; }
  .hero-sub { font-size: var(--fs-lg); }
  .hero-art img { width: 460px; }
}

.home-section { padding: 36px 0 8px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.section-head .btn-flat { color: var(--brand-text); padding-inline: 4px; min-height: 32px; }
.section-head .btn-flat:hover { background: transparent; text-decoration: underline; }
.section-head .eyebrow { display: block; margin-bottom: 4px; }
.section-head .h2 { line-height: 1.35; }
.section-body { min-height: 80px; }
@media (min-width: 960px) { .home-section { padding: 52px 0 8px; } }

.cat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.cat-tile { position: relative; display: block; overflow: hidden; border-radius: var(--radius-lg); aspect-ratio: 4 / 3; background: var(--paper-2); box-shadow: var(--shadow-sm); }
.cat-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.cat-tile:hover img { transform: scale(1.05); }
.cat-tile::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(36, 16, 15, .8) 100%); }
.cat-label { position: absolute; inset-inline: 12px; bottom: 10px; z-index: 1; display: flex; align-items: baseline; justify-content: space-between; gap: 8px; color: #fff; }
.cat-label .h3 { font-size: var(--fs-md); text-shadow: 0 1px 2px rgba(0, 0, 0, .4); }
.cat-label .tiny { opacity: .8; }
@media (min-width: 720px) { .cat-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; } .cat-label .h3 { font-size: var(--fs-lg); } }
@media (min-width: 1100px) { .cat-grid { grid-template-columns: repeat(6, 1fr); } .cat-tile { aspect-ratio: 1; } .cat-label .h3 { font-size: var(--fs-md); } }

.item-rail { display: grid; grid-auto-flow: column; grid-auto-columns: min(66vw, 240px); gap: 12px; overflow-x: auto; padding: 4px 0 14px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.item-rail::-webkit-scrollbar { display: none; }
.item-rail > * { scroll-snap-align: start; }
@media (min-width: 960px) { .item-rail { grid-auto-flow: row; grid-template-columns: repeat(4, 1fr); overflow: visible; gap: 18px; } }

.values { margin-top: 36px; background: var(--paper-2); color: var(--ink); }
.values-grid { display: grid; gap: 12px; padding: 20px 0; }
.value { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; background: var(--paper); border: 1px solid var(--paper-3); border-radius: var(--radius); }
.value .icon { width: 26px; height: 26px; color: var(--brand-text); flex: none; }
@media (min-width: 720px) { .values-grid { grid-template-columns: repeat(2, 1fr); gap: 32px; } }
@media (min-width: 1100px) { .values-grid { grid-template-columns: repeat(4, 1fr); } }
.branch-grid { display: grid; gap: 12px; }
@media (min-width: 720px) { .branch-grid { grid-template-columns: 1fr 1fr; } }
.branch { display: flex; gap: 12px; padding: 14px; align-items: flex-start; }
/* بطاقة الفرع: العنوان فوق، وشريط إجراءات متساوٍ أسفلها (اتصال/واتساب/الخريطة) */
.branch-card { padding: 0; overflow: hidden; }
.branch-head { display: flex; gap: 12px; padding: 14px; align-items: flex-start; }
.branch-name { font-size: var(--fs-md); }
.branch-km { font-size: var(--fs-xs); font-weight: 700; color: var(--brand-text); background: var(--brand-soft); border-radius: 999px; padding: 2px 8px; }
.branch-acts { display: flex; border-top: 1px solid var(--paper-3); }
.branch-act { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 11px 6px; font-size: var(--fs-sm); font-weight: 600; color: var(--ink); }
.branch-act + .branch-act { border-inline-start: 1px solid var(--paper-3); }
.branch-act .icon { width: 18px; height: 18px; color: var(--brand-text); }
.branch-act:hover { background: var(--paper-2); }
.branch-act:active { background: var(--paper-3); }
.branch-icon { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-text); flex: none; }

/* ---------- بطاقة الصنف ---------- */
.item-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 720px) { .item-grid { grid-template-columns: repeat(3, 1fr); gap: 18px; } }
@media (min-width: 1100px) { .item-grid { grid-template-columns: repeat(4, 1fr); } }
.item-card { display: flex; flex-direction: column; background: transparent; border: 0; border-radius: 0; overflow: visible; }
.item-media { position: relative; aspect-ratio: 4 / 5; overflow: hidden; border-radius: 18px; background: var(--paper-2); }
.item-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
@media (hover: hover) { .item-card:hover .item-img { transform: scale(1.04); } }
.item-media.is-unavailable .item-img { filter: grayscale(.8); opacity: .55; }
.item-card.is-unavailable .card-name, .item-card.is-unavailable .card-price { color: var(--ink-3); }
.card-badges { position: absolute; top: 8px; inset-inline-start: 8px; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.card-body { padding: 10px 2px 4px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card-name { font-family: var(--font-display); font-size: var(--fs-md); font-weight: 600; line-height: 1.25; }
.card-desc { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-foot { margin-top: auto; }
.card-price { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; font-size: var(--fs-md); font-weight: 600; color: var(--brand-text); }
.add-btn { width: 36px; height: 36px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; flex: none; transition: transform var(--fast), background var(--fast); }
/* الزر أبيض دائري داخل الصورة عند زاويتها السفلية، في الشبكة والقوائم */
.item-card .add-btn { position: absolute; inset-inline-end: 8px; bottom: 8px; width: 40px; height: 40px; background: #fff; color: var(--ink); box-shadow: 0 2px 10px rgba(0, 0, 0, .18); }
.item-card .add-btn:hover { background: #fff; color: var(--brand-text); }
.item-card .add-btn:disabled { background: var(--paper-2); color: var(--ink-4); }
.item-card .card-desc { margin-top: 2px; }
.item-card.is-list .add-btn { inset-inline-end: 4px; bottom: 4px; width: 32px; height: 32px; }
.item-card.is-list .add-btn .icon { width: 17px; height: 17px; }
/* بعد الإضافة: زائد، العدد، وسلة الحذف داخل الصورة */
.qty-pill { position: absolute; inset-inline-end: 8px; bottom: 8px; display: flex; align-items: center; gap: 2px; height: 40px; padding: 0 4px; border-radius: 999px; background: #fff; box-shadow: 0 2px 10px rgba(0, 0, 0, .18); }
.qty-pill button { width: 30px; height: 30px; display: grid; place-items: center; border: 0; background: transparent; color: var(--brand-text); border-radius: 50%; }
.qty-pill button:hover { background: var(--brand-soft); }
.qty-pill .qty-n { min-width: 18px; text-align: center; font-weight: 700; font-size: var(--fs-sm); color: var(--ink); font-variant-numeric: tabular-nums; }
.item-card.is-list .qty-pill { inset-inline-end: 4px; bottom: 4px; height: 32px; padding: 0 3px; }
.upsell-slot { display: flex; justify-content: center; width: 100%; min-height: 36px; margin-top: 4px; }
/* الصنف يطير إلى السلة */
.fly-ghost { position: fixed; z-index: 1900; pointer-events: none; border-radius: 50%; background-size: cover; background-position: center; box-shadow: 0 12px 28px rgba(40, 20, 16, .28); will-change: transform; }
.upsell-card .qty-pill { position: static; height: 36px; padding: 0 6px; box-shadow: none; border: 1.5px solid var(--brand); background: var(--paper); }
.item-card.is-list .qty-pill button { width: 25px; height: 25px; }
.item-card.is-list .qty-pill button .icon { width: 15px; height: 15px; }
.add-btn:hover { background: var(--brand-2); transform: scale(1.06); }
.add-btn:disabled { background: var(--ink-4); box-shadow: none; cursor: not-allowed; }
.add-btn .icon { width: 20px; height: 20px; stroke-width: 2.4; }
.is-skeleton .item-media { border-color: transparent; }
.sk-line { height: 14px; margin: 10px 12px 0; width: 70%; }
.sk-short { width: 40%; margin-bottom: 12px; }

/* ---------- القائمة ---------- */
.cat-tabs-wrap { position: sticky; top: 66px; z-index: 40; background: var(--paper); border-bottom: 1px solid var(--paper-3); padding: 0; }
@media (min-width: 960px) { .cat-tabs-wrap { top: 74px; } }
.cat-tabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; }
.cat-tabs::-webkit-scrollbar { display: none; }
.cat-tab { flex: none; display: inline-flex; align-items: center; padding: 14px 14px 11px; border-bottom: 3px solid transparent; font-weight: 500; font-size: var(--fs-base); color: var(--ink-3); transition: all var(--fast); }
.cat-tab:hover { color: var(--ink); }
.cat-tab.is-on { border-bottom-color: var(--brand); color: var(--brand-text); }
.menu-body .item-grid { grid-template-columns: 1fr; gap: 0; }
@media (min-width: 720px) { .menu-body .item-grid { grid-template-columns: 1fr 1fr; gap: 12px; } }
.item-card.is-list { flex-direction: row; align-items: stretch; border-radius: 0; border: 0; border-bottom: 1px solid var(--paper-3); }
.item-card.is-list .item-media { width: 108px; flex: none; aspect-ratio: 1; align-self: center; border-radius: 12px; margin: 12px 0; }
.item-card.is-list .card-name { font-family: var(--font-body); font-size: var(--fs-base); }
.item-card.is-list .card-body { padding: 12px 12px 12px 0; }
[dir=ltr] .item-card.is-list .card-body { padding: 12px 0 12px 12px; }
.item-card.is-list .card-name { font-size: var(--fs-base); }
.item-card.is-list .card-badges { top: 6px; inset-inline-start: 6px; }
.item-card.is-list .card-badges .badge { font-size: var(--fs-2xs); padding: 2px 6px; }
@media (min-width: 720px) { .item-card.is-list { border: 1px solid var(--paper-3); border-radius: var(--radius-lg); } .item-card.is-list .item-media { margin-inline-start: 12px; } .item-card.is-list .card-body { padding: 12px; } }
.menu-body { padding-top: 12px; }
.menu-section { padding: 14px 0 8px; scroll-margin-top: 120px; }
.menu-section .section-head { margin-bottom: 12px; }

/* ---------- ورقة الاختيار ---------- */
.modal-sheet > .modal-panel { width: min(520px, 100%); }

/* ---------- ورقة العناوين (بأسلوب توترز): ترتفع من الأسفل، بطاقات بيضاء على أرضية رمادية ---------- */
.addr-modal { align-items: flex-end; padding: 0; }
.addr-modal > .modal-panel { width: 100%; max-width: 560px; max-height: 88vh; border-radius: 22px 22px 0 0; animation: sheet-up .25s var(--ease); }
@keyframes sheet-up { from { transform: translateY(100%); } to { transform: none; } }
.addr-modal .modal-head { border-bottom: 0; padding: 4px 20px 8px; }
/* مقبض السحب: منطقة لمس مريحة، والشريط الرمادي في وسطها */
.sheet-handle { display: grid; place-items: center; padding: 10px 0 6px; cursor: grab; touch-action: none; }
.sheet-handle:active { cursor: grabbing; }
.sheet-handle-bar { width: 44px; height: 5px; border-radius: 999px; background: var(--paper-3); }
.modal-panel.is-dragging { transition: none !important; animation: none !important; }
.addr-modal .modal-head { touch-action: none; }
.addr-modal .modal-head .h4, .addr-modal .modal-head .section-title { font-size: var(--fs-lg); font-weight: 600; }
.addr-modal .modal-body { background: var(--canvas); padding: 12px 16px calc(20px + env(safe-area-inset-bottom)); }
.addr-search { display: flex; align-items: center; gap: 10px; background: var(--paper); border-radius: var(--radius-lg); padding: 0 14px; box-shadow: var(--shadow-card); }
.addr-search-input { flex: 1; border: 0; background: transparent; padding: 14px 0; font: inherit; color: var(--ink); outline: none; }
.addr-search-input::placeholder { color: var(--ink-4); }
.addr-card { background: var(--paper); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); overflow: hidden; }
.addr-head { font-family: var(--font-display); font-weight: 600; font-size: var(--fs-md); padding-inline-start: 4px; }
.addr-row { display: flex; align-items: center; gap: 14px; width: 100%; padding: 15px 16px; text-align: start; background: transparent; border: 0; }
.addr-row + .addr-row { border-top: 1px solid var(--paper-3); }
.addr-row:hover, .addr-row:active { background: var(--paper-2); }
.addr-ico { flex: none; width: 28px; display: grid; place-items: center; color: var(--ink-2); }
.addr-ico .icon { width: 22px; height: 22px; }
.addr-name { font-family: var(--font-display); font-weight: 600; font-size: var(--fs-base); }
.addr-sub { font-size: var(--fs-xs); color: var(--ink-3); margin-top: 2px; }
.addr-chev { flex: none; }
/* لا زر إغلاق في الأعلى: الإغلاق بالسحب أو بالضغط خارج الورقة، كما في توترز */
.addr-modal .modal-head .btn-icon { display: none; }
.addr-search-ico { flex: none; width: 22px; height: 22px; color: var(--ink-2); }
.addr-search { padding: 4px 18px; }
.addr-search-input { padding: 14px 0; font-size: var(--fs-sm); }
.addr-head { font-size: var(--fs-md); margin-top: 6px; }
.addr-saved-card.is-on { box-shadow: 0 0 0 2px var(--brand), var(--shadow-card); }
/* بطاقة العنوان المحفوظ: دبوس يميناً، النص، و«...» يساراً */
.addr-saved-card { display: flex; align-items: stretch; }
.addr-saved-card .addr-row { flex: 1; }
.addr-more { flex: none; width: 52px; display: grid; place-items: center; background: transparent; border: 0; color: var(--ink-3); border-radius: var(--radius-lg); }
.addr-more:hover { background: var(--paper-2); color: var(--ink); }
.addr-more .icon { width: 22px; height: 22px; }
.addr-ico-pin { color: var(--brand-text); }
/* صف الموقع الحالي حين يكون الإذن مرفوضاً */
.addr-row.is-off .addr-name, .addr-row.is-off .addr-sub, .addr-row.is-off .addr-ico { color: var(--ink-4); }
.addr-row.is-off .addr-chev { display: none; }
.addr-enable { flex: none; padding: 8px 14px; border-radius: var(--radius); background: var(--paper-2); color: var(--ink); font-weight: 600; font-size: var(--fs-sm); }
/* شرائح تسمية العنوان: المنزل / العمل / أخرى */
.addr-kinds { display: flex; gap: 8px; }
.addr-kind { flex: 1; padding: 12px 8px; border-radius: var(--radius-lg); border: 1.5px solid var(--paper-3); background: var(--paper); font-weight: 600; font-size: var(--fs-base); color: var(--ink-2); }
.addr-kind.is-on { border-color: var(--brand); color: var(--brand-text); background: var(--brand-soft); }
.addr-name-input { width: 100%; }

.sheet-head { display: flex; gap: 12px; align-items: flex-start; }
.sheet-thumb { width: 72px; height: 90px; object-fit: contain; border-radius: 12px; flex: none; }
.opt-group { display: flex; flex-direction: column; gap: 8px; }
.opt-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.opt-list { display: flex; flex-direction: column; gap: 6px; }
.opt-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: var(--paper); border: 1.5px solid var(--paper-3); border-radius: var(--radius); cursor: pointer; transition: border-color var(--fast), background var(--fast); }
.opt-row:has(input:checked) { border-color: var(--brand); background: var(--paper); }
.opt-row input { width: 20px; height: 20px; accent-color: var(--brand); margin: 0; flex: none; }
.opt-row.is-off { opacity: .55; cursor: not-allowed; }
.opt-name { font-weight: 600; }
.opt-price { color: var(--ink-2); }
.modal-foot .btn-primary.grow { width: 100%; justify-content: space-between; }
.btn-total { margin-inline-start: auto; padding-inline-start: 12px; border-inline-start: 1px solid rgba(255, 255, 255, .35); }
.qty { display: inline-flex; align-items: center; border: 1.5px solid var(--ink); border-radius: 8px; background: var(--paper); }
.qty-btn { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 6px; }
.qty-btn:hover { background: var(--paper-2); }
.qty-btn:disabled { opacity: .35; cursor: not-allowed; }
.qty-val { min-width: 30px; text-align: center; font-weight: 500; }
.qty-lg .qty-btn { width: 42px; height: 42px; }
.qty-lg .qty-val { min-width: 38px; font-size: var(--fs-md); }

/* ---------- صفحة الصنف ---------- */
.pdp { padding-top: 12px; display: grid; gap: 22px; }
/* الهيكل المؤقت لصفحة الصنف (بلا style مضمّن، لأن سياسة الأمان تمنعه) */
.sk-pdp-title { width: 70%; height: 28px; border-radius: 8px; }
.sk-pdp-price { width: 35%; height: 22px; border-radius: 8px; }
.sk-pdp-block { height: 110px; border-radius: var(--radius-lg); }
.sk-pdp-cta { height: 48px; border-radius: var(--radius-pill); }
.pdp-main { position: relative; aspect-ratio: 4 / 4; overflow: hidden; border-radius: var(--radius-lg); background: var(--paper-2); box-shadow: var(--shadow-sm); }
.pdp-img { width: 100%; height: 100%; object-fit: contain; }
.pdp-main.is-unavailable .pdp-img { filter: grayscale(.8); opacity: .55; }
.pdp-thumbs { display: flex; gap: 8px; margin-top: 10px; }
.pdp-thumb { width: 64px; height: 80px; border-radius: 10px; border: 2px solid transparent; overflow: hidden; background: var(--paper-2); }
.pdp-thumb img { width: 100%; height: 100%; object-fit: contain; }
.pdp-thumb.is-on { border-color: var(--brand); }
.pdp-price { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; color: var(--brand-text); }
.pdp-cta .btn-primary { justify-content: space-between; }
@media (min-width: 900px) {
  .pdp { grid-template-columns: 1fr 1.1fr; gap: 40px; align-items: start; padding-top: 28px; }
  .pdp-info { position: sticky; top: 96px; }
}

/* ---------- السلة ---------- */
.cart-line { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: var(--line-soft); transition: background var(--normal); }
.cart-line.is-added { background: var(--brand-soft); }
.cart-thumb { flex: none; width: 68px; aspect-ratio: 4 / 5; border-radius: 12px; overflow: hidden; background: var(--paper-2); }
.cart-thumb img { width: 100%; height: 100%; object-fit: contain; }
.cart-info { display: flex; flex-direction: column; gap: 4px; }
.cart-name { font-weight: 500; line-height: 1.35; }
.drawer-cart .drawer-body { padding: 8px 20px; }
/* السلة: الشريط السفلي يبقى ظاهراً تحت الدرج بدل أن يختفي */
.has-cart-drawer .bottom-nav { z-index: 920; }
@media (max-width: 719px) {
  .has-cart-drawer .drawer-cart { bottom: var(--nav-h, 0px); }
  .has-cart-drawer .backdrop { bottom: var(--nav-h, 0px); }
}
.drawer-back { margin-inline-start: -6px; }
.cart-page { padding-top: 24px; }
.cart-layout { display: grid; gap: 28px; margin-top: 18px; }
.cart-summary { padding: 20px; display: flex; flex-direction: column; gap: 12px; height: fit-content; }
.btn.is-disabled { opacity: .5; pointer-events: none; }
@media (min-width: 960px) { .cart-layout { grid-template-columns: 1fr 360px; align-items: start; } .cart-summary { position: sticky; top: 96px; } }

/* ---------- إتمام الطلب ---------- */
.checkout { padding-top: 24px; }
.checkout-layout { display: grid; gap: 28px; margin-top: 18px; }
.checkout-form { display: flex; flex-direction: column; gap: 16px; }
.field-row { display: grid; gap: 16px; }
@media (min-width: 640px) { .field-row { grid-template-columns: 1fr 1fr; } }
.textarea-sm { min-height: 80px; }
.mode-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mode-btn { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: var(--radius); background: var(--paper); border: 2px solid var(--paper-3); text-align: start; transition: all var(--fast); }
.mode-btn .icon { width: 26px; height: 26px; color: var(--ink-3); flex: none; }
.mode-btn.is-on { border-color: var(--brand); background: var(--paper); }
.mode-btn.is-on .icon { color: var(--brand-text); }
.eta { padding: 4px 0; }
.cod-note { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--paper-2); border-radius: var(--radius); font-size: var(--fs-base); }
.cod-note .icon { flex: none; color: var(--brand-text); }
.form-error { padding: 10px 12px; background: var(--danger-soft); border-radius: var(--radius); }
.checkout-summary { padding: 20px; display: flex; flex-direction: column; gap: 12px; height: fit-content; }
.summary-items { display: flex; flex-direction: column; gap: 10px; }
.summary-item { display: flex; align-items: center; gap: 10px; }
.summary-item img { width: 44px; height: 55px; object-fit: contain; border-radius: 8px; flex: none; }
.summary-item .grow { display: flex; flex-direction: column; min-width: 0; }
.turnstile-host:empty { display: none; }
@media (min-width: 960px) { .checkout-layout { grid-template-columns: 1fr 380px; align-items: start; } .checkout-summary { position: sticky; top: 96px; } }

/* ---------- تأكيد الطلب ---------- */
.order-page { padding-top: 24px; display: flex; flex-direction: column; gap: 20px; }
.order-hero { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; }
.order-check { width: 64px; height: 64px; border-radius: 50%; background: var(--ok); color: #fff; display: grid; place-items: center; box-shadow: 0 0 0 8px var(--ok-soft); }
.order-check .icon { width: 32px; height: 32px; stroke-width: 2.6; }
.order-card { padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.order-no { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.order-no-val { letter-spacing: .06em; color: var(--brand-text); }
.order-actions { margin-top: 8px; }
.my-order-card { padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.orders-page { padding-top: 24px; display: flex; flex-direction: column; gap: 16px; }

/* ---------- التتبّع ---------- */
.track-page { padding-top: 24px; display: flex; flex-direction: column; gap: 16px; }
.track-form { padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.track-card { padding: 22px; display: flex; flex-direction: column; gap: 18px; margin-top: 8px; }

/* ---------- التقييم بعد التسليم: نجوم الطعام والمندوب ---------- */
.stars { display: inline-flex; gap: 4px; align-items: center; }
.icon.star { stroke: var(--ink-4); fill: none; stroke-width: 1.7; }
.icon.star.is-on { fill: var(--sun); stroke: var(--sun-2); }
.stars-pick { gap: 2px; }
.star-btn { appearance: none; background: none; border: 0; padding: 4px; margin: 0; cursor: pointer; color: inherit; border-radius: 8px; line-height: 0; transition: transform var(--fast) var(--ease); }
.star-btn .icon { width: 34px; height: 34px; }
.star-btn.is-on .icon { fill: var(--sun); stroke: var(--sun-2); }
.star-btn:hover { transform: scale(1.12); }
.star-btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.star-word { min-width: 4.5em; font-weight: 500; }
.rate-card { padding: 20px; display: flex; flex-direction: column; gap: 14px; margin-top: 12px; border: 1.5px solid var(--sun-soft); background: linear-gradient(180deg, #fffdf5 0%, #fff 60%); }
.rate-head { display: flex; align-items: center; gap: 12px; }
.rate-head .h4 { margin: 0; }
.rate-icon { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--sun-soft); color: var(--sun-2); }
.rate-icon .icon { fill: var(--sun); stroke: var(--sun-2); }
.rate-icon.is-done { background: var(--ok-soft); color: var(--ok); }
.rate-icon.is-done .icon { fill: none; stroke: var(--ok); }
.rate-row { display: flex; flex-direction: column; gap: 6px; }
.rate-row .label { margin: 0; }
.rate-comment { padding: 10px 12px; background: var(--paper-2); border-radius: 10px; margin: 0; }
.rate-card.in-sheet { margin-top: 0; box-shadow: none; }
.rating-pill { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 6px; font-size: var(--fs-sm); background: var(--paper); border: 1px solid var(--paper-3); }
.my-order-card .btn .star.is-on { fill: var(--sun); stroke: var(--sun-2); }
/* طلباتي كأوبر إيتس: تبويبات، بطاقة الطلب، النجوم تحت الطلب، شبكة الأصناف السابقة */
.orders-tabs { display: flex; border-bottom: 2px solid var(--paper-3); }
.orders-tab { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 8px; margin-bottom: -2px; border: 0; border-bottom: 3px solid transparent; background: none; font: inherit; font-weight: 500; color: var(--ink-3); cursor: pointer; }
.orders-tab.is-on { color: var(--ink); border-bottom-color: var(--ink); }
.my-order-head { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.my-order-head:hover { color: inherit; }
.my-order-icon { flex: none; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--paper-2); color: var(--brand-text); }
.my-order-thumbs { flex: none; display: flex; align-items: center; }
.my-order-thumbs img { width: 56px; height: 70px; object-fit: cover; border-radius: 10px; border: 2px solid #fff; box-shadow: var(--shadow-sm); background: var(--paper-2); }
.my-order-thumbs.is-many img + img { margin-inline-start: -22px; }
.my-order-head .num { white-space: nowrap; }
.my-order-items { color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.order-rate { display: flex; flex-direction: column; gap: 6px; padding-top: 10px; border-top: 1px solid var(--paper-3); }
.order-rate .stars-view { gap: 3px; }
.order-stars .star-btn .icon { width: 30px; height: 30px; }
/* صف أفقي يُمرَّر بالإصبع كما في أوبر إيتس */
.past-grid { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x proximity; padding-bottom: 6px; margin-inline: -4px; padding-inline: 4px; scrollbar-width: none; }
.past-grid::-webkit-scrollbar { display: none; }
.past-card { flex: none; width: 150px; scroll-snap-align: start; background: var(--paper); border: 1px solid var(--paper-3); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
@media (min-width: 600px) { .past-card { width: 170px; } }
.past-card.is-unavailable { opacity: .55; }
.past-media { position: relative; display: block; aspect-ratio: 4 / 4; background: var(--paper-2); }
.past-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.past-add { position: absolute; inset-inline-end: 8px; bottom: 8px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--paper); color: var(--ink); box-shadow: var(--shadow); display: grid; place-items: center; cursor: pointer; }
.past-add:disabled { opacity: .4; cursor: default; }
.past-body { padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; }
.orders-pill { border-radius: 999px; }
/* توقيع المطوّرة في التذييل: الرئيسية فقط (القائمة الجانبية لها توقيعها) */
.footer-bottom .credit { display: none; }
body[data-route="home"] .footer-bottom .credit { display: inline; }
.timeline { display: flex; flex-direction: column; gap: 0; }
.tl-step { display: flex; gap: 14px; position: relative; padding-bottom: 20px; }
.tl-step::before { content: ''; position: absolute; top: 24px; bottom: 0; inset-inline-start: 11px; width: 2px; background: var(--paper-3); }
.tl-step:last-child::before { display: none; }
.tl-dot { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--ink-4); background: var(--paper); display: grid; place-items: center; flex: none; color: #fff; }
.tl-step.is-done .tl-dot { background: var(--ok); border-color: var(--ok); }
.tl-step.is-current .tl-dot { box-shadow: 0 0 0 4px var(--ok-soft); }
.tl-step.is-done::before { background: var(--ok); }
.is-cancelled .tl-step.is-current .tl-dot { background: var(--danger); border-color: var(--danger); box-shadow: 0 0 0 4px var(--danger-soft); }
.tl-text { display: flex; flex-direction: column; }

/* ---------- الصفحات الثابتة ---------- */
.static-page { padding-top: 24px; display: flex; flex-direction: column; gap: 18px; }
.about-hero { border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); max-width: min(420px, 100%); height: auto; }
.story-p { font-size: var(--fs-md); line-height: 1.8; }
.contact-list { display: flex; flex-direction: column; gap: 12px; }
.contact-row { display: flex; gap: 14px; align-items: center; padding: 14px; background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.contact-row .icon { color: var(--brand-text); }
.contact-row .grow { display: flex; flex-direction: column; }
.contact-row a { font-weight: 500; }

/* ---------- البحث ---------- */
.search-overlay { position: fixed; inset: 0; z-index: 900; background: rgba(36, 16, 15, .6); backdrop-filter: blur(3px); animation: fade var(--normal) var(--ease); overflow: auto; }
.search-box { margin-top: 12px; }
.search-form { display: flex; align-items: center; gap: 10px; background: var(--paper); border-radius: 10px; box-shadow: var(--shadow); padding: 4px 8px 4px 18px; }
[dir="rtl"] .search-form { padding: 4px 18px 4px 8px; }
.search-form .icon { color: var(--brand-text); }
.search-input::-webkit-search-cancel-button, .search-input::-webkit-search-decoration { -webkit-appearance: none; appearance: none; }
.search-input { flex: 1; min-height: 46px; border: 0; background: transparent; font-size: var(--fs-md); outline: none; }
.search-results { background: var(--paper); border-radius: 18px; margin-top: 10px; padding: 12px; }
.search-list { display: flex; flex-direction: column; }
.search-item { display: flex; align-items: center; gap: 12px; padding: 8px 4px; border-bottom: var(--line-soft); border-radius: 8px; }
.search-item:hover { background: var(--paper-2); }
.search-item img { width: 48px; height: 60px; object-fit: cover; border-radius: 8px; flex: none; }
.search-item .grow { display: flex; flex-direction: column; min-width: 0; }
.search-name { font-weight: 500; }
@media (min-width: 960px) { .search-box { margin-top: 48px; max-width: 720px; } }

/* ---------- قائمة الهاتف ---------- */
.mobile-nav li a, .mobile-nav .menu-link { display: flex; align-items: center; gap: 12px; padding: 12px 0; font-size: var(--fs-md); font-weight: 500; border-bottom: var(--line-soft); }
.mobile-nav .nav-offer { color: var(--brand-text); }
.mobile-nav .icon { color: var(--brand-text); }
.mobile-contact { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.menu-link { width: 100%; text-align: start; font: inherit; color: inherit; background: none; border: 0; }

/* ---------- الإشعارات والكوبون ---------- */
.push-block { display: flex; flex-direction: column; gap: 8px; }
.promo-push .btn { flex: none; }
.coupon-box { margin: 6px 0; }
.coupon-box .input { flex: 1; min-height: 42px; text-transform: uppercase; letter-spacing: .08em; }
.coupon-on { padding: 8px 12px; background: var(--ok-soft); border-radius: 10px; }
.discount-row .price { color: var(--ok-text); }
.bell-badge { inset-inline-end: -2px; top: -2px; }
.inbox-list { display: flex; flex-direction: column; max-height: 55dvh; overflow: auto; }
.inbox-item a { display: flex; gap: 10px; align-items: flex-start; padding: 10px 6px; border-bottom: var(--line-soft); text-decoration: none; color: inherit; }
.inbox-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 7px; flex: none; background: transparent; }
.inbox-item.is-unread .inbox-dot { background: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.inbox-empty { padding: 24px 8px; }

/* أثناء الكتابة: يختفي الشريط السفلي ولا يرتفع فوق لوحة المفاتيح */
body.kb-open .bottom-nav, body.kb-open #install-banner { display: none !important; }
body.kb-open { padding-bottom: 0; }

@media print { .site-header, .site-footer, .bottom-nav, .install-banner, #announce { display: none !important; } }

/* ---------- شاشة الافتتاح (كتطبيق KFC): أحمر مع الشعار في المنتصف ثم تتلاشى ---------- */
.splash { position: fixed; inset: 0; z-index: 2000; display: grid; place-items: center; overflow: hidden; background: radial-gradient(circle at 50% 38%, #fff 0 24%, #fff8f3 58%, #f8eee9 100%); transition: opacity .45s var(--ease); }
.splash::before { content: ''; position: absolute; width: min(82vw, 390px); aspect-ratio: 1; border-radius: 50%; border: 1px solid rgba(225, 30, 42, .09); box-shadow: 0 0 0 38px rgba(225, 30, 42, .025), 0 0 0 78px rgba(244, 167, 29, .02); }
.splash.is-out { opacity: 0; pointer-events: none; }
.splash-inner { position: relative; display: flex; flex-direction: column; align-items: center; animation: splash-in .65s var(--ease); }
.splash-logo { width: min(42vw, 168px); aspect-ratio: 1; display: grid; place-items: center; padding: 8px; border-radius: 50%; background: #fff; border: 1px solid rgba(225, 30, 42, .1); box-shadow: 0 18px 42px rgba(92, 30, 23, .13); }
.splash-logo img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
@keyframes splash-in { from { transform: translateY(10px) scale(.96); opacity: 0; } }
.splash .splash-word { margin-top: 20px; color: #1d1d1f; font-size: var(--fs-lg); font-weight: 600; letter-spacing: .09em; line-height: 1; direction: ltr; }
.splash-sub { margin-top: 8px; color: var(--brand-text); font-size: var(--fs-2xs); font-weight: 500; letter-spacing: .24em; direction: ltr; }
.splash-rider-wrap { position: relative; width: min(43vw, 178px); margin-top: 10px; filter: drop-shadow(0 15px 14px rgba(75, 25, 20, .18)); animation: rider-arrive 1.25s cubic-bezier(.18, .76, .22, 1.06) both; }
.splash-rider-wrap::after { content: ''; position: absolute; inset-inline: 15% 10%; bottom: 1%; height: 10px; border-radius: 50%; background: rgba(50, 28, 25, .13); filter: blur(5px); animation: rider-shadow 1.25s ease-out both; }
.splash-rider { position: relative; z-index: 1; width: 100%; height: auto; }
@keyframes rider-arrive {
  0% { transform: translateX(-115vw) translateY(8px) rotate(-7deg); opacity: 0; }
  72% { transform: translateX(10px) translateY(0) rotate(2deg); opacity: 1; }
  88% { transform: translateX(-4px) translateY(-3px) rotate(-1deg); }
  100% { transform: translateX(0) translateY(0) rotate(0); opacity: 1; }
}
@keyframes rider-shadow { 0% { transform: scaleX(.35); opacity: 0; } 75%, 100% { transform: scaleX(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .splash-inner, .splash-rider-wrap, .splash-rider-wrap::after { animation: none; } }

/* ---------- الإعلان الافتتاحي: صورة طولية بملء الشاشة مع زر إغلاق وزر ---------- */
.promo { position: fixed; inset: 0; z-index: 1900; display: grid; place-items: center; background: rgba(0, 0, 0, .72); animation: fade var(--normal) var(--ease); padding: 16px; }
.promo-card { position: relative; width: min(92vw, 420px); max-height: 88dvh; display: flex; flex-direction: column; border-radius: 18px; overflow: hidden; background: #000; box-shadow: var(--shadow); animation: pop var(--normal) var(--ease); }
.promo-card img { width: 100%; height: auto; max-height: calc(88dvh - 64px); object-fit: cover; display: block; }
.promo-close { position: absolute; top: 10px; inset-inline-end: 10px; width: 36px; height: 36px; border-radius: 50%; background: rgba(0, 0, 0, .55); color: #fff; display: grid; place-items: center; }
.promo-cta { display: flex; align-items: center; justify-content: center; min-height: 52px; background: var(--brand); color: #fff; font-weight: 600; font-size: var(--fs-md); }

/* ---------- أول خطوة: توصيل أو استلام (ورقة كماكدونالدز) ---------- */
.method-modal .modal-head { border-bottom: 0; padding-bottom: 4px; }
.method-modal .modal-head .h4 { font-size: var(--fs-xl); font-family: var(--font-display, inherit); font-weight: 600; }
.method-modal .modal-body { padding: 8px 0 12px; }
.method-list { display: flex; flex-direction: column; }
.method-row { display: flex; align-items: center; gap: 16px; padding: 18px 20px; border-top: 1px solid var(--paper-3); text-align: start; background: var(--paper); transition: background var(--fast); }
.method-row:last-of-type { border-bottom: 1px solid var(--paper-3); }
.method-row:hover, .method-row:active { background: var(--paper-2); }
.method-row.is-on .method-title { color: var(--brand-text); }
.method-icon { flex: none; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: #fdecec; color: var(--brand-text); }
.method-icon .icon { width: 32px; height: 32px; }
.method-icon-pickup { background: #fdecec; }
.method-icon-delivery { background: #1d1d1f; color: #fff; }
.method-title { font-size: var(--fs-lg); line-height: 1.2; }
.method-chev { transition: transform var(--fast); }
.method-row:hover .method-chev { transform: translateX(-3px); }
[dir="ltr"] .method-row:hover .method-chev { transform: translateX(3px); }
.method-note { padding: 12px 20px 0; }
.branch-list { display: flex; flex-direction: column; }
.branch-row { display: flex; align-items: center; gap: 14px; padding: 14px 20px; border-top: 1px solid var(--paper-3); text-align: start; background: var(--paper); }
.branch-row:last-child { border-bottom: 1px solid var(--paper-3); }
.branch-row:hover { background: var(--paper-2); }
.branch-row-icon { flex: none; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--paper-2); color: var(--ink-2); }
.branch-row.is-on .branch-row-icon { background: var(--brand); color: #fff; }
.branch-check { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--paper-3); display: grid; place-items: center; color: transparent; flex: none; }
.branch-row.is-on .branch-check { border-color: var(--brand); background: var(--brand); color: #fff; }

/* شريط «التوصيل إلى / الاستلام من» في أعلى الرئيسية */
.method-strip { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border-radius: 10px; background: rgba(255, 255, 255, .1); color: #fff; text-align: start; border: 1px solid rgba(255, 255, 255, .14); }
.method-strip:hover { background: rgba(255, 255, 255, .16); }
.method-strip .icon { color: var(--sun, #ffc72c); }
.method-strip-text .tiny { color: rgba(255, 255, 255, .65); }
.method-strip-val { display: block; font-size: var(--fs-base); line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 62vw; }
.method-strip.is-missing .method-strip-val { color: #ffc72c; }
.method-strip-change { display: inline-flex; align-items: center; gap: 2px; font-size: var(--fs-xs); font-weight: 600; color: #fff; opacity: .85; flex: none; }

/* بطاقة الموقع في إتمام الطلب */
.loc-share { margin-bottom: 8px; }
.loc-share.is-busy .icon { animation: spin 1s linear infinite; }
.loc-pick { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px; border: 2px dashed var(--brand); border-radius: var(--radius); background: #fff7f7; color: var(--ink); text-align: start; }
.loc-pick > .icon:first-child { color: var(--brand-text); width: 28px; height: 28px; }
.loc-pick:hover { background: #fdecec; }
.loc-card { border: 1px solid var(--paper-3); border-radius: var(--radius); overflow: hidden; background: var(--paper); }
.loc-mini { height: 150px; pointer-events: none; }
.loc-card-foot { padding: 10px 12px; border-top: 1px solid var(--paper-3); }

/* خريطة التتبّع الحية */
.track-map-wrap { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--paper-3); margin: 4px 0 8px; }
.track-map { height: 260px; }
.track-driver-info { padding: 10px 12px; margin: 0; background: var(--paper-2); font-weight: 500; }
.track-driver-info .icon { color: var(--brand-text); }
.track-map-wrap.is-arrived .track-driver-info { background: var(--ok-soft); color: var(--ok); }
.track-map-wrap.is-arrived .track-driver-info .icon { color: var(--ok); }
.track-arrived { padding: 10px 12px; margin: 0; border-radius: 10px; background: var(--ok-soft); color: var(--ok); font-weight: 500; }
@media (min-width: 720px) { .track-map { height: 320px; } }

/* التذييل: على الهاتف يبقى سطر الحقوق والنسبة فقط (كالتطبيقات)، والأعمدة للشاشات الكبيرة */
@media (max-width: 959px) {
  body:not([data-route="home"]) .site-footer { display: none; }
  .site-footer { margin-top: 20px; background: var(--paper-2); color: var(--ink-3); }
  .footer-inner { padding: 10px 0 12px; gap: 0; }
  .footer-brand, .footer-cols { display: none; }
  .footer-bottom { padding-top: 0; border-top: 0; font-size: var(--fs-xs); }
}

/* ---------- القائمة بأسلوب KFC: مبدّل + شريط الموقع، ثم صفوف الأقسام ---------- */
.menu-top { background: var(--paper-2); padding: 12px 0 14px; border-bottom: 1px solid var(--paper-3); }
.method-strip.is-light { background: var(--paper); color: var(--ink); border-color: var(--paper-3); }
.method-strip.is-light:hover { background: var(--paper); border-color: var(--ink-3); }
.method-strip.is-light .icon { color: var(--brand-text); }
.method-strip.is-light .method-strip-text .tiny { color: var(--ink-3); }
.method-strip.is-light .method-strip-change { color: var(--brand-text); opacity: 1; }
.method-strip.is-light.is-missing .method-strip-val { color: var(--brand-text); }
.menu-cats-title { margin: 18px 0 6px; }
.cat-list { display: flex; flex-direction: column; }
.cat-row-link { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--paper-3); color: var(--ink); }
.cat-row-link:last-child { border-bottom: 0; }
.cat-row-img { flex: none; width: 76px; height: 76px; border-radius: 12px; overflow: hidden; background: var(--paper-2); }
.cat-row-img img { width: 100%; height: 100%; object-fit: cover; }
.cat-row-img-offer { display: grid; place-items: center; background: var(--brand); color: #fff; }
.cat-row-img-offer .icon { width: 32px; height: 32px; }
.cat-row-name { font-size: var(--fs-base); line-height: 1.3; }
.cat-row-chev { color: var(--ink-3); transition: transform var(--fast); }
.cat-row-link:hover .cat-row-chev { color: var(--brand-text); transform: translateX(-3px); }
[dir="ltr"] .cat-row-link:hover .cat-row-chev { transform: translateX(3px); }
.cat-row-sk { height: 76px; margin: 12px 0; border-radius: 12px; }
@media (min-width: 720px) { .cat-list { display: grid; grid-template-columns: 1fr 1fr; column-gap: 32px; } .cat-row-link:nth-last-child(2) { border-bottom: 0; } }

/* ---------- العرض الترغيبي «أكمل وجبتك» ---------- */
.upsell-modal .modal-head .h4 { font-size: var(--fs-lg); font-family: var(--font-display); font-weight: 600; }
.upsell-sub { margin-top: -4px; }
.upsell-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.upsell-card { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px; border: 1px solid var(--paper-3); border-radius: 14px; text-align: center; background: var(--paper); }
.upsell-media { width: 100%; aspect-ratio: 4 / 5; border-radius: 10px; overflow: hidden; background: var(--paper-2); }
.upsell-media img { width: 100%; height: 100%; object-fit: cover; }
.upsell-name { font-size: var(--fs-base); line-height: 1.25; }
.upsell-add { width: 100%; margin-top: 4px; }
.upsell-card.is-added { border-color: var(--ok); }
.upsell-card.is-added .upsell-add { background: var(--ok); border-color: var(--ok); }
.upsell-foot { display: flex; flex-direction: column; gap: 6px; width: 100%; }
@media (min-width: 600px) { .upsell-grid { grid-template-columns: repeat(4, 1fr); } .upsell-foot { flex-direction: row-reverse; } }

/* ---------- الرسوم بالمسافة وبطاقة المندوب ---------- */
.fee-note { display: flex; align-items: center; gap: 8px; margin: -6px 0 0; font-weight: 500; }
.fee-note .icon { color: var(--brand-text); }
.fee-note.is-bad { color: var(--danger-text); }
.fee-note.is-bad .icon { color: var(--danger-text); }
.track-driver { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-top: 1px solid var(--paper-3); background: var(--paper); }
.track-driver-avatar { flex: none; width: 44px; height: 44px; border-radius: 50%; background: #1d1d1f; color: #fff; display: grid; place-items: center; }
.track-driver-avatar .icon { width: 24px; height: 24px; }
.track-driver-avatar { overflow: hidden; }
.dev-credit-ver { margin-inline-start: .5rem; opacity: .6; font-size: var(--fs-2xs); }
.track-driver-avatar.has-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

.free-nudge { color: var(--ok-text); font-weight: 500; margin: -4px 0 0; }

/* ---------- نسخة المتجر (Capacitor): المحتوى يمتد تحت شريط الحالة فتُضاف المسافة الآمنة أعلى العناصر الملتصقة ---------- */
.is-native .site-header { padding-top: env(safe-area-inset-top); }
.is-native .cat-tabs-wrap { top: calc(66px + env(safe-area-inset-top)); }
.is-native .drawer { padding-top: env(safe-area-inset-top); }
.is-native .modal-map > .modal-panel { height: min(760px, calc(100dvh - env(safe-area-inset-top) - 8px)); }
.is-native .splash { padding-top: env(safe-area-inset-top); }
.is-native #install-banner { display: none; }
/* أول شريط ظاهر أعلى الصفحة هو الملاصق للنتوء: الإعلان ثم شريط الصيانة يسبقان الترويسة
   في public/index.html وفي app.js (‎site-header.before)، فيحمل الأولُ منهما مسافة النتوء
   بحشوته العليا وتملأها خلفيته نفسها. حشوة الترويسة تبقى كما هي لأنها هي التي تغطّي النتوء
   حين تُثبَّت الترويسة أعلى الشاشة بعد التمرير، ويسحبها هامش سالب مساوٍ للمسافة فوق حشوتها
   فلا يبقى فراغ بين الشريط والترويسة قبل التمرير. صندوق الترويسة لم يتغيّر، تغيّر موضعها في
   التدفّق فقط، فيبقى ارتفاعها المثبّت 66px + المسافة كما يفترضه .cat-tabs-wrap أعلاه.
   z أعلى للشريطين: الترويسة الملتصقة (z:50) ترسم فوق أشقّائها في التدفّق، فبلا ذلك تغطّي
   خلفيةُ حشوتها الشريطَ الذي فوقها بعد سحبه بالهامش السالب. */
.is-native #announce:not([hidden]), .is-native #maintenance-bar { position: relative; z-index: 51; }
.is-native #announce:not([hidden]) { padding-top: env(safe-area-inset-top); }
.is-native #maintenance-bar { padding-top: calc(10px + env(safe-area-inset-top)); } /* 10px حشوة .maintenance-bar أعلى الملف */
.is-native #announce:not([hidden]) ~ #maintenance-bar { padding-top: 10px; }
.is-native #announce:not([hidden]) ~ .site-header,
.is-native #maintenance-bar ~ .site-header { margin-top: calc(-1 * env(safe-area-inset-top)); }

/* ---------- الوضع الليلي: عناصر بألوان ثابتة ---------- */
/* الشريط السفلي زجاج داكن في الليل بدل الزجاج الأبيض */
html[data-theme="dark"] .bottom-nav-inner { background: rgba(48, 51, 57, .8); border-color: rgba(255, 255, 255, .10); box-shadow: 0 8px 28px rgba(0, 0, 0, .5); }
@supports not (backdrop-filter: blur(1px)) { html[data-theme="dark"] .bottom-nav-inner { background: var(--paper); } }
html[data-theme="dark"] .bottom-nav-item.is-active { background: rgba(255, 255, 255, .09); }
html[data-theme="dark"] .bottom-nav-cart .cart-orb { box-shadow: 0 6px 16px -4px rgba(225, 30, 42, .6), 0 0 0 4px var(--canvas); }
/* أزرار الإضافة فوق صور الأصناف: ورقية داكنة بدل الأبيض الصريح */
html[data-theme="dark"] .item-card .add-btn, html[data-theme="dark"] .item-card .add-btn:hover, html[data-theme="dark"] .qty-pill { background: var(--paper); color: var(--ink); }
html[data-theme="dark"] .loc-pick { background: var(--paper-2); }
html[data-theme="dark"] .splash-logo { background: var(--paper); border-color: rgba(225, 30, 42, .25); }
html[data-theme="dark"] .lb-2 { opacity: .5; filter: brightness(.5) saturate(2.4); }
html[data-theme="dark"] .status-pill { background: var(--paper-2); border-color: var(--paper-3); }
html[data-theme="dark"] .status-pill.is-open { background: var(--ok-soft); }
html[data-theme="dark"] .rate-card { background: var(--paper); border-color: var(--paper-3); }
html[data-theme="dark"] .rating-pill, html[data-theme="dark"] .past-card, html[data-theme="dark"] .past-add { background: var(--paper-2); color: var(--ink); border-color: var(--paper-3); }
html[data-theme="dark"] .footer, html[data-theme="dark"] .site-footer { background: #1b1c20; }
@media (max-width: 959px) {
  html[data-theme="dark"] .site-footer { background: #24262b; color: #aeb2ba; }
}
html[data-theme="dark"] .my-order-thumbs img { border-color: var(--paper-2); }
html[data-theme="dark"] .loc-pick { background: var(--brand-soft); }
html[data-theme="dark"] .leaflet-container { filter: brightness(.9); }
/* مبدّل المظهر في القائمة الجانبية */
.theme-switch { display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 44px; padding: 0; border: 0; background: transparent; cursor: pointer; flex: none; -webkit-tap-highlight-color: transparent; }
.theme-switch-track { position: relative; display: block; width: 46px; height: 26px; border-radius: 999px; background: #a3a8ae; transition: background .2s ease; }
.theme-switch-thumb { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px #0003; transition: transform .2s ease; }
.theme-switch[aria-checked="true"] .theme-switch-track { background: #19b88a; }
.theme-switch[aria-checked="true"] .theme-switch-thumb { transform: translateX(20px); }
[dir="rtl"] .theme-switch-thumb { left: auto; right: 3px; }
[dir="rtl"] .theme-switch[aria-checked="true"] .theme-switch-thumb { transform: translateX(-20px); }
.theme-switch:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 999px; }
@media (prefers-reduced-motion: reduce) { .theme-switch-track, .theme-switch-thumb { transition: none; } }
/* شريط حمّل التطبيق */
.get-app { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-top: 12px; flex-wrap: wrap; }
.get-app-mark { width: 48px; height: 48px; border-radius: 12px; flex: none; }
.get-app .stack { min-width: 160px; }
/* الشكاوى والمقترحات */
.feedback-kinds { display: flex; gap: 6px; flex-wrap: wrap; }
.feedback-kinds button { flex: 1; min-height: 40px; padding: 0 12px; border-radius: 999px; border: 1.5px solid var(--paper-3); background: var(--paper); color: var(--ink-2); font: inherit; font-weight: 500; cursor: pointer; }
.feedback-kinds button.is-on { background: var(--brand); border-color: var(--brand); color: #fff; }
/* الدخول برقم الهاتف */
#lg-captcha { position: fixed; bottom: 0; inset-inline-end: 0; }
.grecaptcha-badge { visibility: hidden; }
/* ---------- شاشة الدخول: أرضية كريمية بأشكال العلامة، بلا شريط سفلي ولا تذييل ---------- */
body[data-route="login"] .bottom-nav,
body[data-route="login"] .site-footer,
body[data-route="login"] .page-back,
body[data-route="login"] .site-header { display: none !important; }
body[data-route="login"] { padding-bottom: 0; background: var(--cream); }

.login-page { position: relative; min-height: 100dvh; overflow: hidden; }
.login-stage { position: relative; z-index: 1; }
.login-screen { display: flex; flex-direction: column; justify-content: center; min-height: 100dvh; }

/* أشكال العلامة مقتطعة من لوحة التصميم، كلٌّ ملتصق بحافته */
.login-decor { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.login-blob { position: absolute; display: block; background-repeat: no-repeat; background-size: 100% 100%; }
.lb-1 { left: 0;  top: 12%;    width: clamp(40px, 11.5vw, 68px);  aspect-ratio: 140 / 347; background-image: url('/img/brand/login/tl.webp'); }
.lb-2 { right: 0; top: 14%;    width: clamp(70px, 21vw, 124px);   aspect-ratio: 262 / 360; background-image: url('/img/brand/login/pink.webp'); }
.lb-3 { left: 0;  bottom: 0;   width: clamp(112px, 30vw, 180px);  aspect-ratio: 380 / 150; background-image: url('/img/brand/login/bl.webp'); }
.lb-4 { right: 0; bottom: 0;   width: clamp(52px, 14vw, 82px);    aspect-ratio: 170 / 124; background-image: url('/img/brand/login/br.webp'); }

/* المقدّمة: الشعار بين رشّتين حمراوين، ثم الترحيب */
.login-intro { text-align: center; padding: calc(24px + env(safe-area-inset-top)) 22px 0; }
.login-intro-sm { padding-block-start: calc(44px + env(safe-area-inset-top)); }
.login-hero { position: relative; display: flex; justify-content: center; padding-bottom: 20px; }
.login-hero img {
  position: relative; z-index: 1;
  width: min(50vw, 188px); height: auto; aspect-ratio: 1; border-radius: 50%;
  box-shadow: 0 16px 30px -20px rgba(90, 45, 15, .55);
}
.login-spark { position: absolute; display: block; background-repeat: no-repeat; background-size: 100% 100%; }
/* مواضع فيزيائية: الرشّتان تتّجهان خارج الشعار كما في لوحة التصميم */
.sp-l { left: 7%;  top: 3%;  width: clamp(34px, 10vw, 52px); aspect-ratio: 104 / 144; background-image: url('/img/brand/login/spark-l.webp'); }
.sp-r { right: 13%; top: 46%; width: clamp(34px, 10vw, 52px); aspect-ratio: 105 / 133; background-image: url('/img/brand/login/spark-r.webp'); }

.login-title { font-size: clamp(1.5rem, 7.2vw, 1.85rem); font-weight: 600; color: var(--brand-text); line-height: 1.3; }
.login-tagline { margin-top: 8px; font-size: clamp(1rem, 4.4vw, 1.15rem); font-weight: 400; color: var(--ink-2); line-height: 1.5; }
.login-tagline:empty { display: none; }

/* البطاقة البيضاء */
.login-card {
  width: min(var(--container-narrow, 520px), 100% - 28px);
  margin: 24px auto calc(26px + env(safe-area-inset-bottom));
  background: var(--paper);
  border-radius: 28px;
  box-shadow: 0 18px 44px -20px rgba(70, 35, 12, .26);
  padding: 26px 22px 28px;
}
.login-card-title { font-size: clamp(1.2rem, 5.6vw, 1.4rem); font-weight: 600; text-align: center; }
.login-card-sub { margin-top: 6px; margin-bottom: 22px; text-align: center; font-size: clamp(.9rem, 4vw, 1rem); font-weight: 400; color: var(--ink-3); }
.login-card .label { display: block; text-align: start; font-size: clamp(.9rem, 4vw, 1rem); font-weight: 500; }
.login-card .btn-lg { font-size: clamp(1rem, 4.4vw, 1.1rem); font-weight: 600; min-height: 56px; border-radius: 16px; }
.login-card .btn-outline { font-weight: 500; }
.login-arrow { transform: scaleX(-1); }
:root[dir="ltr"] .login-arrow { transform: none; }
.phone-row { display: flex; align-items: stretch; gap: 10px; direction: ltr; width: 100%; }
.phone-row > .input { flex: 1 1 auto; min-width: 0; height: 56px; border-radius: 16px; }
.phone-cc { flex: 0 0 104px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 10px; height: 56px; border: 1.5px solid var(--paper-3); border-radius: 16px; background: var(--paper); font-size: var(--fs-md); font-weight: 500; }
.flag-iq { width: 26px; height: 17px; border-radius: 3px; background: linear-gradient(#ce1126 0 33%, #fff 33% 66%, #000 66%); }
.login-phone { font-size: var(--fs-md); letter-spacing: .04em; font-weight: 500; }
.login-code { font-size: 1.6rem; letter-spacing: .5em; text-align: center; font-weight: 600; }
.login-or { display: flex; align-items: center; gap: 12px; color: var(--ink-3); font-size: var(--fs-base); }
.login-or::before, .login-or::after { content: ''; flex: 1; height: 1px; background: var(--paper-3); }
.btn-lg { min-height: 52px; font-size: var(--fs-md); }
/* حسابي */
.account-page { padding-top: 24px; }
.addr-card { padding: 12px 14px; align-items: center; }
.addr-icon { flex: none; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--paper-2); color: var(--brand-text); }
.danger-text { color: var(--danger-text); }
.ok-text { color: var(--ok-text); }
input[readonly].input { background: var(--paper-2); color: var(--ink-2); }
.menu-account { display: flex; align-items: center; gap: 10px; }
/* عناوين محفوظة في إتمام الطلب */
.saved-addr-row { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.saved-addr-row::-webkit-scrollbar { display: none; }
.saved-addr { flex: none; max-width: 220px; display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 999px; border: 1.5px solid var(--paper-3); background: var(--paper); color: var(--ink); font: inherit; font-size: var(--fs-sm); cursor: pointer; }
.saved-addr.is-on { border-color: var(--brand); background: var(--brand-soft); }
.saved-addr .icon { color: var(--brand-text); }
.saved-addr span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* رمز الاستلام */
.track-pin { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--sun-soft); }
.track-pin-code { font-family: var(--font-display); font-size: 1.6rem; font-weight: 600; letter-spacing: .25em; direction: ltr; color: var(--ink); }

/* Calm storefront: browsing first, fulfilment at checkout. */
.site-header { background: var(--paper); color: var(--ink); border-bottom: 1px solid var(--paper-3); }
.header-inner .logo { margin-inline: 0 auto; }
.logo-word, .header-actions .btn-icon { color: var(--ink); }
.logo-sub { color: var(--ink-3); }
.header-actions .btn-icon:hover, .lang-toggle:hover { background: var(--paper-2); }
.header-actions .count-badge { border-color: var(--paper); }
.lang-toggle { color: var(--ink); border-color: var(--paper-3); }
.main-nav a { color: var(--ink-3); }
.main-nav a:hover, .main-nav a.is-active, .main-nav a.nav-offer { color: var(--brand-text); }
.home-top { background: var(--paper); color: var(--ink); }
.home-top-inner { display: flex; flex-direction: column; align-items: stretch; gap: 12px; padding: 12px 0 4px; }
.home-location-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.home-location {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 38px;
  padding: 0 12px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-size: var(--fs-base);
}
.home-location > .icon:first-child { color: var(--brand-text); width: 22px; height: 22px; }
/* الدبوس مصمت وأكبر، والسهم مثلث صغير مصمت — كما في توترز */
.home-location-pin { color: var(--brand-text); width: 26px; height: 26px; }
.home-location-caret { width: 16px; height: 16px; color: var(--ink); }
.home-location-name { font-size: var(--fs-base); font-weight: 600; }
/* الاسم يبقى مختصراً مهما طال العنوان */
.home-location-name { max-width: 46vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-location > .icon:last-child { color: var(--ink-3); }
.home-location:hover { background: var(--paper-2); }
.home-location:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.home-top .status-pill { align-self: flex-start; background: var(--paper-2); border-color: var(--paper-3); color: var(--ink); }
.home-top .status-pill.is-open { color: var(--success, #188552); }
.home-top .status-pill .muted { color: var(--ink-3); }
.home-search { min-height: 52px; border-radius: 16px; background: var(--paper-2); font-size: var(--fs-base); cursor: pointer; }
.home-search .icon { color: var(--ink-3); }
.home-search:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
.home-cats { padding-top: 20px; padding-bottom: 16px; }
.home-cats .section-head { margin-bottom: 12px; }
.cat-row { gap: 12px; touch-action: pan-x pan-y; }
.cat-circle-img { border-radius: 20px; border-color: transparent; }
.cat-circle-label { line-height: 1.5; }
.home-banners { padding: 0 0 8px; background: var(--paper); }
/* لافتة واحدة بعرض الشاشة كاملاً وتتبدّل تلقائياً، كموقع كودو الرسمي */
.banner-track { grid-auto-columns: min(56%, 220px); gap: 12px; touch-action: pan-x pan-y; }
.banner-slide { aspect-ratio: 4 / 5; box-shadow: none; }
.banner-slide img { object-fit: contain; }
.banner-title { font-size: var(--fs-base); }
.banner-dots { padding: 12px 0; gap: 6px; }
.banner-dot { width: 7px; height: 7px; border-radius: 999px; }
.banner-dot.is-on { width: 20px; }
@media (min-width: 900px) {
  .home-top-inner { max-width: 720px; margin-inline: auto; }
  .banner-track { grid-auto-columns: min(28%, 260px); }
}

@media (max-width: 959px) {
  .site-header { padding: 8px 0; box-shadow: 0 4px 18px rgba(20, 24, 30, .06); }
  .header-inner { position: relative; min-height: 56px; }
  .header-inner .logo {
    position: absolute;
    inset-inline-start: 50%;
    transform: translateX(-50%);
    margin: 0;
    z-index: 1;
  }
  [dir="rtl"] .header-inner .logo { transform: translateX(50%); }
  .header-actions { width: 100%; justify-content: space-between; margin-inline-start: 0; }
  .header-search { display: none; }
  .header-actions .btn-icon {
    width: 42px;
    min-height: 42px;
    border: 1px solid var(--paper-3);
    border-radius: 12px;
    background: var(--paper);
    box-shadow: 0 2px 8px rgba(20, 24, 30, .05);
  }
  .logo-word { font-size: var(--fs-md); letter-spacing: .035em; }
  .bell-head { order: 2; }
  .menu-btn { order: 1; }
}

@media (max-width: 599px) {
  .home-top-inner { gap: 10px; padding-top: 14px; }
  .home-top .status-pill { min-height: 34px; padding-inline: 12px; border-radius: 12px; }
  .home-search { min-height: 50px; border: 1px solid var(--paper-3); box-shadow: 0 3px 12px rgba(20, 24, 30, .04); }
}

/* ---------- رسائلي: مراسلة المطعم وردّه ---------- */
.msg-form { padding: 16px; }
.sk-block { height: 120px; border-radius: var(--radius-lg); }
.msg-card { padding: 14px; }
.msg-del { width: 30px; min-height: 30px; color: var(--ink-4); }
.msg-del:hover { color: var(--danger); background: var(--danger-soft); }
.msg-body { margin-top: 8px; white-space: pre-wrap; }
.msg-waiting { margin-top: 8px; }
.msg-reply { margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: var(--brand-soft); border-inline-start: 3px solid var(--brand); }
.msg-reply p { margin: 4px 0 2px; white-space: pre-wrap; }
.msg-reply-head { color: var(--brand-text); font-weight: 600; }
html[data-theme="dark"] .msg-reply { background: var(--paper-2); }
.feedback-kinds { flex-wrap: wrap; }
/* ---------- واجهات البداية: شرائح صور تظهر مرة واحدة على الجهاز ---------- */
.onb {
  position: fixed; inset: 0; z-index: 1900; display: flex; flex-direction: column; align-items: center;
  background: #0d0a08; opacity: 0; transition: opacity .3s var(--ease);
}
.onb.is-on { opacity: 1; }
.onb.is-out { opacity: 0; }
/* الصورة تملأ الشاشة، والنقاط والزر فوقها على تدرّج داكن */
.onb-media { position: absolute; inset: 0; background: #0d0a08; }
.onb-img {
  width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transform: scale(1.03); transition: opacity .4s var(--ease), transform .6s var(--ease);
}
.onb-img.is-in { opacity: 1; transform: none; }
.onb-body {
  position: relative; z-index: 1; margin-top: auto; width: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  gap: 6px; padding: 90px 24px calc(24px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, rgba(10, 6, 4, .92), rgba(10, 6, 4, .6) 45%, transparent);
}
.onb-dots { display: flex; gap: 7px; padding: 10px 0 6px; }
.onb-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, .45); transition: background var(--fast); }
.onb-dot.is-on { background: #fff; }
.onb-actions { width: 100%; max-width: 420px; display: flex; flex-direction: column; align-items: center; gap: 4px; padding-top: 12px; }
.onb-actions .btn-block { width: 100%; }

/* إعلان المطعم يملأ الشاشة: الصورة تغطّيها والزر أسفلها فوق تدرّج داكن */
.promo { padding: 0; }
.promo-card { width: 100%; height: 100%; max-height: none; border-radius: 0; background: #000; }
.promo-card::after {
  content: ''; position: absolute; inset-inline: 0; bottom: 0; height: 46%; pointer-events: none;
  background: linear-gradient(to top, rgba(10, 6, 4, .88), rgba(10, 6, 4, .35) 45%, transparent);
}
.promo-card img, .promo-img { position: absolute; inset: 0; width: 100%; height: 100%; max-height: none; object-fit: cover; }
.promo-x {
  position: absolute; z-index: 2; top: calc(12px + env(safe-area-inset-top)); inset-inline-end: 14px;
  width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .5); color: #fff; display: grid; place-items: center;
}
.promo-cta {
  position: absolute; z-index: 2; bottom: calc(28px + env(safe-area-inset-bottom)); inset-inline: 22px;
  width: auto; border-radius: var(--radius-pill, 999px);
}
@media (min-width: 720px) {
  .promo { padding: 24px; }
  .promo-card { width: min(420px, 100%); height: min(760px, 100%); border-radius: var(--radius-lg); box-shadow: 0 30px 70px -24px rgba(0, 0, 0, .8); }
}
