:root {
  /* Paleta Suave, Cálida y Minimalista Premium (Tonos Crema Parmesano, Marfil y Piedra Suave) */
  --bg-cream: #FAF7F2;
  --bg-ivory: #F3EFE6;
  --bg-card: #FFFFFF;
  --bg-card-subtle: #FCFBF9;
  --bg-elevated: #FFFFFF;
  --bg-sheet: #FAF7F2;
  --border-subtle: rgba(28, 25, 23, 0.08);
  --border-highlight: rgba(28, 25, 23, 0.15);

  /* Parmesano Official Tricolor Palette (Tonos Suavizados y Elegantes) */
  --it-green: #15803D;
  --it-green-bright: #16A34A;
  --it-green-soft: #E8F5EE;
  --it-white: #FFFFFF;
  --it-red: #C8232C;
  --it-red-bright: #DC2626;
  --it-red-soft: #FDECEC;
  --accent-warm: #D97706;

  /* Textos en Tonos Espresso / Carbón Suave para Lectura Cómoda */
  --text-primary: #1C1917;
  --text-secondary: #57534E;
  --text-muted: #8A847C;

  /* Fonts matching original menu */
  --font-script: 'Great Vibes', cursive;
  --font-menu: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Safe areas & sizing */
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --nav-height: 70px;
}

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

html, body {
  width: 100%;
  min-height: 100%;
  background-color: var(--bg-cream);
  color: var(--text-primary);
  font-family: var(--font-menu);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}

/* Fondo Suave con Matices Cálidos de Crema, Salvia Suave y Terracota Pálido */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(circle at 92% 12%, rgba(200, 35, 44, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 8% 35%, rgba(21, 128, 61, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 85% 85%, rgba(217, 119, 6, 0.05) 0%, transparent 50%),
    linear-gradient(180deg, #FAF7F2 0%, #F3EFE6 100%);
  pointer-events: none;
}

/* Sutil marca de agua en el fondo */
body::after {
  content: "";
  position: fixed;
  top: 50%;
  left: 50%;
  width: 280px;
  height: 280px;
  transform: translate(-50%, -50%);
  background-image: url('/logo.jpg');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  border-radius: 50%;
  opacity: 0.025;
  filter: grayscale(100%);
  z-index: -1;
  pointer-events: none;
}

/* Barra Tricolor Italiana */
.tricolor-bar {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  height: 4px;
  width: 100%;
}
.tricolor-bar span:nth-child(1) { background: var(--it-green); }
.tricolor-bar span:nth-child(2) { background: #F5F2EB; }
.tricolor-bar span:nth-child(3) { background: var(--it-red); }

/* =========================================================
   DESKTOP BLOCKER (Strictly Smartphone-Only Enforcement)
   ========================================================= */
#desktop-blocker {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99999;
  background:
    radial-gradient(circle at 85% 20%, rgba(200, 35, 44, 0.08), transparent 45%),
    radial-gradient(circle at 15% 80%, rgba(21, 128, 61, 0.08), transparent 45%),
    linear-gradient(180deg, #FAF7F2 0%, #EFEAE0 100%);
  align-items: center;
  justify-content: center;
  padding: 32px;
  text-align: center;
}

@media (min-width: 769px) {
  #desktop-blocker {
    display: flex !important;
  }
  #mobile-app {
    display: none !important;
  }
}

body.is-desktop-blocked #desktop-blocker {
  display: flex !important;
}
body.is-desktop-blocked #mobile-app {
  display: none !important;
}

.desktop-card {
  max-width: 460px;
  width: 100%;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(28, 25, 23, 0.09);
  border-radius: 28px;
  padding: 36px 32px 30px;
  box-shadow: 0 24px 60px rgba(28, 25, 23, 0.10);
  position: relative;
  overflow: hidden;
}

.desktop-card .tricolor-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
}

