/* ==========================================================================
   CODIGO BURGUER - Mobile App Stylesheet
   Brand Primary: #073582 | Strict Light Theme
   ========================================================================== */

:root {
  --brand-blue: #073582;
  --brand-blue-hover: #05265e;
  --brand-blue-light: #eef4ff;
  --brand-blue-glow: rgba(7, 53, 130, 0.25);
  --brand-gold: #f59e0b;
  --brand-gold-light: #fef3c7;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --border-light: #e2e8f0;
}

/* Base Reset & Fonts */
* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-page);
  color: var(--text-main);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* Subtle Graph Paper Grid Pattern (Echoing the physical menu background) */
.brand-grid-pattern {
  background-size: 24px 24px;
  background-image: 
    linear-gradient(to right, rgba(7, 53, 130, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(7, 53, 130, 0.04) 1px, transparent 1px);
}

/* ==========================================================================
   DESKTOP VS MOBILE VIEW CONTROLS
   Rule: Work ONLY on mobile. Desktop must show QR code scanner portal ONLY.
   No simulator, no phone frame on desktop.
   ========================================================================== */

#desktop-view {
  display: none;
}

#mobile-app-view {
  display: block;
}

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

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

/* ==========================================================================
   FLOATING BOTTOM NAVIGATION BAR (APP STYLE)
   "en la parte inferior debe tener un menu estilo APP flotante con lo colores 
    de la marca (bottom navigation bar), Usando iconos, y cada ves que el cliente 
    se pare sobre un item del menu se debe resaltar en un circulo con un fondo 
    de relleno del color de la marca"
   ========================================================================== */

.floating-bottom-nav {
  position: fixed;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 24px);
  max-width: 440px;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 9999px;
  padding: 6px 10px;
  box-shadow: 0 10px 30px -5px rgba(7, 53, 130, 0.2), 0 4px 12px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(7, 53, 130, 0.12);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-around;
}

.bottom-nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  padding: 4px 0;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  outline: none;
  position: relative;
  flex: 1;
}

/* The circle around the icon that highlights with brand color fill on hover & active */
.bottom-nav-btn .icon-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  background-color: transparent;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

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

.bottom-nav-btn .nav-label {
  font-size: 10px;
  font-weight: 700;
  color: #64748b;
  margin-top: 2px;
  transition: color 0.2s ease;
  letter-spacing: -0.01em;
}

/* Hover and Active State: highlighted in a filled circle with the brand color #073582 */
.bottom-nav-btn:hover .icon-circle,
.bottom-nav-btn.active .icon-circle {
  background-color: var(--brand-blue) !important;
  color: #ffffff !important;
  transform: translateY(-2px) scale(1.06);
  box-shadow: 0 4px 12px var(--brand-blue-glow);
}

.bottom-nav-btn:hover .nav-label,
.bottom-nav-btn.active .nav-label {
  color: var(--brand-blue) !important;
  font-weight: 800;
}

/* Notification badges on bottom bar buttons */
.badge-counter {
  position: absolute;
  top: -2px;
  right: -2px;
  background-color: #ef4444;
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

/* Category Horizontal Scroll Ribbon */
.categories-ribbon {
  display: flex;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  gap: 8px;
  padding: 8px 4px;
}

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

.cat-pill {
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 700;
  transition: all 0.2s ease;
  border: 1px solid var(--border-light);
  cursor: pointer;
  flex-shrink: 0;
}

.cat-pill:active {
  transform: scale(0.96);
}

/* Product Cards */
.product-card {
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

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

/* Modal animation */
.modal-panel {
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Desktop QR Portal styling */
.desktop-qr-card {
  background: #ffffff;
  border: 1px solid var(--border-light);
  box-shadow: 0 20px 40px -10px rgba(7, 53, 130, 0.08), 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* QR Code Container */
#desktop-qrcode img,
#desktop-qrcode canvas {
  margin: 0 auto;
  border-radius: 12px;
}
