/* Comer en Atoto · Estilos complementarios a Tailwind (lo que Tailwind CDN no cubre fácil) */

html { -webkit-tap-highlight-color: transparent; scroll-padding-top: 4.5rem; }
body { padding-bottom: env(safe-area-inset-bottom); }

/* Scroll horizontal sin barra visible (carruseles en móvil) */
.sin-scrollbar { scrollbar-width: none; -ms-overflow-style: none; }
.sin-scrollbar::-webkit-scrollbar { display: none; }

[hidden] { display: none !important; }

/* Chips de categoría */
.chip {
  flex-shrink: 0;
  white-space: nowrap;
  border-radius: 9999px;
  padding: .55rem 1rem;
  font-size: .875rem;
  font-weight: 700;
  background: #fff;
  color: #44403c;
  border: 1px solid #e7e5e4;
  transition: background-color .15s, color .15s, border-color .15s, transform .1s;
}
.chip:active { transform: scale(.96); }
.chip[aria-pressed="true"] { background: #3A2418; color: #fff; border-color: #3A2418; }

/* Puntos del carrusel */
.banner-punto {
  width: .5rem; height: .5rem; border-radius: 9999px;
  background: rgb(255 255 255 / .5);
  transition: width .25s, background-color .25s;
}
.banner-punto[aria-current="true"] { width: 1.4rem; background: #fff; }

/* Botón Sorpréndeme: el dado gira */
.girando .dado { animation: girar .5s ease-in-out infinite; }
@keyframes girar { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ===================== Menú del negocio ===================== */
.btn-primario { background: rgb(var(--c-primario)); color: var(--c-sobre-primario); }
.btn-primario:disabled { opacity: .5; }
.texto-primario { color: rgb(var(--c-primario-oscuro)); }

/* Navegación de categorías: la activa se marca con el color del negocio */
.nav-cat { flex-shrink: 0; white-space: nowrap; border-radius: 999px; padding: .6rem 1.1rem; font-size: .9rem; font-weight: 700; color: #3A2418; background: #fff; border: 1px solid #EFE4DC; transition: background-color .15s, color .15s; }
.nav-cat:hover { background: #FFF6F0; }
.nav-cat[aria-current="true"] { background: rgb(var(--c-primario)); color: var(--c-sobre-primario); border-color: transparent; box-shadow: 0 6px 16px -8px rgb(var(--c-primario) / .7); }
.paso-num { flex-shrink: 0; width: 2.25rem; height: 2.25rem; border-radius: 999px; display: grid; place-items: center; font-weight: 800; }

/* Producto resaltado al llegar desde una búsqueda o al agregarlo */
@keyframes pulso { 0% { box-shadow: 0 0 0 0 rgb(var(--c-primario) / .45); } 100% { box-shadow: 0 0 0 14px rgb(var(--c-primario) / 0); } }
.pulso { animation: pulso .6s ease-out; }

/* Drawer del carrito: hoja inferior en móvil, panel lateral en escritorio */
#carrito { visibility: hidden; transition: visibility 0s .3s; }
#carrito.abierto { visibility: visible; transition: visibility 0s; }
#carrito .fondo { opacity: 0; transition: opacity .25s; }
#carrito.abierto .fondo { opacity: 1; }
#carrito .panel { transform: translateY(100%); transition: transform .3s cubic-bezier(.2, .8, .2, 1); }
#carrito.abierto .panel { transform: none; }
@media (min-width: 640px) { #carrito .panel { transform: translateX(100%); } }

/* Barra flotante del carrito */
#barra-carrito { transform: translateY(150%); transition: transform .3s cubic-bezier(.2, .8, .2, 1); }
#barra-carrito.visible { transform: none; }
@keyframes rebote { 30% { transform: scale(1.06); } 60% { transform: scale(.97); } }
.rebote { animation: rebote .35s ease-out; }

/* Toast */
#toast { transform: translate(-50%, 150%); opacity: 0; transition: transform .25s, opacity .25s; }
#toast.visible { transform: translate(-50%, 0); opacity: 1; }

/* ===================== Portal: estilo "hero oscuro" ===================== */
.hero-fondo {
  background-color: #FFFFFF;
  background-image:
    radial-gradient(45% 60% at 95% 10%, rgb(252 88 36 / .12), transparent 70%),
    radial-gradient(35% 45% at 0% 100%, rgb(244 166 42 / .10), transparent 70%);
}

/* Subrayado amarillo "a mano" bajo una palabra */
.subrayado { position: relative; display: inline-block; }
.subrayado::after {
  content: ""; position: absolute; left: 2%; right: 0; bottom: -.12em; height: .14em;
  background: #F4A62A; border-radius: 999px; transform: rotate(-1.5deg); transform-origin: left;
}
.subrayado-blanco::after { background: #FFD08A; }

/* Barra amarilla bajo los títulos de sección */
.titulo-acento::after {
  content: ""; display: block; width: 3.5rem; height: .3rem; margin-top: .6rem;
  background: #F4A62A; border-radius: 999px; transform: rotate(-2deg);
}

/* Mosaicos de categoría */
.mosaico {
  flex: 1 0 140px; min-height: 84px; text-align: left;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: .9rem 1rem; border-radius: 1.25rem;
  background: #FBF5EC; border: 2px solid transparent;
  transition: border-color .15s, background-color .15s, transform .1s;
}
.mosaico:hover { background: #F3E3CC; }
.mosaico:active { transform: scale(.97); }
.mosaico[aria-pressed="true"] { background: #fff; border-color: #E64B16; box-shadow: 0 6px 18px -8px rgb(230 75 22 / .45); }
.mosaico-titulo { font-weight: 800; line-height: 1.15; color: #3A2418; }
.mosaico-sub { font-size: .75rem; color: #8A6F5E; margin-top: .15rem; }
.mosaico[aria-pressed="true"] .mosaico-sub { color: #8A6F5E; font-weight: 700; }

/* Franja roja final */
.franja-roja {
  background-color: #E64B16;
  background-image:
    radial-gradient(50% 80% at 100% 0%, rgb(252 88 36 / .9), transparent 70%),
    repeating-linear-gradient(-55deg, rgb(0 0 0 / 0) 0 22px, rgb(0 0 0 / .05) 22px 44px);
}

.banner-punto { background: rgb(58 36 24 / .25); }
.banner-punto[aria-current="true"] { background: #E64B16; }

/* ===================== Panel del dueño ===================== */
/* Interruptor grande (checkbox nativo: accesible y sin JS extra) */
.interruptor {
  appearance: none; -webkit-appearance: none; flex-shrink: 0;
  width: 3.75rem; height: 2.25rem; border-radius: 999px; position: relative; cursor: pointer;
  background: #D6D3D1; transition: background-color .2s;
}
.interruptor::after {
  content: ""; position: absolute; top: .25rem; left: .25rem; width: 1.75rem; height: 1.75rem;
  border-radius: 999px; background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / .25); transition: transform .2s;
}
.interruptor:checked { background: #16A34A; }
.interruptor:checked::after { transform: translateX(1.5rem); }
.interruptor:focus-visible { outline: none; box-shadow: 0 0 0 4px rgb(22 163 74 / .3); }
.interruptor:disabled { opacity: .6; }

/* Pestañas inferiores */
.pestana { height: 3.25rem; padding: 0 .2rem; border-radius: 1rem; font-weight: 800; font-size: clamp(.72rem, 3.5vw, .95rem); white-space: nowrap; color: #78716c; transition: background-color .15s, color .15s; }
.pestana[aria-selected="true"] { background: #E64B16; color: #fff; }

/* ===================== Portal estilo "Zesty" ===================== */
/* Categorías en columna lateral (fila deslizable en celular) */
.cat-lateral {
  flex-shrink: 0; display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  min-width: 150px; padding: .8rem 1rem; border-radius: 999px;
  font-weight: 700; color: #3A2418; background: #fff; border: 1px solid #F1E4DA;
  transition: background-color .15s, color .15s, box-shadow .15s;
}
.cat-lateral:hover { background: #FFF1E8; }
.cat-lateral[aria-pressed="true"] { background: #E64B16; color: #fff; border-color: #E64B16; box-shadow: 0 8px 20px -8px rgb(230 75 22 / .6); }
.cat-num { font-size: .75rem; font-weight: 800; min-width: 1.6rem; height: 1.6rem; display: grid; place-items: center; border-radius: 999px; background: #FFEDE4; color: #B8380C; }
.cat-lateral[aria-pressed="true"] .cat-num { background: rgb(255 255 255 / .25); color: #fff; }

/* Flechas de carrusel */
.flecha { width: 2.75rem; height: 2.75rem; border-radius: 999px; display: grid; place-items: center; background: #fff; color: #3A2418; box-shadow: 0 4px 14px -4px rgb(58 36 24 / .25); transition: background-color .15s, color .15s; }
.flecha-activa, .flecha:hover { background: #E64B16; color: #fff; }

/* Pasos numerados */
.beneficio-num { flex-shrink: 0; width: 2.5rem; height: 2.5rem; border-radius: 999px; display: grid; place-items: center; font-weight: 800; color: #fff; background: #FC5824; }

/* Con el carrito abierto, el aviso sale arriba para no tapar el total */
#carrito.abierto ~ #toast { bottom: auto; top: 1rem; }

/* Botones pequeños del manejo de secciones */
.flecha-mini { flex-shrink: 0; width: 2.5rem; height: 2.5rem; border-radius: .75rem; display: grid; place-items: center; font-size: 1.1rem; font-weight: 800; color: #3A2418; background: #FFF6F0; border: 1px solid #F1E4DA; }
.flecha-mini:disabled { opacity: .35; }

/* ===================== Hoja del código QR (tamaño carta) ===================== */
.hoja-qr { width: min(100%, 8.5in); aspect-ratio: 8.5 / 11; container-type: inline-size; border-radius: 1rem; }
@media print {
  @page { size: letter; margin: 0; }
  html, body { background: #fff !important; }
  .no-imprimir { display: none !important; }
  main { padding: 0 !important; }
  .hoja-qr { width: 8.5in; height: 11in; aspect-ratio: auto; border-radius: 0; box-shadow: none !important; }
  .hoja-qr, .hoja-qr * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* Ventana de opciones de un platillo: misma animación que el carrito */
#opciones { visibility: hidden; transition: visibility 0s .3s; }
#opciones.abierto { visibility: visible; transition: visibility 0s; }
#opciones .fondo { opacity: 0; transition: opacity .25s; }
#opciones.abierto .fondo { opacity: 1; }
#opciones .panel { transform: translateY(100%); transition: transform .3s cubic-bezier(.2, .8, .2, 1); }
#opciones.abierto .panel { transform: none; }
@media (min-width: 640px) { #opciones .panel { transform: translateX(100%); } }
#opciones.abierto ~ #toast { bottom: auto; top: 1rem; }

/* Cada opción elegible */
.opcion { display: flex; align-items: center; gap: .75rem; padding: .8rem .25rem; border-bottom: 1px solid #F3EDE8; cursor: pointer; }
.opcion input { width: 1.35rem; height: 1.35rem; flex-shrink: 0; accent-color: rgb(var(--c-primario)); }
.opcion.agotada { opacity: .45; cursor: not-allowed; }

/* Íconos de redes sociales (portal) */
.red-social { display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: 9999px; background: #FFEDE4; color: #E64B16; transition: background-color .15s, color .15s; flex-shrink: 0; }
.red-social:hover, .red-social:focus-visible { background: #E64B16; color: #fff; }
/* En celular no caben arriba junto al botón: se ven en el pie de página */
.redes-cabecera { display: none; }
@media (min-width: 640px) { .redes-cabecera { display: block; } }

/* Promos de hoy: las que pasan del tope se muestran con "Ver todas" */
.promo-extra { display: contents; }
.promo-extra[hidden] { display: none; }
.promo-ver-todas { flex-shrink: 0; width: 60%; max-width: 240px; border-radius: 1.75rem; background: #E64B16; color: #fff; padding: 1.5rem; text-align: left; box-shadow: 0 18px 36px -16px rgba(230,75,22,.6); transition: background-color .15s; }
.promo-ver-todas:hover, .promo-ver-todas:focus-visible { background: #B8380C; }

/* Panel: cuadrito de foto de cada platillo */
.foto-platillo { position: relative; flex-shrink: 0; width: 3.5rem; height: 3.5rem; border-radius: .9rem; overflow: hidden;
  display: grid; place-items: center; background: #FFF4EC; border: 2px dashed #F6A57E; color: #B8380C; font-size: .7rem; font-weight: 800; line-height: 1; }
.foto-platillo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.foto-platillo.con-foto { border: 0; }
.foto-platillo.con-foto [data-foto-vacia] { display: none; }
.foto-platillo.subiendo::after { content: ''; position: absolute; inset: 0; background: rgb(255 255 255 / .55) ; }
.foto-platillo.subiendo::before { content: ''; position: absolute; z-index: 1; width: 1.4rem; height: 1.4rem; border-radius: 9999px;
  border: 3px solid #F6A57E; border-top-color: #E64B16; animation: girar .8s linear infinite; }
@keyframes girar { to { transform: rotate(360deg); } }
/* Campo para elegir foto (platillo nuevo) */
.campo-archivo { display: block; width: 100%; font-size: .9rem; color: #57534e; }
.campo-archivo::file-selector-button { margin-right: .75rem; height: 2.75rem; padding: 0 1.1rem; border: 0; border-radius: 9999px;
  background: #3A2418; color: #fff; font-weight: 700; cursor: pointer; }