.desktop-logo-wrap {
  width: 92px;
  height: 92px;
  margin: 0 auto 14px;
  border-radius: 50%;
  padding: 3px;
  background: linear-gradient(90deg, var(--it-green) 0%, #ffffff 50%, var(--it-red) 100%);
  box-shadow: 0 10px 25px rgba(28, 25, 23, 0.14);
}

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

.desktop-script-title {
  font-family: var(--font-script);
  font-size: 3.2rem;
  font-weight: 400;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 10px;
  letter-spacing: 0.5px;
}

.desktop-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 15px;
  border-radius: 999px;
  background: var(--it-red-soft);
  border: 1px solid rgba(200, 35, 44, 0.22);
  color: var(--it-red);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.desktop-desc {
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--text-secondary);
  margin-bottom: 22px;
  font-weight: 500;
}

.qr-frame {
  width: 204px;
  height: 204px;
  margin: 0 auto 18px;
  padding: 14px;
  background: #FFFFFF;
  border: 1px solid rgba(28, 25, 23, 0.09);
  border-radius: 22px;
  box-shadow: 0 12px 30px rgba(28, 25, 23, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr-frame canvas,
.qr-frame img,
.qr-frame svg {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 8px;
}

.desktop-steps {
  display: flex;
  justify-content: center;
  gap: 14px;
  font-size: 0.78rem;
  color: var(--text-secondary);
  font-weight: 700;
  margin-bottom: 18px;
}

.desktop-meta {
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.76rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* =========================================================
   MOBILE WEBAPP SHELL
   ========================================================= */
#mobile-app {
  min-height: 100dvh;
  padding-bottom: calc(var(--nav-height) + var(--safe-bottom) + 96px);
  position: relative;
}

/* Top Sticky Header en Tono Marfil Cálido Translúcido */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 247, 242, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  padding-top: var(--safe-top);
  box-shadow: 0 4px 20px rgba(28, 25, 23, 0.04);
}

.header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 16px 9px;
  gap: 10px;
}

.brand-cluster {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.brand-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  padding: 2px;
  background: linear-gradient(135deg, var(--it-green) 0%, #ffffff 50%, var(--it-red) 100%);
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(28, 25, 23, 0.14);
}

.brand-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.brand-titles {
  min-width: 0;
}

.brand-script {
  font-family: var(--font-script);
  font-size: 2.1rem;
  line-height: 0.95;
  color: var(--text-primary);
  font-weight: 400;
  letter-spacing: 0.3px;
}

.brand-sub {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-top: 2px;
  white-space: nowrap;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--it-green-bright);
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.18);
}

/* Order Mode Segmented Switcher in Header */
.mode-pill-switch {
  display: inline-flex;
  background: #EAE4D8;
  border: 1px solid rgba(28, 25, 23, 0.08);
  border-radius: 999px;
  padding: 3px;
  flex-shrink: 0;
}

.mode-pill-btn {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-menu);
  font-size: 0.68rem;
  font-weight: 800;
  padding: 6px 10px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: all 0.22s ease;
}

.mode-pill-btn svg {
  width: 13px;
  height: 13px;
}

.mode-pill-btn.active[data-mode="mesa"] {
  background: var(--it-green);
  color: #FFFFFF;
  box-shadow: 0 3px 10px rgba(21, 128, 61, 0.28);
}

.mode-pill-btn.active[data-mode="domicilio"] {
  background: var(--it-red);
  color: #FFFFFF;
  box-shadow: 0 3px 10px rgba(200, 35, 44, 0.28);
}

/* Info Banner Strip */
.info-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 16px 7px;
  font-size: 0.69rem;
  color: var(--text-secondary);
  border-top: 1px solid rgba(28, 25, 23, 0.05);
  background: rgba(243, 239, 230, 0.65);
  gap: 8px;
}

.info-strip-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 600;
  min-width: 0;
}

.info-strip-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.info-strip-item svg {
  width: 13px;
  height: 13px;
  color: var(--it-red);
  flex-shrink: 0;
}

