/* ===== Super Tasty · Carta digital ===== */
/* Paleta de marca: ROJO (predomina ~60%) · BLANCO (~30%) · NEGRO (textos) */
:root {
  --rojo: #e01a22;
  --rojo-osc: #b3141b;
  --rojo-claro: #fdeaea;
  --amarillo: #f7b500;      /* acento del logo, uso mínimo */
  --negro: #1a1a1a;
  --gris: #6b6b6b;
  --blanco: #ffffff;
  --fondo: #ffffff;
  --tarjeta: #ffffff;
  --borde: #eee1e1;
  --verde-wa: #25d366;
  --verde-wa-osc: #1da851;
  --sombra: 0 6px 18px rgba(26, 26, 26, .08);
  --radio: 16px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--negro);
  background: var(--fondo);
  -webkit-font-smoothing: antialiased;
  padding-bottom: 96px;
  position: relative;
}
h1, h2, h3, .hero__name, .btn-wa, .tab { font-family: 'Poppins', sans-serif; }

/* ===== FONDO ANIMADO (nombres de platos deslizándose) ===== */
.bg-anim {
  position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none;
  display: flex; flex-direction: column; justify-content: space-around;
}
.bg-row { white-space: nowrap; overflow: hidden; width: 100%; }
.bg-track { display: inline-flex; will-change: transform; animation: marquee var(--dur, 40s) linear infinite; }
.bg-row--1 .bg-track { animation-direction: reverse; }
.bg-track span {
  padding-right: 44px; white-space: nowrap;
  font-family: 'Poppins', sans-serif; font-weight: 800; letter-spacing: 1px;
  font-size: clamp(1.7rem, 8vw, 3.2rem);
  color: rgba(224, 26, 34, .07);
}
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* El contenido va SOBRE el fondo animado */
.hero, .menu, .pie { position: relative; z-index: 1; }

