/* ═══════════════════════════════════════════════════════
   EMBER QR SMART ORDER — v6
   Dark premium mobile-first ordering experience
   ═══════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=Inter:wght@400;500;600;700;800&display=swap');

/* ── DESIGN TOKENS ────────────────────────────────── */
:root {
  --bg:           #09090b;
  --bg-card:      #131316;
  --bg-elevated:  #18181b;
  --bg-modal:     #18181b;
  --accent:       #ff9f1c;
  --accent-dark:  #e88a00;
  --accent-glow:  rgba(255,159,28,0.18);
  --accent-soft:  rgba(255,159,28,0.08);
  --green:        #10b981;
  --red:          #ef4444;
  --blue:         #3b82f6;
  --purple:       #a855f7;
  --text:         #f4f4f5;
  --text-dim:     #a1a1aa;
  --text-muted:   #71717a;
  --border:       rgba(255, 255, 255, 0.06);
  --border-light: rgba(255, 255, 255, 0.1);
  --radius:       16px;
  --radius-sm:    10px;
  --radius-lg:    24px;
  --radius-pill:  50px;
  --shadow:       0 8px 30px rgba(0,0,0,0.5);
  --shadow-lg:    0 16px 50px rgba(0,0,0,0.7);
  --font:         'Outfit', 'Inter', system-ui, -apple-system, sans-serif;
  --safe-b:       env(safe-area-inset-bottom, 0px);
  /* Header height — used for sticky offsets */
  --header-h:     68px;
  --cats-h:       56px;
}

/* ── RESET ────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overscroll-behavior-y: contain;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  /* leave room for fixed cart bar */
  padding-bottom: calc(74px + var(--safe-b));
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
  overflow-x: hidden;
}

body.no-scroll {
  overflow: hidden;
  height: 100dvh;
  touch-action: none;
}

::-webkit-scrollbar { width: 2px; height: 2px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #333; border-radius: 2px; }

/* ═══════════════════════════════════════════════════
   HEADER
   ═══════════════════════════════════════════════════ */
.smart-header {
  position: sticky;
  top: 0;
  z-index: 200;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transform: translateZ(0);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.header-logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(255,159,28,0.3);
}

.header-info { min-width: 0; }

.header-name {
  font-weight: 800;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.header-table {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
}

.table-pill {
  background: var(--accent-soft);
  border: 1px solid rgba(255,159,28,0.25);
  padding: 1px 8px;
  border-radius: var(--radius-pill);
  font-size: 10px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.3px;
}

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

.loyalty-header-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.btn-my-orders {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  flex-shrink: 0;
}

.order-dot {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 8px;
  height: 8px;
  background: var(--green);
  border-radius: 50%;
  border: 2px solid var(--bg);
  animation: blink 2s ease infinite;
}

@keyframes blink {
  0%,100% { opacity: 1; }
  50%      { opacity: 0.4; }
}

/* ═══════════════════════════════════════════════════
   SECTION TITLES
   ═══════════════════════════════════════════════════ */
.section-title {
  padding: 16px 16px 10px;
  font-size: 15px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--text);
}

/* ═══════════════════════════════════════════════════
   COMBO DEALS CAROUSEL
   ═══════════════════════════════════════════════════ */
.combo-section {
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}

.combo-scroll {
  display: flex;
  gap: 12px;
  padding: 0 16px 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.combo-scroll::-webkit-scrollbar { display: none; }

.combo-card {
  flex-shrink: 0;
  width: 268px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  scroll-snap-align: start;
  transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  position: relative;
}

.combo-card:active { transform: scale(0.96); }

.combo-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 10px;
  font-weight: 800;
  z-index: 2;
  letter-spacing: 0.3px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.combo-badge svg {
  width: 12px;
  height: 12px;
}

.combo-items-preview {
  display: flex;
  height: 88px;
  overflow: hidden;
  position: relative;
}

.combo-items-preview img {
  flex: 1;
  object-fit: cover;
  min-width: 0;
  display: block;
}

.combo-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 40%, rgba(0,0,0,0.65) 100%);
}

