/* ==========================================================
   MENUQR - Modern Digital Menu & Cafe Theme System
   ========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Kantumruy+Pro:wght@400;500;600;700&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Playfair+Display:ital,wght@0,600;0,700;1,600&display=swap');

:root {
  /* Default Coffee Theme */
  --bg-primary: #0f0a06;
  --bg-secondary: #1a120c;
  --bg-surface: #241910;
  --bg-card: rgba(36, 25, 16, 0.7);
  --bg-glass: rgba(26, 18, 12, 0.88);
  --border-color: rgba(217, 119, 6, 0.18);
  --border-hover: rgba(245, 158, 11, 0.4);
  
  --text-main: #fef7ee;
  --text-muted: #c7b8a8;
  --text-dim: #8c7c6d;

  --accent: #d97706;
  --accent-light: #f59e0b;
  --accent-dark: #b45309;
  --accent-glow: rgba(245, 158, 11, 0.25);

  --badge-bg: #451a03;
  --badge-text: #fef3c7;
  --success: #10b981;
  --danger: #ef4444;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-full: 9999px;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 12px 35px rgba(0, 0, 0, 0.5);
  --shadow-accent: 0 6px 20px rgba(217, 119, 6, 0.3);

  --font-sans: 'Plus Jakarta Sans', 'Kantumruy Pro', 'PingFang SC', 'Microsoft YaHei', system-ui, -apple-system, sans-serif;
  --font-serif: 'Playfair Display', Georgia, serif;

  --header-height: 72px;
}

/* Theme: Modern Dark */
[data-theme="dark"] {
  --bg-primary: #09090b;
  --bg-secondary: #121215;
  --bg-surface: #18181b;
  --bg-card: rgba(24, 24, 27, 0.7);
  --bg-glass: rgba(18, 18, 21, 0.88);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.2);
  --text-main: #fafafa;
  --text-muted: #a1a1aa;
  --text-dim: #71717a;
  --accent: #e11d48;
  --accent-light: #f43f5e;
  --accent-dark: #be123c;
  --accent-glow: rgba(244, 63, 94, 0.25);
  --shadow-accent: 0 6px 20px rgba(225, 29, 72, 0.3);
}

/* Theme: Forest Emerald */
[data-theme="forest"] {
  --bg-primary: #03140e;
  --bg-secondary: #06241b;
  --bg-surface: #0a3327;
  --bg-card: rgba(10, 51, 39, 0.75);
  --bg-glass: rgba(6, 36, 27, 0.88);
  --border-color: rgba(52, 211, 153, 0.15);
  --border-hover: rgba(52, 211, 153, 0.4);
  --text-main: #ecfdf5;
  --text-muted: #a7f3d0;
  --text-dim: #6ee7b7;
  --accent: #059669;
  --accent-light: #10b981;
  --accent-dark: #047857;
  --accent-glow: rgba(16, 185, 129, 0.25);
  --shadow-accent: 0 6px 20px rgba(16, 185, 129, 0.3);
}

/* Theme: Sunset Amber */
[data-theme="sunset"] {
  --bg-primary: #180905;
  --bg-secondary: #27100a;
  --bg-surface: #36170e;
  --bg-card: rgba(54, 23, 14, 0.75);
  --bg-glass: rgba(39, 16, 10, 0.88);
  --border-color: rgba(249, 115, 22, 0.18);
  --border-hover: rgba(249, 115, 22, 0.4);
  --text-main: #fff7ed;
  --text-muted: #fed7aa;
  --text-dim: #fb923c;
  --accent: #ea580c;
  --accent-light: #f97316;
  --accent-dark: #c2410c;
  --accent-glow: rgba(249, 115, 22, 0.25);
  --shadow-accent: 0 6px 20px rgba(234, 88, 12, 0.3);
}