/* Search Bar Collapsible / Inline */
.search-bar-wrap {
  padding: 6px 16px 10px;
  display: none;
}

.search-bar-wrap.open {
  display: block;
}

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

.search-input-box svg.search-icon {
  position: absolute;
  left: 13px;
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  pointer-events: none;
}

.search-input {
  width: 100%;
  background: #FFFFFF;
  border: 1px solid rgba(28, 25, 23, 0.14);
  border-radius: 14px;
  padding: 11px 38px 11px 38px;
  color: var(--text-primary);
  font-family: var(--font-menu);
  font-size: 0.85rem;
  font-weight: 600;
  outline: none;
  box-shadow: inset 0 1px 3px rgba(28, 25, 23, 0.04);
  transition: border-color 0.2s;
}

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

.search-input:focus {
  border-color: var(--it-green);
}

.search-clear-btn {
  position: absolute;
  right: 10px;
  background: #EAE4D8;
  border: none;
  color: var(--text-primary);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 0.75rem;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* =========================================================
   ICON CATEGORY BAR (Horizontal App-Style Icon Scroller)
   ========================================================= */
.category-rail-wrap {
  padding: 10px 0 11px;
  background: rgba(250, 247, 242, 0.96);
  border-top: 1px solid rgba(28, 25, 23, 0.06);
}

.category-rail {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 0 16px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

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

.cat-icon-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-menu);
  cursor: pointer;
  flex-shrink: 0;
  width: 68px;
  transition: transform 0.18s ease, color 0.18s ease;
}

.cat-icon-btn:active {
  transform: scale(0.93);
}

.cat-icon-circle {
  width: 50px;
  height: 50px;
  border-radius: 16px;
  background: #FFFFFF;
  border: 1px solid rgba(28, 25, 23, 0.09);
  box-shadow: 0 4px 10px rgba(28, 25, 23, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.22s cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
  color: var(--text-primary);
}

.cat-icon-circle svg {
  width: 23px;
  height: 23px;
  stroke-width: 1.9;
}

.cat-icon-label {
  font-size: 0.66rem;
  font-weight: 700;
  text-align: center;
  line-height: 1.15;
  max-width: 68px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: -0.01em;
}

.cat-icon-btn.active {
  color: var(--it-red);
}

.cat-icon-btn.active .cat-icon-circle {
  background: linear-gradient(145deg, var(--it-red), #a81921);
  border-color: var(--it-red);
  color: #FFFFFF;
  box-shadow: 0 6px 16px rgba(200, 35, 44, 0.32);
  transform: translateY(-2px);
}

.cat-icon-btn.active .cat-icon-label {
  color: var(--it-red);
  font-weight: 800;
}

/* =========================================================
   ACTIVE ORDER MODE CARD BANNER
   ========================================================= */
.mode-context-banner {
  margin: 14px 16px 8px;
  padding: 12px 14px;
  border-radius: 18px;
  background: #FFFFFF;
  border: 1px solid var(--border-subtle);
  box-shadow: 0 6px 20px rgba(28, 25, 23, 0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

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

.mode-badge-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mode-badge-icon.mesa {
  background: var(--it-green-soft);
  color: var(--it-green);
  border: 1px solid rgba(21, 128, 61, 0.2);
}

.mode-badge-icon.domicilio {
  background: var(--it-red-soft);
  color: var(--it-red);
  border: 1px solid rgba(200, 35, 44, 0.2);
}

.mode-context-text h4 {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--text-primary);
}

.mode-context-text p {
  font-size: 0.68rem;
  color: var(--text-secondary);
  font-weight: 600;
  margin-top: 1px;
}

.mode-change-link {
  background: var(--bg-ivory);
  border: 1px solid rgba(28, 25, 23, 0.1);
  color: var(--text-primary);
  font-family: var(--font-menu);
  font-size: 0.68rem;
  font-weight: 800;
  padding: 7px 12px;
  border-radius: 10px;
  white-space: nowrap;
  cursor: pointer;
}

/* =========================================================
   BANNERS VISUALES ENTRE CADA CATEGORÍA
   ========================================================= */
.category-divider-banner {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  min-height: 132px;
  display: flex;
  align-items: flex-end;
  padding: 16px 16px 14px;
  margin-bottom: 10px;
  box-shadow: 0 10px 26px rgba(28, 25, 23, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.6);
  background-size: cover;
  background-position: center;
  isolation: isolate;
}

.category-divider-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(24, 20, 18, 0.84) 0%,
    rgba(24, 20, 18, 0.56) 55%,
    rgba(24, 20, 18, 0.22) 100%
  );
  z-index: 1;
}

.category-divider-banner::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--it-green) 0%, #FFFFFF 50%, var(--it-red) 100%);
  z-index: 3;
}