.combo-body {
  padding: 12px 14px 14px;
}

.combo-name {
  font-weight: 800;
  font-size: 14px;
  margin-bottom: 3px;
  color: var(--text);
}

.combo-item-names {
  font-size: 11px;
  color: var(--text-dim);
  margin-bottom: 10px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.combo-pricing {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.combo-price-group {
  display: flex;
  align-items: baseline;
  gap: 7px;
}

.combo-price {
  font-weight: 800;
  font-size: 18px;
  color: var(--accent);
}

.combo-original {
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: line-through;
}

.combo-savings {
  background: rgba(34,197,94,0.12);
  color: var(--green);
  font-size: 10px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
}

.combo-add-btn {
  width: 100%;
  padding: 11px;
  background: var(--accent);
  color: #000;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  font-family: var(--font);
  letter-spacing: 0.3px;
  transition: opacity 0.15s;
}

.combo-add-btn:active { opacity: 0.8; }

/* ═══════════════════════════════════════════════════
   UPSELL BAR
   ═══════════════════════════════════════════════════ */
.upsell-bar {
  margin: 8px 14px;
  padding: 10px 14px;
  background: linear-gradient(135deg, rgba(255,159,28,0.07), rgba(255,159,28,0.02));
  border: 1px solid rgba(255,159,28,0.2);
  border-radius: var(--radius);
  display: none;
  align-items: center;
  gap: 10px;
}

.upsell-bar.visible  { display: flex; animation: fadeIn 0.3s ease; }
.upsell-bar.unlocked { background: linear-gradient(135deg, rgba(34,197,94,0.08), transparent); border-color: rgba(34,197,94,0.2); }

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

.upsell-icon   { font-size: 20px; flex-shrink: 0; }
.upsell-content { flex: 1; min-width: 0; }

.upsell-text {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 5px;
  line-height: 1.4;
}

.upsell-text .highlight { color: var(--accent); font-weight: 700; }
.upsell-bar.unlocked .upsell-text .highlight { color: var(--green); }

.upsell-progress {
  width: 100%;
  height: 4px;
  background: rgba(255,255,255,0.07);
  border-radius: 2px;
  overflow: hidden;
}

.upsell-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #ffbf49);
  border-radius: 2px;
  transition: width 0.5s cubic-bezier(0.4,0,0.2,1);
}

.upsell-bar.unlocked .upsell-progress-fill { background: linear-gradient(90deg, var(--green), #4ade80); }

/* ═══════════════════════════════════════════════════
   RECOMMENDATIONS
   ═══════════════════════════════════════════════════ */
.rec-section {
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.rec-scroll {
  display: flex;
  gap: 10px;
  padding: 4px 16px 8px;
  overflow-x: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.rec-scroll::-webkit-scrollbar { display: none; }

.rec-card {
  flex-shrink: 0;
  width: 126px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  overflow: hidden;
}

.rec-card img {
  width: 100%;
  height: 86px;
  object-fit: cover;
  display: block;
  background: var(--bg-elevated);
}

.rec-card-body { padding: 8px 8px 10px; }

.rec-card-name {
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
  color: var(--text);
}

.rec-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  margin-bottom: 6px;
}

.rec-card-price {
  font-size: 12px;
  font-weight: 800;
  color: var(--accent);
  white-space: nowrap;
}

.rec-card-badge {
  font-size: 8px;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: var(--radius-pill);
  background: rgba(255,159,28,0.12);
  color: var(--accent);
  white-space: nowrap;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.rec-card-badge svg {
  width: 10px;
  height: 10px;
}

.rec-card-badge.order-again {
  background: rgba(168,85,247,0.12);
  color: var(--purple);
}

.rec-quick-add {
  width: 100%;
  padding: 6px;
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font);
  transition: background 0.15s;
  display: block;
}

.rec-quick-add:active { background: var(--accent-glow); }

/* ═══════════════════════════════════════════════════
   CATEGORY STRIP
   ═══════════════════════════════════════════════════ */
.categories {
  position: sticky;
  top: var(--header-h);
  z-index: 100;
  height: var(--cats-h);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
  flex-shrink: 0;
  transform: translateZ(0);
}

.categories::-webkit-scrollbar { display: none; }

.cat {
  padding: 6px 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text-dim);
  flex-shrink: 0;
  line-height: 1;
}

.cat:active { transform: scale(0.96); }

.cat.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #000;
  font-weight: 800;
}

/* ═══════════════════════════════════════════════════
   SEARCH BAR
   ═══════════════════════════════════════════════════ */
.search-wrap {
  padding: 10px 14px 12px;
  background: var(--bg);
}

.search-wrap input {
  width: 100%;
  padding: 10px 14px 10px 38px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 14px;
  font-family: var(--font);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='15' height='15' fill='%23666' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85zm-5.242.156a5 5 0 1 1 0-10 5 5 0 0 1 0 10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 13px center;
}

.search-wrap input::placeholder { color: var(--text-muted); }

.search-wrap input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
  background-color: var(--bg-elevated);
}

/* ═══════════════════════════════════════════════════
   MENU ITEMS
   ═══════════════════════════════════════════════════ */
.menu-category-title {
  padding: 12px 16px 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,159,28,0.15);
  position: sticky;
  /* header + category strip */
  top: calc(var(--header-h) + var(--cats-h));
  z-index: 50;
}

