/* ==========================================================================
   ¡YA LO DIJOH! - MENÚ DIGITAL ESTILO APP
   Paleta de Colores de la Marca:
   - Primario: #5271ff (Azul Rey de la Marca / Logo)
   - Primario Oscuro: #3956e8
   - Acento Suave: #eef2ff / #e0e7ff
   - Fondos Claros: #ffffff / #f8faff / #f1f5f9 (CERO fondos oscuros)
   - Texto Principal: #111827 / #1e293b
   - Texto Secundario: #64748b
   - Éxito / WhatsApp: #25D366
   ========================================================================== */

:root {
  --brand-primary: #5271ff;
  --brand-primary-dark: #3956e8;
  --brand-primary-light: #eef2ff;
  --brand-primary-subtle: #f4f6ff;
  --brand-accent-amber: #f59e0b;
  --brand-accent-red: #ef4444;
  --color-whatsapp: #25D366;
  --color-whatsapp-dark: #1ea952;

  --bg-app: #f8faff;
  --bg-card: #ffffff;
  --bg-elevated: #ffffff;
  --border-light: #e8ecf4;
  --border-brand: #d2dcff;

  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --text-inverse: #ffffff;

  --shadow-sm: 0 2px 6px rgba(82, 113, 255, 0.06);
  --shadow-md: 0 6px 18px rgba(82, 113, 255, 0.08);
  --shadow-lg: 0 12px 30px rgba(82, 113, 255, 0.12);
  --shadow-float: 0 14px 36px rgba(82, 113, 255, 0.22), 0 2px 8px rgba(0, 0, 0, 0.04);

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 9999px;

  --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --safe-bottom: env(safe-area-inset-bottom, 20px);
}

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

html, body {
  width: 100%;
  min-height: 100%;
  font-family: var(--font-family);
  background-color: var(--bg-app);
  color: var(--text-main);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  outline: none;
  background: transparent;
}

input, textarea {
  font-family: inherit;
}

/* ==========================================================================
   VISTA DE ESCRITORIO (EXCLUSIVA CON QR - NUNCA SIMULADOR / DEMO)
   ========================================================================== */
#desktop-view {
  display: none;
  min-height: 100vh;
  width: 100vw;
  background: linear-gradient(135deg, #f0f4ff 0%, #ffffff 50%, #e9efff 100%);
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.desktop-card {
  background: #ffffff;
  border-radius: 32px;
  box-shadow: 0 24px 60px rgba(82, 113, 255, 0.14), 0 4px 16px rgba(0, 0, 0, 0.03);
  max-width: 580px;
  width: 100%;
  padding: 44px 40px;
  text-align: center;
  border: 1px solid var(--border-brand);
  position: relative;
  overflow: hidden;
}

.desktop-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 8px;
  background: linear-gradient(90deg, #5271ff 0%, #7690ff 50%, #5271ff 100%);
}

.desktop-logo-wrapper {
  width: 96px;
  height: 96px;
  margin: 0 auto 16px;
  border-radius: 50%;
  padding: 4px;
  background: linear-gradient(135deg, #5271ff, #9bb0ff);
  box-shadow: 0 10px 24px rgba(82, 113, 255, 0.3);
}

.desktop-logo {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: #fff;
}

.desktop-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--brand-primary-light);
  color: var(--brand-primary);
  font-size: 13px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  margin-bottom: 12px;
}

.live-dot {
  width: 8px;
  height: 8px;
  background-color: var(--brand-primary);
  border-radius: 50%;
  animation: pulseDot 1.8s infinite;
}

@keyframes pulseDot {
  0% { transform: scale(0.9); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.8; }
}

.desktop-title {
  font-size: 32px;
  font-weight: 900;
  color: var(--text-main);
  letter-spacing: -0.5px;
  margin-bottom: 4px;
}

.desktop-subtitle {
  font-size: 16px;
  font-weight: 600;
  color: var(--brand-primary);
  margin-bottom: 6px;
}

.desktop-slogan {
  font-size: 14px;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 28px;
}

.desktop-qr-container {
  background: #f8faff;
  border: 2px dashed #cfdbff;
  border-radius: 24px;
  padding: 24px;
  margin-bottom: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.qr-frame {
  background: #ffffff;
  padding: 16px;
  border-radius: 20px;
  box-shadow: 0 8px 24px rgba(82, 113, 255, 0.12);
  position: relative;
  overflow: hidden;
  display: inline-block;
}

.qr-canvas-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr-canvas-wrapper canvas {
  display: block;
  max-width: 200px;
  height: auto;
  border-radius: 8px;
}

.qr-instructions {
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  max-width: 380px;
}

.qr-step-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--brand-primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.qr-instructions h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 3px;
}

