/* ========================================================
   CIELITO LINDO - ORIGINAL COMIDA MEXICANA
   Mobile WebApp Design System & Styles
   ======================================================== */

@font-face {
  font-family: 'Badhorse';
  src: url('fonts/Badhorse-Regular.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'CalpsSans';
  src: url('fonts/CalpsSans-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'CalpsSans';
  src: url('fonts/CalpsSans-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --primary: #E85025;
  --primary-dark: #C43D15;
  --primary-light: #FFEDE6;
  --cactus: #114232;
  --cactus-dark: #0A281E;
  --cactus-light: #EBF4F0;
  --gold: #F7B32B;
  --gold-light: #FFF8E7;
  --cream: #FAF6ED;
  --cream-card: #FFFFFF;
  --text-primary: #1A1E1C;
  --text-secondary: #5C6661;
  --text-muted: #8E9993;
  --border: rgba(17, 66, 50, 0.08);
  --border-focus: #E85025;
  --shadow-sm: 0 2px 8px rgba(17, 66, 50, 0.05);
  --shadow-md: 0 6px 20px rgba(17, 66, 50, 0.08);
  --shadow-lg: 0 12px 32px rgba(17, 66, 50, 0.14);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-full: 9999px;
  --font-display: 'Badhorse', 'CalpsSans', -apple-system, sans-serif;
  --font-heading: 'CalpsSans', -apple-system, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --safe-bottom: env(safe-area-inset-bottom, 16px);
  --safe-top: env(safe-area-inset-top, 16px);
}

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

html, body {
  width: 100%;
  height: 100%;
  background-color: #121614;
  font-family: var(--font-body);
  color: var(--text-primary);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ========================================================
   DESKTOP BLOCKER / SMARTPHONE ONLY GATE
   ======================================================== */
#desktop-gate {
  display: none;
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at top, #23342B 0%, #0F1713 100%);
  z-index: 99999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px;
  text-align: center;
  color: #FFFDF9;
}

.gate-card {
  max-width: 520px;
  width: 100%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 28px;
  padding: 36px 28px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.gate-logo {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  border: 3px solid var(--primary);
  box-shadow: 0 8px 24px rgba(232, 80, 37, 0.4);
  margin-bottom: 16px;
  object-fit: cover;
}

.gate-brand {
  font-family: var(--font-display);
  font-size: 32px;
  color: var(--gold);
  letter-spacing: 0.5px;
  margin-bottom: 4px;
  line-height: 1.1;
}

.gate-tagline {
  font-family: var(--font-heading);
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 3px;
  color: #D3DDD8;
  margin-bottom: 20px;
}

.gate-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(232, 80, 37, 0.2);
  border: 1px solid rgba(232, 80, 37, 0.4);
  color: #FFA585;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  margin-bottom: 14px;
}

.gate-badge svg {
  width: 16px;
  height: 16px;
}

.gate-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
  color: #FFFFFF;
}

.gate-desc {
  font-size: 13px;
  line-height: 1.45;
  color: #AAB7B0;
  margin-bottom: 20px;
  max-width: 440px;
}

.gate-qr-box {
  background: #FFFFFF;
  padding: 14px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  min-width: 190px;
  min-height: 190px;
}

.gate-qr-box canvas {
  display: block;
  width: 170px !important;
  height: 170px !important;
}

.gate-qr-tip {
  font-size: 13px;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 18px;
}

.gate-sim-btn-primary {
  background: var(--primary);
  color: #FFFFFF;
  border: none;
  padding: 14px 24px;
  border-radius: var(--radius-full);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 6px 20px rgba(232, 80, 37, 0.4);
  transition: all 0.2s ease;
  margin-bottom: 18px;
}

.gate-sim-btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(232, 80, 37, 0.5);
}

.gate-url-config {
  width: 100%;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-top: 6px;
  text-align: left;
}

.gate-url-label {
  font-size: 11px;
  font-weight: 600;
  color: #C0CCC6;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.gate-url-row {
  display: flex;
  gap: 8px;
}

.gate-url-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #FFFDF9;
  border-radius: var(--radius-sm);
  padding: 7px 10px;
  font-size: 12px;
  font-family: monospace;
  outline: none;
}