.item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  transition: background 0.15s;
}

.item:active { background: rgba(255,255,255,0.02); }

.item-img-wrap {
  flex-shrink: 0;
  width: 95px;
  height: 95px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
}

.item-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.item-details {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 95px;
}

.item-top {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  flex-wrap: wrap;
  margin-bottom: 2px;
}

.item-name {
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
  line-height: 1.35;
  flex: 1;
  min-width: 0;
}

.item-desc {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 3px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.45;
}

.item-meta {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 4px;
}

.item-bottom{
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 10px;
}

.item-price {
  color: var(--accent);
  font-weight: 800;
  font-size: 15px;
  margin-top: auto;
  padding-top: 6px;
}

.item-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}


/* Veg / Non-veg dot */
.food-dot {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 2px;
  border: 1.5px solid;
  position: relative;
  flex-shrink: 0;
}

.food-dot::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  width: 6px; height: 6px;
  border-radius: 50%;
}

.food-dot.veg     { border-color: var(--green); }
.food-dot.veg::after { background: var(--green); }
.food-dot.nonveg  { border-color: var(--red); }
.food-dot.nonveg::after { background: var(--red); }

/* Popular tag */
.popular-tag {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: linear-gradient(135deg, rgba(255,159,28,0.18), rgba(255,159,28,0.08));
  border: 1px solid rgba(255,159,28,0.25);
  color: var(--accent);
  font-size: 9px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.spicy-level { font-size: 11px; letter-spacing: -1px; }

/* ═══════════════════════════════════════════════════
   ADD BUTTON / QTY STEPPER
   ═══════════════════════════════════════════════════ */
.add-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  border: 1.5px solid var(--accent);
  background: transparent;
  color: var(--accent);
  padding: 7px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  font-family: var(--font);
  transition: background 0.15s;
  letter-spacing: 0.5px;
  min-width: 68px;
  position: relative;
  overflow: hidden;
}

.add-btn:active { background: var(--accent-glow); }

/* Qty stepper state */
.add-btn.added {
  padding: 5px 4px;
  gap: 0;
  background: var(--accent-glow);
  min-width: 88px;
}

.add-btn.added .qty-minus,
.add-btn.added .qty-plus {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: var(--radius-sm);
  font-size: 18px;
  font-weight: 800;
  color: var(--accent);
  cursor: pointer;
  background: transparent;
  border: none;
  font-family: var(--font);
  flex-shrink: 0;
  padding: 0;
  line-height: 1;
}

