/* Los elementos marcados como "hidden" tienen que ocultarse siempre,
   incluso si otra regla de este archivo les puso display:flex/block. */
[hidden] { display: none !important; }

:root {
  --rojo: #E2211C;
  --rojo-oscuro: #B01812;
  --negro: #222222;
  --negro-suave: #2f2f2f;
  --crema: #fff8ef;
  --crema-fuerte: #fbecd7;
  --marron: #262220;
  --gris-texto: #6b5c50;
  --verde: #2e8b47;
  --borde: #ecdcc4;
  --sombra: 0 6px 20px rgba(34, 34, 34, 0.1);
  --radio: 16px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--crema);
  color: var(--marron);
  padding-bottom: 90px;
}

h1, h2 {
  font-family: 'Anton', 'Fraunces', serif;
  letter-spacing: 0.3px;
  margin: 0;
}

/* ---------- Header ---------- */
.topbar {
  background: var(--negro);
  color: white;
  padding: 18px 16px;
}
.topbar-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}
.brand-logo { width: 56px; height: 56px; border-radius: 12px; display: block; }
.brand h1 { font-size: 28px; text-transform: uppercase; }
.brand-tagline {
  margin: 4px 0 0;
  font-size: 14px;
  opacity: 0.9;
  max-width: 420px;
}
.estado-badge {
  background: rgba(255,255,255,0.15);
  border-radius: 999px;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
}
.estado-badge .dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ccc;
}
.estado-badge.abierto .dot { background: #6ee7a0; box-shadow: 0 0 8px #6ee7a0; }
.estado-badge.cerrado .dot { background: #f2a19a; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: linear-gradient(135deg, var(--negro) 0%, var(--negro-suave) 100%);
  color: white;
  padding: 44px 16px;
  overflow: hidden;
}
.hero-inner {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.hero-titulo {
  font-family: 'Anton', 'Fraunces', serif;
  font-size: 34px;
  line-height: 1.15;
  text-transform: uppercase;
  max-width: 480px;
  margin: 0 0 12px;
}
.hero-subtitulo {
  font-size: 15px;
  opacity: 0.85;
  max-width: 420px;
  margin: 0 0 20px;
}
.btn-hero {
  display: inline-block;
  background: var(--rojo);
  color: white;
  text-decoration: none;
  font-weight: 700;
  padding: 13px 28px;
  border-radius: 999px;
  font-size: 15px;
}
.hero-botones { display: flex; flex-wrap: wrap; gap: 10px; }
.btn-hero:hover { background: var(--rojo-oscuro); }
.btn-hero-secundario {
  background: transparent;
  border: 1.5px solid rgba(255,255,255,0.5);
}
.btn-hero-secundario:hover { background: rgba(255,255,255,0.1); }
.hero-decoracion {
  position: absolute;
  right: -30px;
  bottom: -30px;
  width: 220px;
  height: 220px;
  color: rgba(226, 33, 28, 0.25);
}
@media (max-width: 600px) {
  .hero-titulo { font-size: 26px; }
  .hero-decoracion { width: 140px; height: 140px; right: -20px; bottom: -20px; }
}

/* ---------- Promo banner ---------- */
.promo-banner {
  background: var(--negro);
  color: white;
  text-align: center;
  padding: 10px 16px;
  font-weight: 600;
  font-size: 14px;
}

/* ---------- Contenido ---------- */
.contenido {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px 16px 40px;
}

.categorias-nav {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 12px;
  margin-bottom: 12px;
  position: sticky;
  top: 0;
  background: var(--crema);
  z-index: 5;
}
.categorias-nav button {
  border: 1px solid var(--borde);
  background: white;
  color: var(--marron);
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}
.categorias-nav button.activa {
  background: var(--rojo);
  border-color: var(--rojo);
  color: white;
}

.cargando { color: var(--gris-texto); text-align: center; padding: 40px 0; }

.seccion-categoria { margin-bottom: 32px; }
.seccion-categoria h2 {
  font-size: 22px;
  margin-bottom: 14px;
  color: var(--rojo-oscuro);
}

.grilla-productos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}

.tarjeta-producto {
  background: white;
  border-radius: var(--radio);
  overflow: hidden;
  box-shadow: var(--sombra);
  display: flex;
  flex-direction: column;
  border: 1px solid var(--borde);
}
.foto-producto {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: var(--crema-fuerte);
}
.foto-producto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.foto-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--borde);
}
.foto-placeholder svg { width: 42px; height: 42px; }
.sello-promo {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--rojo);
  color: white;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border: 2px dashed rgba(255,255,255,0.6);
  box-shadow: var(--sombra);
}
.info-producto {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.tarjeta-producto h3 { font-size: 17px; margin: 0; }
.tarjeta-producto .descripcion {
  font-size: 13px;
  color: var(--gris-texto);
  min-height: 32px;
}
.tarjeta-producto .fila-precio {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
}
.precio { font-weight: 700; font-size: 16px; color: var(--rojo-oscuro); }

.btn-agregar {
  background: var(--rojo);
  color: white;
  border: none;
  border-radius: 10px;
  padding: 8px 14px;
  font-weight: 600;
  cursor: pointer;
  font-size: 14px;
}
.btn-agregar:hover { background: var(--rojo-oscuro); }

.stepper {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--crema-fuerte);
  border-radius: 10px;
  padding: 4px 8px;
}
.stepper button {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: none;
  background: var(--rojo);
  color: white;
  font-size: 16px;
  cursor: pointer;
  line-height: 1;
}
.stepper span { font-weight: 700; min-width: 16px; text-align: center; }

