/* Carta pública: la carta vieja (MenuDigital static/css/style.css), orden M-1b.
   Orden M-2c: misma estructura, más legible. Precios en #b34700 sólido, la
   tarjeta entera se toca, Mega Combos con lo que incluyen y pie con los datos
   del local. Orden M-2d: tamaños más compactos (cabecera de 56 px, títulos de
   32 px, precio de 14 px); la estructura y los colores no cambian. */

@font-face {
  font-family: 'Rosalita';
  src: url("../fonts/RosalitaRegular-X3MnG.e474f62c81a6.otf") format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
  max-width: 100vw;
}

body {
  font-family: 'Plus Jakarta Sans', 'Be Vietnam Pro', sans-serif;
  color: #1a1a1a;
  overflow-x: clip;
  max-width: 100vw;
  min-height: 100dvh;
  padding-bottom: 8rem;
  -webkit-font-smoothing: antialiased;
}

/* ── Textura de yeso, igual a la carta física ── */
.textured-bg {
  background-color: #f0efed;
  background-image:
    radial-gradient(circle at 15% 25%, rgba(210, 205, 200, 0.18) 0%, transparent 55%),
    radial-gradient(circle at 85% 75%, rgba(185, 180, 175, 0.12) 0%, transparent 55%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
}

.app-container {
  max-width: 600px;
  margin: 0 auto;
  min-height: 100dvh;
  position: relative;
  overflow-x: clip;
}

.cr-main {
  padding: 110px 16px 0;  /* cabecera 56 + pestañas 46 (orden M-2d) */
}

/* ────────────────────────────────────────────
   CABECERA: logo y buscador
──────────────────────────────────────────── */
.top-bar-custom {
  position: fixed;
  top: 0;
  /* Fija y centrada: sin left/right tomaba el margen de 16 px de la página y
     se salía por la derecha (orden M-2d). */
  left: 0;
  right: 0;
  margin: 0 auto;
  width: 100%;
  max-width: 600px;
  height: 56px;
  z-index: 50;
  background-color: rgba(240, 239, 237, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid #dcd8d4;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.top-logo-wrapper {
  display: flex;
  align-items: center;
  min-width: 0;
}

.top-logo {
  height: 36px;
  width: auto;
  object-fit: contain;
}

.cr-buscador {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cr-buscar::after {
  content: '';
  position: absolute;
  inset: -2px;
}

.cr-buscar {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 20px;
  position: relative;
  border: 0;
  background: #fff;
  color: #a30013;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
  cursor: pointer;
}

#searchInput {
  width: 160px;
  min-height: 36px;
  border-radius: 9999px;
  border: 1.5px solid #c9c4c0;
  font-size: 16px; /* 16 px: el iPhone no hace zoom al escribir */
  padding: 0 14px;
  outline: none;
  background: #fff;
  transition: border-color 0.2s;
}

#searchInput:focus {
  border-color: #a30013;
}

/* ────────────────────────────────────────────
   PESTAÑAS, fijas bajo la cabecera
──────────────────────────────────────────── */
.sticky-tabs-container {
  position: fixed;
  top: 56px;
  left: 0;
  right: 0;
  margin: 0 auto;
  width: 100%;
  max-width: 600px;
  z-index: 40;
  background-color: rgba(240, 239, 237, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.sticky-tabs-scroll {
  display: flex;
  gap: 8px;
  padding: 6px 48px 6px 16px;
  overflow-x: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
  /* Difuminado a la derecha: hay más pestañas */
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 48px), transparent);
  mask-image: linear-gradient(90deg, #000 calc(100% - 48px), transparent);
}

.sticky-tabs-scroll::-webkit-scrollbar {
  display: none;
}

.nav-pill-custom {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 9999px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  color: #2e2b28;
  background-color: #e2deda;
  transition: background-color 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}

.nav-pill-custom:hover {
  background-color: #d8d3ce;
  color: #1a1a1a;
}

.nav-pill-custom.active {
  background-color: #a30013;
  color: #fff;
  font-weight: 800;
}

.nav-pill-custom:focus-visible {
  outline: 3px solid #1a7a72;
  outline-offset: 2px;
}

.scroll-section {
  scroll-margin-top: 108px;
}

/* ────────────────────────────────────────────
   BANNERS con puntos
──────────────────────────────────────────── */
.banner-carousel-container {
  margin: 0 -16px 16px;
}

.banner-scroll {
  display: flex;
  overflow-x: auto;
  gap: 12px;
  padding: 4px 16px;
  scroll-snap-type: x mandatory;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

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

.banner-card {
  flex: 0 0 88%;
  scroll-snap-align: center;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
  background: #1a1a1a;
}

.banner-card img {
  width: 100%;
  height: 130px;
  object-fit: cover;
  display: block;
}

.cr-puntos {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding-top: 8px;
}

.cr-puntos span {
  width: 6px;
  height: 6px;
  border-radius: 3px;
  background: #c9c4c0;
  transition: width 0.2s, background-color 0.2s;
}

.cr-puntos span.activo {
  width: 18px;
  background: #a30013;
}

/* ────────────────────────────────────────────
   SECCIÓN
──────────────────────────────────────────── */
.category-card {
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  margin-bottom: 16px;
}

.cr-seccion {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cr-cabeza {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.cr-cabeza-textos {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-width: 0;
}

.cr-lateral {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  object-fit: contain;
}

/* Título Rosalita con su eco (la "sombra" de la carta física) */
.section-title-wrap {
  display: inline-block;
  position: relative;
  line-height: 1.05;
  /* Lugar para el eco, que va entero debajo del título como en la carta vieja */
  padding-bottom: 2rem;
}

.section-name,
.section-echo {
  font-family: 'Rosalita', 'Pacifico', cursive;
  font-weight: normal;
  font-size: 2rem;  /* 32 px (orden M-2d) */
  line-height: 1.05;
  margin: 0;
  overflow-wrap: anywhere;
}

.section-name {
  position: relative;
  z-index: 1;
}

.section-echo {
  position: absolute;
  top: 1.9rem;
  left: 0;
  opacity: 0.28;
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
  z-index: 0;
}

.section-name.red,
.section-echo.red {
  color: #a30013;
}

.section-name.teal,
.section-echo.teal {
  color: #0c8536;
}

/* Cinta verde bajo el título */
.cr-cinta {
  position: relative;
  z-index: 1;
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  background: #1a7a72;
  border-radius: 999px;
  padding: 4px 10px;
}

.cr-guia {
  margin: 0;
  font-size: 13px;
  color: #5a5550;
}

.cr-bloque {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Subtítulo de grupo ("Cocteles y Licor") */
.subcategory-divider {
  border: none;
  border-top: 1px solid #e4e1de;
  opacity: 1;
  margin: 4px 0 0;
}

.subcategory-name {
  font-family: 'Rosalita', 'Pacifico', cursive;
  font-weight: normal;
  font-size: 1.625rem;
  line-height: 1.05;
  margin: 0;
}

.subcategory-name.red {
  color: #a30013;
}

.subcategory-name.teal {
  color: #0c8536;
}

/* ────────────────────────────────────────────
   PRECIO: naranja sólido, se lee al sol (5,5:1)
──────────────────────────────────────────── */
.price-badge {
  background: #b34700;
  color: #fff;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  font-size: 14px;
  border-radius: 0.875rem;
  padding: 4px 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1.2;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ────────────────────────────────────────────
   LO QUE SE TOCA: la tarjeta entera es el botón
──────────────────────────────────────────── */
[data-ref-tipo] {
  font: inherit;
  color: #1a1a1a;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: transform 0.08s ease, background-color 0.08s ease;
}

[data-ref-tipo]:active {
  transform: scale(0.98);
  background-color: #ebe4dc;
}

[data-ref-tipo]:focus-visible {
  outline: 3px solid #1a7a72;
  outline-offset: 2px;
}

@media (hover: hover) {
  [data-ref-tipo]:hover {
    background-color: #f0ebe5;
  }
}

.cr-detalle {
  font-size: 13px;
  color: #5a5550;
  line-height: 1.35;
}

/* Tarjetas de 3 columnas: pizzas y alitas */
.cr-grid3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.cr-tarjeta {
  width: 100%;
  min-height: 84px;
  border-radius: 14px;
  border: 2px solid #d4e7e4;
  background: #f7f4f0;
  padding: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 2px;
  text-align: center;
}

.cr-tarjeta .cr-detalle {
  font-size: 12px;
}

.cr-estilo-alitas .cr-tarjeta {
  min-height: 68px;
}

.product-card-name {
  font-family: 'Boogaloo', cursive;
  font-size: 19px;
  line-height: 1.1;
  margin-top: 2px;
  overflow-wrap: anywhere;
}

.cr-estilo-alitas .product-card-name {
  font-size: 19px;
}

/* Cuadro de salsas en la casilla libre de Alitas */
.cr-salsas {
  border-radius: 14px;
  background: #1a7a72;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8px;
  gap: 2px;
  font-size: 12px;
  line-height: 1.35;
}

.cr-salsas-titulo {
  font-family: 'Boogaloo', cursive;
  font-size: 17px;
  line-height: 1.1;
}

/* Filas con descripción */
.cr-filas {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cr-fila {
  width: 100%;
  min-height: 52px;
  border-radius: 14px;
  border: 0;
  background: #f7f4f0;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
}

.cr-fila-textos {
  flex-grow: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cr-fila-nombre {
  font-family: 'Boogaloo', cursive;
  font-size: 18px;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

/* Dos columnas compactas (sin descripción) */
.cr-compacto {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.cr-chica {
  width: 100%;
  min-height: 52px;
  border-radius: 12px;
  border: 0;
  background: #f7f4f0;
  padding: 8px 8px 8px 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  text-align: left;
}

.cr-chica-textos {
  flex-grow: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cr-chica-nombre {
  font-family: 'Boogaloo', cursive;
  font-size: 18px;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.cr-chica-precio {
  flex-shrink: 0;
  font-size: 14px;
  font-weight: 800;
  color: #b34700;
}

/* ────────────────────────────────────────────
   COMBOS CON TAMAÑOS: una tarjeta por combo
──────────────────────────────────────────── */
.cr-combo {
  border-radius: 16px;
  background: #f7f4f0;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cr-combo-nombre {
  margin: 0;
  font-family: 'Rosalita', 'Pacifico', cursive;
  font-weight: normal;
  font-size: 24px;
  line-height: 1;
}

.cr-combo-nombre.red {
  color: #a30013;
}

.cr-combo-nombre.teal {
  color: #0c8536;
}

.cr-incluye {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.cr-incluye li {
  font-size: 12px;
  font-weight: 700;
  color: #11504b;
  background: #e3f1ee;
  border-radius: 999px;
  padding: 4px 9px;
}

.cr-tamanos {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.cr-tamano {
  width: 100%;
  min-height: 52px;
  border-radius: 12px;
  border: 2px solid #d4e7e4;
  background: #fff;
  padding: 3px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.cr-tamano-nombre {
  font-family: 'Boogaloo', cursive;
  font-size: 16px;
  line-height: 1;
  overflow-wrap: anywhere;
}

.cr-tamano-precio {
  font-size: 14px;
  font-weight: 800;
  color: #b34700;
}

/* ────────────────────────────────────────────
   AGRANDA TU COMBO
──────────────────────────────────────────── */
.cr-agranda {
  border-radius: 14px;
  background: #1a7a72;
  color: #fff;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
}

.cr-agranda svg {
  flex-shrink: 0;
}

.cr-agranda-textos {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.cr-agranda-titulo {
  font-family: 'Boogaloo', cursive;
  font-size: 17px;
  line-height: 1.1;
}

.cr-agranda-precio {
  flex-shrink: 0;
  background: #fff;
  color: #b34700;
  font-weight: 800;
  font-size: 14px;
  border-radius: 12px;
  padding: 4px 10px;
}

/* ────────────────────────────────────────────
   PIE: datos del local
──────────────────────────────────────────── */
.cr-pie {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 8px 8px 16px;
  text-align: center;
}

.cr-pie p {
  margin: 0;
}

.cr-pie-logo {
  height: 48px;
  width: auto;
}

.cr-pie-direccion {
  font-size: 15px;
  font-weight: 700;
}

.cr-pie-horario {
  font-size: 14px;
  color: #5a5550;
}

.cr-pie-whatsapp {
  min-height: 48px;
  padding: 0 20px;
  border-radius: 24px;
  background: #0c8536;
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.cr-pie-whatsapp:hover,
.cr-pie-whatsapp:focus {
  color: #fff;
  background: #0a6e2d;
}

.cr-pie-whatsapp:focus-visible {
  outline: 3px solid #1a7a72;
  outline-offset: 2px;
}

.cr-pie-nota {
  font-size: 13px;
  color: #5a5550;
}