/* Theme: Royal Indigo */
[data-theme="royal"] {
  --bg-primary: #07091a;
  --bg-secondary: #0e122c;
  --bg-surface: #151b3d;
  --bg-card: rgba(21, 27, 61, 0.75);
  --bg-glass: rgba(14, 18, 44, 0.88);
  --border-color: rgba(99, 102, 241, 0.2);
  --border-hover: rgba(129, 140, 248, 0.4);
  --text-main: #eef2ff;
  --text-muted: #c7d2fe;
  --text-dim: #818cf8;
  --accent: #4f46e5;
  --accent-light: #6366f1;
  --accent-dark: #3730a3;
  --accent-glow: rgba(99, 102, 241, 0.25);
  --shadow-accent: 0 6px 20px rgba(99, 102, 241, 0.3);
}

/* Theme: Clean Minimal Light */
[data-theme="minimal"] {
  --bg-primary: #f8fafc;
  --bg-secondary: #f1f5f9;
  --bg-surface: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.85);
  --bg-glass: rgba(255, 255, 255, 0.9);
  --border-color: rgba(0, 0, 0, 0.08);
  --border-hover: rgba(0, 0, 0, 0.18);
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dim: #94a3b8;
  --accent: #0f172a;
  --accent-light: #334155;
  --accent-dark: #020617;
  --accent-glow: rgba(15, 23, 42, 0.15);
  --shadow-accent: 0 6px 20px rgba(15, 23, 42, 0.15);
}

/* Global Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
  padding-bottom: 90px;
  overflow-x: hidden;
  position: relative;
}

/* Ambient glow */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: radial-gradient(circle at 10% 20%, var(--accent-glow) 0%, transparent 45%),
              radial-gradient(circle at 90% 80%, rgba(0, 0, 0, 0.4) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* Responsive Container: Fluid on mobile, comfortably wide on desktop */
.app-container {
  width: 100%;
  max-width: 1380px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  padding: 0 16px;
}

@media (min-width: 1024px) {
  body {
    padding-bottom: 40px; /* On desktop, cart sidebar is inline */
  }
  .app-container {
    padding: 0 24px;
  }
}

/* ==========================================================
   Header & Brand Showcase
   ========================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg-glass);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border-color);
  transition: all 0.3s ease;
  margin: 0 -16px 0;
  padding: 0 16px;
}

@media (min-width: 1024px) {
  .site-header {
    margin: 0 -24px 0;
    padding: 0 24px;
  }
}

.header-inner {
  max-width: 1380px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  gap: 16px;
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
}

.brand-logo-wrap {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-surface);
  border: 2px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

.brand-logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-info h1 {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.3px;
  color: var(--text-main);
  line-height: 1.2;
}

.brand-status {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  display: inline-block;
  box-shadow: 0 0 8px var(--success);
}

/* Header Action Buttons */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 8px 14px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.header-btn:hover, .header-btn:active {
  border-color: var(--accent);
  background: var(--accent-glow);
}

.table-badge {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #ffffff;
  padding: 7px 14px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: var(--shadow-accent);
  white-space: nowrap;
}

/* Desktop Theme Switcher in Header */
.theme-selector-mini {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 7px 12px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  outline: none;
  cursor: pointer;
}

/* Language Selector Pills */
.lang-selector-pills {
  display: inline-flex;
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 3px;
  gap: 2px;
}

.lang-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 5px 11px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.lang-btn:hover {
  color: var(--text-main);
}

.lang-btn.active {
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

/* ==========================================================
   Restaurant Quick Info Bar (Hours, Wi-Fi, Address)
   ========================================================== */
.quick-info-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.8rem;
  color: var(--text-muted);
  gap: 16px;
  margin-bottom: 12px;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.info-item button {
  background: none;
  border: none;
  color: var(--accent-light);
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: underline;
}

/* ==========================================================
   Desktop 2-Column Layout (Main Menu + Order Sidebar)
   ========================================================== */
.menu-layout-wrapper {
  display: flex;
  gap: 28px;
  align-items: flex-start;
  margin-top: 6px;
}

.menu-main-column {
  flex: 1;
  min-width: 0; /* Prevents overflow */
}

/* ==========================================================
   Banner Slider / Carousel (Responsive)
   ========================================================== */
.banner-carousel-container {
  padding: 6px 0 14px;
  position: relative;
  overflow: hidden;
}

.carousel-viewport {
  position: relative;
  width: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
  aspect-ratio: 16 / 7.5;
  background: var(--bg-secondary);
}

@media (min-width: 768px) {
  .carousel-viewport {
    aspect-ratio: 21 / 8;
    max-height: 380px;
  }
}

.carousel-track {
  display: flex;
  height: 100%;
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: transform;
}

.carousel-slide {
  min-width: 100%;
  height: 100%;
  position: relative;
  user-select: none;
}

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

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--border-color);
  transition: all 0.25s ease;
  cursor: pointer;
  border: none;
}