.gate-url-input:focus {
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.12);
}

.gate-url-btn {
  background: var(--cactus);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  border-radius: var(--radius-sm);
  padding: 7px 12px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.gate-url-btn:hover {
  background: var(--primary);
}

.gate-notice-wifi {
  font-size: 11px;
  color: #9AA8A0;
  margin-top: 8px;
  line-height: 1.4;
}

/* ========================================================
   DESKTOP SIMULATOR WRAPPER (FOR PREVIEWS)
   ======================================================== */
@media (min-width: 601px) {
  body:not(.simulator-mode) #desktop-gate {
    display: flex;
  }

  body.simulator-mode {
    background: #0E1310;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
  }

  body.simulator-mode #desktop-gate {
    display: none !important;
  }

  body.simulator-mode #app-container {
    max-width: 412px;
    height: 890px;
    border-radius: 44px;
    border: 10px solid #232A26;
    box-shadow: 0 35px 80px rgba(0, 0, 0, 0.7), 0 0 0 2px rgba(255, 255, 255, 0.08);
    position: relative;
    overflow: hidden;
  }

  .simulator-bar {
    position: fixed;
    top: 16px;
    right: 20px;
    z-index: 10000;
    display: flex;
    gap: 12px;
  }

  .simulator-bar button {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 8px 16px;
    border-radius: var(--radius-full);
    font-size: 13px;
    cursor: pointer;
  }
}

@media (max-width: 600px) {
  .simulator-bar {
    display: none !important;
  }
}

/* ========================================================
   MAIN MOBILE APP CONTAINER
   ======================================================== */
#app-container {
  width: 100%;
  min-height: 100vh;
  background-color: var(--cream);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: 110px; /* Space for floating bottom nav & cart */
}

/* ========================================================
   TOP BRAND HEADER
   ======================================================== */
.app-header {
  background: var(--cactus-dark);
  color: #FFFDF9;
  padding: calc(var(--safe-top) + 12px) 16px 14px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.15);
  border-bottom: 2px solid var(--primary);
}

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

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

.header-logo {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--primary);
  object-fit: cover;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.brand-text h1 {
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 1;
  color: var(--gold);
  letter-spacing: 0.5px;
}

.brand-text p {
  font-family: var(--font-heading);
  text-transform: uppercase;
  font-size: 9px;
  letter-spacing: 2px;
  color: #D7E2DC;
  margin-top: 2px;
}

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

.lang-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #FFFDF9;
  border-radius: var(--radius-full);
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
}

.lang-btn:active {
  background: var(--primary);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(46, 204, 113, 0.15);
  border: 1px solid rgba(46, 204, 113, 0.4);
  color: #4EFA96;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-full);
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #2ECC71;
  box-shadow: 0 0 8px #2ECC71;
}

/* ========================================================
   ORDER MODALITY SELECTOR (MESA vs DOMICILIO)
   ======================================================== */
.modality-bar {
  background: rgba(0, 0, 0, 0.25);
  border-radius: var(--radius-md);
  padding: 4px;
  display: flex;
  gap: 4px;
}

.modality-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: #D3DDD8;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.modality-btn.active {
  background: var(--primary);
  color: #FFFFFF;
  box-shadow: 0 3px 10px rgba(232, 80, 37, 0.4);
}

.modality-btn .mode-badge {
  background: rgba(0, 0, 0, 0.2);
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 10px;
}

/* Active Mode Context Banner */
.mode-details-banner {
  background: var(--gold-light);
  border-bottom: 1px solid rgba(247, 179, 43, 0.3);
  padding: 8px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: #7D5100;
  font-weight: 500;
}

.mode-details-banner span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.mode-edit-btn {
  background: none;
  border: none;
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
}

/* ========================================================
   SEARCH & QUICK FILTER BAR
   ======================================================== */
.search-container {
  padding: 12px 16px 6px;
}

.search-box {
  background: var(--cream-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 8px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-sm);
}

