/* ============================================
   Dinerato Customer — Ordering Website Styles
   Swiggy/Zomato-inspired, mobile-first, Indian aesthetic
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@400;500;600;700&family=Poppins:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --saffron: #F38A1D;
  --saffron-hover: #D97A15;
  --saffron-light: #FEF3E2;
  --gold: #F7C948;
  --gold-light: #FBE38A;
  --green-veg: #0F8A4F;
  --red-nonveg: #E23744;
  --bg: #FAFAFA;
  --bg-card: #FFFFFF;
  --bg-elevated: #FFFFFF;
  --text: #1A1A1A;
  --text-secondary: #555770;
  --text-muted: #8E90A6;
  --border: #EEEAE4;
  --shadow: 0 4px 12px rgba(0,0,0,0.05);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.1);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 6px;
  --success: #06D6A0;
  --danger: #EF476F;
  --warning: #FFD166;
  --max-w: 520px;
  --header-h: 60px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --touch-target: 44px;
  --elev-card: 0 6px 18px rgba(0,0,0,0.14);
  --elev-sticky: 0 6px 20px rgba(0,0,0,0.24);
}

[data-theme="dark"] {
  --bg: #0F0F1A;
  --bg-card: #1A1A2E;
  --bg-elevated: #16213E;
  --text: #EAEAF0;
  --text-secondary: #A0A0B8;
  --text-muted: #6B6B80;
  --border: #2A2A40;
  --shadow: 0 2px 16px rgba(0,0,0,0.3);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.4);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
  font-family: 'Poppins', -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  max-width: var(--max-w);
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
  transition: background 0.3s, color 0.3s;
}

h1,h2,h3,h4 { font-family: 'Fredoka', sans-serif; line-height: 1.2; }

/* ── Header ─────────────────────────────── */
.customer-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 0 var(--space-4);
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  backdrop-filter: blur(16px);
  box-shadow: var(--elev-sticky);
}

.header-brand {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.header-brand .logo {
  width: 36px; height: 36px;
  background: var(--saffron);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  box-shadow: 0 2px 8px rgba(255,107,53,0.3);
}

.header-brand h1 {
  font-size: 20px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--saffron), #E8A317);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.icon-btn {
  width: var(--touch-target); height: var(--touch-target);
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  transition: all 0.2s;
  position: relative;
  color: var(--text);
}

.icon-btn:hover { border-color: var(--saffron); transform: scale(1.05); }

.cart-badge {
  position: absolute;
  top: -4px; right: -4px;
  width: 18px; height: 18px;
  background: var(--saffron);
  color: #fff;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  display: none;
}

.cart-badge.show { display: flex; animation: popIn 0.3s ease; }

/* ── Search Bar ─────────────────────────── */
.search-container {
  padding: var(--space-3) var(--space-4);
}

.search-bar {
  width: 100%;
  padding: 12px 16px 12px 42px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
  font-size: 14px;
  color: var(--text);
  outline: none;
  transition: border 0.2s;
  font-family: 'Inter', sans-serif;
}

.search-bar::placeholder { color: var(--text-muted); }
.search-bar:focus { border-color: var(--saffron); }

.search-wrapper {
  position: relative;
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  opacity: 0.5;
}

/* ── Hero Banner ────────────────────────── */
.hero {
  margin: 0 var(--space-4) var(--space-4);
  padding: var(--space-5);
  background: linear-gradient(135deg, var(--saffron), #FF8C5A);
  border-radius: var(--radius);
  color: #fff;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: '🍛';
  position: absolute;
  right: 16px;
  bottom: -8px;
  font-size: 80px;
  opacity: 0.15;
}

.hero-tag {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.9;
  margin-bottom: var(--space-2);
}

.hero h2 {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: var(--space-1);
}

.hero p {
  font-size: 13px;
  opacity: 0.9;
}

.hero-weather-line {
  margin-top: var(--space-2);
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: #fff;
  opacity: 0.95;
  line-height: 1.5;
}

/* ── Category Tabs ──────────────────────── */
.category-tabs {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-2);
  padding: 0 var(--space-4) var(--space-4);
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.category-tabs::-webkit-scrollbar { display: none; }

.cat-tab {
  box-sizing: border-box;
  flex-shrink: 0;
  width: 77px;
  min-height: 77px;
  padding: var(--space-3) var(--space-2);
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: #171c25;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease-in-out, border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out, filter 0.2s ease-in-out;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: var(--space-2);
  color: #edf0f8;
  white-space: normal;
  text-align: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 6px 18px rgba(0, 0, 0, 0.26);
}

.cat-tab:hover {
  transform: translateY(-1px) scale(1.01);
  border-color: rgba(243, 154, 43, 0.45);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 0 0 1px rgba(243, 154, 43, 0.22), 0 0 18px rgba(243, 154, 43, 0.3), 0 10px 24px rgba(0, 0, 0, 0.38);
  filter: saturate(1.06);
}

.cat-tab.active {
  border-color: rgba(243, 154, 43, 0.58);
  box-shadow: inset 0 0 0 1px rgba(243, 154, 43, 0.45), 0 0 0 2px rgba(243, 154, 43, 0.92), 0 0 14px rgba(243, 154, 43, 0.28), 0 10px 22px rgba(0, 0, 0, 0.34);
}

.cat-tab-icon {
  font-size: 24px;
  line-height: 1;
}

.cat-tab-label {
  font-size: 12px;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: 0.2px;
}

/* ── Menu Grid ──────────────────────────── */
.menu-section {
  padding: 0 var(--space-4);
}

.menu-section-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: var(--space-3);
  padding-bottom: var(--space-2);
  border-bottom: 2px solid var(--border);
}