/* ===== ANIMACIONES PREMIUM (micro-interacciones) ===== */
@keyframes flotar { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes latido {
  0%, 100% { box-shadow: 0 10px 26px rgba(224, 26, 34, .4); }
  50% { box-shadow: 0 12px 36px rgba(224, 26, 34, .62); }
}
@keyframes cardIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* Respeta a quien prefiere menos movimiento */
@media (prefers-reduced-motion: reduce) {
  .bg-track, .hero__logo, .barra-carrito, .sec-head__emoji { animation: none !important; }
  .card, .btn-add, .sec-head { animation: none !important; }
  .card:hover, .tab:hover { transform: none; }
  .card:hover .card__foto { transform: none; }
}

/* ===== HERO ===== */
.hero {
  background: linear-gradient(160deg, var(--rojo) 0%, var(--rojo-osc) 100%);
  color: #fff;
  padding: 26px 18px 24px;
  text-align: center;
  border-radius: 0 0 28px 28px;
  box-shadow: 0 6px 20px rgba(224, 26, 34, .22);
  position: relative;
}
.hero__inner { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; }
.hero__logo {
  width: 110px; height: 110px; border-radius: 50%; overflow: hidden;
  background: #fff; border: 4px solid #fff;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .28); margin-bottom: 12px;
  animation: flotar 3.6s ease-in-out infinite;
}
.hero__logo img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.14); display: block; }
.hero__name { font-size: 1.7rem; font-weight: 800; letter-spacing: .5px; line-height: 1; }
.hero__tag { color: #ffe0e0; font-size: .92rem; margin-top: 6px; }
.hero__estado { font-size: .82rem; margin-top: 8px; font-weight: 600; background: rgba(0,0,0,.16); padding: 4px 12px; border-radius: 999px; }
.hero__estado .abierto { color: #b8ffcb; }
.hero__estado .cerrado { color: #ffd0cb; }

/* ===== NAV CATEGORÍAS (sticky) ===== */
.cats {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 255, 255, .97);
  backdrop-filter: blur(8px);
  border-bottom: 2px solid var(--rojo);
  display: flex; gap: 8px; overflow-x: auto;
  padding: 10px 14px; scrollbar-width: none;
}
.cats::-webkit-scrollbar { display: none; }
.tab {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 7px;
  border: 1.5px solid var(--borde); background: #fff;
  color: var(--gris); font-size: .86rem; font-weight: 600;
  padding: 8px 15px; border-radius: 999px; cursor: pointer;
  white-space: nowrap; font-family: 'Poppins', sans-serif;
  transition: transform .18s cubic-bezier(.2, .9, .3, 1.2), background .2s, color .2s, border-color .2s, box-shadow .2s;
}
.tab__emoji { font-size: 1.05rem; line-height: 1; transition: transform .2s; }
.tab:hover { transform: translateY(-2px); border-color: #f3cfd0; box-shadow: 0 6px 14px rgba(224, 26, 34, .14); }
.tab:hover .tab__emoji { transform: scale(1.2) rotate(-6deg); }
.tab:active { transform: translateY(0) scale(.95); }
.tab.activo {
  background: var(--rojo); border-color: var(--rojo); color: #fff;
  box-shadow: 0 8px 18px rgba(224, 26, 34, .32);
}
.tab.activo .tab__emoji { transform: scale(1.18); }

/* ===== MENÚ (pestañas + cuadrícula) ===== */
.menu { max-width: 1120px; margin: 0 auto; padding: 14px 16px 30px; }
.cargando { text-align: center; color: var(--gris); padding: 40px 0; }

/* Encabezado de la sección activa */
.sec-head {
  display: flex; align-items: center; gap: 10px; margin: 4px 2px 14px;
  animation: headIn .4s ease both;
}
.sec-head__emoji { font-size: 1.7rem; line-height: 1; animation: flotar 3.4s ease-in-out infinite; }
.sec-head__nombre { font-family: 'Poppins', sans-serif; font-weight: 800; font-size: 1.35rem; color: var(--rojo); line-height: 1.1; }
.sec-head__count {
  margin-left: auto; background: var(--rojo-claro); color: var(--rojo);
  font-weight: 700; font-size: .78rem; padding: 4px 11px; border-radius: 999px;
}
@keyframes headIn { from { opacity: 0; transform: translateX(-12px); } to { opacity: 1; transform: none; } }

/* Cuadrícula responsiva */
.grid { display: grid; gap: 14px; grid-template-columns: repeat(2, 1fr); }

/* ===== TARJETA DE PLATO (vertical, foto arriba) ===== */
.card {
  display: flex; flex-direction: column; background: var(--tarjeta);
  border: 1px solid var(--borde); border-radius: var(--radio);
  overflow: hidden; box-shadow: var(--sombra); position: relative;
  transition: transform .22s cubic-bezier(.2, .9, .3, 1.2), box-shadow .22s, border-color .22s;
  animation: cardIn .5s ease both;
}
.card:hover { transform: translateY(-6px); box-shadow: 0 16px 34px rgba(224, 26, 34, .18); border-color: #f3cfd0; }
.card:hover .card__foto { transform: scale(1.08); }
/* Entrada escalonada al cambiar de categoría */
.card:nth-child(2) { animation-delay: .05s; }
.card:nth-child(3) { animation-delay: .1s; }
.card:nth-child(4) { animation-delay: .15s; }
.card:nth-child(5) { animation-delay: .2s; }
.card:nth-child(6) { animation-delay: .25s; }
.card:nth-child(7) { animation-delay: .3s; }
.card:nth-child(n+8) { animation-delay: .35s; }
.card.agotado { opacity: .62; }

.card__media { position: relative; width: 100%; aspect-ratio: 4 / 3; overflow: hidden; background: #f3eded; }
.card__foto { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; cursor: zoom-in; }
.card__foto--ph { display: flex; align-items: center; justify-content: center; font-size: 2.6rem; color: #d9c9c9; }

.card__cuerpo { flex: 1; display: flex; flex-direction: column; padding: 11px 12px 12px; min-width: 0; }
.card__nombre { font-family: 'Poppins', sans-serif; font-weight: 700; font-size: .98rem; line-height: 1.2; color: var(--negro); }
.card__desc { color: var(--gris); font-size: .8rem; line-height: 1.35; margin-top: 3px; flex: 1; }
.card__fila { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; }
.card__precio { font-family: 'Poppins', sans-serif; font-weight: 800; color: var(--rojo); font-size: 1.12rem; }
.card__acc { flex: 0 0 auto; }
.card__off { color: var(--gris); font-size: .78rem; font-weight: 600; }

/* Selector de tamaño (bebidas con 2 precios) */
.tamanos { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.tamano { border: 1.5px solid var(--borde); background: #fff; border-radius: 10px; padding: 6px 10px; font-size: .78rem; font-weight: 600; cursor: pointer; color: var(--gris); }
.tamano.activo { border-color: var(--rojo); color: var(--rojo); background: var(--rojo-claro); }

/* Botón agregar / control cantidad */
.btn-add {
  border: none; background: var(--rojo); color: #fff; font-weight: 700;
  padding: 9px 14px; border-radius: 11px; cursor: pointer; font-size: .84rem;
  display: inline-flex; align-items: center; gap: 6px;
  box-shadow: 0 5px 14px rgba(224, 26, 34, .3);
  transition: transform .12s cubic-bezier(.2, .9, .3, 1.2), background .15s, box-shadow .15s;
  animation: pop .28s ease both;
}
.btn-add:hover { background: var(--rojo-osc); transform: translateY(-2px); box-shadow: 0 8px 18px rgba(224, 26, 34, .42); }
.btn-add:active { transform: scale(.9); }
@keyframes pop { from { opacity: 0; transform: scale(.8); } to { opacity: 1; transform: none; } }

.stepper { display: inline-flex; align-items: center; gap: 10px; background: var(--rojo-claro); border-radius: 11px; padding: 4px; }
.stepper button { width: 30px; height: 30px; border: none; border-radius: 8px; background: var(--rojo); color: #fff; font-size: 1.1rem; font-weight: 700; cursor: pointer; line-height: 1; }
.stepper span { min-width: 18px; text-align: center; font-weight: 700; color: var(--negro); }

.badge-agotado {
  position: absolute; top: 10px; left: 10px; background: var(--negro); color: #fff;
  font-size: .68rem; font-weight: 700; padding: 3px 8px; border-radius: 999px;
  text-transform: uppercase; letter-spacing: .5px;
}

/* ===== BARRA CARRITO (rojo de marca) ===== */
.barra-carrito {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 16px; z-index: 40;
  width: calc(100% - 28px); max-width: 692px;
  display: flex; align-items: center; gap: 12px;
  background: var(--rojo); color: #fff; border: none;
  padding: 14px 18px; border-radius: 14px; cursor: pointer;
  box-shadow: 0 10px 26px rgba(224, 26, 34, .4); font-family: 'Poppins';
  animation: subir .25s ease, latido 2.6s ease-in-out .3s infinite;
}
.barra-carrito[hidden] { display: none; } /* respeta hidden: no mostrar el carrito vacío */
@keyframes subir { from { transform: translate(-50%, 20px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }
.barra-carrito__cont { background: rgba(255,255,255,.25); border-radius: 8px; min-width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: .9rem; }
.barra-carrito__txt { flex: 1; text-align: left; font-weight: 700; }
.barra-carrito__total { font-weight: 800; }

/* ===== HOJA (carrito) ===== */
.hoja { position: fixed; inset: 0; z-index: 60; }
.hoja__fondo { position: absolute; inset: 0; background: rgba(26,26,26,.5); }
.hoja__panel {
  position: absolute; left: 0; right: 0; bottom: 0; background: #fff;
  border-radius: 22px 22px 0 0; max-width: 720px; margin: 0 auto;
  max-height: 86vh; display: flex; flex-direction: column; animation: hojaSubir .28s ease;
  padding-bottom: env(safe-area-inset-bottom);
}
@keyframes hojaSubir { from { transform: translateY(100%); } to { transform: translateY(0); } }
.hoja__cab { display: flex; align-items: center; justify-content: space-between; padding: 18px 18px 6px; }
.hoja__cab h2 { font-size: 1.2rem; color: var(--negro); }
.hoja__cerrar { border: none; background: var(--rojo-claro); color: var(--rojo); width: 34px; height: 34px; border-radius: 50%; font-size: 1rem; cursor: pointer; }
.hoja__items { overflow-y: auto; padding: 8px 18px; flex: 1; }
.hoja__vacio { text-align: center; color: var(--gris); padding: 30px 0; }

.citem { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--borde); }
.citem__info { flex: 1; min-width: 0; }
.citem__nombre { font-weight: 600; font-size: .92rem; color: var(--negro); }
.citem__meta { color: var(--gris); font-size: .8rem; margin-top: 2px; }
.citem__sub { font-weight: 700; color: var(--negro); font-size: .9rem; min-width: 62px; text-align: right; }

.hoja__pie { border-top: 1px solid var(--borde); padding: 14px 18px 18px; background: #fff; }
.hoja__total { display: flex; justify-content: space-between; align-items: baseline; font-size: 1.1rem; color: var(--negro); }
.hoja__total strong { font-family: 'Poppins'; font-size: 1.4rem; color: var(--rojo); }
.hoja__nota { color: var(--gris); font-size: .76rem; margin: 6px 0 12px; }

/* Botón final = verde WhatsApp (señal reconocible del canal) */
.btn-wa {
  width: 100%; border: none; background: var(--verde-wa); color: #fff;
  padding: 15px; border-radius: 13px; font-size: 1.02rem; font-weight: 700;
  cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 10px;
  transition: background .15s, transform .08s;
}
.btn-wa:hover { background: var(--verde-wa-osc); transform: translateY(-2px); box-shadow: 0 10px 22px rgba(37, 211, 102, .4); }
.btn-wa:active { transform: scale(.98); }

/* ===== PIE (rojo de marca) ===== */
.pie { text-align: center; color: #ffdede; font-size: .84rem; padding: 26px 18px 40px; line-height: 1.7; background: var(--rojo); margin-top: 14px; border-radius: 28px 28px 0 0; }
.pie__familia { color: #fff; font-family: 'Poppins'; font-weight: 600; font-size: 1rem; margin-bottom: 14px; line-height: 1.4; }
.pie__nombre { font-family: 'Poppins'; font-weight: 700; color: #fff; font-size: 1.05rem; margin-bottom: 6px; }
.pie__credito { margin-top: 14px; font-size: .78rem; opacity: .9; }
.pie__credito a { color: #fff; text-decoration: none; border-bottom: 1px solid rgba(255, 255, 255, .5); padding-bottom: 1px; transition: opacity .15s, border-color .15s; }
.pie__credito a:hover { border-color: #fff; opacity: 1; }
.pie strong { color: #fff; }

/* ===== AVISO DE BIENVENIDA ===== */
.bienve { position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center; padding: 22px; }
.bienve[hidden] { display: none; } /* respeta el atributo hidden (si no, display:flex lo anula) */
.bienve__fondo { position: absolute; inset: 0; background: rgba(26, 18, 16, .6); backdrop-filter: blur(3px); }
.bienve__caja {
  position: relative; background: #fff; border-radius: 22px; max-width: 400px; width: 100%;
  padding: 26px 22px 22px; text-align: center; box-shadow: 0 24px 60px rgba(0, 0, 0, .35);
  border-top: 6px solid var(--rojo); animation: bienvePop .35s cubic-bezier(.2, .9, .3, 1.2) both;
}
@keyframes bienvePop { from { opacity: 0; transform: translateY(24px) scale(.94); } to { opacity: 1; transform: none; } }
.bienve__logo {
  width: 84px; height: 84px; border-radius: 50%; overflow: hidden; margin: -58px auto 10px;
  background: #fff; border: 4px solid #fff; box-shadow: 0 8px 22px rgba(0, 0, 0, .25);
}
.bienve__logo img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.14); display: block; }
.bienve__titulo { font-size: 1.28rem; color: var(--negro); margin-bottom: 4px; }
.bienve__texto { color: var(--gris); font-size: .92rem; margin-bottom: 14px; }
.bienve__aviso {
  background: var(--rojo-claro); border: 1px solid #f3cfd0; border-radius: 14px;
  padding: 14px 14px; font-size: .9rem; line-height: 1.5; color: #7a1116; text-align: left;
}
.bienve__aviso strong { color: var(--rojo); }
.bienve__btn {
  margin-top: 16px; width: 100%; border: none; background: var(--rojo); color: #fff;
  font-family: 'Poppins'; font-weight: 700; font-size: 1rem; padding: 13px; border-radius: 13px;
  cursor: pointer; transition: background .15s, transform .08s;
}
.bienve__btn:hover { background: var(--rojo-osc); }
.bienve__btn:active { transform: scale(.97); }

/* ===== TOAST (negro) ===== */
.toast {
  position: fixed; bottom: 92px; left: 50%; transform: translateX(-50%);
  background: var(--negro); color: #fff; padding: 12px 18px; border-radius: 12px;
  font-size: .88rem; font-weight: 600; z-index: 80; box-shadow: var(--sombra);
  animation: subir .25s ease; max-width: calc(100% - 32px); text-align: center;
}

/* ===== VISOR DE FOTO (lightbox) ===== */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.lightbox[hidden] { display: none; } /* respeta el atributo hidden (si no, display:flex lo anula) */
.lightbox__fondo { position: absolute; inset: 0; background: rgba(26, 26, 26, .85); }
.lightbox__img {
  position: relative; z-index: 1;
  max-width: 100%; max-height: 100%;
  object-fit: contain; border-radius: 14px;
  box-shadow: 0 16px 44px rgba(0, 0, 0, .5);
  animation: zoomIn .22s ease;
}
@keyframes zoomIn { from { opacity: 0; transform: scale(.92); } to { opacity: 1; transform: none; } }
.lightbox__cerrar {
  position: absolute; top: 14px; right: 14px; z-index: 2;
  border: none; background: rgba(255, 255, 255, .92); color: var(--negro);
  width: 42px; height: 42px; border-radius: 50%; font-size: 1.1rem; cursor: pointer;
  box-shadow: var(--sombra); line-height: 1;
}
@media (prefers-reduced-motion: reduce) { .lightbox__img { animation: none; } }

/* ===== INTRO (carga + video de inicio) ===== */
.intro {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 35%, #ff3b42 0%, var(--rojo) 45%, var(--rojo-osc) 100%);
  transition: opacity .5s ease;
}
.intro[hidden] { display: none; } /* respeta hidden (si no, display:flex lo anula) */
.intro--out { opacity: 0; pointer-events: none; }

/* Fase 1: cargando */
.intro__load { text-align: center; color: #fff; padding: 24px; width: min(420px, 88vw); }
.intro__logo img {
  width: 128px; height: 128px; border-radius: 50%; object-fit: cover;
  box-shadow: 0 8px 30px rgba(0,0,0,.35); animation: flotar 2.4s ease-in-out infinite;
}
.intro__burgers { display: flex; justify-content: center; gap: 18px; font-size: 2.8rem; margin: 22px 0 10px; }
.intro__burgers span { display: inline-block; animation: brincar .9s ease-in-out infinite; }
.intro__burgers span:nth-child(2) { animation-delay: .18s; }
.intro__burgers span:nth-child(3) { animation-delay: .36s; }
@keyframes brincar { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-22px); } }
.intro__txt { font-family: 'Poppins', sans-serif; font-weight: 600; font-size: 1.05rem; margin-bottom: 16px; text-shadow: 0 2px 8px rgba(0,0,0,.25); }
.intro__bar {
  width: 100%; height: 12px; border-radius: 99px; overflow: hidden;
  background: rgba(255,255,255,.25); box-shadow: inset 0 1px 3px rgba(0,0,0,.2);
}
.intro__fill {
  display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--amarillo), #fff);
  border-radius: 99px; transition: width .18s ease;
}
.intro__pct { font-family: 'Poppins', sans-serif; font-weight: 700; font-size: .9rem; margin-top: 8px; opacity: .95; }

/* Fase 2: video */
.intro__video { position: absolute; inset: 0; background: #000; display: flex; align-items: center; justify-content: center; }
.intro__video[hidden] { display: none; } /* CLAVE: sin esto, display:flex tapa la pantalla de carga */
.intro__vid { width: 100%; height: 100%; object-fit: contain; }
.intro__skip, .intro__sound {
  position: absolute; z-index: 2; border: none; cursor: pointer;
  font-family: 'Poppins', sans-serif; font-weight: 600; border-radius: 99px;
  backdrop-filter: blur(4px); box-shadow: 0 4px 14px rgba(0,0,0,.35);
}
.intro__skip {
  bottom: 22px; right: 18px; padding: 11px 20px; font-size: .95rem;
  background: rgba(255,255,255,.92); color: var(--negro);
}
.intro__sound {
  bottom: 22px; left: 18px; padding: 11px 16px; font-size: .88rem;
  background: rgba(26,26,26,.6); color: #fff;
}
@media (prefers-reduced-motion: reduce) {
  .intro__logo img, .intro__burgers span { animation: none; }
}

/* ===== RESPONSIVE (cuadrícula) ===== */
@media (min-width: 560px) { .grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 820px) {
  .grid { grid-template-columns: repeat(4, 1fr); gap: 16px; }
  .hero__name { font-size: 2.2rem; }
  .sec-head__nombre { font-size: 1.6rem; }
}