.search-box svg {
  color: var(--text-muted);
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.search-box input {
  border: none;
  outline: none;
  background: transparent;
  width: 100%;
  font-size: 14px;
  color: var(--text-primary);
  font-family: inherit;
}

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

.search-clear {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: none;
}

.search-clear.visible {
  display: block;
}

/* ========================================================
   CATEGORY ICON NAVIGATION (HORIZONTAL SCROLL)
   ======================================================== */
.categories-nav-wrapper {
  position: sticky;
  top: 136px;
  z-index: 90;
  background: var(--cream);
  padding: 10px 0 10px 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
  border-bottom: 1px solid var(--border);
}

.categories-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding-right: 16px;
  scrollbar-width: none;
}

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

.cat-pill {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--cream-card);
  border: 1px solid var(--border);
  padding: 8px 14px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-sm);
  white-space: nowrap;
}

.cat-pill .cat-icon {
  font-size: 18px;
  line-height: 1;
}

.cat-pill.active {
  background: var(--primary);
  color: #FFFFFF;
  border-color: var(--primary);
  box-shadow: 0 4px 14px rgba(232, 80, 37, 0.35);
  transform: translateY(-1px);
}

/* ========================================================
   MENU CONTENT SECTIONS
   ======================================================== */
.menu-feed {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.category-section {
  scroll-margin-top: 190px;
}

/* ========================================================
   CATEGORY HERO BANNERS (WITH BRAND TYPOGRAPHY & PHOTOS)
   ======================================================== */
.category-banner {
  width: 100%;
  height: 154px;
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
  margin-bottom: 14px;
  box-shadow: 0 8px 24px rgba(17, 66, 50, 0.12);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border: 1px solid rgba(17, 66, 50, 0.08);
}

.category-banner.has-image .banner-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.4s ease;
}

.category-banner:hover .banner-img {
  transform: scale(1.03);
}

.category-banner .banner-overlay {
  position: relative;
  z-index: 2;
  padding: 14px 16px;
  background: linear-gradient(180deg, rgba(11, 41, 31, 0.1) 0%, rgba(10, 36, 27, 0.72) 45%, rgba(8, 28, 21, 0.95) 100%);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.category-banner.no-image {
  background: linear-gradient(135deg, #0F3B2C 0%, #174E3C 55%, #E85025 180%);
}

.category-banner.no-image .banner-overlay {
  background: transparent;
  height: 100%;
  justify-content: flex-end;
}

.banner-badge-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 2px;
}

.banner-badge {
  background: var(--primary);
  color: #FFFFFF;
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.banner-title {
  font-family: var(--font-display);
  font-size: 32px;
  color: #FFFDF7;
  letter-spacing: 0.5px;
  line-height: 1;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.75);
}

.banner-subtitle {
  font-family: var(--font-heading);
  font-size: 12px;
  color: #E2ECE7;
  line-height: 1.35;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
  max-width: 95%;
}

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

/* ========================================================
   MENU ITEM CARDS (PREMIUM MINIMALIST APP STYLE)
   ======================================================== */
.item-card {
  background: var(--cream-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  cursor: pointer;
  position: relative;
}

.item-card:active {
  transform: scale(0.985);
  box-shadow: var(--shadow-md);
}

.item-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.item-title {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.25;
}

.item-badge {
  display: inline-block;
  background: var(--gold-light);
  color: #B27B00;
  border: 1px solid rgba(247, 179, 43, 0.4);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 6px;
  flex-shrink: 0;
  letter-spacing: 0.5px;
}

.item-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.45;
}

.item-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
}

.item-price {
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.3px;
}

.add-btn {
  background: var(--cactus);
  color: #FFFDF9;
  border: none;
  padding: 7px 14px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(17, 66, 50, 0.2);
}

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

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

/* In-card quantity counter */
.card-qty-control {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--cactus-light);
  border-radius: var(--radius-full);
  padding: 3px 6px;
}

.card-qty-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  background: var(--cactus);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
}

.card-qty-number {
  font-size: 13px;
  font-weight: 700;
  color: var(--cactus);
  min-width: 16px;
  text-align: center;
}