.carousel-dot.active {
  width: 24px;
  background: var(--accent);
}

/* ==========================================================
   Search & Filter Bar
   ========================================================== */
.search-filter-section {
  padding: 6px 0 12px;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 16px;
  color: var(--text-dim);
  font-size: 1.1rem;
  pointer-events: none;
}

.search-input {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.95rem;
  padding: 13px 16px 13px 46px;
  outline: none;
  transition: all 0.2s ease;
}

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

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

.clear-search-btn {
  position: absolute;
  right: 14px;
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 1.1rem;
  display: none;
}

/* ==========================================================
   Category Navigation (Horizontal Sticky Bar)
   ========================================================== */
.category-nav-wrapper {
  position: sticky;
  top: var(--header-height);
  z-index: 40;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  padding: 12px 0;
  margin-bottom: 16px;
}

.category-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

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

.category-pill {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 18px;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  user-select: none;
  white-space: nowrap;
}

.category-pill:hover {
  color: var(--text-main);
  border-color: var(--accent-light);
}

.category-pill.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
  box-shadow: var(--shadow-accent);
}

/* ==========================================================
   Menu Sections & Item Cards Grid (Mobile to Desktop)
   ========================================================== */
.menu-container {
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding-bottom: 24px;
}

.category-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.category-title {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.2px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.category-item-count {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-dim);
  background: var(--bg-surface);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
}

/* Grid Scaling: 1 col on mobile, 2 col on tablet, 3-4 cols on desktop */
.menu-items-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

@media (max-width: 520px) {
  .menu-items-grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 900px) {
  .menu-items-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
  }
}

@media (min-width: 1200px) {
  .menu-items-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
  }
}

/* Modern Food/Drink Card */
.menu-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  position: relative;
  backdrop-filter: blur(10px);
}

.menu-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md);
}

.card-image-wrap {
  width: 100%;
  aspect-ratio: 4 / 3;
  position: relative;
  background: var(--bg-surface);
  overflow: hidden;
}

.card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.menu-card:hover .card-image {
  transform: scale(1.06);
}

.card-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--accent);
  color: #ffffff;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: var(--shadow-sm);
  z-index: 2;
}

.card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-title {
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.35;
  margin-bottom: 6px;
}

/* Bilingual Side-by-Side Title Display (Khmer + English or Khmer + Chinese) */
.title-bilingual {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 6px;
  row-gap: 2px;
}

.title-bilingual .title-primary {
  font-weight: 700;
  color: var(--text-main);
  font-family: 'Kantumruy Pro', var(--font-main);
}

.title-bilingual .title-sep {
  opacity: 0.45;
  font-weight: 400;
  font-size: 0.85em;
  color: var(--text-muted);
}

.title-bilingual .title-secondary {
  font-weight: 600;
  font-size: 0.9em;
  opacity: 0.9;
  color: var(--accent-light);
}

.modal-item-title .title-bilingual {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 10px;
}

.modal-item-title .title-bilingual .title-secondary {
  font-size: 0.88em;
}

.card-description {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  gap: 10px;
}

.card-price {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--accent-light);
}

/* Dual Currency Display (USD $ and Khmer Riels ៛) */
.price-dual {
  display: inline-flex;
  align-items: baseline;
  flex-wrap: wrap;
  column-gap: 5px;
  row-gap: 2px;
}