.cat-banner-content {
  position: relative;
  z-index: 2;
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.cat-banner-text {
  color: #FFFFFF;
  max-width: 80%;
}

.cat-banner-kicker {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #FFFFFF;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 6px;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.cat-banner-title {
  font-family: var(--font-menu);
  font-size: 1.25rem;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: #FFFFFF;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

.cat-banner-tagline {
  font-size: 0.73rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  margin-top: 3px;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
}

.cat-banner-emblem {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--it-red);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

.cat-banner-emblem svg {
  width: 24px;
  height: 24px;
  stroke-width: 2.1;
}

/* =========================================================
   MENU SECTIONS & CARDS (Soft Minimalist App Style)
   ========================================================= */
.menu-container {
  padding: 6px 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.category-block-wrap {
  scroll-margin-top: 175px;
}

.menu-category-section {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 22px;
  padding: 16px 14px;
  box-shadow: 0 8px 26px rgba(28, 25, 23, 0.05);
}

.cat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(28, 25, 23, 0.07);
}

.cat-title-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-ivory);
  padding: 6px 13px 6px 10px;
  border-radius: 12px;
  border-left: 3.5px solid var(--it-red);
}

.cat-title-pill svg {
  width: 19px;
  height: 19px;
  color: var(--it-red);
  flex-shrink: 0;
}

.cat-title-pill h2 {
  font-family: var(--font-menu);
  font-size: 1.02rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.cat-count-badge {
  font-size: 0.66rem;
  font-weight: 700;
  color: var(--text-secondary);
  background: var(--bg-ivory);
  padding: 4px 9px;
  border-radius: 999px;
  flex-shrink: 0;
}

/* Promo Banner inside Category (like "Agrega 1 litro de refresco por $2" in Pizzas) */
.cat-subtitle-banner {
  margin-bottom: 12px;
  padding: 9px 12px;
  border-radius: 12px;
  font-size: 0.74rem;
  font-weight: 700;
  background: var(--bg-ivory);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 7px;
}

.cat-subtitle-banner.highlight-white {
  background: linear-gradient(135deg, var(--it-green-soft), #dcfce7);
  color: var(--it-green);
  border: 1px solid rgba(21, 128, 61, 0.25);
  font-weight: 800;
}

.cat-subtitle-banner svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

/* Dish List Items */
.dish-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dish-card {
  background: var(--bg-card-subtle);
  border: 1px solid rgba(28, 25, 23, 0.07);
  border-radius: 16px;
  padding: 12px 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: all 0.18s ease;
  cursor: pointer;
  position: relative;
}

.dish-card:active {
  transform: scale(0.985);
  background: var(--bg-ivory);
}

.dish-card.in-cart {
  border-color: rgba(21, 128, 61, 0.45);
  background: linear-gradient(90deg, rgba(21, 128, 61, 0.08) 0%, #FFFFFF 100%);
}

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

.dish-title-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  width: 100%;
}

.dish-name {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.25;
}

/* Classic Menu Dotted Line Leader */
.dish-dots {
  flex: 1;
  border-bottom: 1.5px dotted rgba(28, 25, 23, 0.22);
  margin: 0 4px;
  min-width: 12px;
  position: relative;
  top: -3px;
}

.dish-price {
  font-size: 0.92rem;
  font-weight: 900;
  color: var(--it-red);
  white-space: nowrap;
  letter-spacing: -0.02em;
}

.dish-desc {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-secondary);
  line-height: 1.38;
  margin-top: 4px;
}

.dish-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}

