/* ─────────────────────────────────────────────────────────────
   Estilos del motor: solo lo que no es de ningún restaurante.
   Va antes del tema, así que cada tema puede cambiarlo todo.
   ───────────────────────────────────────────────────────────── */

/* Hasta que llega el tema, la carta no se muestra a medio pintar. */
html:not([data-ready]) body > :not(noscript) {
  visibility: hidden;
}

[hidden] {
  display: none !important;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Carta no encontrada o sin conexión: neutra, sin marca. */
.message {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 12px;
  min-height: 100svh;
  padding: 24px;
  font-family: system-ui, sans-serif;
  text-align: center;
  color: #1f1f1f;
  background: #fafafa;
}
.message__title {
  margin: 0;
  font-size: 1.375rem;
}

/* ── La hoja del plato: lo que el motor añade ──────────────── */

/* Plato sin foto: la X va sobre la hoja y el nombre baja para no quedar debajo de ella. */
.viewer__box:has(> .viewer__stage[hidden]) .viewer__info {
  padding-top: 72px;
}
.viewer__desc {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.5;
}
/* Varios precios (Media y Completa): uno por renglón, alineados a la derecha. */
.viewer__price--multi {
  white-space: pre;
  text-align: right;
}

/* ── Compartir: usa la caja de la guía de cada tema ───────── */

.share__dish {
  margin: 4px 0 16px;
  font-weight: 600;
}
.share__options {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.share__option {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border: 1.5px solid color-mix(in srgb, currentColor 22%, transparent);
  border-radius: 12px;
  background: none;
  color: inherit;
  font: inherit;
  font-weight: 600;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.share__option:hover {
  border-color: currentColor;
}
.share__option svg {
  flex: none;
  width: 20px;
  height: 20px;
}
.share__status {
  min-height: 1.5em;
  margin: 12px 0 0;
  font-size: 0.875rem;
}

/* ── Agotado, presentaciones y pedir por WhatsApp ── */

.item--sold-out > :not(.item__sold-out) {
  opacity: 0.5;
}

.item__sold-out {
  display: inline-block;
  margin: 0.35em 0 0;
  padding: 0.1em 0.6em;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 0.8em;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.item__sizes {
  list-style: none;
  margin: 0.3em 0 0;
  padding: 0;
}

.item__sizes li {
  display: flex;
  justify-content: space-between;
  gap: 1em;
}

/* Botón flotante de WhatsApp, igual que en las páginas de PITS y Ascua (components .flotante y .subir): círculo blanco
   de 56 px con el icono negro, abajo a la derecha, y el botón de subir —más pequeño, oscuro y translúcido— centrado
   justo encima (.to-top--stacked). Es el mismo en todos los restaurantes: no depende del tema. */
:root {
  --order-fab-size: 56px;
  --order-fab-gap: 12px;
}
.order-fab {
  position: fixed;
  z-index: 20;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  display: grid;
  place-items: center;
  width: var(--order-fab-size);
  height: var(--order-fab-size);
  border-radius: 50%;
  background: #fff;
  color: #000;
  text-decoration: none;
  box-shadow: 0 10px 30px rgb(0 0 0 / 0.45), 0 0 0 1px rgb(255 255 255 / 0.08);
  animation: order-fab-in 0.5s cubic-bezier(0.16, 1, 0.3, 1) 1s both;
}
.order-fab svg {
  width: 26px;
  height: 26px;
}
.order-fab:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 4px;
}
@keyframes order-fab-in {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.9);
  }
}
@media (prefers-reduced-motion: reduce) {
  .order-fab {
    animation: none;
  }
}
/* Con la hoja de un plato abierta (el 3D) o la de compartir, los botones flotantes se apartan: la hoja es lo único que se
   ve y no hay un «pedir por WhatsApp» asomando detrás del 3D. Vuelven al cerrarla. */
html:has(dialog[open]) .order-fab,
html:has(dialog[open]) .to-top {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}
/* Con WhatsApp, el botón de subir se centra sobre él: 44 px, oscuro, flecha blanca. */
.to-top.to-top--stacked {
  right: calc(max(16px, env(safe-area-inset-right)) + (var(--order-fab-size) - 44px) / 2);
  bottom: calc(max(16px, env(safe-area-inset-bottom)) + var(--order-fab-size) + var(--order-fab-gap));
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgb(13 10 10 / 0.86);
  color: #fff;
  box-shadow: 0 8px 20px rgb(0 0 0 / 0.35), inset 0 0 0 1px rgb(255 255 255 / 0.18);
}

/* Pantallas diminutas (relojes, ventanas muy angostas): como en las páginas de PITS y Ascua, el botón de WhatsApp y el de
   subir se encogen por pasos y se acomodan juntos, para no tapar la carta. */
@media (max-width: 260px) {
  :root {
    --order-fab-size: 44px;
  }
  .order-fab svg {
    width: 20px;
    height: 20px;
  }
}
@media (max-width: 200px) {
  :root {
    --order-fab-size: 30px;
  }
  .order-fab {
    right: 4px;
    bottom: 4px;
  }
  .order-fab svg {
    width: 15px;
    height: 15px;
  }
  .to-top.to-top--stacked {
    right: 8px;
    bottom: 42px;
    width: 26px;
    height: 26px;
  }
  .to-top.to-top--stacked svg {
    width: 14px;
    height: 14px;
  }
}
@media (max-width: 130px) {
  :root {
    --order-fab-size: 26px;
  }
  .order-fab svg {
    width: 13px;
    height: 13px;
  }
  .to-top.to-top--stacked {
    right: 7px;
    bottom: 36px;
    width: 24px;
    height: 24px;
  }
}

/* ── Piezas estructurales (igual en todos los temas) ── */

html:has(dialog[open]) {
  overflow: hidden;
}
.skip-link:focus {
  top: 12px;
}
.sentinel {
  display: block;
  height: 1px;
  margin-bottom: -1px;
}
.menu__categories::-webkit-scrollbar {
  display: none;
}
.to-top svg {
  width: 20px;
  height: 20px;
}
.viewer__close svg {
  width: 20px;
  height: 20px;
}
.viewer__model {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  --poster-color: transparent;
}
.viewer__stage[data-state="model"] .viewer__photo {
  opacity: 0;
}
.guide__close svg {
  width: 20px;
  height: 20px;
}

/* ── Aviso de carta nueva ──
   Una píldora oscura abajo al centro, igual en todos los temas (neutra, como el botón de subir). En celular se aparta
   del botón de WhatsApp y del de subir (abajo a la derecha): ocupa el ancho que queda a su izquierda; en pantallas
   anchas, donde ya no se tocan, queda centrada de verdad. Con la hoja de un plato o la de compartir abiertas no se ve. */
.update-banner {
  position: fixed;
  z-index: 25;
  left: max(16px, env(safe-area-inset-left));
  right: calc(max(16px, env(safe-area-inset-right)) + var(--order-fab-size) + var(--order-fab-gap));
  bottom: max(16px, env(safe-area-inset-bottom));
  display: flex;
  justify-content: center;
  pointer-events: none;
}
.update-banner:empty {
  display: none;
}
@media (min-width: 640px) {
  .update-banner {
    right: max(16px, env(safe-area-inset-right));
  }
}
.update-banner__pill {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px 4px;
  box-sizing: border-box;
  max-width: min(100%, 380px);
  padding: 4px 4px 4px 14px;
  border-radius: 24px;
  background: rgb(13 10 10 / 0.92);
  color: #fff;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.3;
  box-shadow: 0 8px 20px rgb(0 0 0 / 0.35), inset 0 0 0 1px rgb(255 255 255 / 0.18);
  pointer-events: auto;
  animation: update-banner-in 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.update-banner__text {
  min-width: 0;
  padding: 6px 0;
}
/* En pantallas muy angostas el texto ocupa su fila y los botones van debajo. */
@media (max-width: 359px) {
  .update-banner__pill {
    flex-wrap: wrap;
  }
}
.update-banner__action,
.update-banner__dismiss {
  display: inline-grid;
  place-items: center;
  min-height: 40px;
  margin: 0;
  border: 0;
  border-radius: 999px;
  font: inherit;
  cursor: pointer;
  position: relative;
}
/* Área táctil de 44 px sin agrandar la píldora. */
.update-banner__action::after,
.update-banner__dismiss::after {
  content: '';
  position: absolute;
  inset: -2px 0;
}
.update-banner__action {
  padding: 0 12px;
  background: #fff;
  color: #000;
  font-weight: 600;
}
.update-banner__dismiss {
  min-width: 36px;
  background: transparent;
  color: rgb(255 255 255 / 0.8);
  font-size: 1.5rem;
  line-height: 1;
}
.update-banner__action:focus-visible,
.update-banner__dismiss:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}
.update-banner__action:disabled {
  opacity: 0.6;
  cursor: default;
}
html:has(dialog[open]) .update-banner {
  visibility: hidden;
}
@keyframes update-banner-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .update-banner__pill {
    animation: none;
  }
}