.add-btn.added .qty-minus:active { background: rgba(255,159,28,0.15); border-radius: var(--radius-sm); }
.add-btn.added .qty-plus:active  { background: rgba(255,159,28,0.15); border-radius: var(--radius-sm); }

.add-btn.added .qty-val {
  font-size: 14px;
  font-weight: 800;
  color: var(--accent);
  min-width: 24px;
  text-align: center;
  flex: 1;
}

.in-cart-label {
  font-size: 10px;
  color: var(--green);
  font-weight: 600;
  white-space: nowrap;
}

/* ═══════════════════════════════════════════════════
   FLOATING CART BAR
   ═══════════════════════════════════════════════════ */
.cart-bar {
  position: fixed;
  bottom: calc(10px + var(--safe-b));
  left: 12px;
  right: 12px;
  height: 58px;
  background: var(--accent);
  color: var(--text);
  display: none;
  justify-content: space-between;
  align-items: center;
  padding: 0 16px;
  font-weight: 700;
  z-index: 150;
  cursor: pointer;
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 28px var(--accent-glow), 0 2px 8px rgba(0,0,0,0.4);
  transition: transform 0.12s;
}

.cart-bar:active { transform: scale(0.98); }

.cart-bar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.cart-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 26px;
  padding: 0 6px;
  border-radius: 50px;
  background: rgba(0,0,0,0.25);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  flex-shrink: 0;
}

.cart-badge.bounce { animation: pop 0.35s ease; }

@keyframes pop {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.5); }
  70%  { transform: scale(0.9); }
  100% { transform: scale(1); }
}

.cart-bar-main {
  min-width: 0;
  flex: 1;
}

.cart-count-text {
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-bar-upsell {
  font-size: 10px;
  font-weight: 500;
  opacity: 0.78;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}

.cart-bar-right {
  font-size: 13px;
  font-weight: 800;
  flex-shrink: 0;
  opacity: 0.9;
}

/* ═══════════════════════════════════════════════════
   CART MODAL
   ═══════════════════════════════════════════════════ */
.cart-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  z-index: 300;
}

.cart-modal {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  min-height: 70dvh;
  max-height: 88dvh;
  background: var(--bg-modal);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  box-shadow: 0 -10px 40px rgba(0,0,0,0.8);
  border-top: 1px solid var(--border-light);
  z-index: 301;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.32s cubic-bezier(0.25,0.8,0.25,1);
  will-change: transform;
  overflow: hidden;
}

.cart-open .cart-backdrop { opacity: 1; pointer-events: auto; }
.cart-open .cart-modal    { transform: translateY(0); }

.cart-handle {
  padding: 10px 0 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: grab;
  user-select: none;
  flex-shrink: 0;
  touch-action: none;
}

.drag-bar {
  width: 36px;
  height: 4px;
  background: #444;
  border-radius: 2px;
}

.cart-title {
  font-weight: 800;
  font-size: 16px;
  color: var(--accent);
}

.cart-body {
  flex: 1;
  overflow-y: auto;
  padding: 4px 14px 0;
  -webkit-overflow-scrolling: touch;
}

.cart-footer {
  padding: 12px 14px;
  padding-bottom: calc(12px + var(--safe-b));
  border-top: 1px solid var(--border);
  background: var(--bg-modal);
  flex-shrink: 0;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 1px;
  padding: 8px 12px;
  background: var(--bg-elevated);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.cart-item-info {
  flex: 1;
  min-width: 0;
}

.cart-item-name {
  font-weight: 700;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
}

.cart-addons {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-item-price {
  font-weight: 800;
  color: var(--accent);
  margin-top: 3px;
  font-size: 13px;
}

.qty-controls {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  padding: 2px;
}

.qty-controls button {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: var(--accent);
  font-weight: 800;
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font);
  transition: background 0.15s;
  padding: 0;
  line-height: 1;
}

.qty-controls button:active { background: var(--accent-glow); }

.qty-controls .qty-num {
  font-weight: 800;
  font-size: 13px;
  min-width: 22px;
  text-align: center;
  color: var(--text);
}

/* Cart upsell strip */
.cart-upsell {
  padding: 10px 0 6px;
  border-top: 1px dashed var(--border-light);
  margin-top: 6px;
}

.cart-upsell-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-dim);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cart-upsell-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
  padding-bottom: 4px;
}