.dish-tag {
  font-size: 0.62rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--bg-ivory);
  color: var(--text-secondary);
}

.dish-tag.customizable {
  background: var(--it-green-soft);
  color: var(--it-green);
  border: 1px solid rgba(21, 128, 61, 0.22);
}

/* Add / Quantity Button on Dish Card */
.dish-action {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.btn-add-dish {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  border: 1px solid rgba(28, 25, 23, 0.12);
  background: #FFFFFF;
  color: var(--text-primary);
  box-shadow: 0 2px 6px rgba(28, 25, 23, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-add-dish svg {
  width: 18px;
  height: 18px;
}

.dish-card.in-cart .btn-add-dish {
  background: var(--it-green);
  border-color: var(--it-green);
  color: #FFFFFF;
  font-weight: 800;
  font-size: 0.82rem;
  box-shadow: 0 4px 12px rgba(21, 128, 61, 0.3);
}

/* =========================================================
   FLOATING CART BAR (Above Bottom App Nav)
   ========================================================= */
.floating-cart-wrap {
  position: fixed;
  left: 14px;
  right: 14px;
  bottom: calc(var(--nav-height) + var(--safe-bottom) + 12px);
  z-index: 120;
  transform: translateY(140%);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

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

.floating-cart-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--it-green) 0%, #0f632e 100%);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 18px;
  padding: 13px 16px;
  color: #FFFFFF;
  font-family: var(--font-menu);
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 12px 28px rgba(21, 128, 61, 0.32);
  cursor: pointer;
}

.fc-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.fc-count {
  background: #FFFFFF;
  color: var(--it-green);
  font-weight: 900;
  font-size: 0.8rem;
  min-width: 26px;
  height: 26px;
  padding: 0 7px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.fc-label {
  text-align: left;
}

.fc-label strong {
  display: block;
  font-size: 0.84rem;
  font-weight: 800;
}

.fc-label span {
  font-size: 0.68rem;
  opacity: 0.92;
  font-weight: 600;
}

.fc-right {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.98rem;
  font-weight: 900;
}

/* =========================================================
   APP BOTTOM NAVIGATION BAR (Soft Ivory & Tricolor Accent)
   ========================================================= */
.bottom-app-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 130;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(28, 25, 23, 0.09);
  box-shadow: 0 -6px 24px rgba(28, 25, 23, 0.06);
  padding-bottom: var(--safe-bottom);
}

.nav-items-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  height: var(--nav-height);
  align-items: center;
}

.nav-tab {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-menu);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 100%;
  cursor: pointer;
  position: relative;
  transition: color 0.2s ease;
}

.nav-tab svg {
  width: 21px;
  height: 21px;
  transition: transform 0.2s ease;
}

.nav-tab span {
  font-size: 0.62rem;
  font-weight: 700;
}

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