/* ---------- Boton flotante carrito ---------- */
.btn-carrito {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--rojo);
  color: white;
  border: none;
  padding: 14px 24px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 8px 24px rgba(192,57,43,0.4);
  cursor: pointer;
  z-index: 20;
}
.btn-carrito .separador { opacity: 0.5; }

/* ---------- Modales ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(58,36,24,0.5);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 50;
}
.modal {
  background: white;
  width: 100%;
  max-width: 480px;
  max-height: 88vh;
  overflow-y: auto;
  border-radius: 20px 20px 0 0;
  padding: 22px;
  animation: subir 0.2s ease-out;
}
@media (min-width: 560px) {
  .modal-overlay { align-items: center; }
  .modal { border-radius: 20px; }
}
@keyframes subir {
  from { transform: translateY(30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.modal-header .cerrar {
  border: none;
  background: var(--crema-fuerte);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
}

.carrito-items { display: flex; flex-direction: column; gap: 12px; }
.carrito-vacio { color: var(--gris-texto); text-align: center; padding: 20px 0; }
.item-carrito {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--borde);
  padding-bottom: 10px;
}
.item-carrito .info h4 { margin: 0 0 2px; font-size: 15px; }
.item-carrito .info span { font-size: 13px; color: var(--gris-texto); }

.carrito-footer { margin-top: 16px; }
.carrito-footer-total {
  display: flex;
  justify-content: space-between;
  font-size: 17px;
  margin-bottom: 14px;
}

.btn-principal {
  width: 100%;
  background: var(--rojo);
  color: white;
  border: none;
  padding: 14px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
}
.btn-principal:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-principal:hover:not(:disabled) { background: var(--rojo-oscuro); }

.form-checkout { display: flex; flex-direction: column; gap: 12px; }
.form-checkout label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 13px;
  font-weight: 600;
  color: var(--gris-texto);
}
.form-checkout input, .form-checkout textarea {
  border: 1px solid var(--borde);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 15px;
  font-family: inherit;
  color: var(--marron);
}
.metodo-pago {
  border: 1px solid var(--borde);
  border-radius: 10px;
  padding: 10px 12px;
}
.metodo-pago legend { font-size: 13px; font-weight: 600; color: var(--gris-texto); padding: 0 4px; }
.opcion-pago { flex-direction: row !important; align-items: center; gap: 8px !important; font-weight: 500 !important; }
.checkout-resumen {
  display: flex;
  justify-content: space-between;
  font-size: 17px;
  padding-top: 6px;
}
.error-msg { color: var(--rojo); font-size: 13px; margin: 0; }

.modal-confirmacion { text-align: center; }
.check-icono {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--verde);
  color: white;
  font-size: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
}
.confirmacion-detalle { color: var(--gris-texto); font-size: 14px; margin-bottom: 20px; }

.pie {
  text-align: center;
  color: var(--gris-texto);
  font-size: 13px;
  padding: 20px 16px 40px;
}

/* ---------- Zona y horarios ---------- */
.info-local {
  background: var(--crema-fuerte);
  padding: 36px 16px;
}
.info-local-inner {
  max-width: 900px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 700px) {
  .info-local-inner {
    grid-template-columns: 1fr 1fr;
  }
  .tarjeta-info:nth-child(3) {
    grid-column: 1 / -1;
  }
}
.tarjeta-info {
  background: white;
  border-radius: var(--radio);
  padding: 18px;
  box-shadow: var(--sombra);
  border: 1px solid var(--borde);
}
.tarjeta-info h3 { font-size: 16px; margin: 0 0 12px; }
.tarjeta-info p { font-size: 14px; margin: 0 0 6px; color: var(--marron); }
.tarjeta-info a { color: var(--rojo); text-decoration: none; font-weight: 600; }
.tarjeta-info a:hover { text-decoration: underline; }
.tabla-horarios { width: 100%; border-collapse: collapse; font-size: 13px; }
.tabla-horarios td { padding: 5px 4px; border-bottom: 1px solid var(--crema-fuerte); }
.tabla-horarios td:first-child { font-weight: 600; }
.tabla-horarios td:last-child { text-align: right; color: var(--gris-texto); }
.tabla-horarios tr.fila-hoy td { color: var(--rojo-oscuro); font-weight: 700; }
.info-zona-texto { white-space: pre-line; }
.mapa-contenedor {
  margin-top: 10px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--borde);
  aspect-ratio: 2 / 1;
}
.mapa-contenedor iframe { width: 100%; height: 100%; border: 0; display: block; }