.menu-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}

/* ── Menu Card ──────────────────────────── */
.menu-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  gap: var(--space-4);
  transition: all 0.2s;
  box-shadow: var(--elev-card);
  position: relative;
}

.menu-card:hover { border-color: var(--saffron); box-shadow: var(--shadow-lg); }

.menu-card.unavailable { opacity: 0.5; pointer-events: none; }

.veg-badge {
  width: 16px; height: 16px;
  border: 2px solid var(--green-veg);
  border-radius: 3px;
  display: flex; align-items: center; justify-content: center;
  position: absolute;
  top: 12px; left: 12px;
}

.veg-badge::after {
  content: '';
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--green-veg);
}

.veg-badge.non-veg { border-color: var(--red-nonveg); }
.veg-badge.non-veg::after { background: var(--red-nonveg); }

.menu-card-info {
  flex: 1;
  min-width: 0;
}

.menu-card-name {
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 2px;
  padding-left: 22px;
}

.menu-card-name-hi {
  font-size: 12px;
  color: var(--text-muted);
  padding-left: 22px;
  margin-bottom: var(--space-2);
}

.menu-card-desc {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: var(--space-2);
  line-height: 1.5;
  display: -webkit-box;
  line-clamp: 2;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.menu-card-meta {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.menu-card-price {
  font-family: 'JetBrains Mono', monospace;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.menu-card-tag {
  font-size: 12px;
  font-weight: 600;
  padding: var(--space-1) var(--space-2);
  border-radius: 4px;
}

.tag-bestseller { background: rgba(255,107,53,0.1); color: var(--saffron); }
.tag-spicy { background: rgba(239,71,111,0.1); color: var(--danger); }

.menu-card-right {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  min-width: 96px;
}

.menu-card-img {
  width: 88px; height: 88px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255,107,53,0.1), rgba(247,201,72,0.1));
  display: flex; align-items: center; justify-content: center;
  font-size: 36px;
  overflow: hidden;
}

.add-btn {
  width: 100%;
  min-height: var(--touch-target);
  padding: var(--space-2) 0;
  border-radius: var(--radius-xs);
  border: 1px solid var(--saffron);
  background: transparent;
  color: var(--saffron);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-family: 'Inter', sans-serif;
}

.add-btn:hover {
  background: var(--saffron);
  color: #fff;
}

.add-btn.added {
  background: var(--saffron);
  color: #fff;
}

.qty-control {
  display: flex;
  align-items: center;
  border: 1px solid var(--saffron);
  border-radius: var(--radius-xs);
  overflow: hidden;
  width: 100%;
  min-height: var(--touch-target);
}

.qty-btn {
  width: var(--touch-target); height: var(--touch-target);
  background: var(--saffron);
  color: #fff;
  border: none;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}

.qty-value {
  flex: 1;
  text-align: center;
  font-weight: 700;
  font-size: 16px;
  color: var(--saffron);
  font-family: 'JetBrains Mono', monospace;
}

/* ── Cart Bar ───────────────────────────── */
.cart-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(calc(var(--max-w) - 32px), calc(100vw - 32px));
  background: var(--saffron);
  color: #fff;
  border-radius: 14px 14px 0 0;
  padding: var(--space-4) 20px;
  display: none;
  align-items: center;
  justify-content: space-between;
  z-index: 90;
  box-shadow: 0 -8px 24px rgba(0,0,0,0.36);
  border-top: 1px solid rgba(255,255,255,0.1);
  cursor: pointer;
  transition: all 0.3s;
}

