/* ════════════════════════════════════════════
   VIVID FEAST — Bold Food App Design System
   نموذج ثالث | Syria Alpouti
   ════════════════════════════════════════════ */

:root {
  /* ─── Vibrant Red-Orange Palette ─── */
  --bg:           #FFF8F5;
  --surface:      #FFFFFF;
  --surface2:     #FFF1EB;
  --surface3:     #FFE4DA;

  /* ─── Primary: Vivid Red-Orange ─── */
  --primary:      #E8380D;
  --primary-dark: #C02808;
  --primary-mid:  #F04E20;
  --primary-lt:   rgba(232,56,13,0.09);
  --primary-glow: rgba(232,56,13,0.22);

  /* ─── Secondary: Warm Amber ─── */
  --secondary:    #FF8C00;
  --secondary-lt: rgba(255,140,0,0.10);

  /* ─── Text ─── */
  --text:         #1A1014;
  --text-sub:     #7A6E72;
  --text-light:   #B0A4A8;

  /* ─── Structure ─── */
  --divider:      #EFE8E4;
  --border:       #E8DED9;

  /* ─── Functional ─── */
  --wa-green:     #25D366;
  --error:        #D32F2F;
  --success:      #22A45D;

  /* ─── Radius ─── */
  --radius-sm:    10px;
  --radius-md:    16px;
  --radius-lg:    20px;
  --radius-xl:    28px;

  /* ─── Shadows ─── */
  --shadow-xs:    0 1px 6px rgba(0,0,0,0.06);
  --shadow-sm:    0 2px 14px rgba(0,0,0,0.08);
  --shadow-md:    0 6px 24px rgba(0,0,0,0.11);
  --shadow-lg:    0 12px 40px rgba(0,0,0,0.14);
  --shadow-red:   0 4px 20px rgba(232,56,13,0.28);
}

/* ════════════════════════════════════════════
   Reset & Base
   ════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: 'Cairo', sans-serif;
  background: var(--bg);
  color: var(--text);
  direction: rtl;
  min-height: 100dvh;
  overflow-x: hidden;
  /* Subtle dot grid texture */
  background-image: radial-gradient(circle, rgba(232,56,13,0.045) 1px, transparent 1px);
  background-size: 22px 22px;
}
button { cursor: pointer; border: none; outline: none; background: none; font-family: inherit; }
input, textarea { font-family: inherit; }
a { text-decoration: none; color: inherit; }
img { display: block; }
.hidden { display: none !important; }

/* ════════════════════════════════════════════
   Page Layout
   ════════════════════════════════════════════ */
.page {
  max-width: 520px;
  margin: 0 auto;
  min-height: 100dvh;
  background: transparent;
  position: relative;
}
.divider {
  height: 1px;
  background: var(--divider);
}

/* topbar hidden — no top bar in this design */
.topbar { display: none; }
.topbar-icon-btn, .topbar-title, .topbar-cart-btn, .topbar-cart-badge { display: none; }

/* ════════════════════════════════════════════
   Restaurant Card (Compact Hero)
   ════════════════════════════════════════════ */
.restaurant-card {
  position: relative;
  height: 195px;
  overflow: hidden;
  background: var(--primary-dark);
}
.rc-bg {
  position: absolute;
  inset: 0;
}
.rc-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.06);
  transition: transform 8s ease;
}
.rc-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    150deg,
    var(--primary-dark) 0%,
    var(--primary) 45%,
    var(--secondary) 100%
  );
}
/* Dot pattern overlay */
.rc-dots {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.12) 1.5px, transparent 1.5px);
  background-size: 20px 20px;
  z-index: 1;
}
/* Bottom fade for text readability */
.rc-bottom-fade {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 130px;
  background: linear-gradient(to top, rgba(0,0,0,0.65) 0%, rgba(0,0,0,0.25) 55%, transparent 100%);
  z-index: 2;
}
.rc-content {
  position: absolute;
  bottom: 20px;
  right: 18px;
  left: 18px;
  display: flex;
  align-items: flex-end;
  gap: 14px;
  z-index: 3;
}
.rc-logo {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: white;
  border: 3px solid rgba(255,255,255,0.90);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow:
    0 4px 20px rgba(0,0,0,0.28),
    0 0 0 4px rgba(232,56,13,0.25);
}
.rc-logo img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.rc-logo-icon { color: var(--primary); font-size: 30px; }
.rc-text { flex: 1; }
.rc-name {
  color: #fff;
  font-size: 25px;
  font-weight: 900;
  text-shadow: 0 2px 14px rgba(0,0,0,0.55);
  line-height: 1.2;
  letter-spacing: 0.3px;
}
.rc-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255,255,255,0.16);
  border: 1px solid rgba(255,255,255,0.30);
  color: rgba(255,255,255,0.88);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 16px;
  margin-top: 7px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.rc-tag i { font-size: 9px; color: #FFD76A; }

/* ════════════════════════════════════════════
   Info Bar
   ════════════════════════════════════════════ */
.info-bar {
  background: white;
  padding: 10px 14px;
  border-bottom: 1px solid var(--divider);
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.info-bar-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.info-bar-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 4px 10px;
  font-size: 12px;
  color: var(--text-sub);
  font-weight: 500;
}
.info-bar-item i { color: var(--primary); font-size: 12px; }
.info-bar-sep {
  width: 1px;
  height: 16px;
  background: var(--border);
  flex-shrink: 0;
}

/* ════════════════════════════════════════════
   Category Pills — Sticky
   ════════════════════════════════════════════ */
.cat-pills-section {
  position: sticky;
  top: 0;
  z-index: 90;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--divider);
  box-shadow: 0 3px 12px rgba(0,0,0,0.06);
}
.cat-pills {
  display: flex;
  overflow-x: auto;
  padding: 11px 14px;
  gap: 8px;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}
.cat-pills::-webkit-scrollbar { display: none; }

