/* ==========================================================================
   QUETZAL COCINA MX - ESTILOS WEBAPP Y DESKTOP QR
   Paleta: Verde Teal (#0E4F59), Marfil Cálido (#FAF7F0), Dorado Miel (#C99738), 
           Terracota (#C85238), Blanco Puro (#FFFFFF)
   ========================================================================== */

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

:root {
  --color-primary: #0E4F59;
  --color-primary-dark: #09373E;
  --color-primary-light: #166470;
  --color-primary-subtle: #E8F2F3;
  
  --color-gold: #C99738;
  --color-gold-light: #F7EEDB;
  --color-terracotta: #C85238;
  --color-terracotta-light: #FCECE8;
  
  --color-bg: #FAF7F0;
  --color-surface: #FFFFFF;
  --color-surface-subtle: #F5EFE6;
  --color-border: #E8DFD1;
  --color-border-subtle: #F0EAE1;
  
  --color-text-main: #1A2729;
  --color-text-muted: #667678;
  --color-text-light: #8E9E9F;
  
  --color-whatsapp: #25D366;
  --color-whatsapp-dark: #1EBE5D;
  
  --font-serif: 'Cinzel', 'Playfair Display', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  
  --shadow-sm: 0 2px 6px rgba(14, 79, 89, 0.04);
  --shadow-md: 0 6px 18px rgba(14, 79, 89, 0.08);
  --shadow-lg: 0 12px 32px rgba(14, 79, 89, 0.12);
  --shadow-nav: 0 10px 30px rgba(14, 79, 89, 0.15);
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-pill: 9999px;
  
  --safe-bottom: env(safe-area-inset-bottom, 16px);
  --safe-top: env(safe-area-inset-top, 0px);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
}

body {
  width: 100%;
  min-height: 100vh;
  background-color: var(--color-bg);
  color: var(--color-text-main);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* ==========================================================================
   VISTA DE ESCRITORIO (SOLO QR - NO SIMULACIÓN)
   ========================================================================== */
#desktop-screen {
  display: flex;
  min-height: 100vh;
  width: 100%;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 20%, #F5EFE6 0%, #FAF7F0 100%);
  padding: 40px 20px;
  position: relative;
  overflow: hidden;
}

.desktop-bg-pattern {
  position: absolute;
  inset: 0;
  background-image: 
    radial-gradient(#0E4F59 0.75px, transparent 0.75px),
    radial-gradient(#C99738 0.75px, #FAF7F0 0.75px);
  background-size: 30px 30px;
  background-position: 0 0, 15px 15px;
  opacity: 0.15;
  pointer-events: none;
}

.desktop-card {
  position: relative;
  max-width: 540px;
  width: 100%;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 44px 36px;
  text-align: center;
  box-shadow: var(--shadow-lg);
  z-index: 10;
}

.desktop-logo-wrap {
  width: 110px;
  height: 110px;
  margin: 0 auto 20px auto;
  border-radius: 50%;
  padding: 4px;
  background: linear-gradient(135deg, var(--color-gold) 0%, var(--color-primary) 100%);
  box-shadow: 0 8px 24px rgba(14, 79, 89, 0.2);
}

.desktop-logo-wrap img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.desktop-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--color-primary-subtle);
  color: var(--color-primary);
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.desktop-title {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--color-primary);
  margin-bottom: 6px;
}

.desktop-slogan {
  font-size: 14px;
  color: var(--color-gold);
  font-style: italic;
  font-weight: 600;
  margin-bottom: 24px;
}

.desktop-qr-container {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  background: #FFFFFF;
  border: 2px dashed var(--color-gold);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin: 0 auto 20px auto;
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.02);
}

#desktop-qr-box {
  width: 220px;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #FFFFFF;
}

#desktop-qr-box canvas,
#desktop-qr-box img {
  display: block !important;
  width: 220px !important;
  height: 220px !important;
  border-radius: 4px;
}

.desktop-qr-hint {
  margin-top: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.desktop-desc {
  font-size: 14px;
  color: var(--color-text-muted);
  line-height: 1.6;
  max-width: 420px;
  margin: 0 auto 24px auto;
}

.desktop-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

.btn-copy-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--color-primary);
  color: #FFFFFF;
  font-weight: 600;
  font-size: 14px;
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(14, 79, 89, 0.25);
}

.btn-copy-link:hover {
  background: var(--color-primary-dark);
  transform: translateY(-1px);
}