.cart-bar.show { display: flex; animation: slideUp 0.3s ease; }

.cart-bar:hover { filter: brightness(1.05); }

.cart-bar-info {
  font-size: 14px;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.cart-bar-items { font-weight: 700; }
.cart-bar-total { font-size: 12px; opacity: 0.9; }

.cart-bar-btn {
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ── Cart Page ──────────────────────────── */
.cart-page {
  display: none;
  padding: 16px;
  padding-bottom: 100px;
}

.cart-page.show { display: block; animation: fadeIn 0.3s; }

.cart-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: var(--space-4);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-3);
  box-shadow: var(--shadow);
}

.cart-item-info { flex: 1; }

.cart-item-name {
  font-weight: 600;
  font-size: 14px;
}

.cart-item-price {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--text-muted);
  margin-top: var(--space-1);
}

.cart-item .qty-control { width: 112px; }

.cart-item-total {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 15px;
  min-width: 60px;
  text-align: right;
}

/* ── Cart Summary ───────────────────────── */
.cart-summary {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-5);
  margin-top: 16px;
  box-shadow: var(--shadow);
}

/* ── Upsell Suggestions ─────────────────── */
.upsell-section {
  margin-top: 16px;
}

.upsell-header {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 12px;
  color: var(--text);
}

.upsell-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.upsell-chip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-card);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
  border: 1px dashed var(--saffron);
  box-shadow: 0 4px 12px rgba(255, 107, 53, 0.08);
}

.upsell-chip-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.upsell-emoji {
  font-size: 20px;
}

.upsell-chip-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.upsell-chip-price {
  font-size: 12px;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
  margin-top: 2px;
}

.upsell-add-btn {
  background: var(--bg);
  border: 1.5px solid var(--saffron);
  color: var(--saffron);
  min-height: var(--touch-target);
  padding: var(--space-2) var(--space-3);
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.upsell-add-btn:hover {
  background: var(--saffron);
  color: #fff;
}

.cart-summary-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 16px;
  margin-bottom: var(--space-4);
}

.cart-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  margin-bottom: 8px;
  color: var(--text-secondary);
}

.cart-row.total {
  font-weight: 700;
  font-size: 18px;
  color: var(--text);
  border-top: 2px solid var(--border);
  padding-top: 12px;
  margin-top: 8px;
  font-family: 'Outfit', sans-serif;
}

.checkout-btn {
  width: 100%;
  min-height: 48px;
  padding: 16px;
  border: none;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--saffron), #FF8C5A);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  font-family: 'Outfit', sans-serif;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 16px rgba(255,107,53,0.3);
}

.checkout-btn:hover { filter: brightness(1.08); transform: translateY(-1px); }

/* ── Order Tracking ─────────────────────── */
.tracking-page {
  display: none;
  padding: 16px;
}

.tracking-page.show { display: block; animation: fadeIn 0.3s; }

.order-success {
  text-align: center;
  padding: var(--space-5);
  margin-bottom: var(--space-5);
}

.order-success .check {
  width: 64px; height: 64px;
  background: var(--success);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: #fff;
  margin-bottom: 12px;
  animation: popIn 0.5s ease;
}

.order-success h2 { font-size: 20px; font-weight: 800; }
.order-success .order-id {
  font-family: 'JetBrains Mono', monospace;
  color: var(--saffron);
  font-weight: 600;
  margin-top: 4px;
}

/* Stepper */
.stepper {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  box-shadow: var(--shadow);
}

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

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

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

.step:last-child::before { display: none; }

.step.done::before { background: var(--success); }

.step-dot {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
  z-index: 1;
  background: var(--bg);
  transition: all 0.3s;
}

.step.done .step-dot {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
}

.step.active .step-dot {
  border-color: var(--saffron);
  background: var(--saffron);
  color: #fff;
  animation: pulse 1.5s infinite;
}

.step-info { flex: 1; }

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

.step-time {
  font-size: 12px;
  color: var(--text-muted);
}

/* ── Virtual Menu Entry ─────────────────── */
.virtual-menu-entry-wrap {
  padding: 0 16px 16px;
}