/* Individual pill */
.cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: 24px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  border: 1.5px solid var(--border);
  background: white;
  color: var(--text-sub);
  transition: all .22s cubic-bezier(.4,0,.2,1);
  flex-shrink: 0;
  user-select: none;
  line-height: 1;
}
.cat-pill i { font-size: 12px; transition: color .2s; }
.cat-pill-img {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1.5px solid rgba(0,0,0,0.08);
  transition: border-color .2s;
}
.cat-pill.active .cat-pill-img { border-color: rgba(255,255,255,0.50); }
.cat-pill:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-lt);
  transform: translateY(-1px);
}
.cat-pill:active { transform: scale(0.95); }
.cat-pill.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  box-shadow: var(--shadow-red);
  transform: translateY(-1px);
}
.cat-pill.active i { color: rgba(255,255,255,0.88); }

/* Pill skeleton */
.cat-pill-skel {
  height: 36px;
  width: 80px;
  border-radius: 20px;
  background: var(--surface2);
  animation: pulse 1.6s ease-in-out infinite;
  flex-shrink: 0;
}
.cats-empty {
  padding: 24px;
  text-align: center;
}

/* ════════════════════════════════════════════
   Menu Section Header
   ════════════════════════════════════════════ */
.menu-section-head {
  padding: 16px 14px 12px;
  background: transparent;
}
.menu-title-row {
  margin-bottom: 12px;
}
.menu-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}
.menu-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
}
.menu-count-badge {
  background: var(--primary-lt);
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  border: 1px solid rgba(232,56,13,0.18);
}

/* ════════════════════════════════════════════
   Search Bar
   ════════════════════════════════════════════ */
.search-bar-wrap { background: transparent; }
.search-bar-inner {
  display: flex;
  align-items: center;
  background: white;
  border: 1.5px solid var(--border);
  border-radius: 24px;
  padding: 0 14px;
  height: 44px;
  gap: 8px;
  box-shadow: var(--shadow-xs);
  transition: border-color .2s, box-shadow .2s;
}
.search-bar-inner:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(232,56,13,0.09);
}
.search-bar-icon { color: var(--text-light); font-size: 13px; flex-shrink: 0; }
.search-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  font-size: 14px;
  color: var(--text);
  direction: rtl;
}
.search-input::placeholder { color: var(--text-light); }
.search-clear-btn {
  color: var(--text-light);
  font-size: 13px;
  padding: 4px;
  transition: color .15s;
  flex-shrink: 0;
}
.search-clear-btn:hover { color: var(--text); }

/* ════════════════════════════════════════════
   Products — 2-Column Grid
   ════════════════════════════════════════════ */
.products-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 0 14px 14px;
}

/* ── Product Card ── */
.product-card {
  background: white;
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--divider);
  box-shadow: var(--shadow-xs);
  transition: transform .18s cubic-bezier(.4,0,.2,1), box-shadow .18s;
  position: relative;
  animation: fadeUpIn .28s ease both;
}
.product-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.product-card:active { transform: scale(0.97); }
@keyframes fadeUpIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
/* Stagger on load */
.product-card:nth-child(2)  { animation-delay: .04s; }
.product-card:nth-child(3)  { animation-delay: .08s; }
.product-card:nth-child(4)  { animation-delay: .12s; }
.product-card:nth-child(5)  { animation-delay: .16s; }
.product-card:nth-child(6)  { animation-delay: .20s; }
.product-card:nth-child(n+7) { animation-delay: .24s; }

/* Image area */
.pc-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  position: relative;
  overflow: hidden;
  background: var(--surface2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.pc-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s ease;
}
.product-card:hover .pc-image img { transform: scale(1.07); }
.pc-image.pc-no-img {
  background: linear-gradient(145deg, #FFF0EB, #FFE4DA);
}
.pc-image.pc-no-img i {
  font-size: 34px;
  color: rgba(232,56,13,0.20);
}
/* Unavailable overlay */
.pc-unavail-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255,248,245,0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.pc-unavail-overlay span {
  background: rgba(211,47,47,0.90);
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  letter-spacing: 0.3px;
}
/* Price ribbon on image corner */
.pc-price-ribbon {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: white;
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
  line-height: 1;
  z-index: 2;
}
/* Card body */
.pc-body {
  padding: 10px 10px 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.pc-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 3px;
}
.pc-desc {
  font-size: 11px;
  color: var(--text-sub);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 8px;
  flex: 1;
}
.pc-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: auto;
}
.pc-price {
  font-size: 14px;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}
.pc-unavail-tag {
  font-size: 10px;
  font-weight: 600;
  color: var(--error);
  background: rgba(211,47,47,0.08);
  border: 1px solid rgba(211,47,47,0.20);
  padding: 3px 7px;
  border-radius: 10px;
}
/* Add button */
.pc-add-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(232,56,13,0.32);
  transition: transform .15s, box-shadow .15s;
}
.pc-add-btn:hover { transform: scale(1.10); box-shadow: 0 4px 14px rgba(232,56,13,0.44); }
.pc-add-btn:active { transform: scale(0.90); }
/* Compact qty control */
.pc-qty-ctrl {
  display: flex;
  align-items: center;
  background: var(--surface2);
  border-radius: 20px;
  overflow: hidden;
  border: 1.5px solid rgba(232,56,13,0.22);
}
.pqc-btn {
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  transition: background .15s;
}
.pqc-btn:first-child { color: var(--text-sub); }
.pqc-btn.plus {
  background: var(--primary);
  color: white;
  border-radius: 50%;
}
.pqc-val {
  width: 22px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
}