.qr-instructions p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.4;
}

.desktop-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.btn-primary, .btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-primary {
  background: var(--brand-primary);
  color: var(--text-inverse);
  box-shadow: 0 6px 18px rgba(82, 113, 255, 0.35);
}

.btn-primary:hover {
  background: var(--brand-primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(82, 113, 255, 0.45);
}

.btn-secondary {
  background: var(--brand-primary-light);
  color: var(--brand-primary);
  border: 1px solid var(--border-brand);
}

.btn-secondary:hover {
  background: #dfe7ff;
  transform: translateY(-2px);
}

.desktop-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.info-pill {
  background: #f1f5f9;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}


/* ==========================================================================
   VISTA MÓVIL (LA WEBAPP REAL)
   ========================================================================== */
.mobile-container {
  display: block;
  max-width: 500px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg-app);
  position: relative;
  box-shadow: 0 0 35px rgba(82, 113, 255, 0.08);
}

/* Header de la App */
.app-header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-light);
  padding: 14px 16px 8px;
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.app-logo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--brand-primary);
  box-shadow: 0 4px 12px rgba(82, 113, 255, 0.25);
}

.brand-name {
  font-size: 20px;
  font-weight: 900;
  color: var(--brand-primary);
  line-height: 1.1;
  letter-spacing: -0.3px;
}

.brand-tagline {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}

