/* ═══════════════════════════════════════════════════════
   بيتزا الريم — Customer App v4.0
   Mobile-first, RTL
═══════════════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Almarai:wght@300;400;700;800&display=swap');

:root {
  --red:       #8B0000;
  --red-light: #B22222;
  --gold:      #D4AF37;
  --gold-light:#F5E27A;
  --green:     #22C55E;
  --bg:        #F8F8F8;
  --white:     #FFFFFF;
  --text:      #1A1A1A;
  --muted:     #6B7280;
  --border:    #E5E7EB;
  --surface:   #FFFFFF;
  --shadow:    0 2px 12px rgba(0,0,0,0.08);
  --radius:    14px;
  --radius-sm: 8px;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; font-family: 'Almarai', 'Segoe UI', Tahoma, Arial, sans-serif; background: var(--bg); color: var(--text); direction: rtl; }
body { overflow-x: hidden; }
img { max-width: 100%; }
button { cursor: pointer; font-family: 'Almarai', inherit; }
input, select, textarea { font-family: 'Almarai', inherit; }

/* ── HEADER ─────────────────────────────────────────── */
.app-header {
  background: linear-gradient(135deg, #084C34 0%, #0E6B46 100%);
  color: white;
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px 8px;
}

.logo-btn {
  background: none;
  border: none;
  padding: 0;
  display: flex;
  align-items: center;
}

.header-logo {
  height: 52px;
  width: auto;
  border-radius: 10px;
  object-fit: contain;
}

.hdr-icon-btn {
  background: rgba(255,255,255,0.15);
  border: none;
  color: white;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.cart-badge {
  position: absolute;
  top: -4px;
  left: -4px;
  background: var(--gold);
  color: #1A1A1A;
  font-size: 10px;
  font-weight: 800;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 14px 8px;
  font-size: 12px;
}

.header-location {
  display: flex;
  align-items: center;
  gap: 4px;
  opacity: 0.9;
}

.header-right-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-pill {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(255,255,255,0.2);
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}
.status-pill.busy { background: rgba(245,158,11,0.3); }
.status-pill.closed { background: rgba(239,68,68,0.3); }

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ADE80;
  flex-shrink: 0;
}
.status-pill.busy .status-dot { background: #FCD34D; }
.status-pill.closed .status-dot { background: #FCA5A5; }

.delivery-time-block {
  display: flex;
  align-items: center;
  gap: 3px;
  background: rgba(255,255,255,0.15);
  padding: 3px 7px;
  border-radius: 20px;
  font-size: 11px;
}

/* Social bar */
.social-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 14px 10px;
  border-top: 1px solid rgba(255,255,255,0.15);
}

.social-follow {
  font-size: 11px;
  opacity: 0.8;
}

.social-icons {
  display: flex;
  gap: 8px;
}

.social-link {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-decoration: none;
}
.social-link.fb { background: #1877F2; }
.social-link.ig { background: linear-gradient(45deg,#f09433,#e6683c,#dc2743,#cc2366,#bc1888); }
.social-link.tk { background: #000; }
.social-link.sc { background: #FFFC00; color: #000; }

/* ── WELCOME BANNER ─────────────────────────────────── */
.welcome-banner {
  background: linear-gradient(135deg, var(--gold), #9A8700);
  color: #1A1A1A;
  text-align: center;
  padding: 10px;
  font-weight: 700;
  font-size: 14px;
}

/* ── RESTAURANT BANNER ──────────────────────────────── */
.rest-banner {
  background: linear-gradient(135deg, #084C34 0%, #0E6B46 100%);
  border-bottom: none;
  padding: 10px 14px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 13px;
  color: #fff;
}
.rest-banner-title { font-weight: 800; margin-bottom: 2px; color: #fff; }
.rest-banner-sub { color: rgba(255,255,255,0.85); font-size: 12px; }

/* ── LOYALTY CARD (header) ──────────────────────────── */
.loyalty-card {
  margin: 12px 14px;
  background: linear-gradient(135deg, #C98B00, var(--gold), #F6B318);
  border-radius: var(--radius);
  padding: 14px 16px;
  color: #1A1A1A;
  box-shadow: 0 4px 16px rgba(198,192,19,0.30);
}

.loyalty-card-profile {
  margin-bottom: 14px;
  background: linear-gradient(135deg, #C98B00, var(--gold), #F6B318);
  border-radius: var(--radius);
  padding: 14px 16px;
  color: #1A1A1A;
  box-shadow: 0 4px 16px rgba(198,192,19,0.30);
}

.loyalty-header {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.8;
  margin-bottom: 8px;
}

.loyalty-points-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 10px;
}

.loyalty-points-num {
  font-size: 36px;
  font-weight: 900;
  line-height: 1;
}

.loyalty-points-label {
  font-size: 14px;
  font-weight: 600;
}

.loyalty-divider {
  height: 1px;
  background: rgba(0,0,0,0.2);
  margin-bottom: 10px;
}

.loyalty-value-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}

.loyalty-value-num {
  font-weight: 800;
  font-size: 15px;
}

/* ── MAIN CONTENT ───────────────────────────────────── */
.main-content {
  padding-bottom: 80px;
}

/* ── CATEGORY TABS ──────────────────────────────────── */
.cat-tabs-wrap {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 90;
  overflow: hidden;
}

.cat-tabs {
  display: flex;
  gap: 6px;
  padding: 10px 14px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.cat-tabs::-webkit-scrollbar { display: none; }

.cat-btn {
  flex-shrink: 0;
  padding: 7px 16px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  background: var(--white);
  color: var(--brand);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  transition: all 0.2s;
}
.cat-btn.active {
  background: var(--cta);
  border-color: var(--cta);
  color: white;
  box-shadow: 0 4px 14px rgba(232, 93, 42, 0.25);
}

/* ── SKELETON ───────────────────────────────────────── */
.skeleton-wrap { padding: 14px; }
.skel-row { display: flex; gap: 12px; margin-bottom: 12px; }
.skel-card {
  flex: 1;
  height: 180px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--radius);
}
@keyframes shimmer { 0%{background-position:200% 0} 100%{background-position:-200% 0} }

/* ── MENU WRAP ──────────────────────────────────────── */
.menu-wrap { padding: 14px; }

.menu-section { margin-bottom: 28px; }

/* رأس القسم */
.sec-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding: 10px 14px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-light) 100%);
  border-radius: 14px;
  box-shadow: 0 3px 10px rgba(3,71,50,0.20);
}
.sec-header-info {
  display: flex;
  align-items: center;
  gap: 8px;
}
.sec-icon {
  font-size: 22px;
  line-height: 1;
}
.sec-name {
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  font-family: 'Almarai', sans-serif;
}
.sec-count {
  font-size: 11px;
  font-weight: 700;
  color: rgba(255,255,255,0.7);
  background: rgba(255,255,255,0.15);
  padding: 2px 7px;
  border-radius: 20px;
}
.sec-all-link {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.4);
  border-radius: 20px;
  padding: 4px 10px;
  white-space: nowrap;
  font-family: 'Almarai', sans-serif;
}

/* صف أفقي (عرض الكل) */
.prods-row {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.prods-row::-webkit-scrollbar { display: none; }
.prods-row .prod-card {
  min-width: 148px;
  max-width: 148px;
  flex-shrink: 0;
}

/* شبكة (عرض قسم واحد) */
.prods-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

/* زر عرض المزيد */
.sec-more-btn {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 10px 16px;
  background: linear-gradient(90deg, var(--cta), var(--cta-light));
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  font-family: 'Almarai', sans-serif;
  border: none;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(239,138,23,0.25);
  letter-spacing: 0.3px;
}
.sec-more-btn:active { opacity: 0.85; }

/* تراجع للتوافق */
.prods-scroll {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

/* ── PRODUCT CARD ───────────────────────────────────── */
.prod-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.15s;
  position: relative;
}
.prod-card:active { transform: scale(0.97); }

.prod-img-box { position: relative; aspect-ratio: 1; overflow: hidden; }
.prod-img { width: 100%; height: 100%; object-fit: cover; }
.unavail-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 12px;
  font-weight: 700;
}

.prod-body { padding: 10px; }
.prod-name { font-size: 13px; font-weight: 700; margin-bottom: 3px; line-height: 1.3; }
.prod-desc { font-size: 11px; color: var(--muted); margin-bottom: 6px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.prod-foot { display: flex; align-items: center; justify-content: space-between; }
.prod-price { font-size: 14px; font-weight: 800; color: var(--red); }
.prod-add-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--red);
  color: white;
  border: none;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* ── MODAL ──────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 700;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.modal-sheet {
  background: var(--white);
  width: 100%;
  max-width: 480px;
  border-radius: 20px 20px 0 0;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 12px;
  left: 14px;
  background: rgba(0,0,0,0.1);
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.modal-img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}

.modal-body { padding: 14px 14px 0; }
.modal-name { font-size: 18px; font-weight: 800; margin-bottom: 4px; }
.modal-sub { font-size: 13px; color: var(--muted); margin-bottom: 12px; line-height: 1.5; }

/* Steps */
.step-box {
  background: #F9F9F9;
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-bottom: 10px;
}
.step-box-hdr {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.step-box-title { font-size: 14px; font-weight: 700; }
.step-box-prog { font-size: 11px; color: var(--muted); background: var(--border); padding: 2px 8px; border-radius: 10px; }

.step-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}
.step-item:last-child { border-bottom: none; }
.step-item-img { width: 40px; height: 40px; border-radius: 6px; object-fit: cover; flex-shrink: 0; }
.step-item-name { flex: 1; font-size: 13px; font-weight: 600; }
.step-item-price { font-size: 12px; color: var(--muted); }
.step-item-check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 12px;
  transition: all 0.15s;
}
.step-item-check.selected { background: var(--red); border-color: var(--red); color: white; }
.step-item-check.excluded { background: #FEE2E2; border-color: #EF4444; color: #EF4444; }

.modal-qty-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 14px 0;
}
.qty-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--red);
  background: white;
  color: var(--red);
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.qty-val { font-size: 20px; font-weight: 800; min-width: 30px; text-align: center; }

.modal-footer {
  display: flex;
  gap: 10px;
  padding: 14px;
  border-top: 1px solid var(--border);
  position: sticky;
  bottom: 0;
  background: white;
}
.btn-back {
  flex: 0 0 auto;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--red);
  background: white;
  color: var(--red);
  font-size: 14px;
  font-weight: 700;
}
.btn-next {
  flex: 1;
  padding: 14px;
  border-radius: var(--radius-sm);
  border: none;
  background: var(--red);
  color: white;
  font-size: 15px;
  font-weight: 700;
}

/* ── PAGE OVERLAY ───────────────────────────────────── */
.page-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 150;
  overflow-y: auto;
}

.page-sheet {
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

.page-hdr {
  display: flex;
  align-items: center;
  padding: 14px;
  background: var(--red);
  color: white;
  position: sticky;
  top: 0;
  z-index: 10;
  gap: 12px;
}

.page-close {
  background: rgba(255,255,255,0.2);
  border: none;
  color: white;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.page-title {
  font-size: 17px;
  font-weight: 800;
  flex: 1;
  text-align: center;
  margin-left: 34px;
}

.page-body {
  flex: 1;
  padding: 14px;
  padding-bottom: 30px;
}

.page-footer {
  padding: 14px;
  background: white;
  border-top: 1px solid var(--border);
  position: sticky;
  bottom: 0;
}

/* ── CART ───────────────────────────────────────────── */
.cart-item {
  display: flex;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
}
.cart-item-img { width: 60px; height: 60px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.cart-item-info { flex: 1; }
.cart-item-name { font-size: 14px; font-weight: 700; margin-bottom: 3px; }
.cart-item-extras { font-size: 11px; color: var(--muted); line-height: 1.5; }
.cart-item-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; }
.cart-item-price { font-size: 14px; font-weight: 800; color: var(--red); }
.cart-item-qty { display: flex; align-items: center; gap: 8px; }
.cart-qty-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: white;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
}
.cart-qty-val { font-size: 14px; font-weight: 700; min-width: 20px; text-align: center; }

.cart-empty { text-align: center; padding: 50px 20px; color: var(--muted); }
.cart-empty-ico { font-size: 48px; margin-bottom: 12px; }

.btn-checkout {
  width: 100%;
  padding: 15px;
  background: var(--red);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 700;
}

/* ── CHECKOUT ───────────────────────────────────────── */
.section-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
}

.section-title {
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 12px;
  color: var(--red);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.dlv-toggle {
  display: flex;
  gap: 8px;
}
.dlv-btn {
  flex: 1;
  padding: 10px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border);
  background: white;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  transition: all 0.2s;
}
.dlv-btn.active {
  border-color: var(--red);
  background: #FFF5F5;
  color: var(--red);
}

.form-group { margin-bottom: 10px; }
.form-label { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 5px; }
.form-inp {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  background: #FAFAFA;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
}
.form-inp:focus { border-color: var(--red); background: white; }

.area-notice {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: 10px;
}
.area-notice.warn { background: var(--gold-light); border: 1px solid var(--gold); color: var(--brand); }

/* Saved addresses */
.addr-card {
  background: #F9F9F9;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-bottom: 8px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.addr-card:active { background: #FFF5F5; border-color: var(--red); }
.addr-name { font-size: 13px; font-weight: 700; }
.addr-detail { font-size: 12px; color: var(--muted); margin-top: 2px; }
.addr-delete {
  background: none;
  border: none;
  color: #EF4444;
  font-size: 16px;
  padding: 4px;
  flex-shrink: 0;
}

.addr-add-btn {
  width: 100%;
  padding: 9px;
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-sm);
  background: none;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 10px;
}

/* Address Book cards (profile page) */
.ab-addr-card {
  background: #f9f9f9;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 8px;
  display: flex;
  flex-direction: column;
}
.ab-addr-card.is-default {
  border-color: #f97316;
  background: #fff7ed;
}

/* Pickup location */
.pickup-location-card {
  background: #F0FDF4;
  border: 1px solid #BBF7D0;
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-top: 10px;
}
.pickup-loc-title { font-size: 13px; font-weight: 700; color: #166534; margin-bottom: 4px; }
.pickup-loc-addr { font-size: 12px; color: #166534; line-height: 1.6; margin-bottom: 10px; }
.btn-whatsapp-sm {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #25D366;
  color: white;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

/* Schedule */
.sched-row { display: flex; align-items: center; justify-content: space-between; }
.sched-label { font-size: 14px; font-weight: 600; }
.toggle-switch { position: relative; display: inline-block; width: 44px; height: 24px; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--border);
  border-radius: 24px;
  transition: 0.3s;
}
.toggle-slider:before {
  content: '';
  position: absolute;
  height: 18px;
  width: 18px;
  right: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: 0.3s;
}
input:checked + .toggle-slider { background: var(--red); }
input:checked + .toggle-slider:before { transform: translateX(-20px); }

/* Payment */
.pay-options {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}
.pay-opt {
  flex: 1;
  padding: 10px 6px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  text-align: center;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transition: all 0.2s;
}
.pay-opt.active { border-color: var(--red); background: #FFF5F5; color: var(--red); }
.pay-ico { font-size: 20px; }
.reflect-logo-sm { height: 24px; width: auto; border-radius: 4px; }

.pay-info {
  padding: 12px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  margin-top: 8px;
}
.reflect-info { background: #F0F9FF; border: 1px solid #BAE6FD; }
.card-info { background: #F0FDF4; border: 1px solid #BBF7D0; }
.reflect-number { font-size: 20px; font-weight: 900; color: var(--red); letter-spacing: 1px; }

/* Loyalty redeem */
.loyalty-redeem-wrap {
  margin-top: 10px;
  background: linear-gradient(135deg, var(--gold-light), #FCFAD8);
  border: 1.5px solid var(--gold);
  border-radius: var(--radius-sm);
  padding: 12px;
}
.loyalty-redeem-hdr {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
}
.loyalty-redeem-body { font-size: 12px; color: var(--muted); }
.loyalty-redeem-info { margin-bottom: 8px; }
.redeem-slider { width: 100%; accent-color: var(--gold); }
.redeem-slider-labels { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-top: 2px; }
.redeem-result { margin-top: 8px; font-size: 13px; font-weight: 700; color: var(--cta); }

/* Summary */
.summary-card { }
.sum-row { display: flex; justify-content: space-between; padding: 6px 0; font-size: 14px; border-bottom: 1px solid var(--border); }
.sum-row:last-child { border-bottom: none; }
.sum-total { font-weight: 800; font-size: 16px; color: var(--red); }

.btn-submit-order {
  width: 100%;
  padding: 16px;
  background: var(--red);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 800;
  margin-top: 8px;
}

/* ── SUCCESS PAGE ───────────────────────────────────── */
.success-sheet {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  min-height: 100vh;
  text-align: center;
}
.success-icon { font-size: 72px; margin-bottom: 16px; }
.success-title { font-size: 24px; font-weight: 800; margin-bottom: 8px; }
.success-sub { font-size: 14px; color: var(--muted); }
.btn-track {
  margin-top: 24px;
  width: 100%;
  padding: 14px;
  background: var(--red);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 700;
}
.btn-home {
  margin-top: 10px;
  width: 100%;
  padding: 12px;
  background: white;
  color: var(--red);
  border: 2px solid var(--red);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 700;
}

/* ── TRACKING ───────────────────────────────────────── */
.trk-steps {
  background: white;
  border-radius: var(--radius);
  padding: 14px;
  margin: 12px 0;
  box-shadow: var(--shadow);
}
.trk-step {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  opacity: 0.4;
}
.trk-step:last-child { border-bottom: none; }
.trk-step.done, .trk-step.active { opacity: 1; }
.trk-dot {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.trk-step.done .trk-dot { background: var(--green); color: white; }
.trk-step.active .trk-dot { background: var(--red); color: white; }
.trk-lbl { font-size: 14px; font-weight: 600; }
.trk-id { font-size: 15px; font-weight: 800; }
.trk-cus { font-size: 13px; color: var(--muted); margin-top: 3px; }

.rejection-box {
  background: #FEE2E2;
  border: 1px solid #FECACA;
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-bottom: 12px;
}
.rejection-title { font-size: 13px; font-weight: 700; color: #991B1B; margin-bottom: 4px; }
.rejection-text { font-size: 13px; color: #7F1D1D; }

.admin-msg-box {
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-bottom: 12px;
}
.admin-msg-title { font-size: 13px; font-weight: 700; color: #1E40AF; margin-bottom: 4px; }

.trk-actions { margin-top: 14px; }
.btn-whatsapp {
  width: 100%;
  padding: 13px;
  background: #25D366;
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.st-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
}
.st-pending   { background: #FEF3C7; color: #92400E; }
.st-confirmed { background: #DBEAFE; color: #1E40AF; }
.st-preparing { background: #FDE8D8; color: #9A3412; }
.st-delivering{ background: #D1FAE5; color: #065F46; }
.st-delivered { background: #D1FAE5; color: #065F46; }
.st-cancelled { background: #FEE2E2; color: #991B1B; }

/* ── PROFILE ────────────────────────────────────────── */
.oh-card {
  background: white;
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-bottom: 10px;
  box-shadow: var(--shadow);
}
.oh-hdr { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.oh-num { font-size: 12px; color: var(--muted); }
.oh-items { font-size: 13px; color: var(--text); margin-bottom: 8px; }
.oh-foot { display: flex; justify-content: space-between; align-items: center; }
.oh-total { font-size: 15px; font-weight: 800; color: var(--red); }
.oh-rating { color: var(--gold); font-size: 14px; }
.btn-trk-sm {
  padding: 6px 12px;
  background: var(--red);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
}

/* ══════════════════════════════════════════════════════════
   MODERN TRACKING UI
══════════════════════════════════════════════════════════ */

/* بطاقة ملخص الطلب */
.trk-summary-modern {
  background: var(--white);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  margin-bottom: 12px;
}
.trk-sum-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.trk-sum-num {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
}
.trk-sum-meta {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 4px;
}
.trk-sum-addr {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 8px;
  line-height: 1.4;
}
.trk-sum-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.trk-sum-type {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}
.trk-sum-fee {
  font-size: 12px;
  color: var(--muted);
}
.trk-sum-total {
  font-size: 18px;
  font-weight: 800;
  color: var(--red);
}

/* بطاقة الحالة الحية */
.trk-live-card {
  border-radius: var(--radius);
  padding: 20px 16px 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
}
.trk-live-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}
.trk-status-orb {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: rgba(255,255,255,0.25);
}
.trk-status-icon {
  font-size: 30px;
  line-height: 1;
}
.trk-status-title {
  font-size: 17px;
  font-weight: 800;
  margin-bottom: 4px;
  color: white;
}
.trk-status-sub {
  font-size: 13px;
  color: rgba(255,255,255,0.85);
  line-height: 1.4;
}

/* شريط التقدم */
.trk-progress-wrap {
  height: 8px;
  background: rgba(255,255,255,0.3);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 6px;
}
.trk-progress-fill {
  height: 100%;
  border-radius: 99px;
  background: rgba(255,255,255,0.9);
  transition: width 0.6s ease;
}
.trk-progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: rgba(255,255,255,0.75);
}

/* التايملاين الرأسي */
.trk-timeline-modern {
  background: var(--white);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}
.trk-timeline-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  opacity: 0.38;
}
.trk-timeline-row.done,
.trk-timeline-row.active { opacity: 1; }
.trk-timeline-dot-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
}
.trk-timeline-dot {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
  flex-shrink: 0;
}
.trk-timeline-dot.done {
  background: #15803D;
  color: white;
}
.trk-timeline-line {
  width: 2px;
  height: 26px;
  background: var(--border);
  margin: 3px 0;
}
.trk-timeline-line.done {
  background: #15803D;
}
.trk-timeline-label {
  padding-top: 8px;
  padding-bottom: 8px;
  flex: 1;
  min-width: 0;
}
.trk-tl-main {
  font-size: 14px;
  font-weight: 700;
  display: block;
  color: var(--text);
}
.trk-tl-sub {
  font-size: 12px;
  color: var(--muted);
  display: block;
  margin-top: 2px;
}

/* ألوان الحالات */
.trk-live-card.trk-pending   { background: linear-gradient(135deg,#6D28D9,#8B5CF6); }
.trk-live-card.trk-confirmed  { background: linear-gradient(135deg,#1D4ED8,#3B82F6); }
.trk-live-card.trk-preparing  { background: linear-gradient(135deg,#C2410C,#F97316); }
.trk-live-card.trk-onway      { background: linear-gradient(135deg,#0F766E,#14B8A6); }
.trk-live-card.trk-delivered  { background: linear-gradient(135deg,#15803D,#22C55E); }
.trk-live-card.trk-cancelled  { background: linear-gradient(135deg,#991B1B,#EF4444); }

.trk-timeline-dot.trk-pending   { background: #7C3AED; color: white; }
.trk-timeline-dot.trk-confirmed  { background: #1D4ED8; color: white; }
.trk-timeline-dot.trk-preparing  { background: #EA580C; color: white; }
.trk-timeline-dot.trk-onway      { background: #0F766E; color: white; }
.trk-timeline-dot.trk-delivered  { background: #15803D; color: white; }
.trk-timeline-dot.trk-cancelled  { background: #991B1B; color: white; }

/* ══════════════════════════════════════════════════════════ */

.btn-reorder {
  padding: 6px 12px;
  background: white;
  color: var(--red);
  border: 1.5px solid var(--red);
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
}

/* Messages */
.msg-item {
  background: #F0F9FF;
  border: 1px solid #BAE6FD;
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-bottom: 8px;
  font-size: 13px;
}
.msg-time { font-size: 11px; color: var(--muted); margin-top: 4px; }

/* ── RATING MODAL ───────────────────────────────────── */
.rating-sheet {
  padding: 24px;
  text-align: center;
}
.rating-title { font-size: 20px; font-weight: 800; margin-bottom: 6px; }
.rating-sub { font-size: 13px; color: var(--muted); margin-bottom: 20px; }
.stars-row {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 16px;
  flex-direction: row-reverse;
}
.star {
  font-size: 36px;
  color: var(--border);
  cursor: pointer;
  transition: color 0.15s;
}
.star.active { color: var(--gold); }
.rating-btns { display: flex; gap: 10px; margin-top: 14px; }
.btn-skip {
  flex: 1;
  padding: 12px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: white;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}
.btn-submit-rating {
  flex: 2;
  padding: 12px;
  background: var(--red);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 700;
}

/* ── POPUP ──────────────────────────────────────────── */
.popup-sheet {
  padding: 24px;
  text-align: center;
  border-radius: 20px 20px 0 0;
}
.popup-title { font-size: 18px; font-weight: 800; margin-bottom: 12px; }
.popup-body { font-size: 14px; color: var(--muted); margin-bottom: 20px; line-height: 1.6; }
.btn-popup-ok {
  width: 100%;
  padding: 14px;
  background: var(--red);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 700;
}

/* ── STATUS NOTIFICATION ────────────────────────────── */
.status-notif {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: #1A1A1A;
  color: white;
  padding: 12px 18px;
  border-radius: 30px;
  font-size: 14px;
  font-weight: 600;
  z-index: 999;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 90%;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  animation: slideDown 0.3s ease;
}
@keyframes slideDown {
  from { opacity: 0; transform: translateX(-50%) translateY(-20px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ── TOAST ──────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #1A1A1A;
  color: white;
  padding: 10px 20px;
  border-radius: 30px;
  font-size: 13px;
  z-index: 999;
  max-width: 90%;
  text-align: center;
}

/* ── EMPTY STATE ────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--muted);
  font-size: 14px;
}
.empty-ico { font-size: 48px; display: block; margin-bottom: 12px; }

/* ── "قد يعجبك أيضاً" ──────────────────────────────── */
.upsell-section {
  margin-top: 16px;
}
.upsell-title {
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 10px;
  color: var(--red);
}
.upsell-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 4px;
}
.upsell-scroll::-webkit-scrollbar { display: none; }
.upsell-card {
  flex-shrink: 0;
  width: 130px;
  background: white;
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow);
  cursor: pointer;
}
.upsell-card img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.upsell-card-body { padding: 8px; }
.upsell-card-name { font-size: 12px; font-weight: 700; }
.upsell-card-price { font-size: 12px; color: var(--red); font-weight: 800; }

/* ── RESPONSIVE ─────────────────────────────────────── */
@media (min-width: 480px) {
  .modal-sheet, .page-sheet { max-width: 480px; margin: 0 auto; }
  .page-overlay { display: flex; justify-content: center; }
}

/* ── FLOATING CART BUTTON ───────────────────────────── */
#floatingCartBtn {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 448px;
  background: var(--red);
  color: white;
  border: none;
  border-radius: 14px;
  padding: 14px 20px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  z-index: 900;
  box-shadow: 0 4px 20px rgba(139,0,0,0.35);
  display: none;
  align-items: center;
  justify-content: space-between;
  font-family: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
#floatingCartBtn:active {
  transform: translateX(-50%) scale(0.97);
  box-shadow: 0 2px 10px rgba(139,0,0,0.25);
}

/* ── REDEEM HISTORY ─────────────────────────────────── */
.redeem-hist-item {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.redeem-hist-item:last-child { border-bottom: none; }

/* ── HERO BANNER SLIDER ───────────────────────────────────── */
#heroBannerSection {
  width: 100%;
  overflow: hidden;
  background: #000;
}
.hero-slider {
  position: relative;
  width: 100%;
  /* نسبة 8:3 للشاشات الجوال — الارتفاع = العرض × 3/8 */
  aspect-ratio: 8 / 3;
  overflow: hidden;
  background: #111;
}
.hero-slides {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}
.hero-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  position: relative;
  cursor: pointer;
  overflow: hidden;
}
.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}
.hero-slide-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.35) 0%, transparent 60%);
  pointer-events: none;
}
.hero-slide-title {
  position: absolute;
  bottom: 10px;
  right: 12px;
  left: 12px;
  color: white;
  font-size: 14px;
  font-weight: 700;
  text-shadow: 0 1px 4px rgba(0,0,0,0.7);
  pointer-events: none;
}
.hero-dots {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 5px;
  z-index: 10;
}
.hero-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  transition: all 0.3s;
  cursor: pointer;
}
.hero-dot.active {
  background: white;
  width: 18px;
  border-radius: 3px;
}
.hero-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: rgba(255,255,255,0.7);
  border-radius: 0 2px 2px 0;
  z-index: 10;
}


/* ═══════════════════════════════════════════════════════
   Modern Minimal Refresh — Customer UI only
   Safe CSS overrides
═══════════════════════════════════════════════════════ */

:root {
  --red: #E85D2A;
  --red-light: #FFF1E3;
  --gold: #F6B318;
  --gold-light: #FEF3C7;
  --green: #1F8A5B;
  --green-dark: #084C34;
  --bg: #FFF9F3;
  --white: #FFFFFF;
  --text: #1F2937;
  --muted: #667085;
  --border: #EADBCD;
  --surface: #FFFFFF;
  --surface-soft: #FFF9F3;
  --accent-soft: #FEF3C7;
  --shadow: 0 4px 18px rgba(14, 107, 70, 0.10);
  --radius: 24px;
  --radius-sm: 18px;
  --cart-bg: #E85D2A;
  --cart-shadow: 0 10px 26px rgba(232, 93, 42, 0.30);
  --overlay: rgba(8, 76, 52, 0.38);
  --brand: #0E6B46;
  --brand-light: #1F8A5B;
  --danger: #D92D20;
  --error: #D92D20;
  --warning: #F6B318;
  --success: #1F8A5B;
  --teal: #1F8A5B;
  --accent: #F6B318;
  --cta: #E85D2A;
  --cta-light: #F07A4E;
}

html,
body {
  background: linear-gradient(180deg, var(--white) 0%, var(--bg) 100%);
  color: var(--text);
  line-height: 1.5;
}

.app-header {
  background: linear-gradient(135deg, #084C34 0%, #0E6B46 100%);
  color: white;
  border-bottom: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  backdrop-filter: none;
}

.header-top {
  padding: 14px 16px 12px;
}

.header-logo {
  height: 62px;
  border-radius: 12px;
}

.hdr-icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  border: none;
  background: rgba(255,255,255,0.15);
  color: white;
}

.cart-badge {
  top: -6px;
  left: -6px;
  width: 20px;
  height: 20px;
  background: var(--cart-bg);
  color: var(--white);
  box-shadow: 0 6px 16px rgba(242, 101, 34, 0.24);
}

.header-info {
  padding: 0 16px 12px;
  color: rgba(255,255,255,0.85);
}

.status-pill,
.delivery-time-block {
  background: rgba(255,255,255,0.2);
  color: white;
  border: none;
}

.social-bar {
  padding: 8px 16px 14px;
  border-top: 1px solid rgba(255,255,255,0.15);
}

.social-follow {
  color: rgba(255,255,255,0.7);
}

.social-link {
  width: 32px;
  height: 32px;
  box-shadow: 0 8px 18px rgba(20, 23, 24, 0.08);
}

.welcome-banner,
.rest-banner {
  margin: 12px 16px 0;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) - 4px);
  box-shadow: var(--shadow);
}

.welcome-banner {
  background: linear-gradient(135deg, var(--accent-soft), var(--white));
  color: var(--green-dark);
}

.rest-banner {
  background: linear-gradient(135deg, #084C34 0%, #0E6B46 100%);
  border: none;
  color: #fff;
}

.loyalty-card,
.loyalty-card-profile {
  margin: 16px;
  padding: 18px;
  color: var(--text);
  background: linear-gradient(135deg, var(--accent-soft), var(--white));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.loyalty-header {
  color: var(--green-dark);
  letter-spacing: 0;
  opacity: 1;
}

.loyalty-divider {
  background: var(--border);
}

.main-content {
  padding-bottom: 96px;
}

.cat-tabs-wrap {
  background: rgba(246, 248, 246, 0.94);
  border-bottom: 0;
  backdrop-filter: blur(12px);
}

.cat-tabs {
  gap: 10px;
  padding: 12px 16px 8px;
}

.cat-btn {
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--brand);
  box-shadow: 0 6px 18px rgba(20, 23, 24, 0.04);
}

.cat-btn.active {
  background: var(--cta);
  border-color: var(--cta);
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(232, 93, 42, 0.25);
}

.skeleton-wrap,
.menu-wrap,
.page-body {
  padding: 16px;
}

.skel-card {
  border-radius: calc(var(--radius) - 2px);
}

.menu-section {
  margin-bottom: 30px;
}

.sec-title-row {
  margin-bottom: 16px;
}

.sec-name,
.section-title,
.upsell-title,
.page-title {
  color: var(--text);
}

.sec-name {
  font-size: 20px;
  padding-bottom: 8px;
}

.sec-name::after {
  width: 42px;
  height: 3px;
  background: var(--red);
  border-radius: 999px;
}

.prods-scroll {
  gap: 14px;
}

.prod-card,
.section-card,
.trk-steps,
.oh-card,
.upsell-card,
.addr-card,
.step-box,
.popup-sheet {
  background: var(--white);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.prod-card {
  border-radius: 26px;
}

.prod-img-box {
  background: var(--surface-soft);
}

.prod-body {
  padding: 14px 14px 16px;
}

.prod-name {
  font-size: 15px;
  margin-bottom: 6px;
  line-height: 1.45;
}

.prod-desc {
  font-size: 12px;
  margin-bottom: 10px;
  color: var(--muted);
}

.prod-price,
.cart-item-price,
.oh-total,
.upsell-card-price {
  color: var(--cta);
}

.prod-price {
  font-size: 18px;
}

.prod-add-btn,
.btn-next,
.btn-checkout,
.btn-submit-order,
.btn-track,
.btn-popup-ok,
#floatingCartBtn {
  background: linear-gradient(135deg, var(--cart-bg), var(--red));
  color: var(--white);
  box-shadow: var(--cart-shadow);
}

.prod-add-btn {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  font-size: 20px;
}

.modal-overlay {
  background: var(--overlay);
}

.modal-sheet {
  border-radius: 30px 30px 0 0;
  box-shadow: 0 -10px 36px rgba(15, 23, 42, 0.12);
}

.modal-close,
.page-close {
  border: 1px solid var(--border);
  background: var(--surface-soft);
  color: var(--text);
}

.modal-close {
  width: 38px;
  height: 38px;
  border-radius: 14px;
}

.modal-body {
  padding: 18px 18px 0;
}

.modal-name {
  font-size: 22px;
  margin-bottom: 8px;
}

.modal-sub {
  color: var(--muted);
}

.step-box {
  padding: 14px;
  border-radius: 20px;
}

.step-box-title {
  font-size: 15px;
}

.step-box-prog {
  background: var(--accent-soft);
  color: var(--green-dark);
}

.step-item {
  padding: 12px 0;
}

.step-item-img {
  width: 44px;
  height: 44px;
  border-radius: 12px;
}

.step-item-check {
  border-color: var(--border);
  background: var(--white);
}

.step-item-check.selected {
  background: var(--green);
  border-color: var(--green);
}

.step-item-check.excluded {
  background: var(--red-light);
  border-color: var(--red);
  color: var(--red);
}

.qty-btn,
.cart-qty-btn,
.btn-back,
.btn-home,
.btn-skip,
.btn-reorder {
  background: var(--white);
  color: var(--text);
  border-color: var(--border);
}

.qty-btn {
  width: 40px;
  height: 40px;
  background: var(--surface-soft);
}

.qty-val {
  min-width: 36px;
}

.modal-footer,
.page-footer {
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid var(--border);
}

.btn-back,
.btn-home,
.btn-skip,
.btn-reorder,
.dlv-btn,
.pay-opt,
.form-inp,
.addr-card,
.addr-add-btn {
  border-radius: 16px;
}

.page-hdr {
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--text);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 8px 24px rgba(20, 23, 24, 0.04);
  backdrop-filter: blur(14px);
}

.page-title {
  font-size: 19px;
}

.cart-item {
  padding: 14px 0;
}

.cart-item-img {
  width: 72px;
  height: 72px;
  border-radius: 16px;
}

.cart-item-name {
  font-size: 15px;
}

.cart-empty {
  padding: 56px 24px;
}

.section-card {
  padding: 16px;
  border-radius: var(--radius);
}

.section-title {
  margin-bottom: 14px;
  padding-bottom: 0;
  border-bottom: 0;
}

.dlv-btn,
.pay-opt {
  border: 1px solid var(--border);
  background: var(--white);
}

.dlv-btn.active,
.pay-opt.active {
  background: var(--accent-soft);
  border-color: var(--green);
  color: var(--green-dark);
}

.form-label {
  font-size: 13px;
  margin-bottom: 6px;
}

.form-inp {
  padding: 13px 14px;
  background: var(--white);
  border: 1px solid var(--border);
}

.form-inp:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(57, 199, 132, 0.12);
}

.addr-card:active {
  background: var(--accent-soft);
  border-color: var(--green);
}

.addr-add-btn {
  background: var(--white);
}

.pickup-location-card,
.card-info {
  background: var(--accent-soft);
  border-color: var(--green);
}

.pickup-loc-title,
.pickup-loc-addr {
  color: var(--green-dark);
}

.btn-whatsapp,
.btn-whatsapp-sm {
  background: var(--green);
  color: var(--white);
}

.toggle-slider {
  background: #DDE5DE;
}

input:checked + .toggle-slider {
  background: var(--green);
}

.reflect-info,
.msg-item,
.admin-msg-box {
  background: var(--white);
  border-color: var(--border);
}

.loyalty-redeem-wrap {
  background: linear-gradient(135deg, var(--gold-light), var(--white));
  border-color: var(--gold);
}

.sum-total,
.reflect-number {
  color: var(--text);
}

.success-sub,
.popup-body,
.rating-sub,
.empty-state,
.msg-time,
.cart-item-extras,
.redeem-slider-labels,
.loyalty-redeem-body,
.rejection-text,
.trk-cus,
.oh-num,
.addr-detail,
.rest-banner-sub {
  color: var(--muted);
}

.trk-dot {
  background: var(--surface-soft);
}

.trk-step.active .trk-dot {
  background: var(--cart-bg);
}

.trk-step.done .trk-dot {
  background: var(--green);
}

.btn-trk-sm {
  background: var(--green);
  color: var(--white);
}

.popup-sheet {
  padding: 28px 24px;
  border-radius: 28px 28px 0 0;
}

.status-notif,
.toast {
  border-radius: 18px;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.16);
}

.upsell-card {
  width: 144px;
  border-radius: 22px;
}

.upsell-card-body {
  padding: 10px;
}

#heroBannerSection {
  padding: 0 16px;
  background: transparent;
}

.hero-slider {
  border-radius: 28px;
  background: var(--surface-soft);
  box-shadow: var(--shadow);
}

.hero-slide-title {
  bottom: 14px;
  right: 14px;
  left: 14px;
  font-size: 15px;
}

.hero-dot {
  width: 7px;
  height: 7px;
  background: rgba(255, 255, 255, 0.6);
}

.hero-dot.active {
  width: 20px;
  background: var(--white);
}

#floatingCartBtn {
  bottom: 18px;
  border-radius: 20px;
  padding: 15px 20px;
}

#floatingCartBtn:active,
.btn-next:active,
.btn-checkout:active,
.btn-submit-order:active,
.btn-track:active,
.btn-popup-ok:active,
.prod-card:active {
  transform: scale(0.98);
}

@media (min-width: 480px) {
  .modal-sheet,
  .page-sheet {
    max-width: 480px;
  }

  #floatingCartBtn {
    max-width: 448px;
  }
}

/* ═══════════════════════════════════════════════════════
   التعديلات النهائية — إزالة أيقونات الهيدر، إخفاء الزر العائم القديم،
   إتاحة مساحة أسفل الصفحات، وتصميم الشريط السفلي (Bottom Navigation)
═══════════════════════════════════════════════════════ */

/* 1) إخفاء أيقونات الهيدر القديمة وتركيز الشعار */
.header-top .hdr-icon-btn {
  display: none !important;
}
.header-top {
  justify-content: center !important;
}

/* 2) إخفاء زر "عرض السلة" العائم القديم تمامًا */
#floatingCartBtn {
  display: none !important;
}

/* 3) توفير مساحة آمنة أسفل كافة الصفحات */
body,
.main-content,
.page-body,
.success-sheet {
  padding-bottom: calc(var(--bottom-safe-space) + env(safe-area-inset-bottom, 0px));
}

.page-footer {
  bottom: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom, 0px));
}

/* ─── إصلاح تداخل footer مع "اللحظة الأخيرة" في صفحة السلة ─── */
#cartPage .page-footer {
  position: fixed;
  right: 0;
  left: 0;
  bottom: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom, 0px));
  z-index: 160;
  padding: 10px 14px;
}

@media (min-width: 480px) {
  #cartPage .page-footer {
    max-width: 480px;
    margin: 0 auto;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: 480px;
  }
}

#lastMinuteSectionCart {
  margin-bottom: 80px;
}

#cartPage,
#checkoutPage,
#trackingPage,
#profilePage,
#messagesPage {
  padding-bottom: calc(var(--bottom-safe-space) + env(safe-area-inset-bottom, 0px)) !important;
}

/* 4) تصميم الشريط السفلي */
:root {
  --bottom-nav-height: 76px;
  --bottom-fab-size: 68px;
  --bottom-fab-ring: 3px;
  --bottom-fab-lift: 18px;
  --bottom-safe-space: 98px;
  --bottom-cutout-width: 122px;
  --bottom-radius: 26px;
  --bottom-nav-shadow: 0 -8px 22px rgba(0, 0, 0, 0.075);
  --bottom-cart-shadow:
    0 10px 22px rgba(139, 0, 0, 0.25),
    0 0 0 var(--bottom-fab-ring) rgba(212, 175, 55, 0.92);
}

.bottom-nav {
  position: fixed;
  right: 0;
  left: 0;
  bottom: 0;
  height: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom, 0px));
  background: var(--white);
  border-top: 1px solid rgba(0, 0, 0, 0.04);
  box-shadow: var(--bottom-nav-shadow);
  z-index: 170;
  direction: rtl;
  overflow: visible;
  display: grid;
  grid-template-columns: 1fr 1fr var(--bottom-cutout-width) 1fr 1fr;
  align-items: center;
  padding: 0 10px env(safe-area-inset-bottom, 0px);
  border-top-left-radius: var(--bottom-radius);
  border-top-right-radius: var(--bottom-radius);
}

/* إصلاح توزيع الأعمدة في Grid */
#bnHome     { grid-column: 1; }
#bnTracking { grid-column: 2; }
#bnMessages { grid-column: 4; }
#bnProfile  { grid-column: 5; }

.bottom-nav::before,
.bottom-nav::after {
  content: '';
  position: absolute;
  top: 0;
  height: var(--bottom-nav-height);
  background: var(--white);
  border-top: 4px solid var(--red);
  z-index: 1;
}

.bottom-nav::before {
  right: 0;
  width: calc(50% - (var(--bottom-cutout-width) / 2));
  border-top-left-radius: var(--bottom-radius);
}

.bottom-nav::after {
  left: 0;
  width: calc(50% - (var(--bottom-cutout-width) / 2));
  border-top-right-radius: var(--bottom-radius);
}

.bottom-nav-cutout {
  position: absolute;
  right: 50%;
  top: 0;
  transform: translateX(50%);
  width: var(--bottom-cutout-width);
  height: var(--bottom-nav-height);
  background: var(--white);
  border-top: 4px solid var(--red);
  border-top-left-radius: 999px;
  border-top-right-radius: 999px;
  z-index: 2;
  pointer-events: none;
}

.bottom-nav-item {
  position: relative;
  z-index: 3;
  width: 100%;
  height: 58px;
  border: none;
  background: transparent;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0;
  transition: transform 0.18s ease, color 0.18s ease, opacity 0.18s ease;
  font-family: inherit;
}

.bottom-nav-item:active { transform: scale(0.96); }
.bottom-nav-item.active { color: var(--gold); }
.bottom-nav-item:not(.active) { opacity: 0.92; }

.bottom-nav-icon {
  width: 30px;
  height: 30px;
  font-size: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.bottom-nav-label {
  font-size: 10.5px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.bottom-nav-item.active .bottom-nav-icon {
  transform: translateY(-1px);
}

.bottom-cart-fab {
  position: absolute;
  right: 50%;
  top: calc(var(--bottom-fab-lift) * -1);
  transform: translateX(50%);
  width: var(--bottom-fab-size);
  height: var(--bottom-fab-size);
  border-radius: 50%;
  border: 4px solid var(--white);
  background: linear-gradient(180deg, var(--red-light) 0%, var(--red) 100%);
  color: var(--white);
  box-shadow: var(--bottom-cart-shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  padding: 0;
}

.bottom-cart-fab::before {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: inherit;
  background: radial-gradient(circle, rgba(139, 0, 0, 0.14) 0%, rgba(139, 0, 0, 0) 72%);
  z-index: -1;
}

.bottom-cart-fab:active {
  transform: translateX(50%) scale(0.96);
}

.bottom-cart-icon {
  width: 35px;
  height: 35px;
  font-size: 30px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bottom-cart-badge {
  position: absolute;
  top: -3px;
  right: -1px;
  min-width: 21px;
  height: 21px;
  border-radius: 999px;
  background: #FF5A1F;
  color: var(--white);
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  border: 2px solid var(--white);
  line-height: 1;
}

.bottom-cart-total {
  position: absolute;
  bottom: -16px;
  right: 50%;
  transform: translateX(50%);
  background: #111;
  color: var(--white);
  font-size: 11.5px;
  font-weight: 800;
  line-height: 1;
  padding: 7px 11px 8px;
  border-radius: 999px;
  white-space: nowrap;
  box-shadow: 0 5px 10px rgba(0,0,0,0.14);
}

@media (min-width: 480px) {
  .bottom-nav {
    max-width: 480px;
    margin: 0 auto;
    left: 50%;
    transform: translateX(-50%);
    overflow: visible;
  }
}

@media (max-width: 380px) {
  :root {
    --bottom-nav-height: 74px;
    --bottom-fab-size: 64px;
    --bottom-safe-space: 94px;
    --bottom-cutout-width: 112px;
  }

  .bottom-nav {
    padding: 0 6px env(safe-area-inset-bottom, 0px);
  }

  .bottom-nav-item {
    height: 56px;
    gap: 4px;
  }

  .bottom-nav-label {
    font-size: 10px;
  }

  .bottom-nav-icon {
    font-size: 24px;
  }

  .bottom-cart-icon {
    font-size: 28px;
  }

  .bottom-cart-total {
    font-size: 11px;
    padding: 6px 10px 7px;
  }
}

/* ═══════════════════════════════════════════════════════
   المجموعة الثالثة — التسجيل + الإشعارات + الحالات
   ═══════════════════════════════════════════════════════ */

/* ── شريط ساعات العمل (الهيدر) ─────────────────────── */
.work-hours-bar {
  display: flex; align-items: center; justify-content: center;
  gap: 5px; padding: 4px 14px 6px;
  font-size: 11px; color: rgba(255,255,255,0.8);
  border-top: 1px solid rgba(255,255,255,0.12);
}
.work-hours-bar svg { flex-shrink: 0; }

/* ── popup المطعم المغلق ───────────────────────────── */
.closed-popup-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(0,0,0,0.78);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.closed-popup-card {
  background: white; border-radius: 22px;
  padding: 28px 22px 24px; text-align: center;
  max-width: 340px; width: 100%;
  animation: popIn 0.3s ease;
}
.closed-popup-icon { font-size: 54px; margin-bottom: 10px; }
.closed-popup-title { font-size: 18px; font-weight: 800; color: var(--danger); margin-bottom: 8px; }
.closed-popup-msg   { font-size: 13px; color: #475569; line-height: 1.65; margin-bottom: 20px; }
.btn-closed-ok {
  width: 100%; padding: 13px; border-radius: 12px;
  background: linear-gradient(135deg, var(--danger), #C0392B);
  color: white; font-size: 15px; font-weight: 700; border: none; cursor: pointer;
}
@keyframes popIn {
  from { transform: scale(0.85); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}

/* ── تنبيه "مشغول" في صفحة الدفع ──────────────────── */
.busy-checkout-banner {
  background: linear-gradient(135deg, #92400e, #b45309);
  color: white; border-radius: 12px;
  padding: 12px 14px; margin-bottom: 12px;
  display: flex; align-items: flex-start; gap: 10px;
}
.busy-checkout-icon { font-size: 22px; flex-shrink: 0; line-height: 1; }
.busy-checkout-text { font-size: 13px; font-weight: 700; line-height: 1.55; }

/* ── overlay التسجيل / الدخول ───────────────────────── */
.register-overlay {
  position: fixed; inset: 0; z-index: 450;
  background: rgba(0,0,0,0.65);
  display: flex; align-items: flex-end; justify-content: center;
}
.register-sheet {
  background: white; border-radius: 24px 24px 0 0;
  padding: 24px 20px 44px; width: 100%; max-width: 480px;
  animation: slideUp 0.3s ease;
}
.register-logo-row {
  display: flex; flex-direction: column; align-items: center;
  gap: 8px; margin-bottom: 22px; text-align: center;
}
.register-logo-row img  { height: 62px; border-radius: 12px; }
.register-logo-row h2   { font-size: 18px; font-weight: 800; color: #1a1a1a; margin: 0; }
.register-logo-row p    { font-size: 13px; color: #64748b; margin: 0; }
.register-phone-row     { display: flex; gap: 8px; }
.register-prefix {
  padding: 10px 8px; border: 1.5px solid #e2e8f0; border-radius: 10px;
  font-size: 13px; background: white; flex-shrink: 0; width: 105px;
  font-family: inherit;
}
.btn-do-register {
  width: 100%; padding: 14px; border-radius: 14px;
  background: linear-gradient(135deg, var(--brand), var(--brand-light));
  color: white; font-size: 16px; font-weight: 800;
  border: none; cursor: pointer; margin-top: 16px;
  transition: opacity 0.2s; white-space: nowrap;
}
.btn-do-register:active   { opacity: 0.82; transform: scale(0.98); }
.btn-do-register:disabled { opacity: 0.55; }
.btn-guest-mode {
  width: 100%; padding: 12px; border-radius: 14px;
  background: transparent; color: #64748b; font-size: 14px;
  border: 1.5px solid #e2e8f0; cursor: pointer; margin-top: 8px;
  font-family: inherit;
}

/* ── حقل العنوان التفصيلي (ملفت) ───────────────────── */
.addr-highlight-box {
  background: linear-gradient(135deg, #fffbeb, #fefce8);
  border: 2px solid #f59e0b; border-radius: 12px; padding: 12px 14px;
}
.addr-highlight-label {
  display: flex; align-items: center; gap: 6px;
  font-weight: 700; color: #92400e; margin-bottom: 4px; font-size: 13px;
}
.addr-hint { font-size: 11px; color: #b45309; margin-bottom: 8px; }

/* ── إضافات صفحة حسابي ──────────────────────────────── */
.profile-section-card {
  background: white; border-radius: 16px; padding: 16px;
  margin-bottom: 12px; box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}
.profile-section-card h4 { font-size: 14px; font-weight: 700; color: #1e293b; margin: 0 0 12px; }
.notif-toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.notif-toggle-text { font-size: 13px; color: #475569; flex: 1; line-height: 1.5; }
.notif-denied-hint {
  margin-top: 8px; padding: 8px 10px; background: #fef3c7;
  border-radius: 8px; font-size: 12px; color: #92400e;
}
.birthday-hint { font-size: 12px; color: #64748b; margin-bottom: 8px; line-height: 1.5; }
.birthday-saved-msg { font-size: 12px; color: #16a34a; margin-top: 6px; font-weight: 600; }

/* ── شارات الحظر (admin) ──────────────────────────────── */
.ban-badge {
  display: inline-block; font-size: 10px; padding: 2px 7px;
  border-radius: 8px; font-weight: 700; margin-right: 4px; vertical-align: middle;
}
.ban-badge.chat { background: #fef3c7; color: #92400e; }
.ban-badge.full { background: #fee2e2; color: #dc2626; }

/* ── إصلاح ألوان هيدر الزبون ─────────────────────────── */
.sec-header .sec-name { color: #fff !important; }
.rest-banner .rest-banner-sub { color: rgba(255,255,255,0.85) !important; }
.social-follow { color: rgba(255,255,255,0.75) !important; }

/* ── OTP شاشة التحقق ──────────────────────────────────── */
.otp-input:focus {
  outline: none;
  border-color: var(--brand-light);
  box-shadow: 0 0 0 3px rgba(0,129,72,0.15);
}

/* ── طلباتي — تبويبات ──────────────────────────────────── */
#ordersTab_active.active-tab,
#ordersTab_past.active-tab {
  background: #f97316;
  border-color: #f97316 !important;
  color: #fff !important;
}
#ordersTab_active:not(.active-tab),
#ordersTab_past:not(.active-tab) {
  background: #f8fafc;
  color: #64748b;
  border-color: #e2e8f0 !important;
}

/* ── حقل كلمة المرور ──────────────────────────────────── */
#regPasswordWrap { margin-bottom: 0; }

/* ── خصومات المنتجات ──────────────────────────────────── */
.prod-discount-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--cta);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 7px;
  border-radius: 20px;
  z-index: 2;
  line-height: 1.4;
}
.prod-price-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.prod-price-old {
  color: var(--muted);
  text-decoration: line-through;
  font-size: 12px;
  font-weight: 400;
}
.prod-price-new {
  color: var(--cta);
}
.prod-saving {
  font-size: 11px;
  color: #16a34a;
  font-weight: 700;
  margin-top: 2px;
}
.cart-item-old-price {
  color: var(--muted);
  text-decoration: line-through;
  font-size: 12px;
  font-weight: 400;
  display: block;
}
.cart-item-saving {
  font-size: 11px;
  color: #16a34a;
  font-weight: 700;
  margin-top: 1px;
}

/* ── خصم الحجم في المودال ─────────────────────────────── */
.step-size-price-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.step-size-disc-badge {
  background: var(--cta);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 20px;
  line-height: 1.4;
}

/* ── قائمة المنتجات في ملخص الطلب ────────────────────── */
.sum-cart-lines {
  margin-bottom: 4px;
}
.sum-cart-line {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 13px;
}
.sum-cart-line:last-child {
  border-bottom: none;
}
.sum-cart-line-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}
.sum-cart-line-name {
  font-weight: 700;
  color: var(--text);
}
.sum-cart-line-qty {
  color: var(--muted);
  font-weight: 400;
}
.sum-cart-line-extras {
  font-size: 11px;
  color: var(--muted);
}
.sum-cart-line-price {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
  white-space: nowrap;
}
.sum-divider {
  border-top: 2px solid var(--border);
  margin: 6px 0 8px;
}

/* ══════════════════════════════════════════════════════════════
   TD-05-UX Phase 2A — minimal checkout/cart visual polish
   Additive, scoped to #checkoutPage / #cartPage. No :root change,
   no selector deduplication, no behavior/logic/pricing change.
   ══════════════════════════════════════════════════════════════ */

/* clearer separation between the stacked checkout section cards */
#checkoutPage .section-card {
  margin-bottom: 14px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 4px 14px rgba(0, 0, 0, 0.05);
}

/* restore a visible divider under each checkout section title
   (the later re-skin layer had stripped border-bottom/padding-bottom) */
#checkoutPage .section-title {
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}

/* more legible form labels inside the checkout */
#checkoutPage .form-label {
  font-size: 13px;
  font-weight: 700;
  color: #475569;
}

/* primary submit button — stronger hierarchy + sticky/floating CTA */
#checkoutPage #btnSubmitOrder {
  position: sticky;
  bottom: 12px;
  z-index: 5;
  margin-top: 16px;
  padding: 16px;
  font-size: 17px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.22);
}

/* cart-page checkout-entry button — clearer primary CTA */
#cartPage .page-footer .btn-checkout {
  font-size: 16px;
  font-weight: 800;
  padding: 15px;
}