.virtual-menu-card {
  width: 100%;
  border: 1px solid rgba(243, 138, 29, 0.35);
  border-radius: 20px;
  background: radial-gradient(circle at 10% 20%, #ffb44d 0%, #f38a1d 45%, #cf5b00 100%);
  box-shadow: 0 14px 28px rgba(243, 138, 29, 0.28);
  padding: 14px;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.virtual-menu-card:hover {
  box-shadow: 0 18px 32px rgba(243, 138, 29, 0.35);
  filter: saturate(1.05);
}

.virtual-menu-card:active {
  transform: scale(0.98);
}

.virtual-menu-card-inner {
  background: rgba(255, 255, 255, 0.96);
  border-radius: 14px;
  padding: 18px 16px;
  text-align: center;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.virtual-menu-kicker {
  display: block;
  font-size: 11px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  font-weight: 700;
  color: #8a5d20;
  margin-bottom: 4px;
}

.virtual-menu-title {
  font-family: 'Fredoka', sans-serif;
  font-size: 26px;
  font-weight: 700;
  color: #1f1f1f;
  letter-spacing: 0.7px;
}

.virtual-menu-subtitle {
  margin-top: 4px;
  font-size: 12px;
  color: #575757;
  font-weight: 500;
}

/* ── Recommendations ────────────────────── */
.rec-section {
  padding: 0 16px 24px;
}

.rec-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 12px;
}

.rec-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 4px;
}

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

.rec-card {
  flex-shrink: 0;
  width: 140px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: var(--shadow);
}

.rec-card:hover { border-color: var(--saffron); transform: translateY(-2px); }

.rec-card-icon {
  width: 56px; height: 56px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255,107,53,0.08), rgba(247,201,72,0.08));
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
  margin: 0 auto 8px;
}

.rec-card-name {
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 4px;
}

.rec-card-price {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 700;
  color: var(--saffron);
}

.rec-card-reason {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: var(--space-1);
  line-height: 1.4;
}

/* ── UPI Payment ────────────────────────── */
.upi-section {
  text-align: center;
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 16px;
  box-shadow: var(--shadow);
}

.upi-amount {
  font-family: 'Outfit', sans-serif;
  font-size: 36px;
  font-weight: 900;
  color: var(--saffron);
  margin: 12px 0;
}

.upi-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #5B47E0, #7B68EE);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  margin-top: 8px;
}

.upi-btn:hover { filter: brightness(1.1); transform: translateY(-1px); }

/* ── Footer ─────────────────────────────── */
.customer-footer {
  padding: 24px 16px;
  text-align: center;
  border-top: 1px solid var(--border);
  margin-top: 24px;
  padding-bottom: 80px;
}

.footer-text {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.footer-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--saffron);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  min-height: var(--touch-target);
  padding: 8px 16px;
  border: 1px solid rgba(255,107,53,0.3);
  border-radius: var(--radius-xs);
  transition: all 0.2s;
}

.footer-link:hover { background: rgba(255,107,53,0.08); }

/* ── Section Visibility ─────────────────── */
.page-section { display: none; }
.page-section.active { display: block; }

/* ── Skeleton Loading ───────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--border) 25%, rgba(255,255,255,0.1) 50%, var(--border) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-xs);
}

/* ── Toast ──────────────────────────────── */
.toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--text);
  color: var(--bg);
  padding: var(--space-3) 20px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  z-index: 200;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.toast.show { opacity: 1; }

/* ── Virtual Menu Modal ─────────────────── */
body.virtual-menu-open {
  overflow: hidden;
}

.virtual-menu-modal {
  position: fixed;
  inset: 0;
  z-index: 560;
  background: rgba(12, 12, 16, 0.97);
  display: none;
  flex-direction: column;
}

.virtual-menu-modal.show {
  display: flex;
}

.virtual-menu-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 16px 10px;
  color: #f2f2f2;
}

.virtual-menu-back {
  border: none;
  background: transparent;
  color: #f2f2f2;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  padding: 8px 10px;
  border-radius: 10px;
}

.virtual-menu-back:hover {
  background: rgba(255, 255, 255, 0.12);
}

.virtual-menu-heading {
  font-size: 22px;
  font-weight: 700;
}

.virtual-menu-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px 0;
  min-height: 0;
}

.virtual-menu-main-image {
  width: 100%;
  height: 100%;
  max-height: 62vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.5);
  background: #0a0a0a;
}

.virtual-menu-pagination {
  color: #f7f7f7;
  text-align: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: 1px;
  padding: 8px 0 6px;
}