.status-badge-open {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #e8f9ee;
  color: #128c3e;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}

.status-dot {
  width: 6px;
  height: 6px;
  background-color: #25D366;
  border-radius: 50%;
}

/* Selector de Servicio (Mesa vs Domicilio) */
.service-selector-card {
  background: var(--brand-primary-light);
  border: 1px solid var(--border-brand);
  border-radius: var(--radius-md);
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.service-tabs {
  display: flex;
  gap: 6px;
  flex: 1;
}

.service-tab {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 12px;
  background: transparent;
  color: var(--text-muted);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: left;
}

.service-tab.active {
  background: #ffffff;
  color: var(--brand-primary);
  box-shadow: 0 2px 8px rgba(82, 113, 255, 0.15);
}

.service-tab-icon {
  font-size: 18px;
}

.service-tab-text {
  display: flex;
  flex-direction: column;
}

.tab-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.tab-detail {
  font-size: 12px;
  font-weight: 800;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 105px;
}

.service-tab.active .tab-detail {
  color: var(--brand-primary);
}

.btn-edit-service {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #ffffff;
  color: var(--brand-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-brand);
  margin-left: 6px;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
}

.btn-edit-service:active {
  transform: scale(0.92);
}

/* Buscador */
.search-box {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

.search-icon {
  position: absolute;
  left: 14px;
  pointer-events: none;
}

.search-box input {
  width: 100%;
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-pill);
  padding: 10px 38px 10px 42px;
  font-size: 13px;
  color: var(--text-main);
  outline: none;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.search-box input:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(82, 113, 255, 0.15);
}

.clear-search-btn {
  position: absolute;
  right: 12px;
  background: #e2e8f0;
  color: #64748b;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Categorías con Iconos */
.category-nav {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

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

.cat-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
}

.cat-pill.active {
  background: var(--brand-primary);
  color: var(--text-inverse);
  border-color: var(--brand-primary);
  box-shadow: 0 4px 14px rgba(82, 113, 255, 0.35);
  transform: translateY(-1px);
}

.cat-pill-icon {
  font-size: 16px;
}

.badge-count {
  background: #fee2e2;
  color: #dc2626;
  font-size: 10px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 10px;
  margin-left: 2px;
}

.cat-pill.active .badge-count {
  background: #ffffff;
  color: var(--brand-primary);
}


/* ==========================================================================
   CUERPO DE LA APP Y BANNERS INTER-CATEGORÍAS
   ========================================================================== */
.app-body {
  padding: 16px 16px 90px;
}

/* Banners entre secciones */
.banner-card {
  border-radius: var(--radius-lg);
  padding: 20px 18px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

/* Banner Hero */
.banner-hero {
  background: linear-gradient(135deg, #5271ff 0%, #3956e8 100%);
  color: #ffffff;
  border: none;
}

.banner-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(8px);
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

.banner-heading {
  font-size: 18px;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 6px;
}

.banner-sub {
  font-size: 13px;
  line-height: 1.4;
  opacity: 0.95;
}

/* Banner Sides Promo */
.banner-promo-sides {
  background: linear-gradient(135deg, #f0f4ff 0%, #ffffff 100%);
  border: 1.5px solid var(--border-brand);
  color: var(--text-main);
}

.banner-tag {
  display: inline-block;
  background: #fef3c7;
  color: #b45309;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  margin-bottom: 8px;
}

.btn-banner-action {
  margin-top: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--brand-primary);
  color: #ffffff;
  padding: 9px 16px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(82, 113, 255, 0.3);
  transition: all 0.2s;
}

.btn-banner-action:active {
  transform: scale(0.96);
}

/* Banner Drinks */
.banner-drinks {
  background: linear-gradient(135deg, #e0f2fe 0%, #f0f9ff 100%);
  border: 1.5px solid #bae6fd;
  color: #0369a1;
}

.banner-drinks .banner-tag {
  background: #bae6fd;
  color: #0284c7;
}

.banner-drinks .banner-heading {
  color: #0c4a6e;
}

.banner-drinks .banner-sub {
  color: #0369a1;
}

/* Brand Story Footer Banner */
.banner-brand-story {
  background: #ffffff;
  border: 1px solid var(--border-light);
  text-align: center;
  padding: 24px 16px;
}

.brand-story-badge {
  display: inline-block;
  background: var(--brand-primary-light);
  color: var(--brand-primary);
  font-size: 11px;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  margin-bottom: 8px;
}

.brand-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin-top: 14px;
}

.b-tag {
  background: #f1f5f9;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}


/* ==========================================================================
   SECCIONES Y TARJETAS DE PRODUCTOS
   (Usa iconos y tipografía premium, NO imágenes inventadas)
   ========================================================================== */
.menu-section {
  margin-bottom: 26px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--brand-primary-light);
}

.section-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-icon {
  font-size: 22px;
}

.section-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.3px;
}

.section-counter {
  font-size: 12px;
  font-weight: 700;
  color: var(--brand-primary);
  background: var(--brand-primary-light);
  padding: 3px 10px;
  border-radius: var(--radius-pill);
}

.items-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Card del Producto */
.product-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 16px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  position: relative;
}

.product-card:active {
  transform: scale(0.99);
}

.card-top-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 8px;
}

.card-title-group {
  flex: 1;
  padding-right: 10px;
}

.product-name {
  font-size: 17px;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.25;
  margin-bottom: 4px;
}

.product-badge-pill {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  margin-bottom: 4px;
}

.badge-popular {
  background: #fef3c7;
  color: #b45309;
}

.badge-signature {
  background: #e0e7ff;
  color: #3730a3;
}

.badge-premium {
  background: #ffedd5;
  color: #c2410c;
}

.badge-soon {
  background: #f1f5f9;
  color: #64748b;
}

/* Botón Favorito Corazón */
.btn-fav {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #f8faff;
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  flex-shrink: 0;
}

.btn-fav svg {
  transition: transform 0.2s ease;
}

.btn-fav.active {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #ef4444;
}

.btn-fav.active svg {
  fill: #ef4444;
  transform: scale(1.15);
}

.product-desc {
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-muted);
  margin-bottom: 12px;
}

/* Tags de ingredientes */
.product-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 14px;
}

.tag-item {
  background: var(--brand-primary-light);
  color: var(--brand-primary);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
}

/* Fila Inferior: Precio y Botón de Acción */
.card-bottom-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px dashed var(--border-light);
}

.price-wrap {
  display: flex;
  flex-direction: column;
}

.price-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-light);
  text-transform: uppercase;
}

.product-price {
  font-size: 18px;
  font-weight: 900;
  color: var(--brand-primary);
}

.price-soon {
  font-size: 14px;
  font-weight: 800;
  color: #94a3b8;
}

/* Botón Añadir / Personalizar */
.btn-add-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--brand-primary);
  color: var(--text-inverse);
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(82, 113, 255, 0.28);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-add-item:active {
  transform: scale(0.94);
}

.btn-add-item.disabled {
  background: #e2e8f0;
  color: #94a3b8;
  box-shadow: none;
  cursor: not-allowed;
}