.btn-preview-toggle {
  background: none;
  border: none;
  color: var(--color-text-light);
  font-size: 12px;
  text-decoration: underline;
  cursor: pointer;
  padding: 4px;
  transition: color 0.2s;
}

.btn-preview-toggle:hover {
  color: var(--color-primary);
}

.desktop-footer-info {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--color-border-subtle);
  font-size: 12px;
  color: var(--color-text-light);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.desktop-footer-info a {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 600;
}

/* ==========================================================================
   VISTA MÓVIL (WEBAPP SMARTPHONE)
   ========================================================================== */
#mobile-screen {
  display: none;
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  min-height: 100vh;
  background-color: var(--color-bg);
  position: relative;
  padding-bottom: 110px; /* Espacio para barra redondeada */
}

/* Header Móvil */
.mobile-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(250, 247, 240, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border-subtle);
  padding: 12px 16px;
  padding-top: max(12px, var(--safe-top));
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-combo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-thumb {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--color-gold);
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

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

.brand-titles {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--color-primary);
  line-height: 1.2;
}

.brand-meta {
  font-size: 11px;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10B981;
  display: inline-block;
}

.header-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  font-size: 18px;
  cursor: pointer;
  position: relative;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease;
}

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

.badge-count {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--color-terracotta);
  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;
}

/* Slogan Bar */
.brand-slogan-bar {
  background: var(--color-surface-subtle);
  border-bottom: 1px solid var(--color-border-subtle);
  padding: 8px 16px;
  font-size: 12px;
  color: var(--color-primary);
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
  font-style: italic;
}

/* ==========================================================================
   BANNER HERO DE PLATOS (CAROUSEL AL INICIO)
   ========================================================================== */
.hero-banner-section {
  padding: 16px 16px 8px 16px;
  position: relative;
}

.banner-carousel-container {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  background: linear-gradient(135deg, #09373E 0%, #0E4F59 100%);
  color: #FFFFFF;
}

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

.banner-slide {
  min-width: 100%;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  box-sizing: border-box;
}

.slide-decor-pattern {
  position: absolute;
  right: -20px;
  bottom: -20px;
  font-size: 110px;
  opacity: 0.18;
  user-select: none;
  pointer-events: none;
}

.slide-header {
  margin-bottom: 12px;
  position: relative;
  z-index: 2;
}

.slide-tag {
  display: inline-block;
  background: rgba(201, 151, 56, 0.25);
  border: 1px solid var(--color-gold);
  color: #FCEFD2;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  margin-bottom: 6px;
}

.slide-title {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #FFFFFF;
  line-height: 1.2;
}

.slide-desc {
  font-size: 12px;
  color: #D3E7E9;
  line-height: 1.4;
  margin-bottom: 18px;
  max-width: 270px;
  position: relative;
  z-index: 2;
}

.slide-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 2;
}

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

.slide-price-label {
  font-size: 10px;
  text-transform: uppercase;
  color: var(--color-gold);
  letter-spacing: 0.5px;
  font-weight: 700;
}

.slide-price {
  font-size: 20px;
  font-weight: 800;
  color: #FFFFFF;
}

.btn-slide-order {
  background: var(--color-gold);
  color: #0E4F59;
  border: none;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
  transition: transform 0.15s;
}

.btn-slide-order:active {
  transform: scale(0.95);
}

.banner-dots {
  position: absolute;
  bottom: 8px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 6px;
  z-index: 10;
}

.banner-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  transition: all 0.25s ease;
  cursor: pointer;
}

.banner-dot.active {
  width: 18px;
  border-radius: 4px;
  background: var(--color-gold);
}

/* ==========================================================================
   BARRA DE CATEGORÍAS CON ICONOS (STICKY ICON NAVIGATION)
   ========================================================================== */
.categories-nav-wrapper {
  position: sticky;
  top: 69px;
  z-index: 30;
  background: rgba(250, 247, 240, 0.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 10px 0;
  border-bottom: 1px solid var(--color-border-subtle);
}

.categories-track {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 2px 16px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

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

.cat-item-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 68px;
  padding: 8px 10px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-sm);
  color: var(--color-text-main);
  user-select: none;
}

.cat-item-btn * {
  pointer-events: none;
}

.cat-item-btn .cat-icon {
  font-size: 20px;
  line-height: 1;
}

.cat-item-btn .cat-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: -0.2px;
}

.cat-item-btn.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(14, 79, 89, 0.28);
  transform: translateY(-2px);
}

/* ==========================================================================
   LISTADO Y SECCIONES DEL MENÚ
   ========================================================================== */