/* ========================================================
   FLOATING CART / CHECKOUT BAR (APP STYLE)
   ======================================================== */
.floating-cart-bar {
  position: fixed;
  bottom: 84px;
  left: 16px;
  right: 16px;
  z-index: 95;
  background: var(--primary);
  color: #FFFFFF;
  border-radius: var(--radius-md);
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 10px 25px rgba(232, 80, 37, 0.45);
  cursor: pointer;
  transform: translateY(140px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@media (min-width: 601px) {
  body.simulator-mode .floating-cart-bar {
    position: absolute;
    bottom: 88px;
  }
}

.floating-cart-bar.visible {
  transform: translateY(0);
  opacity: 1;
}

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

.cart-bar-count {
  background: #FFFFFF;
  color: var(--primary);
  font-weight: 800;
  font-size: 13px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-bar-label {
  font-size: 13px;
  font-weight: 600;
}

.cart-bar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cart-bar-total {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
}

.cart-bar-arrow {
  font-size: 16px;
}

/* ========================================================
   FLOATING BOTTOM NAVIGATION BAR (ROUNDED APP STYLE)
   ======================================================== */
.bottom-nav {
  position: fixed;
  bottom: max(14px, var(--safe-bottom));
  left: 16px;
  right: 16px;
  background: rgba(10, 40, 30, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 6px 12px;
  border-radius: 36px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 99;
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(0, 0, 0, 0.2);
}

@media (min-width: 601px) {
  body.simulator-mode .bottom-nav {
    position: absolute;
    bottom: 16px;
    left: 16px;
    right: 16px;
  }
}

.nav-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  background: none;
  border: none;
  color: #A0B2AA;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 16px;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}

.nav-icon-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  color: #A0B2AA;
}

.nav-icon-circle svg {
  width: 20px;
  height: 20px;
  transition: transform 0.2s ease;
}

/* Active State: Circulo con relleno naranja de la marca */
.nav-tab.active .nav-icon-circle {
  background: var(--primary);
  color: #FFFFFF;
  transform: translateY(-4px) scale(1.08);
  box-shadow: 0 6px 18px rgba(232, 80, 37, 0.55);
}

.nav-tab.active .nav-icon-circle svg {
  transform: scale(1.05);
  color: #FFFFFF;
}

.nav-label {
  font-size: 10px;
  font-weight: 700;
  color: #A0B2AA;
  transition: color 0.2s ease;
}

.nav-tab.active .nav-label {
  color: #FFFFFF;
}

.nav-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background: #FFD166;
  color: #0A281E;
  font-size: 10px;
  font-weight: 800;
  min-width: 17px;
  height: 17px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}
  font-size: 9px;
  font-weight: 800;
  min-width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

/* ========================================================
   BOTTOM SHEET / MODAL SYSTEM
   ======================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

@media (min-width: 601px) {
  body.simulator-mode .modal-overlay {
    position: absolute;
    inset: 0;
    border-radius: 34px;
    z-index: 9999;
  }
}

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

.bottom-sheet {
  width: 100%;
  max-height: 85vh;
  background: var(--cream-card);
  border-radius: 28px 28px 0 0;
  box-shadow: 0 -12px 45px rgba(0, 0, 0, 0.45);
  display: none;
  flex-direction: column;
  transform: translateY(105%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
  pointer-events: auto;
  z-index: 10001;
}

.bottom-sheet.active {
  display: flex !important;
  transform: translateY(0) !important;
}

.sheet-handle {
  width: 44px;
  height: 5px;
  background: #D5DDD8;
  border-radius: var(--radius-full);
  margin: 10px auto 4px;
  flex-shrink: 0;
}

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

.sheet-title {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.sheet-close-btn {
  background: #EFF4F1;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.sheet-close-btn:active {
  background: var(--primary);
  color: white;
}

.sheet-body {
  padding: 16px 20px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: calc(85vh - 145px);
}

.sheet-footer {
  padding: 14px 20px calc(var(--safe-bottom) + 12px);
  border-top: 1px solid var(--border);
  background: var(--cream-card);
  flex-shrink: 0;
}

/* ========================================================
   CART / MI PEDIDO VIEW (DEDICATED FULL SCREEN VIEW)
   ======================================================== */
.cart-view {
  display: none;
  padding: 16px;
  padding-bottom: 120px;
  flex-direction: column;
  gap: 16px;
  min-height: 80vh;
}

.cart-view.active {
  display: flex;
}

.cart-view-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}

.cart-back-btn {
  background: var(--cactus-light);
  border: 1px solid var(--border);
  color: var(--cactus-dark);
  font-size: 13px;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.cart-back-btn:active {
  transform: scale(0.96);
  background: var(--primary);
  color: #fff;
}

.cart-view-title-wrap {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.cart-view-title {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 800;
  color: var(--cactus-dark);
  margin: 0;
  line-height: 1.1;
}

.cart-count-badge {
  font-size: 11px;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cart-view-actions {
  margin-top: 8px;
}

/* ========================================================
   CART / CHECKOUT DETAILS IN MODAL
   ======================================================== */
.cart-items-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

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

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

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

.cart-item-notes {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.cart-item-price {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
  margin-top: 2px;
}

.cart-qty-adjuster {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cart-qty-btn {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: white;
  color: var(--cactus-dark);
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-qty-btn:active {
  background: var(--primary);
  color: white;
}

.cart-qty-val {
  font-size: 14px;
  font-weight: 700;
  min-width: 18px;
  text-align: center;
}

/* Modality Form in Checkout */
.checkout-form-box {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 10px 14px;
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s ease;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--primary);
  background: #FFFFFF;
}

.form-textarea {
  resize: none;
  height: 64px;
}

/* Price Breakdown */
.price-summary {
  background: var(--cream);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-secondary);
}

.summary-row.total {
  font-size: 17px;
  font-weight: 800;
  color: var(--cactus-dark);
  border-top: 1px dashed var(--border);
  padding-top: 8px;
  margin-top: 4px;
}

.summary-row.total span:last-child {
  color: var(--primary);
}

/* Big Action CTA Buttons */
.btn-primary-action {
  width: 100%;
  background: var(--primary);
  color: #FFFFFF;
  border: none;
  padding: 14px;
  border-radius: var(--radius-full);
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(232, 80, 37, 0.4);
  transition: all 0.2s ease;
}

.btn-primary-action:active {
  transform: scale(0.98);
  background: var(--primary-dark);
}

.btn-whatsapp {
  background: #25D366;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4);
}

.btn-whatsapp:active {
  background: #1EBE5D;
}

/* ========================================================
   LOCATION & SCHEDULE TAB VIEW
   ======================================================== */
.info-view {
  display: none;
  padding: 20px 16px;
  flex-direction: column;
  gap: 20px;
}

.info-view.active {
  display: flex;
}

.info-hero-card {
  background: var(--cactus-dark);
  color: #FFFDF9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.info-flyer-img {
  width: 100%;
  max-height: 240px;
  object-fit: contain;
  background: #FF5A2B;
  display: block;
}

.info-hero-content {
  padding: 20px;
}

.info-hero-content h2 {
  font-family: var(--font-display);
  font-size: 24px;
  color: var(--gold);
  margin-bottom: 6px;
}

.info-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 14px;
  font-size: 13px;
  line-height: 1.4;
  color: #DDE5E1;
}

.info-item svg {
  flex-shrink: 0;
  color: var(--primary);
  margin-top: 2px;
}

.info-actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.action-tile {
  background: var(--cream-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease;
}

.action-tile:active {
  transform: scale(0.97);
}

.action-tile .tile-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ========================================================
   TOAST NOTIFICATION
   ======================================================== */
.toast-notice {
  position: fixed;
  top: 90px;
  left: 50%;
  transform: translateX(-50%) translateY(-30px);
  background: rgba(17, 66, 50, 0.95);
  backdrop-filter: blur(10px);
  color: white;
  padding: 10px 18px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  z-index: 10000;
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@media (min-width: 601px) {
  body.simulator-mode .toast-notice {
    position: absolute;
  }
}

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