.cart-upsell-scroll::-webkit-scrollbar { display: none; }

.cart-upsell-card {
  flex-shrink: 0;
  width: 100px;
  height: 100px;
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
}

.cart-upsell-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: var(--bg-elevated);
}

.cart-upsell-card .upsell-name-box {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 8px 4px 6px;
  text-align: center;
}

.cart-upsell-card .upsell-name {
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.cart-upsell-card .upsell-price {
  font-size: 11px;
  color: var(--accent);
  font-weight: 800;
  margin-bottom: 5px;
}

.cart-upsell-card .upsell-add {
  width: 100%;
  padding: 4px;
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
  border-radius: 5px;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font);
}

/* Cart bottom extras */
.cart-savings {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: rgba(34,197,94,0.07);
  border: 1px solid rgba(34,197,94,0.15);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--green);
}

.cart-loyalty-preview {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--accent-soft);
  border: 1px solid rgba(255,159,28,0.12);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--accent);
}

.cart-divider {
  height: 1px;
  background: var(--border);
  margin: 8px 0;
}

.cart-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  margin-bottom: 8px;
}

.cart-summary .label { color: var(--text-dim); font-weight: 500; }
.cart-summary .value { font-weight: 800; color: var(--text); }

#cookingNote {
  width: 100%;
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  background: var(--bg-card);
  color: var(--text);
  font-size: 13px;
  font-family: var(--font);
  resize: none;
  outline: none;
  min-height: 42px;
  transition: border-color 0.2s;
}

#cookingNote:focus { border-color: var(--accent); }

.checkout-btn {
  margin-top: 10px;
  width: 100%;
  padding: 15px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #000;
  border: none;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  font-family: var(--font);
  letter-spacing: 0.3px;
  box-shadow: 0 4px 20px rgba(255,159,28,0.3);
  transition: opacity 0.2s;
}

.checkout-btn:active { opacity: 0.85; }
.checkout-btn:disabled { opacity: 0.4; cursor: not-allowed; box-shadow: none; }

/* ═══════════════════════════════════════════════════
   COUPON INPUT
   ═══════════════════════════════════════════════════ */
.coupon-wrap {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.coupon-wrap input {
  flex: 1;
  padding: 10px 12px;
  background: var(--bg-card);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 12px;
  font-family: var(--font);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  outline: none;
  font-weight: 700;
  min-width: 0;
  transition: border-color 0.2s;
}

.coupon-wrap input:focus   { border-color: var(--accent); }
.coupon-wrap input.valid   { border-color: var(--green); }
.coupon-wrap input.invalid { border-color: var(--red); }

.coupon-apply-btn {
  flex-shrink: 0;
  padding: 10px 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--accent);
  color: var(--accent);
  border-radius: var(--radius-sm);
  font-weight: 800;
  font-size: 12px;
  cursor: pointer;
  font-family: var(--font);
  white-space: nowrap;
  transition: background 0.15s;
}

.coupon-apply-btn:active { background: var(--accent-glow); }

.coupon-apply-btn.applied {
  border-color: var(--green);
  color: var(--green);
}

.coupon-msg {
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 6px;
  min-height: 14px;
}

.coupon-msg.valid   { color: var(--green); }
.coupon-msg.invalid { color: var(--red); }

