/* واجهة الزبون: المدن والمتاجر و«منيو جميع المتاجر» */
:root {
  --bg: #f7f8fa;
  --card: #fff;
  --text: #1f2328;
  --muted: #6b7280;
  --border: #e3e6ea;
  --accent: #166b52;
  --price: #d0312d;
  --radius: 12px;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: "Segoe UI", Tahoma, "Noto Sans Arabic", Arial, sans-serif;
}
a { color: inherit; text-decoration: none; }
.muted { color: var(--muted); }

.top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 18px; background: var(--card); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 10;
}
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 18px; }
.brand img { height: 36px; width: auto; }
.top-links { display: flex; gap: 14px; font-size: 14px; }
.top-links a { color: var(--accent); }

.wrap { max-width: 1240px; margin: 0 auto; padding: 16px 18px 40px; }
.empty { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; text-align: center; color: var(--muted); margin: 14px 0; }

/* الشرائح */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 8px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; padding: 8px 18px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--card); font-size: 14px; white-space: nowrap;
}
.chip.is-on { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.chip-sm { padding: 5px 14px; font-size: 13px; }
.chips-sub { margin-top: 2px; }

/* بطاقات المتاجر */
.stores {
  display: grid; gap: 16px; margin: 14px 0 28px;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}
.store {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
}
.store-img { position: relative; display: block; aspect-ratio: 4 / 3; background: #fff; border-bottom: 1px solid var(--border); }
.store-img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.store-letter { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 56px; font-weight: 700; color: var(--accent); background: #eef6f2; }
.store-body { padding: 12px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.store-body h3 { margin: 0; font-size: 16px; }
.store-body .btn { margin-top: auto; align-self: flex-start; }
.tags { display: flex; flex-wrap: wrap; gap: 4px; }
.tag { font-size: 12px; padding: 2px 10px; border-radius: 999px; background: #f0f1f3; color: #444; }
.tag-place { background: #e7f3ee; color: var(--accent); }
.btn {
  display: inline-block; background: var(--accent); color: #fff; border-radius: 8px;
  padding: 8px 16px; font-size: 14px; font-weight: 600;
}

/* المغلق: رمادي */
.is-closed .store-img img, .is-closed .product-img img, .store-menu.is-closed .store-menu-head img { filter: grayscale(1); opacity: .6; }
.store.is-closed, .store-menu.is-closed .products { opacity: .75; }
.store.is-closed .btn { background: #9aa0a6; }
.closed-badge {
  position: absolute; top: 10px; right: 10px; background: rgba(31, 35, 40, .85); color: #fff;
  font-size: 12px; padding: 3px 10px; border-radius: 999px;
}
.closed-inline { position: static; }

/* منيو جميع المتاجر */
.all-menu h2 { margin: 0 0 6px; font-size: 22px; }
.store-menu { margin-top: 18px; }
.store-menu-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.store-menu-head img { width: 32px; height: 32px; object-fit: contain; border-radius: 50%; border: 1px solid var(--border); background: #fff; }
.store-menu-head .more { margin-inline-start: auto; font-size: 13px; color: var(--accent); }
.products {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}
.product { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 8px; display: flex; flex-direction: column; gap: 4px; }
.product-img { aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: #f3f4f6; }
.product-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.product-name { font-weight: 600; font-size: 14px; }
.product-desc { font-size: 12px; color: var(--muted); }
.product-price { color: var(--price); font-weight: 700; font-size: 14px; margin-top: auto; }

@media (max-width: 560px) {
  .stores { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .products { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .store-body h3 { font-size: 14px; }
}

/* ---------- زر الإضافة وصفحة المتجر ---------- */
.add {
  margin-top: 6px; border: 0; border-radius: 8px; cursor: pointer; width: 100%;
  background: var(--accent); color: #fff; font-weight: 700; padding: 8px 10px; font-family: inherit; font-size: 14px;
}
.add:active { transform: scale(.97); }
.add.added { background: #0f5540; }
.add:disabled { background: #b8bdc3; cursor: not-allowed; }
button.chip { cursor: pointer; font-family: inherit; color: inherit; }
.back { display: inline-block; color: var(--accent); font-size: 14px; margin-bottom: 10px; }
.more { color: var(--accent); font-size: 13px; }
.store-hero { display: flex; gap: 14px; align-items: center; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; margin-bottom: 14px; }
.store-hero img { width: 84px; height: 84px; object-fit: contain; border-radius: 12px; border: 1px solid var(--border); background: #fff; flex: none; }
.store-hero h1 { margin: 0 0 6px; font-size: 22px; }
.store-hero.is-closed img { filter: grayscale(1); opacity: .6; }
.closed-note { margin: 8px 0 0; color: #8a3b12; background: #fff4ec; border: 1px solid #f5d5bf; border-radius: 8px; padding: 6px 10px; font-size: 14px; }
.products-store { margin-top: 8px; }
.products.is-closed { opacity: .75; }
.products.is-closed .product-img img { filter: grayscale(1); opacity: .6; }
.product[hidden] { display: none; }
.btn-block { display: block; width: 100%; text-align: center; padding: 13px; font-size: 16px; border: 0; cursor: pointer; font-family: inherit; }
.btn.is-disabled { opacity: .5; pointer-events: none; }
.link-btn { display: block; width: 100%; margin-top: 8px; border: 0; background: none; color: var(--accent); cursor: pointer; padding: 8px; font-family: inherit; font-size: 15px; }
.note { font-size: 12px; color: var(--muted); text-align: center; margin: 0 0 10px; }

/* ---------- السلة ---------- */
.cart-fab {
  position: fixed; bottom: max(18px, env(safe-area-inset-bottom)); left: 18px; z-index: 30;
  width: 60px; height: 60px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--accent); color: #fff; box-shadow: 0 6px 18px rgba(0,0,0,.2);
  display: flex; align-items: center; justify-content: center;
}
.cart-fab svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.cart-count {
  position: absolute; top: -4px; right: -4px; min-width: 24px; height: 24px; padding: 0 6px;
  border-radius: 12px; background: var(--price); color: #fff; font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.cart-count[hidden], [hidden] { display: none !important; }
.cart-fab.bump { animation: bump .3s; }
@keyframes bump { 50% { transform: scale(1.15); } }
.drawer-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 40; }
.drawer {
  position: fixed; top: 0; bottom: 0; left: 0; z-index: 50; width: min(420px, 100%); background: #fff;
  display: flex; flex-direction: column; transform: translateX(-100%); transition: transform .22s ease;
}
.drawer.open { transform: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.drawer-close { border: 0; background: none; font-size: 28px; line-height: 1; cursor: pointer; color: var(--muted); }
.drawer-body { flex: 1; overflow-y: auto; padding: 4px 16px; }
.drawer-foot { border-top: 1px solid var(--border); padding: 14px 16px max(14px, env(safe-area-inset-bottom)); background: #fafafa; }
.total-row { display: flex; justify-content: space-between; font-size: 18px; margin-bottom: 8px; }
.cart-empty { color: var(--muted); text-align: center; padding: 40px 0; }
.cart-city { font-size: 13px; color: var(--muted); margin: 10px 0 0; }
.cart-store { border-bottom: 2px solid var(--border); padding-bottom: 4px; }
.cart-store-head { display: flex; justify-content: space-between; padding: 12px 0 0; color: var(--accent); }
.line { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.line:last-child { border-bottom: 0; }
.line-img { width: 56px; height: 56px; border: 1px solid var(--border); border-radius: 10px; object-fit: contain; background: #fff; flex: none; }
.line-info { flex: 1; min-width: 0; }
.line-name { font-weight: 700; }
.line-calc { font-size: 13px; color: var(--muted); margin: 2px 0 8px; }
.line-calc b { color: var(--text); }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: 999px; overflow: hidden; }
.qty button { width: 34px; height: 30px; border: 0; background: #f5f6f7; cursor: pointer; font-size: 18px; }
.qty span { min-width: 34px; text-align: center; font-weight: 700; }
.line-del { border: 0; background: none; color: #e05a5a; cursor: pointer; align-self: center; padding: 6px; }
.line-del svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.toast {
  position: fixed; bottom: 90px; left: 50%; transform: translateX(-50%); z-index: 70;
  background: #1f2328; color: #fff; padding: 8px 16px; border-radius: 999px; font-size: 14px;
  opacity: 0; transition: opacity .2s; pointer-events: none;
}
.toast.show { opacity: 1; }

/* ---------- إتمام الطلب ---------- */
.checkout-wrap h1 { margin: 0 0 14px; font-size: 24px; }
.co-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 820px) { .co-grid { grid-template-columns: 1fr; } }
.card-box { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.card-box h2 { margin: 0 0 12px; font-size: 18px; }
.field { margin-bottom: 12px; }
.field label { display: block; font-weight: 600; margin-bottom: 4px; font-size: 14px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px;
  font: inherit; background: #fff;
}
.field small { display: block; margin-top: 4px; font-size: 12px; }
.co-city { padding: 10px 12px; background: #f3f4f6; border-radius: 8px; font-weight: 600; }
.btn-light { border: 1px solid var(--border); background: #f7f8fa; border-radius: 8px; padding: 9px 14px; cursor: pointer; font: inherit; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.co-summary { position: sticky; top: 70px; }
.co-store { border-bottom: 1px solid var(--border); padding: 8px 0; }
.co-store-head { display: flex; justify-content: space-between; color: var(--accent); margin-bottom: 4px; }
.co-line { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; padding: 2px 0; }
.sum-row { display: flex; justify-content: space-between; padding: 6px 0; }
.sum-total { font-size: 19px; border-top: 1px solid var(--border); margin-top: 4px; padding-top: 10px; }
.sum-total b { color: var(--price); }
.co-error { background: #fdecea; color: #a12622; border-radius: 8px; padding: 8px 10px; font-size: 14px; white-space: pre-line; }
.co-done { max-width: 520px; margin: 10px auto; text-align: center; }
.done-icon { width: 64px; height: 64px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 34px; display: flex; align-items: center; justify-content: center; margin: 0 auto 10px; }
.done-buttons { display: grid; gap: 10px; margin: 14px 0; }
.wa-btn { background: #25d366; }
.wa-dispatch { background: #128c7e; }
.wa-btn.is-sent { opacity: .55; }
.wa-btn.is-sent::after { content: ' ✓'; }

/* ---------- رأس الصفحة: خروج الزبون ---------- */
.top-links { align-items: center; }
.inline-out { margin: 0; display: inline; }
.inline-out button { border: 0; background: none; color: var(--accent); font: inherit; font-size: 14px; cursor: pointer; padding: 0; }
.muted-link { color: var(--muted) !important; }

/* ---------- دخول الزبون ---------- */
.auth-box { max-width: 420px; margin: 20px auto; }
.auth-tabs { display: flex; gap: 6px; margin-bottom: 14px; background: #f3f4f6; border-radius: 10px; padding: 4px; }
.auth-tabs a { flex: 1; text-align: center; padding: 9px; border-radius: 8px; font-weight: 600; color: var(--muted); }
.auth-tabs a.is-on { background: #fff; color: var(--accent); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.auth-note { background: #e7f3ee; color: var(--accent); border-radius: 8px; padding: 8px 10px; font-size: 14px; }

/* ---------- طلباتي ---------- */
.orders-wrap { max-width: 760px; }
.orders-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.orders-head h1 { margin: 0 0 12px; font-size: 24px; }
.order-card { margin-bottom: 12px; }
.order-card summary { cursor: pointer; list-style: none; }
.order-card summary::-webkit-details-marker { display: none; }
.order-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.order-sub { font-size: 13px; margin-top: 4px; }
.status-pill { font-size: 13px; padding: 3px 12px; border-radius: 999px; background: #fff4e0; color: #8a5a00; white-space: nowrap; }
.st-accepted .status-pill, .st-picked .status-pill { background: #e6f0fd; color: #1f5fbf; }
.st-delivered .status-pill { background: #e7f3ee; color: var(--accent); }
.st-cancelled .status-pill { background: #fdecea; color: #a12622; }
.steps { display: flex; list-style: none; padding: 0; margin: 14px 0; gap: 4px; counter-reset: s; }
.steps li { flex: 1; text-align: center; font-size: 12px; color: var(--muted); position: relative; padding-top: 26px; }
.steps li::before {
  counter-increment: s; content: counter(s); position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 22px; height: 22px; border-radius: 50%; background: #e5e7eb; color: #555; font-size: 12px; line-height: 22px;
}
.steps li.is-done { color: var(--accent); font-weight: 600; }
.steps li.is-done::before { background: var(--accent); color: #fff; content: '✓'; }
.order-addr { font-size: 13px; margin: 8px 0 0; }
.part-pill { font-size: 11px; font-weight: 600; padding: 1px 8px; border-radius: 999px; background: #fff4e0; color: #8a5a00; margin-inline-start: 6px; vertical-align: middle; }
.part-preparing { background: #e6f0fd; color: #1f5fbf; }
.part-ready, .part-picked { background: #e7f3ee; color: var(--accent); }
.driver-line { background: #ecfdf5; color: #065f46; border-radius: 8px; padding: 6px 10px; margin-bottom: 8px; font-size: 14px; }
.rate-box { display: grid; gap: 8px; background: #fffbeb; border: 1px solid #fde68a; border-radius: 10px; padding: 10px; margin: 10px 0; }
.rate-box textarea { width: 100%; padding: 8px; border: 1px solid var(--border); border-radius: 8px; font: inherit; }
.rate-box .btn { border: 0; cursor: pointer; font: inherit; justify-self: start; }
.stars { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 2px; }
.stars input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.stars label { font-size: 32px; line-height: 1; color: #d1d5db; cursor: pointer; }
.stars input:checked ~ label, .stars label:hover, .stars label:hover ~ label { color: #f59e0b; }
.rated { margin: 8px 0; font-size: 14px; }
.rated span { color: #f59e0b; font-size: 18px; }

/* ---------- الشريط الترحيبي ---------- */
.banner { background: linear-gradient(135deg, #166b52, #1f8a6a); color: #fff; background-size: cover; background-position: center; position: relative; }
.banner.has-img::before { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10,40,30,.25), rgba(10,40,30,.75)); }
.banner-in { position: relative; max-width: 1240px; margin: 0 auto; padding: 26px 18px; }
.banner h1 { margin: 0 0 6px; font-size: 26px; }
.banner p { margin: 0; max-width: 640px; opacity: .95; }
@media (max-width: 560px) { .banner h1 { font-size: 21px; } .banner-in { padding: 18px 14px; } }

/* ---------- التطبيق (PWA): نافذة الشرح وأزرار التثبيت والإشعارات ---------- */
.pwa-sheet { position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.5); display: flex; align-items: flex-end; justify-content: center; }
.pwa-sheet-in { background: #fff; color: #1f2328; width: min(480px, 100%); border-radius: 16px 16px 0 0; padding: 18px 18px max(18px, env(safe-area-inset-bottom)); line-height: 1.7; font-family: inherit; }
.pwa-sheet-in h3 { margin: 0 0 8px; }
.pwa-sheet-in ol { margin: 0 0 8px; padding-inline-start: 20px; }
.pwa-tip { font-size: 13px; color: #6b7280; }
.pwa-close { display: block; width: 100%; margin-top: 10px; border: 0; border-radius: 10px; padding: 11px; background: #166b52; color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.pwa-btn { border: 1px solid #166b52; color: #166b52; background: #fff; border-radius: 999px; padding: 5px 12px; font: inherit; font-size: 13px; cursor: pointer; }
.pwa-btn.is-on { background: #e7f3ee; border-color: #e7f3ee; cursor: default; }
.place { font-size: 13px; color: var(--muted); }
.store-hero .place { margin-top: 4px; font-size: 14px; }

/* ---------- بطاقة المنتج الأفقية + تصنيفات كل متجر ---------- */
.cat-tabs { display: flex; gap: 22px; overflow-x: auto; scrollbar-width: none; padding: 4px 2px 10px; margin-bottom: 4px; }
.cat-tabs::-webkit-scrollbar { display: none; }
.cat-tabs button {
  flex: none; border: 0; background: none; padding: 4px 0; font: inherit; font-size: 15px; color: #374151; cursor: pointer;
  border-bottom: 2px solid transparent;
}
.cat-tabs button.is-on { font-weight: 700; color: #1f2328; border-bottom-color: #10b5c9; }
.items { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 760px) { .items { grid-template-columns: 1fr; } }
.item {
  display: flex; gap: 12px; align-items: stretch; background: #fff; border: 1px solid var(--border);
  border-radius: 12px; padding: 14px;
}
.item[hidden] { display: none; }
.item-info { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; }
.item-badge { font-size: 12px; font-weight: 600; color: #4b5563; background: #f0f1f3; border-radius: 6px; padding: 2px 8px; margin-bottom: 6px; }
.item h3 { margin: 0 0 4px; font-size: 17px; font-weight: 600; color: #0f7c8c; }
.item-desc { margin: 0 0 4px; color: var(--muted); font-size: 13px; }
.item-price { color: #d0312d; font-weight: 800; font-size: 17px; margin: 4px 0 12px; }
.item .add { margin-top: auto; width: auto; background: #10b5c9; padding: 9px 18px; border-radius: 8px; }
.item .add.added { background: #0b8fa0; }
.item .add:disabled { background: #b8bdc3; }
.item-img { width: 120px; height: 120px; flex: none; border-radius: 10px; overflow: hidden; display: flex; align-items: center; justify-content: center; align-self: center; background: #fafafa; }
.item-img img { width: 100%; height: 100%; object-fit: cover; }
.item-img.is-logo { background: #fff; }
.item-img.is-logo img { object-fit: contain; padding: 8px; }
@media (max-width: 380px) { .item-img { width: 92px; height: 92px; } }
.store-menu.is-closed .item-img img { filter: grayscale(1); opacity: .6; }
.store-menu.is-closed .item { opacity: .8; }
.item-old { color: #9ca3af; font-weight: 400; font-size: 14px; margin-inline-start: 8px; }
a.item-badge:hover { background: #e2e5e9; }
.item.is-closed .item-img img { filter: grayscale(1); opacity: .6; }
.item.is-closed { opacity: .8; }

/* ---------- القائمة الثابتة أسفل الشاشة (الجوال والتطبيق المثبّت) ---------- */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 35;
  display: none; justify-content: space-around; align-items: stretch;
  background: #fff; border-top: 1px solid var(--border);
  padding: 4px 4px max(4px, env(safe-area-inset-bottom));
  box-shadow: 0 -2px 10px rgba(0,0,0,.05);
}
.bottom-nav a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; color: #6b7280; font-size: 12px; }
.bottom-nav svg { width: 24px; height: 24px; }
.bottom-nav a.is-on { color: var(--accent); font-weight: 700; }
@media (max-width: 900px) {
  .bottom-nav { display: flex; }
  body.has-bottom-nav { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  body.has-bottom-nav .cart-fab { bottom: calc(76px + env(safe-area-inset-bottom)); }
  body.has-bottom-nav .toast { bottom: calc(150px + env(safe-area-inset-bottom)); }
}
@media (display-mode: standalone) {
  .bottom-nav { display: flex; }
  body.has-bottom-nav { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  body.has-bottom-nav .cart-fab { bottom: calc(76px + env(safe-area-inset-bottom)); }
}
.page-title { margin: 4px 0 12px; font-size: 22px; }

/* ---------- حسابي ---------- */
.me-wrap { max-width: 560px; }
.me-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.me-avatar { width: 52px; height: 52px; border-radius: 50%; background: #e7f3ee; color: var(--accent); display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 700; }
.me-list { padding: 0; }
.me-list a, .me-list button {
  display: flex; justify-content: space-between; align-items: center; width: 100%;
  padding: 15px 16px; border: 0; border-bottom: 1px solid var(--border); background: none;
  font: inherit; font-size: 15px; color: inherit; text-align: right; cursor: pointer;
}
.me-list > :last-child { border-bottom: 0; }
.me-list button.is-on { color: var(--accent); cursor: default; }
.me-out { margin: 14px 0 0; text-align: center; }
.me-staff { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; border-color: #b7dfcd; background: #f3faf6; }
.me-staff .btn { padding: 10px 16px; }
.btn-light-green { background: #fff; color: var(--accent); border: 1px solid var(--accent); }
.staff-login { display: block; text-align: center; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--border); color: var(--muted); font-size: 14px; }

/* ---------- انضم كسائق / الشروط / المزيد ---------- */
.type-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.type-chip { position: relative; cursor: pointer; }
.type-chip input { position: absolute; opacity: 0; pointer-events: none; }
.type-chip span { display: inline-block; padding: 6px 12px; border: 1px solid var(--border); border-radius: 999px; background: #fff; font-size: 14px; }
.type-chip input:checked + span { background: var(--accent); border-color: var(--accent); color: #fff; }
.agree { display: flex; align-items: center; gap: 8px; margin: 4px 0 14px; font-size: 14px; }
.agree a, .note a { color: var(--accent); text-decoration: underline; }
.center-box { text-align: center; }
.terms p { margin: 0 0 10px; line-height: 1.8; }
.co-error div { margin: 2px 0; }
.addr-box { margin-top: 12px; }
.addr-box summary { cursor: pointer; }
.addr-box form { margin-top: 12px; }

/* القائمة السفلية ظاهرة على كل الشاشات (الروابط ليست في الشريط العلوي) */
.bottom-nav { display: flex; }
body.has-bottom-nav { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
body.has-bottom-nav .cart-fab { bottom: calc(76px + env(safe-area-inset-bottom)); }
body.has-bottom-nav .toast { bottom: calc(150px + env(safe-area-inset-bottom)); }
@media (min-width: 901px) {
  .bottom-nav { left: 50%; right: auto; transform: translateX(-50%); width: 560px; border: 1px solid var(--border); border-bottom: 0; border-radius: 16px 16px 0 0; }
}

/* ---------- الكوبون وخصومات المنصة في إتمام الطلب ---------- */
.co-coupon { margin: 10px 0 4px; }
.co-coupon-row { display: flex; gap: 8px; }
.co-coupon-row input { flex: 1; min-width: 0; padding: 9px 12px; border: 1px dashed var(--accent); border-radius: 8px; font: inherit; text-transform: uppercase; }
.co-coupon-row .btn-light { padding: 9px 14px; white-space: nowrap; }
.co-code-ok { color: #1e6b3a; font-weight: 600; }
.co-code-bad { color: #a12622; }
.co-disc { color: #1e6b3a; }
.co-disc b { color: #1e6b3a; }
/* ---------- «عروضي» ورابط المشاركة في حسابي ---------- */
.my-offers h2, .share-box h2 { margin: 0 0 10px; font-size: 18px; }
.my-offer { padding: 10px 0; border-bottom: 1px dashed var(--border); }
.my-offer:last-of-type { border-bottom: 0; }
.my-offer-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.my-offer-sum { color: #1e6b3a; font-weight: 600; font-size: 14px; }
.code-chip { margin-top: 6px; display: inline-flex; gap: 8px; align-items: center; padding: 6px 12px; border: 1px dashed var(--accent); border-radius: 8px; background: #f3faf6; color: var(--accent); font: inherit; font-weight: 700; letter-spacing: 1px; cursor: pointer; }
.code-chip span { font-weight: 400; font-size: 12px; letter-spacing: 0; }
.share-link { padding: 10px 12px; background: #f7f8fa; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; word-break: break-all; text-align: left; margin-bottom: 10px; }
.share-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.share-btns .btn { flex: 1; min-width: 90px; text-align: center; }
/* ---------- إعلانات العروض (الأدمن) ---------- */
.ann-ticker { overflow: hidden; background: #fff4e0; border-bottom: 1px solid #f0d9a8; color: #6b4a00; font-size: 14px; white-space: nowrap; }
.ann-track { display: inline-flex; gap: 48px; padding: 8px 0; animation: ann-scroll 28s linear infinite; }
.ann-ticker:hover .ann-track { animation-play-state: paused; }
.ann-tick { color: inherit; text-decoration: none; cursor: pointer; }
@keyframes ann-scroll { from { transform: translateX(0); } to { transform: translateX(50%); } }
.ann-slider { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 4px 0 6px; border-radius: 14px; }
.ann-slider::-webkit-scrollbar { display: none; }
.ann-slide { position: relative; flex: 0 0 100%; scroll-snap-align: start; border-radius: 14px; overflow: hidden; background: linear-gradient(135deg, var(--accent), #0f4d3b); color: #fff; text-decoration: none; min-height: 110px; display: flex; align-items: flex-end; cursor: pointer; }
.ann-slide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ann-slide.has-img { aspect-ratio: 12 / 5; min-height: 0; }
.ann-text { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; width: 100%; line-height: 1.5; }
.ann-slide.has-img .ann-text { background: linear-gradient(transparent, rgba(0,0,0,.65)); padding-top: 30px; }
.ann-text b { font-size: 18px; }
.ann-code { display: inline-block; align-self: flex-start; margin-top: 4px; padding: 3px 10px; border: 1px dashed currentColor; border-radius: 6px; font-weight: 700; letter-spacing: 1px; font-size: 13px; }
.ann-dots { display: flex; justify-content: center; gap: 6px; margin: 0 0 12px; }
.ann-dots i { width: 7px; height: 7px; border-radius: 50%; background: #cfd5da; }
.ann-dots i.on { background: var(--accent); width: 18px; border-radius: 4px; }
.ann-pop { position: fixed; inset: 0; z-index: 120; background: rgba(0,0,0,.55); display: flex; align-items: center; justify-content: center; padding: 20px; }
.ann-pop-in { position: relative; width: min(420px, 100%); background: #fff; border-radius: 16px; overflow: hidden; box-shadow: 0 20px 50px rgba(0,0,0,.3); }
.ann-pop-body { display: block; color: inherit; text-decoration: none; text-align: center; padding-bottom: 18px; cursor: pointer; }
.ann-pop-body img { width: 100%; display: block; }
.ann-pop-body h3 { margin: 14px 16px 4px; }
.ann-pop-body p { margin: 0 16px 8px; color: var(--muted, #6b7280); }
.ann-pop-body .ann-code { align-self: center; color: var(--accent); }
.ann-pop-cta { display: inline-block; margin-top: 6px; padding: 10px 28px; border-radius: 999px; background: var(--accent, #16a34a); color: #fff; font-weight: 700; }
.ann-pop-x { position: absolute; top: 8px; left: 8px; z-index: 2; width: 32px; height: 32px; border: 0; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; font-size: 16px; cursor: pointer; }
.ann-toast { position: fixed; left: 50%; bottom: calc(90px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 130; background: #1f2328; color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 14px; width: max-content; max-width: 90vw; text-align: center; }
.ann-how { display: block; margin-top: 4px; font-size: 13px; opacity: .92; }

/* ---------- سطر القسائم في إتمام الطلب ---------- */
.co-voucher { margin: 8px 0; padding: 10px 12px; border: 1px dashed var(--accent); border-radius: 10px; background: #f3faf6; }
.co-voucher-row { display: flex; align-items: center; gap: 10px; }
.co-voucher-row span { font-weight: 700; color: var(--accent); white-space: nowrap; }
.co-voucher-row select { flex: 1; min-width: 0; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; font: inherit; background: #fff; }
.co-saved { margin-top: 6px; color: #1e6b3a; font-weight: 700; }

/* ---------- «قسائمي» ---------- */
.vw-tabs { display: flex; gap: 8px; margin-bottom: 12px; }
.vw-tabs a { flex: 1; text-align: center; padding: 9px; border-radius: 999px; border: 1px solid var(--border); background: #fff; color: inherit; text-decoration: none; font-weight: 600; }
.vw-tabs a.is-on { background: var(--accent); border-color: var(--accent); color: #fff; }
.voucher { display: flex; align-items: stretch; background: #fff; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; margin-bottom: 10px; position: relative; }
.voucher-val { flex: 0 0 34%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 14px 8px; background: linear-gradient(135deg, var(--accent), #0f4d3b); color: #fff; text-align: center; border-inline-end: 2px dashed #fff; }
.voucher-val b { font-size: 24px; line-height: 1.2; }
.voucher-val small { font-size: 12px; opacity: .9; }
.voucher-body { flex: 1; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.voucher-body strong { font-size: 16px; }
.voucher-body .muted { font-size: 13px; }
.voucher-body .btn { align-self: flex-start; margin-top: 4px; padding: 7px 14px; font-size: 14px; }
.voucher.is-used { opacity: .55; }
.voucher.is-used .voucher-val { background: #9aa4ad; }
.voucher-new { position: absolute; top: 6px; inset-inline-start: 6px; z-index: 1; background: #d93025; color: #fff; font-size: 11px; padding: 1px 8px; border-radius: 999px; }
.nav-dot { position: absolute; top: 4px; margin-inline-start: 14px; width: 9px; height: 9px; border-radius: 50%; background: #d93025; border: 2px solid #fff; }
.bottom-nav a { position: relative; }
.gift-pop { position: fixed; inset: 0; z-index: 125; background: rgba(0,0,0,.55); display: flex; align-items: center; justify-content: center; padding: 20px; }
.gift-in { width: min(400px, 100%); background: #fff; border-radius: 18px; padding: 22px 18px 18px; text-align: center; box-shadow: 0 20px 50px rgba(0,0,0,.3); }
.gift-in .gift-icon { font-size: 48px; line-height: 1; }
.gift-in h3 { margin: 8px 0 12px; }
.gift-list { text-align: start; margin-bottom: 14px; }
.gift-list div { display: flex; justify-content: space-between; gap: 10px; padding: 8px 10px; border: 1px dashed var(--accent); border-radius: 8px; margin-bottom: 6px; background: #f3faf6; }
.gift-list b { color: var(--accent); white-space: nowrap; }
.store-offer { display: inline-block; margin: 4px 0 2px; padding: 2px 10px; border-radius: 999px; background: #fff4e0; color: #8a5a00; font-size: 12px; font-weight: 700; }
.badge-new { display: inline-block; margin-inline-start: 6px; padding: 1px 8px; border-radius: 999px; background: #d93025; color: #fff; font-size: 11px; font-weight: 700; vertical-align: middle; }

/* عروض المتاجر */
.co-hint { margin: 6px 0; padding: 8px 10px; border-radius: 8px; background: #fff4e0; color: #8a5a00; font-size: 14px; font-weight: 600; }
.store-offer.is-store { background: #e7f3ee; color: var(--accent); }
.store-offers-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.cart-offer { margin: 6px 0 2px; padding: 6px 10px; border-radius: 8px; background: #fff4e0; color: #8a5a00; font-size: 13px; font-weight: 600; }
.cart-offer.is-got { background: #e7f3ee; color: var(--accent); }