/* ── Product Skeleton (grid) ── */
.pc-skeleton {
  background: white;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--divider);
  display: flex;
  flex-direction: column;
}
.pc-skel-img {
  aspect-ratio: 4/3;
  background: var(--surface2);
  animation: pulse 1.6s ease-in-out infinite;
}
.pc-skel-body {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.skel-line {
  border-radius: 5px;
  background: var(--surface2);
  animation: pulse 1.6s ease-in-out infinite;
}

/* ── Empty / Error States ── */
.prods-empty {
  grid-column: 1 / -1;
  padding: 60px 20px;
  text-align: center;
}
.prods-empty i { font-size: 54px; color: rgba(232,56,13,0.15); margin-bottom: 16px; display: block; }
.prods-empty-title { font-size: 17px; font-weight: 700; color: var(--text-sub); }
.prods-empty-sub { font-size: 13px; color: var(--text-light); margin-top: 6px; }
.prods-error {
  grid-column: 1 / -1;
  padding: 56px 20px;
  text-align: center;
}
.prods-error-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: white;
  border: 1px solid var(--divider);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 28px;
  color: var(--primary);
}
.prods-error-title { font-size: 16px; font-weight: 700; color: var(--text); }
.prods-error-msg { font-size: 13px; color: var(--text-sub); margin-top: 6px; }
.btn-retry {
  margin-top: 18px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border-radius: 28px;
  padding: 10px 26px;
  font-size: 14px;
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow-red);
}

/* ════════════════════════════════════════════
   FABs
   ════════════════════════════════════════════ */
.fabs {
  position: fixed;
  bottom: 26px;
  left: 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  z-index: 200;
}
.fab-whatsapp {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--wa-green);
  color: #fff;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 22px rgba(37,211,102,0.42);
  transition: transform .2s, box-shadow .2s;
}
.fab-whatsapp:hover { transform: scale(1.08); }
.fab-whatsapp.mini { width: 44px; height: 44px; font-size: 18px; }
.fab-cart-wrap { order: -1; }
.fab-cart {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border-radius: 30px;
  height: 50px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 800;
  box-shadow: var(--shadow-red);
  transition: transform .2s, box-shadow .2s;
  font-family: inherit;
}
.fab-cart:hover { transform: scale(1.04); }
.fab-cart-icon-wrap { position: relative; }
.fab-cart-icon-wrap i { font-size: 18px; }
.fab-cart-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: #FFD76A;
  color: var(--primary-dark);
  font-size: 9px;
  font-weight: 900;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--primary-dark);
}