/* ═══════════════════════════════════════════════════
   ADDON MODAL
   ═══════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  display: none;
  align-items: flex-end;
  justify-content: center;
  z-index: 500;
}

.modal-overlay.active { display: flex; }

.modal-sheet {
  background: var(--bg-modal);
  width: 100%;
  max-width: 500px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  border-top: 1px solid var(--border-light);
  box-shadow: 0 -10px 40px rgba(0,0,0,0.8);
  overflow: hidden;
  animation: sheetUp 0.3s cubic-bezier(0.25,0.8,0.25,1);
  max-height: 85dvh;
  display: flex;
  flex-direction: column;
}

@keyframes sheetUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.modal-header h3 {
  font-size: 16px;
  font-weight: 800;
  color: var(--accent);
}

.modal-close {
  border: none;
  background: var(--bg-elevated);
  color: var(--text-dim);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  flex-shrink: 0;
}

.modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 8px 16px;
}

.modal-footer {
  padding: 14px 16px;
  padding-bottom: calc(14px + var(--safe-b));
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.modal-total {
  font-weight: 800;
  font-size: 20px;
  color: var(--accent);
}

.modal-confirm {
  background: var(--accent);
  color: #000;
  border: none;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-weight: 800;
  cursor: pointer;
  font-family: var(--font);
  font-size: 14px;
}

.addon-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
}

.addon-row:last-child { border-bottom: none; }

.addon-label { flex: 1; }
.addon-label .addon-name  { font-weight: 600; font-size: 14px; }
.addon-label .addon-price { font-size: 12px; color: var(--accent); font-weight: 600; margin-top: 2px; }

.addon-row input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--accent);
  cursor: pointer;
  flex-shrink: 0;
}

/* Auth modal body */
.auth-body {
  padding: 16px;
}

.auth-field {
  margin-bottom: 14px;
}

.auth-field label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-dim);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.auth-input {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1.5px solid var(--border-light);
  color: var(--text);
  font-size: 15px;
  font-family: var(--font);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.auth-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.loyalty-display {
  margin-top: 14px;
  padding: 16px;
  background: linear-gradient(135deg, rgba(255,159,28,0.08), rgba(255,159,28,0.02));
  border: 1px solid rgba(255,159,28,0.15);
  border-radius: var(--radius);
  text-align: center;
  display: none;
}

.loyalty-display .tier-badge   { font-size: 28px; margin-bottom: 4px; }
.loyalty-display .points-count { font-size: 32px; font-weight: 800; color: var(--accent); line-height: 1; }
.loyalty-display .points-label { font-size: 10px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 1px; margin-top: 2px; }
.loyalty-display .tier-name    { margin-top: 8px; font-size: 13px; font-weight: 700; }

.tier-progress {
  margin-top: 10px;
  height: 4px;
  background: rgba(255,255,255,0.06);
  border-radius: 2px;
  overflow: hidden;
}

.tier-progress .fill {
  height: 100%;
  border-radius: 2px;
  transition: width 1s ease;
}

/* ═══════════════════════════════════════════════════
   ORDER TRACKING PANEL
   ═══════════════════════════════════════════════════ */
.tracking-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 400;
  display: none;
  flex-direction: column;
}

.tracking-overlay.active { display: flex; }

.tracking-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  background: var(--bg);
}

.tracking-back {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
  flex-shrink: 0;
  line-height: 1;
}

.tracking-title {
  font-weight: 800;
  font-size: 17px;
  flex: 1;
  padding-left: 10px;
}

.tracking-loyalty-badge {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  flex-shrink: 0;
}

.tracking-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  -webkit-overflow-scrolling: touch;
}

.tracking-footer {
  padding: 12px 14px;
  padding-bottom: calc(12px + var(--safe-b));
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  background: var(--bg);
}

.tracking-footer .btn-add-more {
  width: 100%;
  padding: 14px;
  background: var(--accent);
  border: none;
  color: #000;
  border-radius: var(--radius);
  font-weight: 800;
  font-size: 15px;
  cursor: pointer;
  font-family: var(--font);
}

/* Order card */
.track-order-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  margin-bottom: 16px;
  overflow: hidden;
}

.track-order-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.track-order-no { font-weight: 800; font-size: 15px; color: var(--accent); }