.virtual-menu-filmstrip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 10px 14px 18px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.virtual-menu-filmstrip::-webkit-scrollbar {
  display: none;
}

.virtual-menu-thumb {
  width: 78px;
  height: 78px;
  border-radius: 12px;
  border: 2px solid transparent;
  padding: 0;
  background: #1f1f1f;
  overflow: hidden;
  flex: 0 0 auto;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.virtual-menu-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.virtual-menu-thumb.active {
  border-color: var(--saffron);
  transform: translateY(-2px);
}

/* ── Animations ─────────────────────────── */
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideUp { from { transform: translateX(-50%) translateY(100%); } to { transform: translateX(-50%) translateY(0); } }
@keyframes popIn { 0% { transform: scale(0.5); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(255,107,53,0.4); } 50% { box-shadow: 0 0 0 8px rgba(255,107,53,0); } }
@keyframes starBounce { 0% { transform: scale(1); } 40% { transform: scale(1.35); } 60% { transform: scale(0.95); } 100% { transform: scale(1.1); } }
@keyframes modalSlideUp { from { opacity: 0; transform: translateY(40px) scale(0.96); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes emojiPop { 0% { transform: scale(0) rotate(-20deg); } 60% { transform: scale(1.2) rotate(5deg); } 100% { transform: scale(1) rotate(0); } }
@keyframes confetti { 0% { background-position: 0 0; } 100% { background-position: 200% 0; } }

/* ── Rating Modal ──────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.modal-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 24px;
  width: 100%;
  max-width: 380px;
  padding: 32px 24px 24px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.2);
  animation: modalSlideUp 0.4s ease;
  position: relative;
  overflow: hidden;
}

.modal-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--saffron), var(--gold), var(--saffron));
  background-size: 200% 100%;
  animation: confetti 3s linear infinite;
}

.rating-step { text-align: center; }
.rating-step.hidden { display: none; }

.rating-emoji {
  font-size: 56px;
  margin-bottom: 12px;
  animation: emojiPop 0.5s ease;
  line-height: 1;
}

.rating-title {
  font-family: 'Outfit', sans-serif;
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 6px;
  color: var(--text);
}

.rating-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.5;
}

/* Star selector */
.star-selector {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 8px;
}

.star-btn {
  background: none;
  border: none;
  font-size: 36px;
  cursor: pointer;
  color: var(--border);
  transition: color 0.2s, transform 0.2s;
  min-width: var(--touch-target);
  min-height: var(--touch-target);
  padding: var(--space-1);
  line-height: 1;
  -webkit-text-stroke: 1px rgba(0,0,0,0.05);
}

.star-btn:hover {
  transform: scale(1.15);
}

.star-btn.active {
  color: #F7C948;
  filter: drop-shadow(0 0 6px rgba(247,201,72,0.5));
  animation: starBounce 0.35s ease;
}

.star-btn.hovered {
  color: #F7C948;
  opacity: 0.7;
}

.rating-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--saffron);
  min-height: 18px;
  margin-bottom: 4px;
  transition: opacity 0.2s;
}

/* Google review CTA */
.google-review-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #4285F4, #34A853);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  font-family: 'Outfit', sans-serif;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 16px rgba(66,133,244,0.3);
  margin-bottom: 12px;
}

.google-review-btn:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(66,133,244,0.4);
}

/* Feedback textarea */
.feedback-textarea {
  width: 100%;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  line-height: 1.5;
  resize: vertical;
  min-height: 100px;
  max-height: 200px;
  outline: none;
  transition: border-color 0.2s;
}

.feedback-textarea::placeholder { color: var(--text-muted); }
.feedback-textarea:focus { border-color: var(--saffron); }

.feedback-char-count {
  text-align: right;
  font-size: 12px;
  color: var(--text-muted);
  margin: 4px 0 12px;
  font-family: 'JetBrains Mono', monospace;
}

.feedback-submit-btn {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--saffron), #FF8C5A);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  font-family: 'Outfit', sans-serif;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 16px rgba(255,107,53,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.feedback-submit-btn:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.feedback-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.rating-close-btn {
  display: block;
  width: 100%;
  min-height: var(--touch-target);
  padding: var(--space-3);
  margin-top: 8px;
  border: none;
  background: none;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s;
}

.rating-close-btn:hover { color: var(--text); }

/* ── Scrollbar ──────────────────────────── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

/* ── Desktop Enhancement ────────────────── */
@media (min-width: 481px) {
  body {
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
    box-shadow: 0 0 40px rgba(0,0,0,0.05);
  }
}