.price-dual .price-usd {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--accent-light);
  letter-spacing: -0.3px;
}

.price-dual .price-sep {
  opacity: 0.45;
  font-size: 0.85em;
  font-weight: 400;
  color: var(--text-muted);
}

.price-dual .price-riel {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
  opacity: 0.88;
  font-family: 'Kantumruy Pro', var(--font-main);
}

.modal-price {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--accent-light);
}

.modal-price .price-dual {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.modal-price .price-dual .price-usd {
  font-size: 1.35rem;
}

.modal-price .price-dual .price-riel {
  font-size: 1.05rem;
  opacity: 0.85;
}

.card-add-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.card-add-btn:hover, .card-add-btn:active {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
  transform: scale(1.1);
}

/* ==========================================================
   Desktop Sticky Order Sidebar (Screens >= 1024px)
   ========================================================== */
.desktop-order-sidebar {
  display: none;
  width: 360px;
  flex-shrink: 0;
  position: sticky;
  top: calc(var(--header-height) + 16px);
  z-index: 30;
}

@media (min-width: 1024px) {
  .desktop-order-sidebar {
    display: block;
  }
}

.desktop-sidebar-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: calc(100vh - var(--header-height) - 40px);
  overflow-y: auto;
}

.desktop-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
}

.desktop-sidebar-header h3 {
  font-size: 1.15rem;
  font-weight: 800;
}

.desktop-cart-count-badge {
  background: var(--accent);
  color: #ffffff;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
}

.desktop-order-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 240px;
  overflow-y: auto;
}

.desktop-sidebar-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 6px;
}

/* ==========================================================
   Item Modal (Responsive Centered on Desktop)
   ========================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

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

.modal-sheet {
  background: var(--bg-secondary);
  border-top-left-radius: var(--radius-lg);
  border-top-right-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  border-bottom: none;
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 0 0 24px 0;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.25, 1, 0.5, 1);
  box-shadow: var(--shadow-lg);
}

.modal-overlay.open .modal-sheet {
  transform: translateY(0);
}

/* Desktop Modal Centering */
@media (min-width: 768px) {
  .modal-overlay {
    align-items: center;
    justify-content: center;
    padding: 24px;
  }
  .modal-sheet {
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    max-width: 580px;
    transform: scale(0.92);
    transition: transform 0.25s ease;
  }
  .modal-overlay.open .modal-sheet {
    transform: scale(1);
  }
}

.modal-image-wrap {
  width: 100%;
  height: 240px;
  position: relative;
  background: var(--bg-surface);
}

.modal-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(5px);
  border: none;
  color: #ffffff;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  z-index: 10;
  transition: transform 0.2s ease;
}

.modal-close-btn:hover {
  transform: scale(1.1);
}

.modal-content {
  padding: 20px 24px;
}

.modal-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 8px;
}

.modal-title {
  font-size: 1.35rem;
  font-weight: 800;
}

.modal-price {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--accent-light);
  white-space: nowrap;
}

.modal-description {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 18px;
}

.options-group {
  margin-bottom: 18px;
}

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

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

.option-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 16px;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: all 0.2s ease;
}

.option-item.selected {
  border-color: var(--accent);
  background: var(--accent-glow);
}

.special-note-input {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-main);
  padding: 12px 14px;
  font-family: inherit;
  font-size: 0.88rem;
  outline: none;
  resize: vertical;
  min-height: 75px;
}

.special-note-input:focus {
  border-color: var(--accent);
}

.modal-footer {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 22px;
}

.quantity-stepper {
  display: inline-flex;
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 4px;
}

.stepper-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: transparent;
  border: none;
  color: var(--text-main);
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stepper-value {
  min-width: 32px;
  text-align: center;
  font-weight: 700;
  font-size: 1rem;
}

.add-order-btn {
  flex: 1;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #ffffff;
  border: none;
  border-radius: var(--radius-full);
  padding: 14px 22px;
  font-size: 0.95rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  box-shadow: var(--shadow-accent);
  transition: transform 0.2s ease;
}