.track-status {
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.s-pending   { background: rgba(251,191,36,0.12); color: #fbbf24; }
.s-accepted  { background: rgba(59,130,246,0.12);  color: var(--blue); }
.s-preparing { background: rgba(255,159,28,0.12);  color: var(--accent); }
.s-ready     { background: rgba(34,197,94,0.12);   color: var(--green); }
.s-cancelled { background: rgba(239,68,68,0.1);    color: var(--red); }
.s-completed { background: rgba(34,197,94,0.08);   color: var(--green); }

/* Timeline */
.track-timeline { padding: 16px 16px 8px; }

.tl-step {
  display: flex;
  gap: 14px;
  padding-bottom: 22px;
  position: relative;
}

.tl-step:last-child { padding-bottom: 0; }

.tl-step::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 32px;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.tl-step:last-child::before { display: none; }
.tl-step.done::before  { background: var(--green); }
.tl-step.now::before   { background: linear-gradient(to bottom, var(--accent), var(--border)); }

.tl-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
  z-index: 1;
  background: var(--bg-elevated);
  border: 2px solid var(--border);
  position: relative;
}

.tl-step.done .tl-dot { background: rgba(34,197,94,0.15); border-color: var(--green); }
.tl-step.now  .tl-dot { background: var(--accent-glow); border-color: var(--accent); animation: pulse 2s ease infinite; }
.tl-step.gray .tl-dot { opacity: 0.35; }

@keyframes pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(255,159,28,0.3); }
  50%      { box-shadow: 0 0 0 8px transparent; }
}

.tl-info  { padding-top: 5px; }

.tl-label {
  font-weight: 700;
  font-size: 13px;
  color: var(--text);
}

.tl-step.gray .tl-label { color: var(--text-muted); }

.tl-time {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 2px;
}

/* Order items summary */
.track-items {
  padding: 12px 16px;
  border-top: 1px dashed var(--border);
}

.track-item-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 3px 0;
  font-size: 13px;
}

.track-item-qty   { color: var(--text-muted); font-weight: 600; flex-shrink: 0; }
.track-item-name  { flex: 1; color: var(--text); }
.track-item-total { color: var(--accent); font-weight: 700; flex-shrink: 0; }

.track-addon-note {
  font-size: 10.5px;
  color: var(--text-muted);
  padding-left: 18px;
  margin-top: 1px;
}

.track-order-total {
  display: flex;
  justify-content: space-between;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  font-weight: 800;
  font-size: 15px;
}

.track-order-total .tv { color: var(--accent); }

.track-actions {
  display: flex;
  gap: 10px;
  padding: 0 16px 16px;
}

.btn-cancel-order {
  flex: 1;
  padding: 12px;
  background: transparent;
  border: 1.5px solid var(--red);
  color: var(--red);
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  font-family: var(--font);
  transition: background 0.15s;
}

.btn-cancel-order:active { background: rgba(239,68,68,0.1); }

.btn-add-more-inline {
  flex: 1;
  padding: 12px;
  background: var(--accent);
  border: none;
  color: #000;
  border-radius: var(--radius-sm);
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  font-family: var(--font);
}

/* ═══════════════════════════════════════════════════
   CONFIRM DIALOG
   ═══════════════════════════════════════════════════ */
.confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 600;
}

.confirm-overlay.active { display: flex; }

.confirm-box {
  background: var(--bg-modal);
  padding: 24px;
  border-radius: var(--radius-lg);
  width: min(85%, 340px);
  text-align: center;
  animation: sheetUp 0.2s ease;
  border: 1px solid var(--border-light);
}

.confirm-box h3 { font-size: 16px; font-weight: 800; margin-bottom: 8px; }
.confirm-box p  { font-size: 13px; color: var(--text-dim); margin-bottom: 20px; line-height: 1.5; }

.confirm-buttons { display: flex; gap: 10px; }

.confirm-buttons button {
  flex: 1;
  padding: 12px;
  border-radius: var(--radius-sm);
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  font-family: var(--font);
  border: none;
}

