/* ============= iOS 26 LIQUID GLASS — توصيل طلبات ============= */
:root {
  --ios-bg: #F2F2F7;
  --ios-bg-2: #FFFFFF;
  --ios-grouped: #F2F2F7;
  --ios-blue: #007AFF;
  --ios-green: #34C759;
  --ios-orange: #FF9500;
  --ios-red: #FF3B30;
  --ios-purple: #AF52DE;
  --ios-yellow: #FFCC00;
  --ios-label: #000000;
  --ios-label-2: #8E8E93;
  --ios-label-3: #C7C7CC;
  --ios-separator: rgba(60,60,67,0.12);
  --brand: #5DADE2;
  --brand-light: #7BC4E8;
  --brand-2: #2D3748;
  --brand-3: #1A202C;
  --accent: #F4C842;
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

* { -webkit-tap-highlight-color: transparent; }

html, body {
  font-family: 'Tajawal', -apple-system, 'SF Pro Display', BlinkMacSystemFont, system-ui, sans-serif;
  background: var(--ios-bg);
  color: var(--ios-label);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  animation: pageIn 0.35s var(--ease-out);
}

@keyframes pageIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============= GLASS ============= */
.glass {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.55);
}
.glass-dark {
  background: rgba(20, 20, 22, 0.85);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.08);
  color: #fff;
}
.glass-tab {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(36px) saturate(200%);
  -webkit-backdrop-filter: blur(36px) saturate(200%);
  border: 1px solid rgba(0, 0, 0, 0.06);
}

