/* ══════════════════════════════════════════════════════════════
   Base que comparten los diseños: medidas, carrusel, botón de pedir,
   barra fija del celular. Cada diseño pone colores, letras y forma.
   ══════════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }
body { margin: 0; overflow-x: clip; min-height: 100vh; }
img, video, iframe { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
[hidden] { display: none !important; }
.oculto { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--foco, #F2A541); outline-offset: 3px; border-radius: 6px; }

.contenedor { width: min(100% - 32px, var(--ancho, 1180px)); margin-inline: auto; }
@media (min-width: 768px) { .contenedor { width: min(100% - 64px, var(--ancho, 1180px)); } }

/* Contenido que llega por JS: sin «brinco» al cargar */
html:not(.listo) [data-anuncios], html:not(.listo) [data-menu], html:not(.listo) [data-semana] { opacity: 0; }
[data-anuncios], [data-menu], [data-semana] { transition: opacity .35s ease; }

/* ── Carrusel: deslizar con el dedo (scroll-snap) + flechas/puntos ── */
[data-anuncios] { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
[data-anuncios]::-webkit-scrollbar { display: none; }
[data-anuncios] > * { flex: 0 0 100%; scroll-snap-align: start; scroll-snap-stop: always; min-width: 0; }
[data-puntos] { display: flex; gap: 8px; justify-content: center; }
[data-puntos] button { width: 10px; height: 10px; padding: 0; border: 0; border-radius: 99px; background: currentColor; opacity: .35; transition: width .25s ease, opacity .25s ease; }
[data-puntos] button[aria-current="true"] { width: 28px; opacity: 1; }
/* el área táctil del punto es más grande que el punto */
[data-puntos] button { position: relative; }
[data-puntos] button::after { content: ""; position: absolute; inset: -12px -4px; }

/* ── Botón de pedir según el estado (html[data-estado]) ── */
[data-pedir] { transition: background-color .2s ease, color .2s ease, transform .15s ease, box-shadow .2s ease; }
[data-pedir]:active { transform: translateY(1px) scale(.99); }
html[data-estado="cerrado"] [data-pedir] { filter: saturate(.25); }
html[data-estado="revisando"] [data-pedir-nota] { opacity: .7; }
.punto-estado { width: 9px; height: 9px; border-radius: 50%; background: #9A8F84; flex: none; }
html[data-estado="pedir"] .punto-estado { background: #4CC36A; box-shadow: 0 0 0 4px rgba(76, 195, 106, .2); animation: latido 2.4s ease-in-out infinite; }
html[data-estado="llamar"] .punto-estado { background: #F2A541; }
html[data-estado="cerrado"] .punto-estado { background: #D14B3B; }
@keyframes latido { 50% { box-shadow: 0 0 0 7px rgba(76, 195, 106, 0); } }
[data-abierto] { white-space: nowrap; }

/* ── Menú: filtros ── */
[data-filtro] { white-space: nowrap; }

/* ── Video ── */
[data-video] { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #000 center / cover no-repeat; }
[data-video] iframe, [data-video] video { width: 100%; height: 100%; border: 0; }
.video-portada { position: absolute; inset: 0; border: 0; background: center / cover no-repeat; }
.video-portada::after, [data-video].sin-video::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 76px; height: 76px; translate: -50% -50%; border-radius: 50%;
  background: rgba(0,0,0,.55) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M8 5v14l11-7z'/%3E%3C/svg%3E") 56% 50% / 34px no-repeat;
  box-shadow: 0 0 0 2px rgba(255,255,255,.6); backdrop-filter: blur(4px);
}
[data-video].sin-video::before { content: "Aquí va tu video (YouTube o MP4)"; position: absolute; left: 50%; bottom: 18px; translate: -50% 0; white-space: nowrap;
  font: 600 13px/1 system-ui, sans-serif; letter-spacing: .02em; color: #fff; background: rgba(0,0,0,.6); padding: 8px 12px; border-radius: 99px; }

/* ── Barra fija de pedir en el celular ── */
.barra-pedir { position: fixed; z-index: 40; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); display: none; }
@media (max-width: 767px) {
  .barra-pedir { display: block; }
  body { padding-bottom: 92px; }
}

/* ── Videos del panel de publicidad (1 o 2 a la vez) ── */
.videos-pub { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); justify-items: center; }
.videos-pub.dos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.video-pub { position: relative; margin: 0; width: 100%; display: grid; gap: 10px; align-content: start; }
.video-pub.vertical { max-width: 340px; }
.video-pub video { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 14px; background: #000; }
.video-pub.horizontal video { aspect-ratio: 16 / 9; }
.video-sonido { position: absolute; top: 10px; right: 10px; min-height: 36px; padding: 6px 12px; border: 0; border-radius: 999px;
  background: rgba(0, 0, 0, .6); color: #fff; font: 600 13px/1 system-ui, sans-serif; cursor: pointer; }
.video-pub figcaption { display: grid; gap: 2px; }
.video-pub figcaption strong { font-size: 17px; }
.video-pub figcaption span { opacity: .8; font-size: 15px; }
@media (max-width: 599px) {
  /* En el celular, dos videos se deslizan de lado (no se encogen) */
  .videos-pub.dos { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 78%; justify-items: stretch;
    overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 4px; }
  .videos-pub.dos::-webkit-scrollbar { display: none; }
  .videos-pub.dos .video-pub { scroll-snap-align: center; max-width: none; }
}