/* ════════════════════════════════════════════
   Drawer
   ════════════════════════════════════════════ */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.48);
  z-index: 400;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s;
}
.drawer-overlay.open { opacity: 1; pointer-events: all; }
.drawer {
  position: fixed;
  top: 0;
  right: -320px;
  width: 300px;
  height: 100dvh;
  background: white;
  z-index: 401;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: right .3s cubic-bezier(.4,0,.2,1);
  box-shadow: var(--shadow-lg);
  border-left: 1px solid var(--divider);
}
.drawer.open { right: 0; }
.drawer-header {
  padding: 52px 22px 26px;
  background: linear-gradient(160deg, var(--primary-dark) 0%, var(--primary) 60%, var(--secondary) 100%);
  position: relative;
  overflow: hidden;
}
.drawer-header::before {
  content: '';
  position: absolute;
  top: -70px;
  left: -70px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(255,255,255,0.07);
}
.drawer-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(255,255,255,0.18);
}
.drawer-logo {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: rgba(255,255,255,0.20);
  border: 2px solid rgba(255,255,255,0.52);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 14px;
}
.drawer-logo img { width: 100%; height: 100%; object-fit: cover; }
.drawer-logo i { color: white; font-size: 30px; }
.drawer-name { color: white; font-size: 19px; font-weight: 700; }
.drawer-accent-line {
  width: 28px;
  height: 2px;
  background: rgba(255,255,255,0.45);
  border-radius: 1px;
  margin: 8px 0 0;
}
.drawer-address {
  font-size: 12px;
  color: rgba(255,255,255,0.72);
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.drawer-body { flex: 1; overflow-y: auto; padding-bottom: 24px; }
.drawer-body::-webkit-scrollbar { width: 0; }
.drawer-section-label {
  padding: 16px 20px 6px;
  font-size: 10px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 2px;
  text-transform: uppercase;
  opacity: 0.75;
}
.drawer-divider { height: 1px; background: var(--divider); margin: 6px 20px; }
.drawer-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  cursor: pointer;
  transition: background .15s;
}
.drawer-item:hover { background: var(--surface2); }
.drawer-item-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}
.drawer-item span { font-size: 14px; font-weight: 500; color: var(--text); }
.drawer-item-sub { display: block; font-size: 11px; color: var(--text-sub); margin-top: 1px; }
.drawer-social-row { padding: 10px 20px; display: flex; flex-wrap: wrap; gap: 12px; }
.social-btn {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  cursor: pointer;
  transition: transform .15s;
  border: 1px solid transparent;
}
.social-btn:hover { transform: scale(1.12); }
.whatsapp-contact-badge {
  background: rgba(37,211,102,0.10);
  border: 1px solid rgba(37,211,102,0.28);
  color: var(--wa-green);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

/* ════════════════════════════════════════════
   Modals / Bottom Sheets
   ════════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.50);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 300;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: fadeIn .22s ease;
}
.modal-overlay.hidden { display: none; }
@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }

/* ─── Cart Sheet ─── */
.cart-sheet {
  width: 100%;
  max-width: 520px;
  max-height: 90dvh;
  background: white;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  display: flex;
  flex-direction: column;
  animation: slideUp .3s cubic-bezier(.4,0,.2,1);
  border-top: 3px solid var(--primary);
  box-shadow: 0 -8px 40px rgba(0,0,0,0.14);
}
@keyframes slideUp { from { transform: translateY(100%) } to { transform: translateY(0) } }
.cart-empty-sheet { padding-bottom: env(safe-area-inset-bottom, 0); align-items: center; }
.cart-drag-handle {
  width: 36px;
  height: 3.5px;
  background: var(--border);
  border-radius: 2px;
  margin: 14px auto 4px;
  flex-shrink: 0;
}
.cart-header {
  padding: 0 20px 14px;
  border-bottom: 1px solid var(--divider);
  flex-shrink: 0;
}
.cart-header-row { display: flex; align-items: center; gap: 12px; }
.cart-icon-wrap {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--primary-lt);
  border: 1px solid rgba(232,56,13,0.16);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 17px;
  flex-shrink: 0;
}
.cart-title { font-size: 18px; font-weight: 700; color: var(--text); }
.cart-subtitle { font-size: 12px; color: var(--text-sub); }
.cart-clear-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(211,47,47,0.07);
  border: 1px solid rgba(211,47,47,0.20);
  color: var(--error);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 24px;
  cursor: pointer;
  font-family: inherit;
  flex-shrink: 0;
  transition: background .15s;
}
.cart-clear-btn:hover { background: rgba(211,47,47,0.14); }
.cart-items { flex: 1; overflow-y: auto; padding: 12px 14px; }
.cart-items::-webkit-scrollbar { width: 0; }
.cart-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--surface2);
  border-radius: var(--radius-md);
  border: 1px solid var(--divider);
  margin-bottom: 10px;
  transition: border-color .15s;
}
.cart-item:hover { border-color: rgba(232,56,13,0.20); }
.cart-item-img {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--surface3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(232,56,13,0.22);
  font-size: 20px;
}
.cart-item-img img { width: 100%; height: 100%; object-fit: cover; }
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name { font-size: 14px; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cart-item-unit { font-size: 12px; color: var(--primary); font-weight: 600; margin-top: 3px; }
.cart-item-total { font-size: 11px; color: var(--text-sub); margin-top: 2px; }
.cart-qty-ctrl {
  display: flex;
  align-items: center;
  background: white;
  border-radius: 28px;
  flex-shrink: 0;
  border: 1px solid var(--border);
}
.cqc-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  transition: background .15s;
}
.cqc-btn.minus { color: var(--text-sub); }
.cqc-btn.plus { background: var(--primary); color: white; }
.cqc-val { width: 30px; text-align: center; font-size: 14px; font-weight: 700; color: var(--text); }
.cart-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--divider);
  flex-shrink: 0;
  padding-bottom: max(14px, env(safe-area-inset-bottom, 14px));
}
.cart-total-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--primary-lt);
  border-radius: 14px;
  border: 1px solid rgba(232,56,13,0.14);
  padding: 12px 16px;
  margin-bottom: 12px;
}
.cart-total-row i { color: var(--primary); font-size: 16px; }
.cart-total-label { font-weight: 700; color: var(--text); font-size: 14px; }
.cart-total-price { font-size: 20px; font-weight: 700; color: var(--primary); }
.btn-send-order {
  width: 100%;
  height: 52px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 800;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: opacity .2s, transform .18s;
  border: none;
  box-shadow: var(--shadow-red);
  letter-spacing: 0.3px;
}
.btn-send-order:hover { opacity: 0.92; transform: translateY(-1px); }
.cart-empty-icon {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background: var(--surface2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  color: rgba(232,56,13,0.20);
  margin: 28px auto 18px;
}
.cart-empty-title { font-size: 20px; font-weight: 700; color: var(--text); text-align: center; }
.cart-empty-sub { font-size: 14px; color: var(--text-sub); text-align: center; margin-top: 8px; }
.btn-browse-menu {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border-radius: 28px;
  padding: 12px 32px;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  margin: 20px auto 0;
  border: none;
  box-shadow: var(--shadow-red);
}

/* ════════════════════════════════════════════
   Product Details Sheet
   ════════════════════════════════════════════ */
.product-sheet {
  width: 100%;
  max-width: 520px;
  height: 93dvh;
  background: white;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  display: flex;
  flex-direction: column;
  animation: slideUp .3s cubic-bezier(.4,0,.2,1);
  border-top: 3px solid var(--primary);
  box-shadow: 0 -8px 40px rgba(0,0,0,0.14);
}
.product-sheet-handle-row {
  display: flex;
  align-items: center;
  padding: 14px 16px 0;
  flex-shrink: 0;
}
.product-close-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--surface2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-sub);
  font-size: 13px;
  cursor: pointer;
  flex-shrink: 0;
  transition: background .15s, color .15s;
}
.product-close-btn:hover { background: var(--surface3); color: var(--text); }
.product-sheet-handle {
  flex: 1;
  display: flex;
  justify-content: center;
}
.product-sheet-handle::after {
  content: '';
  width: 36px;
  height: 3.5px;
  background: var(--border);
  border-radius: 2px;
}
.product-images-section {
  position: relative;
  height: 290px;
  flex-shrink: 0;
  overflow: hidden;
  background: var(--surface2);
  direction: ltr;
}
.product-images-carousel {
  display: flex;
  height: 100%;
  transition: transform .36s cubic-bezier(.4,0,.2,1);
}
.product-img-slide { min-width: 100%; height: 100%; overflow: hidden; }
.product-img-slide img { width: 100%; height: 100%; object-fit: cover; }
.product-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: rgba(232,56,13,0.16);
  font-size: 54px;
}
.product-img-placeholder span { font-size: 13px; color: var(--text-sub); }
.product-image-dots {
  position: absolute;
  bottom: 14px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 5px;
}
.img-dot {
  height: 6px;
  border-radius: 3px;
  background: rgba(255,255,255,0.60);
  box-shadow: 0 1px 4px rgba(0,0,0,0.20);
  transition: width .28s, background .28s;
  width: 6px;
  cursor: pointer;
}
.img-dot.active { width: 22px; background: var(--primary); }