/* ============= CARDS ============= */
.ios-card {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04), 0 3px 10px rgba(0,0,0,0.04);
  position: relative;
  overflow: hidden;
}
.ios-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,0.6) 0%, transparent 40%);
  pointer-events: none;
}
.ios-list { background: #fff; border-radius: 14px; overflow: hidden; }
.ios-list-row {
  display: flex;
  align-items: center;
  padding: 9px 12px;
  border-bottom: 0.5px solid var(--ios-separator);
  gap: 9px;
}
.ios-list-row:last-child { border-bottom: none; }
.chevron { color: var(--ios-label-3); font-size: 18px; margin-right: auto; transform: scaleX(-1); }

/* ============= SEGMENTED ============= */
.ios-segmented {
  display: flex;
  background: rgba(120,120,128,0.12);
  border-radius: 10px;
  padding: 2px;
}
.ios-segmented button {
  flex: 1;
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ios-label);
  background: transparent;
  transition: all 0.2s var(--ease-out);
}
.ios-segmented button.active {
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* ============= PRESS / SPRING ============= */
.press { transition: transform 0.35s var(--spring), box-shadow 0.25s var(--ease-out); cursor: pointer; user-select: none; }
.press:active { transform: scale(0.96); }

/* ============= TITLE BAR ============= */
.titlebar {
  position: fixed;
  top: env(safe-area-inset-top, 0);
  left: 0; right: 0;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  z-index: 95;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 0.5px solid var(--ios-separator);
}
.titlebar h1 {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
  flex: 1;
  text-align: center;
  margin: 0;
}
.titlebar .tb-btn {
  position: absolute;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  cursor: pointer;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  color: var(--brand);
  font-family: inherit;
}
.titlebar .tb-back { right: 6px; }
.titlebar .tb-action { left: 6px; }
.titlebar .tb-btn svg { width: 20px; height: 20px; stroke: var(--brand); fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.titlebar .tb-btn:active { transform: translateY(-50%) scale(0.9); }
.dynamic-island { display: none; }

/* ============= TAB BAR ============= */
.tab-bar {
  position: fixed;
  bottom: max(env(safe-area-inset-bottom), 10px);
  left: 50%;
  transform: translateX(-50%);
  border-radius: 999px;
  padding: 4px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  gap: 2px;
  z-index: 100;
}
.tab-btn {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 600;
  color: var(--ios-label-2);
  transition: all 0.3s var(--spring);
  min-width: 50px;
  text-decoration: none;
}
.tab-btn .icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.tab-btn .icon svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tab-badge {
  position: absolute;
  top: -4px;
  right: -8px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--ios-red);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid #fff;
}
.tab-btn.active { color: var(--brand); background: rgba(93, 173, 226, 0.14); }
.tab-btn.active .icon { transform: scale(1.08); }
.tab-btn.active .icon svg { stroke-width: 2.4; }

/* ============= HOME INDICATOR ============= */
.home-indicator {
  position: fixed;
  bottom: 5px;
  left: 50%;
  transform: translateX(-50%);
  width: 110px;
  height: 4px;
  background: #000;
  border-radius: 3px;
  opacity: 0.85;
  z-index: 101;
  display: none;
}

/* ============= TOAST ============= */
.toast {
  position: fixed;
  bottom: 85px;
  left: 50%;
  transform: translateX(-50%) translateY(40px);
  padding: 10px 18px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 600;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  max-width: 90%;
  text-align: center;
  white-space: nowrap;
}
.toast.is-ready { transition: all 0.4s var(--spring); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ============= STEPPER ============= */
.stepper {
  position: relative;
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
}
.stepper::before {
  content: '';
  position: absolute;
  top: 12px; right: 12px; left: 12px;
  height: 2px;
  background: var(--ios-separator);
  border-radius: 2px;
  z-index: 0;
}
.stepper::after {
  content: '';
  position: absolute;
  top: 12px; right: 12px;
  height: 2px;
  width: calc(var(--progress, 0) * 1%);
  background: linear-gradient(90deg, var(--ios-green), #30D158);
  border-radius: 2px;
  z-index: 1;
  transition: width 0.6s var(--spring);
}
.step-dot {
  position: relative;
  z-index: 2;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--ios-separator);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--ios-label-2);
  transition: all 0.4s var(--spring);
}
.step-item { display: flex; flex-direction: column; align-items: center; gap: 4px; flex: 1; }
.step-label { font-size: 10px; font-weight: 600; color: var(--ios-label-2); text-align: center; }
.step-item.done .step-dot { background: var(--ios-green); border-color: var(--ios-green); color: #fff; }
.step-item.current .step-dot { background: var(--brand); border-color: var(--brand); color: #fff; }
.step-item.done .step-label, .step-item.current .step-label { color: var(--ios-label); }

/* ============= SIDEBAR (DESKTOP) ============= */
.desktop-shell { display: none; }
.sidebar {
  width: 220px;
  background: #fff;
  border-left: 1px solid var(--ios-separator);
  padding: 14px 10px;
  display: none; /* hidden by default — only shown on desktop via @media (min-width: 1024px) */
  flex-direction: column;
  gap: 3px;
  height: 100vh;
  position: sticky;
  top: 0;
}
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ios-label);
  cursor: pointer;
  transition: all 0.2s var(--ease-out);
  position: relative;
  text-decoration: none;
}
.sidebar-link:hover { background: rgba(0,0,0,0.04); }
.sidebar-link.active { background: rgba(93, 173, 226, 0.1); color: var(--brand); }
.sidebar-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.sidebar-icon svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sidebar-link.active::before {
  content: '';
  position: absolute;
  right: -10px; top: 6px; bottom: 6px;
  width: 3px;
  background: var(--brand);
  border-radius: 3px 0 0 3px;
}
.sidebar-group { font-size: 10px; font-weight: 700; color: var(--ios-label-2); text-transform: uppercase; padding: 8px 10px 2px; letter-spacing: 0.5px; }

/* ============= CATEGORY CHIPS ============= */
.cat-chip {
  flex-shrink: 0;
  padding: 5px 12px;
  border-radius: 999px;
  background: #fff;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  height: 28px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04), 0 0 0 1px rgba(0,0,0,0.03);
  cursor: pointer;
  transition: all 0.3s var(--spring);
  color: var(--ios-label);
}
.cat-chip .emoji { font-size: 14px; }
.cat-chip.active { background: var(--brand); color: #fff; }
.cat-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 4px 2px 8px;
  margin: -4px -2px 0;
}
.cat-scroll::-webkit-scrollbar { display: none; }

/* ============= FLOATING CART (deprecated — cart now in tab bar) ============= */
.floating-cart { display: none !important; }

/* ============= BADGES ============= */
.badge { font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 999px; display: inline-block; }
.badge-green { background: rgba(52, 199, 89, 0.15); color: #1E7E33; }
.badge-orange { background: rgba(255, 149, 0, 0.15); color: #B86E00; }
.badge-blue { background: rgba(0, 122, 255, 0.15); color: #0055B3; }
.badge-red { background: rgba(255, 59, 48, 0.15); color: #C42412; }

.star { color: var(--accent); }

/* ============= MODAL SHEET ============= */
.sheet-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 300;
  opacity: 0;
  pointer-events: none;
}
.sheet-backdrop.is-ready { transition: opacity 0.3s var(--ease-out); }
.sheet-backdrop.show { opacity: 1; pointer-events: auto; }
.sheet {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: #fff;
  border-radius: 20px 20px 0 0;
  padding: 14px 14px max(env(safe-area-inset-bottom), 14px);
  transform: translateY(100%);
  z-index: 301;
  max-height: 85vh;
  overflow-y: auto;
}
.sheet.is-ready { transition: transform 0.4s var(--spring); }
.sheet.show { transform: translateY(0); }
.sheet-handle {
  width: 32px; height: 4px;
  background: var(--ios-label-3);
  border-radius: 3px;
  margin: 0 auto 10px;
}

/* ============= SHELL CONTAINERS ============= */
.app-layout {
  display: flex;
  min-height: 100vh;
  background: linear-gradient(180deg, #EDF6FB 0%, var(--ios-bg) 30%);
}
.app-main {
  flex: 1;
  padding: calc(env(safe-area-inset-top, 0px) + 60px) 12px 95px;
  min-width: 0;
}

/* ============= INPUTS ============= */
.ios-input {
  width: 100%;
  padding: 9px 12px;
  border-radius: 11px;
  background: rgba(120,120,128,0.10);
  border: none;
  font-size: 13px;
  font-family: inherit;
  color: var(--ios-label);
  outline: none;
  transition: all 0.2s;
}
.ios-input:focus { background: rgba(120,120,128,0.16); }
.ios-input::placeholder { color: var(--ios-label-2); }

.search-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 11px;
  background: #fff;
  border: 1px solid var(--ios-separator);
  font-size: 13px;
  color: var(--ios-label-2);
  cursor: pointer;
  font-weight: 500;
}
.search-pill svg { width: 16px; height: 16px; stroke: var(--ios-label-2); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.search-pill.with-input { padding: 0; }
.search-pill.with-input input { background: transparent; padding: 9px 0 9px 12px; border: none; outline: none; flex: 1; font-family: inherit; font-size: 13px; color: var(--ios-label); }
.search-pill.with-input svg { margin: 0 12px; }

/* ============= ICON BTN ============= */
.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  border: 1px solid var(--ios-separator);
}
.icon-btn svg { width: 18px; height: 18px; stroke: var(--ios-label); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn.brand svg { stroke: var(--brand); }
.icon-btn .dot { position: absolute; top: 6px; right: 7px; width: 8px; height: 8px; background: var(--ios-red); border: 2px solid #fff; border-radius: 50%; }

/* ============= PAYMENT OPTION ============= */
.payment-option .pay-check { display: none; color: var(--brand); font-weight: 900; font-size: 18px; }
.payment-option.selected .pay-check { display: inline; }
.payment-option.selected { background: rgba(93, 173, 226, 0.05); }

/* ============= ACCOUNT TILE ICON ============= */
.acct-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #fff;
}
.acct-icon svg { width: 18px; height: 18px; stroke: #fff; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.scroll-x { overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none; }
.scroll-x::-webkit-scrollbar { display: none; }

/* ============= UTILITY CLASSES ============= */
.text-brand { color: var(--brand); }
.bg-brand { background: var(--brand); }
.text-ios-2 { color: var(--ios-label-2); }
.text-ios-3 { color: var(--ios-label-3); }

h1, h2, h3, h4 { font-weight: 700; letter-spacing: -0.02em; }
.title-large { font-size: 24px; font-weight: 900; letter-spacing: -0.03em; line-height: 1.1; }
.title-1 { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; }
.title-2 { font-size: 17px; font-weight: 700; }
.title-3 { font-size: 14px; font-weight: 700; }
.body-txt { font-size: 13px; }
.subheadline { font-size: 12px; }
.footnote { font-size: 11px; }
.caption { font-size: 10px; color: var(--ios-label-2); }

/* ============= HOME HERO ============= */
/* Mobile: clean and simple — no background image, no sprinkles, no dark overlay */
.home-hero {
  position: relative;
  margin-bottom: 16px;
}
.sprinkles { display: none; }
@keyframes sprinkle-bob {
  0%, 100% { transform: translateY(0) rotate(var(--r, 30deg)); }
  50%      { transform: translateY(-8px) rotate(calc(var(--r, 30deg) + 8deg)); }
}

.hero-greeting {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.hero-subtitle { display: none; }
.hero-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
/* Mobile: show inline small location pill in greeting, hide the big hero-loc pill */
.mobile-loc-pill { display: inline-flex; }
.hero-row .hero-loc { display: none; }
.hero-loc {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 11px;
  background: #fff;
  border: 1px solid var(--ios-separator);
  font-size: 13px;
  color: var(--ios-label);
  font-weight: 500;
  text-align: right;
}
.hero-loc svg { width: 16px; height: 16px; flex-shrink: 0; }
.hero-loc .chevron { margin-inline-start: auto; }

@media (min-width: 1024px) {
  .home-hero {
    text-align: center;
    padding: 56px 24px 48px;
    margin-bottom: 24px;
    border-radius: 22px;
    overflow: hidden;
    color: #fff;
    background-image: url('https://images.unsplash.com/photo-1568901346375-23c9450c58cd?w=2000&q=85&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
  }
  .home-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0,0,0,0.65) 0%, rgba(0,0,0,0.45) 60%, rgba(0,0,0,0.55) 100%);
    z-index: 1;
  }
  .home-hero > * { position: relative; z-index: 2; }
  .home-hero .text-ios-2,
  .home-hero .hero-title,
  .home-hero .hero-subtitle { color: #fff !important; }
  .home-hero .text-ios-2 { opacity: 0.85; }
  .sprinkles {
    display: block;
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2;
  }
  .sprinkle {
    position: absolute;
    width: 10px;
    height: 14px;
    border-radius: 2px;
    opacity: 0.92;
    transform: rotate(var(--r, 30deg));
    animation: sprinkle-bob 3.5s ease-in-out infinite;
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
  }
  .sprinkle:nth-child(2n)  { animation-duration: 4.2s; animation-delay: 0.2s; }
  .sprinkle:nth-child(3n)  { animation-duration: 3.8s; animation-delay: 0.5s; }
  .sprinkle:nth-child(4n)  { animation-duration: 4.6s; animation-delay: 0.8s; }
  .hero-bell { display: none; }
  .hero-greeting {
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 20px;
  }
  .hero-greeting > div { text-align: center; }
  .hero-greeting .footnote { font-size: 13px; }
  .hero-title { font-size: 30px !important; line-height: 1.15; margin-bottom: 6px; }
  .hero-subtitle { display: block; font-size: 14px; }
  .hero-row {
    flex-direction: row;
    max-width: 720px;
    margin: 0 auto;
    gap: 12px;
    width: 100%;
  }
  .hero-pill {
    flex: 1;
    height: 56px;
    padding: 0 20px !important;
    border-radius: 999px !important;
    font-size: 15px !important;
  }
  .hero-pill svg { width: 20px !important; height: 20px !important; }
  .hero-row .search-pill { flex: 1.4; }
  .hero-row .hero-loc { font-weight: 700; display: flex; }
  /* Force dark text inside hero-loc (parent .home-hero forces white but the pill is white-bg) */
  .home-hero .hero-loc,
  .home-hero .hero-loc > span:not(.chevron) { color: var(--ios-label); }
  /* Search pill text stays grey (placeholder-like) */
  .home-hero .search-pill,
  .home-hero .search-pill > span { color: var(--ios-label-2); }
  .mobile-loc-pill { display: none; }
}

/* ============= ANIMATIONS ============= */
@keyframes stagger-in {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.stagger { opacity: 0; animation: stagger-in 0.5s var(--spring) forwards; }
@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(255, 59, 48, 0.45); }
  70% { box-shadow: 0 0 0 24px rgba(255, 59, 48, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 59, 48, 0); }
}
.pulse { animation: pulse-ring 1.8s infinite; }
@keyframes bounce-cart {
  0%, 100% { transform: scale(1); }
  30% { transform: scale(1.3) rotate(-8deg); }
  60% { transform: scale(0.92) rotate(4deg); }
}
.bounce { animation: bounce-cart 0.6s var(--spring); }
@keyframes float-emoji {
  0%, 100% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(-6px) rotate(4deg); }
}
.float-emoji { animation: float-emoji 3s ease-in-out infinite; }

/* ============= RESTAURANT LOGOS ============= */
.rest-logo {
  width: 56px; height: 56px;
  border-radius: 14px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  flex-shrink: 0;
  position: relative; overflow: hidden;
  letter-spacing: -0.02em;
  line-height: 1;
}
.rest-logo .main { font-weight: 900; }
.rest-logo .sub { font-weight: 700; letter-spacing: 0.12em; opacity: 0.75; }
.rest-logo.lg { width: 72px; height: 72px; border-radius: 18px; }

.logo-sham { background: linear-gradient(135deg, #FFF5F5 0%, #FED7D7 100%); color: #C53030; border: 2px solid #C53030; }
.logo-sham .main { font-size: 16px; }
.logo-sham .sub { font-size: 6px; margin-top: 1px; }
.logo-sham.lg .main { font-size: 22px; }
.logo-sham.lg .sub { font-size: 8px; }

.logo-pizza { background: linear-gradient(90deg, #38A169 33%, #fff 33% 66%, #E53E3E 66%); color: #1A202C; }
.logo-pizza .main { font-size: 11px; background: #fff; padding: 1px 4px; border-radius: 3px; letter-spacing: 0; }
.logo-pizza .sub { font-size: 7px; background: rgba(255,255,255,0.9); padding: 0 4px; border-radius: 3px; margin-top: 2px; }
.logo-pizza.lg .main { font-size: 14px; padding: 2px 6px; }
.logo-pizza.lg .sub { font-size: 9px; padding: 1px 6px; }

.logo-halab { background: #1A202C; color: #D69E2E; border: 2px solid #D69E2E; }
.logo-halab .main { font-size: 28px; line-height: 0.9; }
.logo-halab .sub { font-size: 6px; margin-top: 2px; }
.logo-halab.lg .main { font-size: 38px; }
.logo-halab.lg .sub { font-size: 8px; }

.logo-sushi { background: #fff; color: #1A202C; border: 2px solid #1A202C; }
.logo-sushi::before { content: ''; position: absolute; top: 7px; left: 50%; transform: translateX(-50%); width: 12px; height: 12px; background: #E53E3E; border-radius: 50%; }
.logo-sushi .main { font-size: 9px; margin-top: 18px; }
.logo-sushi .sub { font-size: 6px; margin-top: 1px; }
.logo-sushi.lg::before { top: 10px; width: 16px; height: 16px; }
.logo-sushi.lg .main { font-size: 12px; margin-top: 26px; }
.logo-sushi.lg .sub { font-size: 8px; }

/* ============= MEAL DETAIL ============= */
.meal-hero {
  position: relative;
  width: calc(100% + 24px);
  margin: -12px -12px 12px;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
@media (min-width: 1024px) {
  .meal-hero {
    width: 100%;
    max-width: 420px;
    margin: 0 auto 16px;
    border-radius: 18px;
  }
}
.meal-hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.meal-hero-emoji { font-size: 110px; position: relative; z-index: 1; }
.meal-hero-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0.15) 0%, transparent 30%, transparent 60%, rgba(255,255,255,0.5) 100%); z-index: 1; }
.meal-hero-btn {
  position: absolute; top: 50px;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex; align-items: center; justify-content: center;
  z-index: 5;
}
.meal-hero-btn svg { width: 18px; height: 18px; stroke: var(--ios-label); fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.meal-hero-back { right: 14px; }
.meal-hero-fav { left: 14px; }
.discount-badge {
  position: absolute;
  bottom: 14px; right: 14px;
  background: var(--ios-red);
  color: #fff;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  z-index: 5;
}
.addon-row {
  display: flex; align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-bottom: 0.5px solid var(--ios-separator);
  cursor: pointer;
  transition: background 0.2s;
}
.addon-row:last-child { border-bottom: none; }
.addon-row:active { background: rgba(0,0,0,0.03); }
.addon-check {
  width: 22px; height: 22px;
  border-radius: 7px;
  border: 1.5px solid var(--ios-label-3);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: all 0.25s var(--spring);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
}
.addon-row.checked .addon-check {
  background: var(--brand);
  border-color: var(--brand);
}
.meal-cta {
  position: fixed;
  bottom: max(env(safe-area-inset-bottom), 75px);
  left: 12px; right: 12px;
  background: var(--brand);
  color: #fff;
  padding: 6px 6px 6px 16px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  z-index: 92;
}
.qty-control { display: flex; align-items: center; gap: 4px; background: rgba(255,255,255,0.2); border-radius: 999px; padding: 3px; }
.qty-control button {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: rgba(255,255,255,0.95);
  color: var(--brand);
  font-weight: 900;
  font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.2s var(--spring);
}
.qty-control button:active { transform: scale(0.9); }
.qty-control .qty-val { min-width: 22px; text-align: center; font-weight: 800; font-size: 14px; }

/* ============= ACCOUNT ============= */
.avatar-circle {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-light));
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 32px; font-weight: 900;
}

/* ============= DESKTOP ============= */
@media (min-width: 1024px) {
  .dynamic-island, .status-bar, .titlebar, .tab-bar, .home-indicator, .floating-cart { display: none !important; }

  /* Stack the sidebar (turned into top header) above the main content */
  .app-layout {
    flex-direction: column;
    background: var(--ios-bg);
  }

  /* Sidebar → horizontal top header (talabat-style) */
  .sidebar {
    display: flex;
    flex-direction: row;
    position: fixed;
    top: 0; left: 0; right: 0;
    width: 100%;
    height: 64px;
    border-left: none;
    border-bottom: 1px solid var(--ios-separator);
    padding: 0 32px;
    align-items: center;
    z-index: 50;
    gap: 6px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
  }
  .sidebar > div:first-child {
    margin: 0 !important;
    padding: 0 !important;
    flex-shrink: 0;
    gap: 10px !important;
  }
  .sidebar .sidebar-group { display: none; }
  .sidebar-link {
    padding: 7px 14px;
    border-radius: 10px;
    font-size: 13px;
    flex-shrink: 0;
  }
  .sidebar > .sidebar-link:first-of-type { margin-inline-start: 22px; }
  .sidebar-link.active::before { display: none; }
  .sidebar-link .badge { margin-right: 0 !important; margin-inline-start: 4px; }
  /* Push the cart link (and everything after it) to the far end */
  .sidebar > a[href="cart.html"] { margin-inline-start: auto; }

  /* Main content area centered, full-width within max */
  .app-main {
    padding: 88px 32px 48px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
  }

  /* Inline meal CTA below the form on desktop (no fixed bar) */
  .meal-cta {
    position: static;
    bottom: auto; left: auto; right: auto;
    max-width: 420px;
    margin: 0 auto;
  }

  /* Wider home grid */
  #restaurant-grid.grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

  /* ===== Search page: filters sidebar (right) + results (left) ===== */
  .search-page-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 20px;
    align-items: start;
  }
  .search-filters-sidebar {
    position: sticky;
    top: 80px;
  }

  /* ===== Restaurant page: menu cats (right) + items (center) + cart (left) ===== */
  .restaurant-layout-grid {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr) 280px;
    gap: 16px;
    align-items: start;
  }
  .menu-categories-sidebar,
  .cart-summary-sidebar {
    position: sticky;
    top: 80px;
  }
  /* Hide the horizontal section chips on desktop — we use vertical list instead */
  .restaurant-layout-grid #section-chips { display: none; }
  /* Menu list one column inside the middle area */
  .restaurant-layout-grid #menu-list { grid-template-columns: minmax(0, 1fr); }
}

/* Sidebar items hidden by default (mobile) */
.search-filters-sidebar,
.menu-categories-sidebar,
.cart-summary-sidebar { display: none; }

@media (min-width: 1024px) {
  .search-filters-sidebar,
  .menu-categories-sidebar,
  .cart-summary-sidebar { display: block; }
}

/* ===== Vertical menu category list ===== */
.menu-cat-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ios-label);
  cursor: pointer;
  transition: background 0.2s;
}
.menu-cat-item:hover { background: rgba(0,0,0,0.04); }
.menu-cat-item.active {
  background: rgba(93, 173, 226, 0.12);
  color: var(--brand);
}

/* ===== Filter item (checkbox row) ===== */
.filter-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 0;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: var(--ios-label);
}
.filter-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--brand);
  cursor: pointer;
}
.filter-item .emoji { font-size: 16px; }

  .ios-card { border-radius: 14px; }
  .toast { bottom: 20px; left: auto; right: 20px; transform: translateX(40px); }
  .toast.show { transform: translateX(0); }
  .sheet {
    border-radius: 16px;
    max-width: 480px;
    width: 90%;
    left: 50%;
    top: 50%;
    bottom: auto;
    right: auto;
    margin: 0;
    transform: translate(-50%, -50%) scale(0.95);
    opacity: 0;
    pointer-events: none;
    max-height: 80vh;
  }
  .sheet.is-ready { transition: opacity 0.25s, transform 0.3s var(--spring); }
  .sheet.show {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    pointer-events: auto;
  }
}

@media (max-width: 1023px) {
  .home-indicator { display: block; }
  /* Force bottom-sheet behavior on mobile for ALL sheets (location, categories, auth, edit-profile, order-detail) */
  .sheet {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    top: auto !important;
    max-width: none !important;
    width: auto !important;
    margin: 0 !important;
    border-radius: 20px 20px 0 0 !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    transform: translateY(100%) !important;
  }
  .sheet.show { transform: translateY(0) !important; }
}