/* ==========================================================================
   FLOATING BOTTOM NAVIGATION BAR (ESTILO APP KFC / MCDONALDS)
   REQUISITO CLAVE:
   "y cada ves que el cliente se pare sobre un item del menu se debe resaltar
    en un circulo con un fondo de relleno del color de la marca"
   ========================================================================== */
.floating-bottom-nav {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 28px);
  max-width: 440px;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 36px;
  border: 1.5px solid var(--border-brand);
  box-shadow: var(--shadow-float);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 8px 12px;
  z-index: 100;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: transparent;
  padding: 2px 8px;
  color: var(--text-muted);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  flex: 1;
}

/* Círculo del icono */
.nav-icon-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: transparent;
  color: var(--text-muted);
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}

.nav-emoji {
  font-size: 20px;
  line-height: 1;
}

.nav-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  transition: all 0.2s;
  white-space: nowrap;
}

/* EFECTO CÍRCULO CON COLOR DE MARCA (#5271ff) AL PARARSE (HOVER) O ESTAR ACTIVO */
.nav-item:hover .nav-icon-circle,
.nav-item.active .nav-icon-circle {
  background-color: var(--brand-primary) !important; /* Relleno del color de la marca */
  color: #ffffff !important;
  transform: translateY(-4px) scale(1.08);
  box-shadow: 0 6px 16px rgba(82, 113, 255, 0.45);
}

.nav-item:hover .nav-label,
.nav-item.active .nav-label {
  color: var(--brand-primary);
  font-weight: 800;
}

/* Badges sobre iconos de la barra flotante */
.nav-badge {
  position: absolute;
  top: 0px;
  right: 0px;
  background: #ef4444;
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 2px solid #ffffff;
}

.nav-spacer {
  height: 70px;
}


/* ==========================================================================
   MODALES Y HOJAS DESLIZANTES (BOTTOM SHEETS)
   ========================================================================== */
.modal-backdrop, .drawer-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 1000;
  display: none;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.modal-backdrop.show, .drawer-backdrop.show {
  display: flex;
  opacity: 1;
}

.modal-sheet, .drawer-panel {
  background: #ffffff;
  border-top-left-radius: 28px;
  border-top-right-radius: 28px;
  width: 100%;
  max-width: 500px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  padding: 18px 20px calc(20px + var(--safe-bottom));
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.15);
  overflow-y: auto;
}

.modal-backdrop.show .modal-sheet,
.drawer-backdrop.show .drawer-panel {
  transform: translateY(0);
}

.modal-handle {
  width: 44px;
  height: 5px;
  background: #cbd5e1;
  border-radius: 3px;
  margin: 0 auto 14px;
}

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

.modal-cat-tag {
  font-size: 12px;
  font-weight: 700;
  color: var(--brand-primary);
  background: var(--brand-primary-light);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}

.modal-title-main {
  font-size: 19px;
  font-weight: 800;
  color: var(--text-main);
}

.btn-close-modal {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f1f5f9;
  color: #64748b;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-product-title {
  font-size: 22px;
  font-weight: 900;
  color: var(--text-main);
  margin-bottom: 6px;
}

.modal-product-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 14px;
}

.modal-fries-notice {
  background: #fef3c7;
  border: 1px solid #fde68a;
  color: #92400e;
  font-size: 12px;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
}

/* Variantes */
.variants-container {
  margin-bottom: 18px;
}

.option-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 8px;
}

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

.variant-card {
  border: 1.5px solid var(--border-light);
  border-radius: 12px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.2s;
}

.variant-card.selected {
  border-color: var(--brand-primary);
  background: var(--brand-primary-light);
}

/* Form fields */
.form-group {
  margin-bottom: 14px;
}

.field-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 6px;
}

.input-text {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border-light);
  border-radius: 12px;
  font-size: 14px;
  color: var(--text-main);
  background: #ffffff;
  outline: none;
  transition: border-color 0.2s;
}

.input-text:focus {
  border-color: var(--brand-primary);
}

/* Cantidad Modal */
.modal-qty-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 16px 0;
  padding: 12px 0;
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

.qty-control {
  display: flex;
  align-items: center;
  gap: 12px;
}

.qty-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--brand-primary-light);
  color: var(--brand-primary);
  font-size: 18px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.qty-btn:active {
  transform: scale(0.9);
}

.qty-number {
  font-size: 17px;
  font-weight: 800;
  min-width: 24px;
  text-align: center;
}