.product-info-scroll { flex: 1; overflow-y: auto; padding: 20px 20px 0; }
.product-info-scroll::-webkit-scrollbar { width: 0; }
.product-detail-name { font-size: 22px; font-weight: 800; color: var(--text); line-height: 1.25; }
.product-detail-row { display: flex; align-items: center; gap: 12px; margin: 12px 0 20px; }
.product-price-badge {
  background: var(--primary-lt);
  border: 1px solid rgba(232,56,13,0.22);
  color: var(--primary);
  font-size: 18px;
  font-weight: 700;
  padding: 7px 14px;
  border-radius: 24px;
}
.product-avail-badge {
  font-size: 12px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.product-avail-badge.available {
  background: rgba(34,164,93,0.08);
  color: var(--success);
  border: 1px solid rgba(34,164,93,0.20);
}
.product-avail-badge.unavailable {
  background: rgba(211,47,47,0.07);
  color: var(--error);
  border: 1px solid rgba(211,47,47,0.18);
}
.avail-dot { width: 7px; height: 7px; border-radius: 50%; }
.avail-dot.green { background: var(--success); }
.avail-dot.red { background: var(--error); }
.product-section-label { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.section-label-bar { width: 3px; height: 18px; border-radius: 2px; }
.section-label-bar.accent { background: linear-gradient(to bottom, var(--secondary), #FF5A00); }
.section-label-bar.primary { background: linear-gradient(to bottom, var(--primary), var(--primary-dark)); }
.product-section-label span { font-size: 15px; font-weight: 700; color: var(--text); }
.product-detail-desc { font-size: 14px; color: var(--text-sub); line-height: 1.85; }
.product-qty-row { display: flex; align-items: center; justify-content: space-between; margin-top: 20px; }
.qty-selector {
  display: flex;
  align-items: center;
  background: var(--surface2);
  border-radius: 36px;
  border: 1px solid var(--border);
}
.qty-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  cursor: pointer;
  transition: background .15s;
}
.qty-minus { color: var(--text-light); }
.qty-minus.active { background: var(--surface3); color: var(--text); }
.qty-plus { background: var(--primary); color: white; }
.qty-value { width: 42px; text-align: center; font-size: 17px; font-weight: 700; color: var(--text); }
.product-add-bar {
  padding: 14px 20px;
  border-top: 1px solid var(--divider);
  flex-shrink: 0;
  padding-bottom: max(14px, env(safe-area-inset-bottom, 14px));
}
.btn-add-to-cart {
  width: 100%;
  height: 52px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  transition: opacity .2s, transform .18s;
  border: none;
  box-shadow: var(--shadow-red);
  letter-spacing: 0.3px;
}
.btn-add-to-cart:disabled { background: var(--surface3); color: var(--text-sub); box-shadow: none; cursor: not-allowed; }
.btn-add-to-cart:not(:disabled):hover { opacity: 0.92; transform: translateY(-1px); }

/* ════════════════════════════════════════════
   Dialogs
   ════════════════════════════════════════════ */
#customerOverlay, #confirmOverlay { align-items: center; padding: 16px; }
.dialog-box {
  background: white;
  border-radius: 24px;
  width: 100%;
  max-width: 400px;
  overflow: hidden;
  animation: scaleIn .24s cubic-bezier(.4,0,.2,1);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
}
@keyframes scaleIn { from { transform: scale(.94); opacity: 0 } to { transform: scale(1); opacity: 1 } }
.dialog-header-lux {
  padding: 22px 20px 16px;
  border-bottom: 1px solid var(--divider);
  text-align: center;
  background: linear-gradient(160deg, rgba(232,56,13,0.05) 0%, transparent 60%);
}
.dialog-header-orn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 10px;
}
.dlg-orn-line { display: block; width: 30px; height: 1px; background: linear-gradient(to right, transparent, var(--primary)); opacity: 0.38; }
.dlg-orn-line-rev { background: linear-gradient(to left, transparent, var(--primary)); }
.dlg-orn-icon { color: var(--primary); font-size: 18px; opacity: 0.72; }
.dialog-title-lux { font-size: 18px; font-weight: 700; color: var(--text); }
.dialog-subtitle-lux { font-size: 12px; color: var(--text-sub); margin-top: 4px; }
.dialog-title { display: none !important; }
.dialog-title-bar { display: none; }
.dialog-body { padding: 16px 20px; }
.form-group { margin-bottom: 12px; }
.form-label { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--text-sub); margin-bottom: 6px; }
.form-label i { color: var(--primary); font-size: 12px; }
.form-input {
  width: 100%;
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 14px;
  color: var(--text);
  direction: rtl;
  font-family: inherit;
  transition: border .2s, box-shadow .2s;
}
.form-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(232,56,13,0.09); background: white; }
.form-input::placeholder { color: var(--text-light); }
.form-input.error { border-color: rgba(211,47,47,0.50); }
.form-textarea { min-height: 72px; resize: vertical; }
.form-error { font-size: 11px; color: var(--error); margin-top: 4px; min-height: 14px; }
.dialog-actions { padding: 12px 20px 22px; display: flex; justify-content: flex-end; gap: 10px; }
.btn-cancel {
  background: none;
  color: var(--text-sub);
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  padding: 8px 14px;
  border-radius: 8px;
  transition: color .15s, background .15s;
}
.btn-cancel:hover { color: var(--text); background: var(--surface2); }
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  padding: 10px 20px;
  border-radius: 10px;
  border: none;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 3px 12px rgba(232,56,13,0.22);
  transition: opacity .2s, transform .15s;
}
.btn-primary:hover { opacity: 0.92; transform: translateY(-1px); }
.confirm-info-row { display: flex; align-items: flex-start; gap: 7px; color: var(--text-sub); font-size: 13px; margin-bottom: 6px; }
.confirm-info-row i { color: var(--primary); font-size: 13px; margin-top: 2px; flex-shrink: 0; }
.confirm-total-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--primary-lt);
  border: 1px solid rgba(232,56,13,0.15);
  border-radius: 12px;
  padding: 12px 14px;
  margin-top: 12px;
}
.confirm-total-box i { color: var(--primary); font-size: 16px; }
.confirm-total-label { font-weight: 700; color: var(--text); }
.confirm-total-val { font-size: 16px; font-weight: 700; color: var(--primary); margin-right: auto; }

/* ════════════════════════════════════════════
   Toast
   ════════════════════════════════════════════ */