.add-order-btn:active {
  transform: scale(0.98);
}

/* ==========================================================
   Sticky Floating Cart Dock (Mobile only, hidden on desktop)
   ========================================================== */
.floating-cart-dock {
  position: fixed;
  bottom: 16px;
  left: 0;
  right: 0;
  max-width: 640px;
  margin: 0 auto;
  padding: 0 16px;
  z-index: 60;
  pointer-events: none;
  transform: translateY(120%);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.floating-cart-dock.visible {
  pointer-events: auto;
  transform: translateY(0);
}

@media (min-width: 1024px) {
  .floating-cart-dock {
    display: none !important;
  }
}

.cart-dock-inner {
  background: linear-gradient(135deg, var(--accent-dark), var(--accent));
  color: #ffffff;
  border-radius: var(--radius-full);
  padding: 13px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-lg), var(--shadow-accent);
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

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

.dock-badge {
  background: #ffffff;
  color: var(--accent-dark);
  font-weight: 800;
  font-size: 0.85rem;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dock-label {
  font-size: 0.92rem;
  font-weight: 700;
}

.dock-total {
  font-size: 1.05rem;
  font-weight: 800;
}

/* ==========================================================
   Checkout / Cart Drawer (Mobile)
   ========================================================== */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 110;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.drawer-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.drawer-sheet {
  background: var(--bg-secondary);
  border-top-left-radius: var(--radius-lg);
  border-top-right-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  width: 100%;
  max-width: 640px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.25, 1, 0.5, 1);
}

.drawer-overlay.open .drawer-sheet {
  transform: translateY(0);
}

@media (min-width: 768px) {
  .drawer-overlay {
    align-items: center;
  }
  .drawer-sheet {
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    max-width: 580px;
    transform: scale(0.92);
  }
  .drawer-overlay.open .drawer-sheet {
    transform: scale(1);
  }
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border-color);
}

.drawer-header h3 {
  font-size: 1.15rem;
  font-weight: 800;
}

.drawer-body {
  padding: 18px 22px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.order-items-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.order-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 14px;
}

.order-item-info h4 {
  font-size: 0.9rem;
  font-weight: 700;
}

.order-item-info p {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.order-item-price {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent-light);
  margin-top: 2px;
}

.table-selector-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.table-selector-box label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
}

.table-select-input, .customer-input {
  width: 100%;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  padding: 10px 12px;
  font-family: inherit;
  font-size: 0.88rem;
  outline: none;
}

.table-select-input:focus, .customer-input:focus {
  border-color: var(--accent);
}

.bill-breakdown {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.85rem;
}

.bill-row {
  display: flex;
  justify-content: space-between;
  color: var(--text-muted);
}

.bill-row.total {
  border-top: 1px dashed var(--border-color);
  padding-top: 8px;
  margin-top: 4px;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-main);
}

.drawer-footer {
  padding: 18px 22px;
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.whatsapp-order-btn {
  background: #25d366;
  color: #ffffff;
  border: none;
  border-radius: var(--radius-full);
  padding: 14px;
  font-size: 0.95rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.35);
  transition: transform 0.2s ease;
  text-decoration: none;
}

.whatsapp-order-btn:hover {
  background: #20ba59;
}

.kitchen-order-btn {
  background: var(--bg-surface);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 12px;
  font-size: 0.88rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
}

.kitchen-order-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* ==========================================================
   Generic Modal Dialogs (Wi-Fi, QR Info, Success)
   ========================================================== */
.dialog-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.dialog-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.dialog-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  max-width: 440px;
  width: 100%;
  padding: 26px;
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.dialog-box h3 {
  font-size: 1.25rem;
  margin-bottom: 10px;
}

.dialog-box p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 18px;
}

.dialog-action-btn {
  background: var(--accent);
  color: #ffffff;
  border: none;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  font-weight: 700;
  cursor: pointer;
  width: 100%;
}