.btn-keep   { background: var(--bg-elevated); color: var(--text); border: 1px solid var(--border) !important; }
.btn-cancel { background: var(--red); color: #fff; }
.btn-confirm { background: var(--accent); color: #000; }

/* ═══════════════════════════════════════════════════
   TOASTS
   ═══════════════════════════════════════════════════ */
.toast-container {
  position: fixed;
  top: calc(var(--header-h) + 8px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 90%;
  max-width: 360px;
  pointer-events: none;
}

.toast {
  width: 100%;
  padding: 11px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  background: var(--bg-modal);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow);
  pointer-events: auto;
  animation: toastIn 0.3s ease forwards;
  opacity: 0;
  transform: translateY(-12px);
  display: flex;
  align-items: center;
  gap: 6px;
}
.toast svg {
  width: 16px;
  height: 16px;
}

.toast.out { animation: toastOut 0.25s ease forwards; }

.toast-success { border-left: 3px solid var(--green); }
.toast-error   { border-left: 3px solid var(--red); }
.toast-info    { border-left: 3px solid var(--accent); }

@keyframes toastIn  { to { opacity:1; transform:none; } }
@keyframes toastOut { to { opacity:0; transform:translateY(-12px); } }

/* ═══════════════════════════════════════════════════
   LOADING / EMPTY
   ═══════════════════════════════════════════════════ */
.loading-spinner {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px 16px;
}

.loading-spinner::before,
.loading-spinner::after {
  content: '';
  width: 100%;
  height: 95px;
  border-radius: var(--radius);
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-elevated) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: skeleton 1.5s infinite linear;
}

@keyframes skeleton {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  color: var(--text-muted);
  text-align: center;
  gap: 8px;
}

.empty-state .ei { font-size: 40px; }
.empty-state .et { font-size: 14px; }

/* ═══════════════════════════════════════════════════
   RESPONSIVE OVERRIDES
   ═══════════════════════════════════════════════════ */
@media (min-width: 480px) {
  .item-img-wrap { width: 105px; height: 105px; }
  .item-details  { min-height: 105px; }
  .item-name     { font-size: 15px; }
  .item-price    { font-size: 16px; }
  .combo-card    { width: 290px; }
  .rec-card      { width: 140px; }
  .cart-modal    { max-width: 520px; margin: 0 auto; }
  .modal-sheet   { border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
}

@media (min-width: 768px) {
  :root { --header-h: 66px; }
  .combo-card { width: 310px; }
}

/* ═══════════════════════════════════════════════════
   MULTI-STEP CART
   ═══════════════════════════════════════════════════ */
.cart-step {
  display: none;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  animation: fadeStep 0.2s ease;
}
.cart-step.active {
  display: flex;
}

@keyframes fadeStep {
  from { opacity: 0; transform: translateX(10px); }
  to   { opacity: 1; transform: translateX(0); }
}

.cart-breakdown {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-top: 10px;
}
.cart-breakdown-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 6px;
}
.cart-breakdown-row.total-row {
  border-top: 1px dashed var(--border);
  padding-top: 10px;
  margin-top: 6px;
  margin-bottom: 0;
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
}
.cart-breakdown-row.discount-row {
  color: var(--green);
}
.cart-breakdown-row .bv {
  font-weight: 600;
  color: var(--text);
}
.cart-breakdown-row.discount-row .bv {
  color: var(--green);
}
.cart-breakdown-row.total-row .bv {
  color: var(--accent);
}

.cart-footer-btn-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.cart-footer-total-preview {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.cart-footer-total-preview .t-label {
  font-size: 11px;
  color: var(--text-dim);
  font-weight: 600;
  text-transform: uppercase;
}
.cart-footer-total-preview .t-val {
  font-size: 18px;
  font-weight: 800;
  color: var(--accent);
}

.proceed-btn {
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #000;
  border: none;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  font-family: var(--font);
  transition: opacity 0.2s;
  min-width: 130px;
}
.proceed-btn:active {
  opacity: 0.85;
}