.menu-content {
  padding: 16px;
}

.category-section {
  margin-bottom: 32px;
  scroll-margin-top: 135px;
}

.category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1.5px solid var(--color-border);
}

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

.category-icon-large {
  font-size: 22px;
}

.category-heading {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--color-primary);
}

.category-item-count {
  font-size: 11px;
  color: var(--color-text-light);
  font-weight: 600;
  background: var(--color-surface-subtle);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}

/* Tarjeta de Plato Minimalista Premium */
.dishes-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.dish-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  cursor: pointer;
}

.dish-card:active {
  transform: scale(0.985);
}

.dish-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 6px;
}

.dish-title-group {
  flex: 1;
}

.dish-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 4px;
}

.dish-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: var(--color-gold-light);
  color: #8C6514;
}

.dish-badge.badge-red {
  background: var(--color-terracotta-light);
  color: var(--color-terracotta);
}

.dish-badge.badge-teal {
  background: var(--color-primary-subtle);
  color: var(--color-primary);
}

.dish-name {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1.3;
}

.btn-favorite {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  flex-shrink: 0;
}

.btn-favorite.active {
  color: var(--color-terracotta);
  background: var(--color-terracotta-light);
  border-color: #F8C3B8;
  transform: scale(1.1);
}

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

.dish-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px dashed var(--color-border-subtle);
}

.dish-price {
  font-size: 17px;
  font-weight: 800;
  color: var(--color-primary);
  letter-spacing: -0.3px;
}

.btn-add-cart {
  background: var(--color-primary);
  color: #FFFFFF;
  border: none;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 3px 8px rgba(14, 79, 89, 0.2);
}

.btn-add-cart:active {
  background: var(--color-primary-dark);
  transform: scale(0.95);
}

/* Stepper cuando ya está en el carrito */
.cart-stepper {
  display: flex;
  align-items: center;
  background: var(--color-primary-subtle);
  border: 1px solid var(--color-primary);
  border-radius: var(--radius-pill);
  padding: 2px;
  gap: 8px;
}

.stepper-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #FFFFFF;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.stepper-qty {
  font-weight: 800;
  font-size: 13px;
  color: var(--color-primary);
  min-width: 16px;
  text-align: center;
}

/* ==========================================================================
   BARRA DE MENÚ INFERIOR REDONDEADA (FLOATING APP NAV)
   ========================================================================== */
.floating-bottom-nav {
  position: fixed;
  bottom: max(16px, var(--safe-bottom));
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 440px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl); /* BORDES REDONDEADOS */
  box-shadow: var(--shadow-nav);
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 50;
}

.nav-tab-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: none;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  padding: 6px 12px;
  border-radius: var(--radius-md);
  position: relative;
  transition: all 0.2s ease;
  user-select: none;
}

.nav-tab-btn .nav-icon {
  font-size: 20px;
  line-height: 1;
}

.nav-tab-btn .nav-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: -0.2px;
}

.nav-tab-btn.active {
  color: var(--color-primary);
}

.nav-tab-btn.active .nav-icon {
  transform: translateY(-2px);
}

.nav-cart-pill {
  position: absolute;
  top: 2px;
  right: 6px;
  background: var(--color-terracotta);
  color: #FFFFFF;
  font-size: 9px;
  font-weight: 800;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  border: 1.5px solid #FFFFFF;
}

/* ==========================================================================
   DRAWER / MODAL DE CARRITO Y PEDIDOS (DOS MODALIDADES)
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(14, 79, 89, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 100;
  display: none;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.modal-overlay.open {
  display: flex;
  opacity: 1;
}

.bottom-sheet {
  background: var(--color-surface);
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  border-radius: 28px 28px 0 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 -10px 40px rgba(0,0,0,0.2);
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.sheet-handle-bar {
  width: 44px;
  height: 5px;
  background: var(--color-border);
  border-radius: 3px;
  margin: 12px auto 6px auto;
}

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

.sheet-title {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 700;
  color: var(--color-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.sheet-close-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: var(--color-surface-subtle);
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
}

.sheet-scroll-body {
  padding: 18px 20px;
  overflow-y: auto;
  flex: 1;
}

/* Selector de Modalidades */
.modality-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  background: var(--color-surface-subtle);
  padding: 4px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  border: 1px solid var(--color-border-subtle);
}

.modality-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  font-size: 13px;
  font-weight: 700;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.modality-btn.active {
  background: var(--color-primary);
  color: #FFFFFF;
  box-shadow: 0 3px 8px rgba(14, 79, 89, 0.2);
}