.nav-tab.active::before {
  content: "";
  position: absolute;
  top: 0;
  width: 28px;
  height: 3px;
  border-radius: 0 0 4px 4px;
  background: linear-gradient(90deg, var(--it-green), #D6D1C4, var(--it-red));
}

.nav-tab.active svg {
  transform: translateY(-1px);
  color: var(--it-red);
}

.nav-cart-badge {
  position: absolute;
  top: 8px;
  right: calc(50% - 20px);
  background: var(--it-red);
  color: #FFFFFF;
  font-size: 0.6rem;
  font-weight: 900;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  display: none;
  align-items: center;
  justify-content: center;
  border: 1.5px solid #FFFFFF;
}

.nav-cart-badge.show {
  display: inline-flex;
}

/* =========================================================
   BOTTOM SHEETS / MODALS (Soft Warm Light Style)
   ========================================================= */
.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(28, 25, 23, 0.45);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.sheet-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.bottom-sheet {
  width: 100%;
  max-width: 520px;
  max-height: 88dvh;
  background: var(--bg-sheet);
  border-top: 1px solid rgba(28, 25, 23, 0.1);
  border-radius: 26px 26px 0 0;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  overflow: hidden;
  padding-bottom: var(--safe-bottom);
  box-shadow: 0 -16px 40px rgba(28, 25, 23, 0.16);
}

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

.sheet-handle-bar {
  padding: 10px 0 4px;
  display: flex;
  justify-content: center;
}

.sheet-handle {
  width: 42px;
  height: 4px;
  border-radius: 999px;
  background: rgba(28, 25, 23, 0.18);
}

.sheet-header {
  padding: 10px 18px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  background: #FFFFFF;
}

.sheet-header h3 {
  font-size: 1.05rem;
  font-weight: 900;
  color: var(--text-primary);
}

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

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

.sheet-footer {
  padding: 12px 18px 16px;
  border-top: 1px solid var(--border-subtle);
  background: #FFFFFF;
}

/* Option Groups inside Dish Sheet */
.option-group {
  margin-bottom: 16px;
}

.option-group-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.option-req-badge {
  font-size: 0.64rem;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--it-red-soft);
  color: var(--it-red);
  font-weight: 700;
}

.option-chips {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.option-chip {
  background: #FFFFFF;
  border: 1px solid rgba(28, 25, 23, 0.12);
  border-radius: 12px;
  padding: 10px 12px;
  color: var(--text-secondary);
  font-family: var(--font-menu);
  font-size: 0.78rem;
  font-weight: 700;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  cursor: pointer;
  transition: all 0.18s ease;
}

.option-chip.selected {
  background: var(--it-green-soft);
  border-color: var(--it-green);
  color: var(--text-primary);
}

.option-chip .opt-price {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--it-green);
}

/* Quantity Stepper inside Dish Sheet */
.qty-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 14px 0 6px;
  padding: 10px 14px;
  border-radius: 14px;
  background: #FFFFFF;
  border: 1px solid var(--border-subtle);
}

.qty-controls {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.qty-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(28, 25, 23, 0.14);
  background: var(--bg-ivory);
  color: var(--text-primary);
  font-size: 1.1rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.qty-val {
  font-size: 1rem;
  font-weight: 900;
  min-width: 20px;
  text-align: center;
  color: var(--text-primary);
}

/* Category Icon Grid Drawer */
.cat-drawer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.cat-grid-card {
  background: #FFFFFF;
  border: 1px solid rgba(28, 25, 23, 0.08);
  border-radius: 16px;
  padding: 14px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  color: var(--text-primary);
  font-family: var(--font-menu);
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(28, 25, 23, 0.04);
  transition: all 0.18s ease;
}

.cat-grid-card:active,
.cat-grid-card.active {
  background: var(--it-red-soft);
  border-color: var(--it-red);
  color: var(--it-red);
}

.cat-grid-card svg {
  width: 26px;
  height: 26px;
}

.cat-grid-card strong {
  font-size: 0.73rem;
  font-weight: 800;
  text-align: center;
  line-height: 1.2;
}

.cat-grid-card span {
  font-size: 0.62rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* Checkout Cart Items & Form */
.cart-items-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
}

.cart-item-row {
  background: #FFFFFF;
  border: 1px solid rgba(28, 25, 23, 0.08);
  border-radius: 14px;
  padding: 11px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

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

.cart-item-info h4 {
  font-size: 0.84rem;
  font-weight: 800;
  color: var(--text-primary);
}

.cart-item-meta {
  font-size: 0.7rem;
  color: var(--text-secondary);
  margin-top: 2px;
  line-height: 1.3;
}

.cart-item-price {
  font-size: 0.82rem;
  font-weight: 900;
  color: var(--it-green);
  margin-top: 3px;
}

.cart-item-stepper {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-ivory);
  padding: 4px 6px;
  border-radius: 10px;
  border: 1px solid rgba(28, 25, 23, 0.08);
}

.cart-step-btn {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  border: none;
  background: #FFFFFF;
  color: var(--text-primary);
  font-weight: 800;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  cursor: pointer;
}

.checkout-mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
}