.toast {
  position: fixed;
  bottom: 92px;
  left: 50%;
  transform: translateX(-50%) translateY(22px);
  background: #1A1014;
  color: white;
  padding: 11px 20px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transition: opacity .28s, transform .28s;
  white-space: nowrap;
  max-width: 90vw;
  text-align: center;
  z-index: 600;
  border-right: 3px solid var(--primary);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ════════════════════════════════════════════
   Animations
   ════════════════════════════════════════════ */
@keyframes pulse {
  0%, 100% { opacity: 1 }
  50% { opacity: .38 }
}
@keyframes spin {
  from { transform: rotate(0deg) }
  to { transform: rotate(360deg) }
}

/* ════════════════════════════════════════════
   Responsive
   ════════════════════════════════════════════ */
@media (max-width: 380px) {
  .rc-name { font-size: 21px; }
  .rc-logo { width: 64px; height: 64px; }
  .products-list { gap: 10px; padding: 0 10px 10px; }
  .cat-pill { padding: 6px 12px; font-size: 12px; }
}
@media (min-width: 521px) {
  .page {
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
  }
  .cart-sheet, .product-sheet {
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
  }
  .fabs { max-width: 520px; margin: 0 auto; right: auto; }
}

/* ════════════════════════════════════════════
   NEW HERO — Full Background with Overlay
   ════════════════════════════════════════════ */
.new-hero {
  position: relative;
  height: 310px;
  overflow: hidden;
  background: #1A1014;
}
.new-hero-bg {
  position: absolute;
  inset: 0;
}
.new-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.05);
  transition: transform 8s ease;
}
.new-hero-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #1A1014 0%, #3D1A2A 55%, #7A3C1A 100%);
}
.new-hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.42);
  z-index: 1;
}

/* ── Floating Topbar ── */
.new-topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  padding: 14px 16px;
  padding-top: max(14px, env(safe-area-inset-top, 14px));
}
.new-topbar-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255,255,255,0.14);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: white;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,0.22);
  transition: background .2s;
  flex-shrink: 0;
}
.new-topbar-btn:hover { background: rgba(255,255,255,0.24); }
.new-topbar-btn:active { transform: scale(0.93); }

/* ── Hero Content (centered) ── */
.new-hero-body {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 5;
  padding: 0 20px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: linear-gradient(to top, rgba(0,0,0,0.72) 0%, rgba(0,0,0,0.28) 60%, transparent 100%);
}
.new-hero-logo {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: white;
  border: 3px solid rgba(255,255,255,0.92);
  box-shadow: 0 4px 28px rgba(0,0,0,0.40), 0 0 0 5px rgba(255,255,255,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  margin-bottom: 12px;
}
.new-hero-logo img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.new-hero-logo-icon { font-size: 38px; color: var(--primary); }
.new-hero-name {
  font-size: 26px;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 2px 18px rgba(0,0,0,0.65);
  line-height: 1.2;
  margin-bottom: 6px;
}
.new-hero-tagline {
  font-size: 14px;
  font-weight: 500;
  color: rgba(255,255,255,0.92);
  text-shadow: 0 1px 10px rgba(0,0,0,0.55);
  margin-bottom: 10px;
}
.new-hero-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.hero-info-item {
  display: flex;
  align-items: center;
  gap: 7px;
  color: rgba(255,255,255,0.88);
  font-size: 13px;
  font-weight: 500;
}
.hero-info-item i { font-size: 11px; color: rgba(255,255,255,0.65); flex-shrink: 0; }

/* ════════════════════════════════════════════
   Category Bento Grid
   ════════════════════════════════════════════ */

/* Dark background for the main page only */
#mainPage {
  background: #111010;
}

.cat-bento-section {
  padding: 12px;
  background: #111010;
}
.cat-bento-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* ── Category Card ── */
.cat-card {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  cursor: pointer;
  background: #2A1A20;
  min-height: 148px;
  box-shadow: 0 3px 14px rgba(0,0,0,0.22);
  transition: transform .2s cubic-bezier(.4,0,.2,1), box-shadow .2s;
  animation: fadeUpIn .3s ease both;
}
.cat-card.cat-card-full {
  grid-column: 1 / -1;
  min-height: 188px;
}
.cat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.32);
}
.cat-card:active { transform: scale(0.96); }
.cat-card:nth-child(2) { animation-delay: .05s; }
.cat-card:nth-child(3) { animation-delay: .10s; }
.cat-card:nth-child(4) { animation-delay: .14s; }
.cat-card:nth-child(5) { animation-delay: .18s; }
.cat-card:nth-child(6) { animation-delay: .22s; }
.cat-card:nth-child(n+7) { animation-delay: .26s; }

.cat-card-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .45s ease;
}
.cat-card:hover .cat-card-img { transform: scale(1.07); }
.cat-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0,0,0,0.72) 0%,
    rgba(0,0,0,0.32) 50%,
    rgba(0,0,0,0.08) 100%
  );
}
.cat-card-icon-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 46px;
  color: rgba(255,255,255,0.10);
}
.cat-card-content {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: flex-end;
  padding: 14px 14px 16px;
  z-index: 2;
}
.cat-card-name {
  color: white;
  font-size: 18px;
  font-weight: 800;
  text-shadow: 0 1px 10px rgba(0,0,0,0.55);
  line-height: 1.25;
  flex: 1;
}
.cat-card-full .cat-card-name { font-size: 22px; }
.cat-card-cart-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,0.18);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.90);
  font-size: 14px;
  flex-shrink: 0;
}