/* Formularios de Modalidad */
.modality-form-section {
  background: #FAF8F4;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.table-pills-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.table-pill-btn {
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-main);
  cursor: pointer;
}

.table-pill-btn.active {
  background: var(--color-primary);
  color: #FFFFFF;
  border-color: var(--color-primary);
}

.app-input, .app-textarea, .app-select {
  width: 100%;
  padding: 10px 14px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--color-text-main);
  outline: none;
  transition: border-color 0.15s ease;
  margin-bottom: 12px;
}

.app-input:focus, .app-textarea:focus, .app-select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px var(--color-primary-subtle);
}

.app-textarea {
  min-height: 64px;
  resize: vertical;
}

/* Lista de Items en Carrito */
.cart-items-title {
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
}

.cart-items-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

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

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

.cart-item-name {
  font-weight: 700;
  font-size: 13px;
  color: var(--color-primary);
}

.cart-item-price {
  font-size: 12px;
  color: var(--color-text-muted);
}

/* Footer de Carrito */
.sheet-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--color-border-subtle);
  background: var(--color-surface);
}

.order-totals-breakdown {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.total-line {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--color-text-muted);
}

.total-line.final {
  font-size: 18px;
  font-weight: 800;
  color: var(--color-primary);
  padding-top: 8px;
  border-top: 1px dashed var(--color-border);
}

.btn-confirm-ws {
  width: 100%;
  background: var(--color-whatsapp);
  color: #FFFFFF;
  border: none;
  font-size: 15px;
  font-weight: 800;
  padding: 14px 20px;
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.35);
  transition: all 0.15s ease;
}

.btn-confirm-ws:active {
  background: var(--color-whatsapp-dark);
  transform: scale(0.98);
}

/* ==========================================================================
   MODAL DE DETALLE DE PLATO
   ========================================================================== */
.dish-detail-sheet {
  background: var(--color-surface);
  border-radius: 28px 28px 0 0;
  padding: 24px 20px;
  max-width: 500px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
}

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

.detail-title {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 700;
  color: var(--color-primary);
}

.detail-desc {
  font-size: 14px;
  color: var(--color-text-muted);
  line-height: 1.5;
  margin-bottom: 20px;
}

.detail-price-big {
  font-size: 22px;
  font-weight: 800;
  color: var(--color-primary);
  margin-bottom: 18px;
}

/* ==========================================================================
   VISTA DE BUSCADOR Y FAVORITOS
   ========================================================================== */
.view-overlay-page {
  position: fixed;
  inset: 0;
  background: var(--color-bg);
  z-index: 60;
  display: none;
  flex-direction: column;
  max-width: 500px;
  margin: 0 auto;
  padding-bottom: 110px;
  overflow-y: auto;
}

.view-overlay-page.open {
  display: flex;
}

.overlay-header {
  position: sticky;
  top: 0;
  background: rgba(250, 247, 240, 0.96);
  backdrop-filter: blur(10px);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--color-border);
  z-index: 10;
}

.search-input-wrap {
  flex: 1;
  position: relative;
}

.search-field {
  width: 100%;
  padding: 10px 14px 10px 36px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  font-size: 14px;
  color: var(--color-text-main);
  outline: none;
}

.search-icon-inside {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-light);
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--color-text-muted);
}

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

/* Toast de notificación */
.toast-notice {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-50px);
  background: var(--color-primary-dark);
  color: #FFFFFF;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  z-index: 200;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  gap: 8px;
}

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

/* ==========================================================================
   RESPONSIVIDAD Y REGLAS DE DISPOSITIVO (SOLO SMARTPHONE PARA LA APP)
   ========================================================================== */

/* En pantallas grandes (Desktop): Mostramos por defecto la pantalla con QR */
@media (min-width: 769px) {
  body:not(.force-mobile-preview) #desktop-screen {
    display: flex;
  }
  body:not(.force-mobile-preview) #mobile-screen {
    display: none !important;
  }
  
  /* Si el usuario activa "Vista previa en escritorio" para probar en su PC */
  body.force-mobile-preview #desktop-screen {
    display: none !important;
  }
  body.force-mobile-preview #mobile-screen {
    display: block;
    box-shadow: 0 0 50px rgba(14, 79, 89, 0.15);
  }
}

/* En smartphones / pantallas móviles (<= 768px): Mostramos la WebApp directamente */
@media (max-width: 768px) {
  #desktop-screen {
    display: none !important;
  }
  #mobile-screen {
    display: block !important;
  }
}