.checkout-mode-tab {
  padding: 11px 10px;
  border-radius: 14px;
  border: 1px solid rgba(28, 25, 23, 0.1);
  background: #FFFFFF;
  color: var(--text-secondary);
  font-family: var(--font-menu);
  font-size: 0.78rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.checkout-mode-tab.active[data-mode="mesa"] {
  background: var(--it-green-soft);
  border-color: var(--it-green);
  color: var(--it-green);
}

.checkout-mode-tab.active[data-mode="domicilio"] {
  background: var(--it-red-soft);
  border-color: var(--it-red);
  color: var(--it-red);
}

.form-field {
  margin-bottom: 12px;
}

.form-field label {
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  background: #FFFFFF;
  border: 1px solid rgba(28, 25, 23, 0.14);
  border-radius: 12px;
  padding: 11px 13px;
  color: var(--text-primary);
  font-family: var(--font-menu);
  font-size: 0.84rem;
  font-weight: 600;
  outline: none;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  border-color: var(--it-green);
}

.mesa-quick-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  margin-top: 7px;
}

.mesa-num-chip {
  padding: 8px 4px;
  border-radius: 10px;
  background: #FFFFFF;
  border: 1px solid rgba(28, 25, 23, 0.1);
  color: var(--text-secondary);
  font-family: var(--font-menu);
  font-size: 0.74rem;
  font-weight: 800;
  cursor: pointer;
}

.mesa-num-chip.selected {
  background: var(--it-green);
  border-color: var(--it-green);
  color: #FFFFFF;
}

.payment-chips {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 7px;
}

.pay-chip {
  padding: 9px 10px;
  border-radius: 11px;
  background: #FFFFFF;
  border: 1px solid rgba(28, 25, 23, 0.1);
  color: var(--text-secondary);
  font-family: var(--font-menu);
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
}

.pay-chip.selected {
  background: var(--it-red-soft);
  border-color: var(--it-red);
  color: var(--it-red);
}

.primary-ws-btn {
  width: 100%;
  border: none;
  border-radius: 16px;
  padding: 15px 18px;
  background: linear-gradient(135deg, #16a34a 0%, var(--it-green) 100%);
  color: #FFFFFF;
  font-family: var(--font-menu);
  font-size: 0.9rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 10px 24px rgba(21, 128, 61, 0.3);
  cursor: pointer;
}

.primary-ws-btn svg {
  width: 20px;
  height: 20px;
}

.primary-add-btn {
  width: 100%;
  border: none;
  border-radius: 16px;
  padding: 14px 18px;
  background: linear-gradient(135deg, var(--it-red) 0%, #a5161d 100%);
  color: #FFFFFF;
  font-family: var(--font-menu);
  font-size: 0.9rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 10px 22px rgba(200, 35, 44, 0.28);
  cursor: pointer;
}

/* Toast Notification */
.app-toast {
  position: fixed;
  top: calc(var(--safe-top) + 16px);
  left: 50%;
  transform: translate(-50%, -140%);
  z-index: 500;
  background: #FFFFFF;
  border: 1.5px solid var(--it-green);
  color: var(--text-primary);
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 10px 28px rgba(28, 25, 23, 0.16);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  white-space: nowrap;
}

.app-toast.show {
  transform: translate(-50%, 0);
}