/* ── Category Skeleton ── */
.cat-card-skel {
  border-radius: 18px;
  min-height: 148px;
  background: linear-gradient(135deg, #EFE8E4, #FFE4DA);
  animation: pulse 1.6s ease-in-out infinite;
}
.cat-card-skel.cat-card-full {
  grid-column: 1 / -1;
  min-height: 188px;
}

/* ════════════════════════════════════════════
   Category Products Page
   ════════════════════════════════════════════ */
.cp-topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: white;
  border-bottom: 1px solid var(--divider);
  box-shadow: 0 2px 10px rgba(0,0,0,0.07);
  position: sticky;
  top: 0;
  z-index: 90;
}
.cp-back-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--surface2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-sub);
  font-size: 16px;
  cursor: pointer;
  flex-shrink: 0;
  transition: background .15s, color .15s;
}
.cp-back-btn:hover { background: var(--surface3); color: var(--text); }
.cp-title {
  flex: 1;
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  text-align: center;
}
.cp-icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--surface2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-sub);
  font-size: 14px;
  cursor: pointer;
  flex-shrink: 0;
  transition: background .15s, color .15s;
}
.cp-icon-btn:hover { background: var(--primary-lt); color: var(--primary); }
.cp-search-bar {
  padding: 10px 14px;
  background: white;
  border-bottom: 1px solid var(--divider);
}
.cp-count-row {
  padding: 12px 14px 4px;
  min-height: 36px;
  display: flex;
  align-items: center;
}

/* ════════════════════════════════════════════
   ADMIN SHARED STYLES
   — Restores light palette for admin pages —
   ════════════════════════════════════════════ */