.btn-block {
  width: 100%;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}


/* ==========================================================================
   CONFIGURACIÓN DE SERVICIO (MESA VS DOMICILIO)
   ========================================================================== */
.service-type-picker {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 18px;
}

.service-card-radio {
  display: block;
  cursor: pointer;
}

.service-card-radio input {
  display: none;
}

.radio-card-content {
  border: 2px solid var(--border-light);
  border-radius: 16px;
  padding: 14px 10px;
  text-align: center;
  transition: all 0.2s ease;
  background: #ffffff;
}

.service-card-radio input:checked + .radio-card-content {
  border-color: var(--brand-primary);
  background: var(--brand-primary-light);
  box-shadow: 0 4px 14px rgba(82, 113, 255, 0.2);
}

.radio-emoji {
  font-size: 26px;
  display: block;
  margin-bottom: 4px;
}

.radio-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-main);
  display: block;
}

.radio-desc {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.quick-mesa-pills {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  margin-bottom: 8px;
  padding-bottom: 4px;
}

.mesa-pill {
  padding: 6px 12px;
  background: #f1f5f9;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: all 0.2s;
}

.mesa-pill.selected {
  background: var(--brand-primary);
  color: #ffffff;
}


/* ==========================================================================
   CARRITO Y CONFIRMACIÓN POR WHATSAPP
   ========================================================================== */
.drawer-header-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.drawer-header-title h2 {
  font-size: 20px;
  font-weight: 800;
}

.cart-service-summary {
  background: var(--brand-primary-light);
  border: 1px solid var(--border-brand);
  border-radius: 14px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  cursor: pointer;
}

.summary-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.summary-emoji {
  font-size: 22px;
}

.summary-label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  color: var(--brand-primary);
  text-transform: uppercase;
}

.summary-edit-action {
  font-size: 12px;
  font-weight: 800;
  color: var(--brand-primary);
  text-decoration: underline;
}

.cart-items-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 18px;
  max-height: 40vh;
  overflow-y: auto;
}

.cart-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: #f8faff;
  border-radius: 14px;
  border: 1px solid var(--border-light);
}

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

.cart-item-name {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-main);
}

.cart-item-notes {
  font-size: 11px;
  color: #64748b;
  font-style: italic;
  margin-top: 2px;
}

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

.cart-item-qty {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 10px;
}

.cart-item-qty button {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid var(--border-light);
  color: var(--text-main);
  font-weight: 800;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-cost-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.included-fries-row {
  color: #16a34a;
  font-weight: 700;
}

.free-tag {
  background: #dcfce7;
  color: #15803d;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}

.cart-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 10px;
  margin-top: 8px;
  border-top: 2px dashed var(--border-light);
  margin-bottom: 16px;
}

.cart-total-row span {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-main);
}

.total-big-val {
  font-size: 22px;
  font-weight: 900;
  color: var(--brand-primary);
}

/* BOTÓN DE WHATSAPP */
.btn-whatsapp {
  background: var(--color-whatsapp);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 20px;
  border-radius: var(--radius-pill);
  font-size: 15px;
  font-weight: 800;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.35);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-whatsapp:hover {
  background: var(--color-whatsapp-dark);
}

.btn-whatsapp:active {
  transform: scale(0.97);
}

.ws-disclaimer {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 8px;
  line-height: 1.3;
}

.empty-cart {
  text-align: center;
  padding: 40px 20px;
}

.empty-icon {
  font-size: 48px;
  display: block;
  margin-bottom: 10px;
}

.empty-cart h3 {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 6px;
}

.empty-cart p {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
}


/* Toast Notification */
.toast-message {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  background: #1e293b;
  color: #ffffff;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  z-index: 2000;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}

.toast-message.show {
  transform: translateX(-50%) translateY(0);
}


/* ==========================================================================
   RESPONSIVE DESIGN: ESCRITORIO VS MÓVIL
   REGLA ESTRICTA:
   "debe funcionar solamente en version movil, la version de escritorio
    debe tener un codigo QR para escanear y dirigir al menu,
    no debes crear un demo ni simulador en la version desktop solo version movile"
   ========================================================================== */
@media (min-width: 769px) {
  #mobile-app {
    display: none !important;
  }
  #desktop-view {
    display: flex !important;
  }
}

@media (max-width: 768px) {
  #desktop-view {
    display: none !important;
  }
  #mobile-app {
    display: block !important;
  }
}