.admin-body {
  --bg:         #F4F6FA;
  --surface:    #FFFFFF;
  --surface2:   #F0EDE6;
  --surface3:   #EDE8DF;
  --primary:    #1B5E3A;
  --primary-lt: rgba(27,94,58,0.10);
  --accent:     #C8963C;
  --accent-lt:  rgba(200,150,60,0.10);
  --text:       #1C1C1C;
  --text-sub:   #8A8278;
  --divider:    #E5DED4;
  --divider2:   #DDD8D0;
  --error:      #D32F2F;
  --shadow-sm:  0 2px 8px rgba(0,0,0,0.06);
  --shadow-md:  0 4px 16px rgba(0,0,0,0.10);
  --shadow-lg:  0 8px 32px rgba(0,0,0,0.16);
  background: #F4F6FA;
  min-height: 100dvh;
  font-family: 'Cairo', sans-serif;
  direction: rtl;
  color: #1C1C1C;
  background-image: none;
}
.admin-topbar {
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  height: 60px;
  padding: 0 20px;
  gap: 14px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.admin-topbar-title { flex: 1; font-size: 18px; font-weight: 700; }
.admin-back-btn {
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255,255,255,0.12);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 16px; cursor: pointer; text-decoration: none; border: none;
}
.admin-topbar-btn {
  height: 36px; background: rgba(255,255,255,0.15); color: #fff;
  border-radius: 8px; padding: 0 14px; font-family: inherit; font-size: 13px;
  font-weight: 600; cursor: pointer; border: none;
  display: flex; align-items: center; gap: 6px;
}
.admin-content { max-width: 720px; margin: 0 auto; padding: 20px 16px 60px; }
.admin-card { background: var(--surface); border-radius: 16px; box-shadow: var(--shadow-sm); padding: 20px; margin-bottom: 16px; }
.admin-card-title { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.admin-card-title i { color: var(--accent); }
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.dash-card {
  background: var(--surface); border-radius: 16px; box-shadow: var(--shadow-sm);
  padding: 20px 16px; display: flex; flex-direction: column; align-items: center;
  gap: 12px; cursor: pointer; text-decoration: none;
  transition: transform .15s, box-shadow .15s; border: 1px solid transparent;
}
.dash-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.dash-card:active { transform: scale(0.98); }
.dash-card-icon { width: 60px; height: 60px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 26px; }
.dash-card-title { font-size: 15px; font-weight: 700; color: var(--text); text-align: center; }
.admin-list { }
.admin-list-item { background: var(--surface); border-radius: 16px; box-shadow: var(--shadow-sm); margin-bottom: 10px; display: flex; align-items: center; gap: 12px; padding: 12px; overflow: hidden; }
.admin-item-img { width: 64px; height: 64px; border-radius: 10px; overflow: hidden; background: var(--surface2); display: flex; align-items: center; justify-content: center; color: rgba(200,150,60,0.4); font-size: 22px; flex-shrink: 0; }
.admin-item-img img { width: 100%; height: 100%; object-fit: cover; }
.admin-item-info { flex: 1; min-width: 0; }
.admin-item-name { font-size: 14px; font-weight: 700; color: var(--text); }
.admin-item-sub { font-size: 12px; color: var(--text-sub); margin-top: 3px; }
.admin-item-price { font-size: 13px; color: var(--primary); font-weight: 600; margin-top: 3px; }
.admin-item-actions { display: flex; gap: 8px; flex-shrink: 0; }
.btn-edit { width: 36px; height: 36px; border-radius: 50%; background: rgba(27,94,58,0.10); color: var(--primary); display: flex; align-items: center; justify-content: center; font-size: 14px; cursor: pointer; border: none; transition: background .15s; }
.btn-edit:hover { background: rgba(27,94,58,0.20); }
.btn-delete { width: 36px; height: 36px; border-radius: 50%; background: rgba(211,47,47,0.10); color: #D32F2F; display: flex; align-items: center; justify-content: center; font-size: 14px; cursor: pointer; border: none; transition: background .15s; }
.btn-delete:hover { background: rgba(211,47,47,0.20); }
.badge-active { background: #E8F5EE; color: var(--primary); font-size: 10px; font-weight: 600; padding: 2px 8px; border-radius: 10px; display: inline-block; margin-top: 4px; }
.badge-inactive { background: #F5E8E8; color: #AA5555; font-size: 10px; font-weight: 600; padding: 2px 8px; border-radius: 10px; display: inline-block; margin-top: 4px; }
.badge-available { background: #E8F5EE; color: var(--primary); font-size: 10px; font-weight: 600; padding: 2px 8px; border-radius: 10px; display: inline-block; margin-top: 4px; }
.badge-unavailable { background: #F5E8E8; color: #AA5555; font-size: 10px; font-weight: 600; padding: 2px 8px; border-radius: 10px; display: inline-block; margin-top: 4px; }
.admin-fab { position: fixed; bottom: 24px; left: 20px; width: 56px; height: 56px; border-radius: 50%; background: var(--primary); color: #fff; font-size: 24px; display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-lg); cursor: pointer; border: none; z-index: 200; transition: transform .2s; }
.admin-fab:hover { transform: scale(1.08); }
.form-modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 400; display: flex; align-items: center; justify-content: center; padding: 16px; animation: fadeIn .2s ease; }
.form-modal-overlay.hidden { display: none; }
.form-modal { background: var(--surface); border-radius: 20px; width: 100%; max-width: 500px; max-height: 90dvh; overflow-y: auto; animation: scaleIn .2s ease; }
.form-modal-header { padding: 20px 20px 0; display: flex; align-items: center; justify-content: space-between; }
.form-modal-title { font-size: 18px; font-weight: 700; color: var(--text); }
.form-modal-close { width: 36px; height: 36px; border-radius: 50%; background: var(--surface2); border: none; display: flex; align-items: center; justify-content: center; color: var(--text-sub); font-size: 14px; cursor: pointer; }
.form-modal-body { padding: 16px 20px; }
.form-modal-footer { padding: 12px 20px 20px; display: flex; justify-content: flex-end; gap: 10px; border-top: 1px solid var(--divider); }
.form-row { margin-bottom: 14px; }
.form-row label { display: block; font-size: 13px; font-weight: 600; color: var(--text-sub); margin-bottom: 6px; }
.form-row input, .form-row textarea, .form-row select { width: 100%; background: var(--surface2); border: 1px solid var(--divider); border-radius: 10px; padding: 10px 12px; font-size: 14px; color: var(--text); direction: rtl; font-family: inherit; transition: border .2s; }
.form-row input:focus, .form-row textarea:focus, .form-row select:focus { outline: none; border-color: var(--primary); }
.form-row textarea { min-height: 80px; resize: vertical; }
.form-toggle-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--divider); }
.form-toggle-label { font-size: 14px; color: var(--text); font-weight: 500; }
.toggle-switch { position: relative; width: 48px; height: 26px; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider { position: absolute; inset: 0; background: #ccc; border-radius: 26px; cursor: pointer; transition: background .2s; }
.toggle-slider::before { content: ''; position: absolute; width: 20px; height: 20px; right: 3px; top: 3px; background: #fff; border-radius: 50%; transition: transform .2s; }
.toggle-switch input:checked + .toggle-slider { background: var(--primary); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(-22px); }
.img-upload-area { border: 2px dashed var(--divider2); border-radius: 12px; padding: 20px; text-align: center; cursor: pointer; transition: border .2s; position: relative; }
.img-upload-area:hover { border-color: var(--primary); }
.img-upload-area input { display: none; }
.img-upload-preview { width: 100%; height: 150px; object-fit: cover; border-radius: 8px; display: none; margin-bottom: 8px; }
.img-upload-hint { color: var(--text-sub); font-size: 13px; }
.img-upload-hint i { font-size: 28px; color: var(--accent); display: block; margin-bottom: 8px; }
.btn-upload-loading { display: flex; align-items: center; justify-content: center; gap: 8px; }
.spinner-inline { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.3); border-top-color: #fff; animation: spin .8s linear infinite; }
.login-page { min-height: 100dvh; background: linear-gradient(135deg, #1B5E3A, #2D7A55); display: flex; align-items: center; justify-content: center; padding: 20px; }
.login-card { background: var(--surface); border-radius: 24px; padding: 32px 24px; width: 100%; max-width: 400px; box-shadow: var(--shadow-lg); }
.login-logo { width: 80px; height: 80px; border-radius: 50%; background: var(--primary-lt); display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; font-size: 34px; color: var(--primary); }
.login-title { text-align: center; font-size: 22px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.login-sub { text-align: center; font-size: 13px; color: var(--text-sub); margin-bottom: 28px; }
.login-error { background: #FEE8E8; border-radius: 10px; padding: 10px 14px; color: var(--error); font-size: 13px; margin-bottom: 16px; display: none; }
.btn-login { width: 100%; height: 50px; background: var(--primary); color: #fff; border-radius: 12px; font-size: 16px; font-weight: 700; font-family: inherit; cursor: pointer; border: none; margin-top: 6px; transition: background .2s; display: flex; align-items: center; justify-content: center; gap: 8px; }
.btn-login:hover { background: #226845; }
.btn-login:disabled { background: #999; cursor: not-allowed; }
.confirm-dialog-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 500; display: flex; align-items: center; justify-content: center; padding: 16px; }
.confirm-dialog-overlay.hidden { display: none; }
.product-images-gallery { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.gallery-img-wrap { position: relative; width: 80px; height: 80px; border-radius: 8px; overflow: hidden; }
.gallery-img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.gallery-img-delete { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; background: rgba(211,47,47,0.85); color: #fff; border: none; font-size: 10px; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.admin-empty { padding: 48px 0; text-align: center; color: var(--text-sub); }
.admin-empty i { font-size: 52px; color: rgba(200,150,60,0.35); margin-bottom: 14px; display: block; }
.loading-spinner { display: flex; align-items: center; justify-content: center; padding: 48px 0; }
.loading-spinner::after { content: ''; width: 36px; height: 36px; border-radius: 50%; border: 3px solid var(--divider); border-top-color: var(--primary); animation: spin .8s linear infinite; }
.snackbar { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(30px); background: var(--primary); color: #fff; padding: 12px 20px; border-radius: 12px; font-size: 14px; font-weight: 600; box-shadow: var(--shadow-md); opacity: 0; pointer-events: none; transition: all .3s; z-index: 700; white-space: nowrap; max-width: 90vw; }
.snackbar.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.snackbar.error { background: var(--error); }
.change-pw-card { background: var(--surface); border-radius: 16px; box-shadow: var(--shadow-sm); padding: 24px 20px; }
@media (max-width: 380px) { .dash-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 521px) { .admin-content { border-left: none; border-right: none; } }
