/* ==========================================================================
   PANTALLA — Vista para el monitor del punto de pedido
   Llena la ventana del navegador al 100%. En móvil la vista se accede
   a través de /preview el cual embebe esta página en un iframe de
   1920×1080 escalado al viewport del dispositivo.
   ========================================================================== */

.pantalla-body {
  background: var(--cream);
  margin: 0;
  overflow: hidden;
  height: 100vh;
  height: 100dvh;
}

.pantalla-body::before {
  opacity: 0.3;
}

.exit-btn {
  position: fixed;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(45, 12, 20, 0.5);
  color: var(--cream-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  z-index: 100;
  opacity: 0.15;
  transition: opacity 0.2s;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-decoration: none;
}
.exit-btn:hover {
  opacity: 1;
}

/* ======================================================
   LAYOUT PRINCIPAL
   Sin combos:  Carrusel (1/3) + Menú (2/3) + Footer
   Con combos:  Carrusel (1/3) + Menú (1/3) + Combos (1/3) + Footer
   ====================================================== */

.pantalla {
  height: 100vh;
  height: 100dvh;
  display: grid;
  grid-template-rows: 1fr 2fr auto;
  grid-template-areas:
    "carousel"
    "menu"
    "footer";
  overflow: hidden;
  position: relative;
}

.pantalla.has-combos {
  grid-template-rows: 1fr 1fr 1fr auto;
  grid-template-areas:
    "carousel"
    "menu"
    "combos"
    "footer";
}

.carousel-section { grid-area: carousel; }
.menu-section    { grid-area: menu; }
.combos-section  { grid-area: combos; }
.pantalla-footer { grid-area: footer; }

/* ======================================================
   LOADING
   ====================================================== */

.pantalla-loading {
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  color: var(--burgundy);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 20px;
}

.cross-loader {
  font-size: 60px;
  color: var(--gold);
  animation: pulse 1.8s ease-in-out infinite;
}

/* ======================================================
   CARRUSEL CONTINUO
   ====================================================== */

.carousel-section {
  position: relative;
  overflow: hidden;
  background: var(--burgundy-dark);
  min-height: 0;
}

.carousel-fallback {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at center, var(--burgundy) 0%, var(--burgundy-dark) 100%);
}

.carousel-fallback-cross {
  font-size: 80px;
  color: var(--gold);
  margin-bottom: 16px;
  opacity: 0.9;
  text-shadow: 0 0 40px rgba(184, 134, 11, 0.4);
}

.carousel-fallback-brand {
  font-family: var(--font-display);
  font-size: clamp(42px, 6vw, 70px);
  color: var(--gold-pale);
  font-weight: 500;
  letter-spacing: 0.05em;
  text-align: center;
  line-height: 1;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
  padding: 0 20px;
}

.carousel {
  height: 100%;
  overflow: hidden;
  position: relative;
}

.carousel-track {
  display: flex;
  height: 100%;
  animation: carousel-scroll var(--scroll-duration, 30s) linear infinite;
  will-change: transform;
}

@keyframes carousel-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-33.333%); }
}

.carousel-card {
  width: 440px;
  height: 100%;
  flex-shrink: 0;
  margin-right: 20px;
  position: relative;
  overflow: hidden;
}

.carousel-img {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
}

.carousel-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 80px 28px 28px;
  background: linear-gradient(180deg, transparent 0%, rgba(45, 12, 20, 0.92) 100%);
  color: var(--cream-soft);
}

.carousel-item-name {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--cream-soft);
}

/* Precio en la esquina superior izquierda con bloque blanco sólido
   para alta legibilidad a distancia. */
.carousel-item-price {
  position: absolute;
  top: 16px;
  left: 16px;
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  color: var(--burgundy-deep);
  background: var(--cream-soft);
  padding: 8px 16px;
  letter-spacing: 0.02em;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  border: 1px solid var(--gold);
  z-index: 3;
}

/* Título flotante del menú sobre el carrusel */
.carousel-header {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  text-align: center;
  z-index: 3;
  pointer-events: none;
  padding: 0 40px;
}

.carousel-header-title {
  font-family: var(--font-display);
  font-size: clamp(40px, 5vw, 72px);
  font-weight: 500;
  color: var(--cream-soft);
  letter-spacing: 0.05em;
  margin: 0;
  text-shadow:
    0 4px 30px rgba(0, 0, 0, 0.95),
    0 2px 10px rgba(0, 0, 0, 0.8),
    0 0 20px rgba(0, 0, 0, 0.6);
  line-height: 1.05;
  text-transform: uppercase;
}

.carousel-header-sub {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 18px;
  color: var(--gold-light);
  margin-top: 10px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.95);
}

.carousel-gradient-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(180deg, transparent, var(--cream) 70%);
  pointer-events: none;
  z-index: 2;
}

/* ======================================================
   PAGINADOR (usado por menú y combos)
   Cada slide-container ocupa su grid-area y contiene un track
   que se desplaza horizontalmente para cambiar de página.
   ====================================================== */

.slide-container {
  height: 100%;
  width: 100%;
  overflow: hidden;
  position: relative;
}

.slide-track {
  display: flex;
  height: 100%;
  width: 100%;
  transition: transform 0.9s cubic-bezier(0.65, 0, 0.35, 1);
  will-change: transform;
}

.slide-page {
  width: 100%;
  height: 100%;
  flex-shrink: 0;
  padding: 24px 48px 28px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

/* Indicadores de página (puntos) */
.page-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 5;
}

.page-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold-soft);
  opacity: 0.35;
  transition: all 0.4s ease;
}

.page-dot.is-active {
  opacity: 1;
  width: 24px;
  border-radius: 3px;
  background: var(--burgundy);
}

/* ======================================================
   SECCIÓN DEL MENÚ
   ====================================================== */

.menu-section {
  background: linear-gradient(180deg, var(--cream) 0%, var(--cream-soft) 100%);
  position: relative;
  min-height: 0;
}

/* 2 columnas, hasta 3 filas. Las filas se distribuyen uniformemente
   sin forzar altura fija; así evitamos que la primera fila quede
   recortada si el espacio vertical es ajustado. */
.display-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-auto-rows: 1fr;
  gap: 16px 56px;
  flex: 1;
  min-height: 0;
  align-content: stretch;
  overflow: hidden;
}

.display-item {
  display: flex;
  gap: 22px;
  align-items: center;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.display-item-img {
  width: clamp(70px, 12vh, 110px);
  height: clamp(70px, 12vh, 110px);
  background: var(--cream-warm);
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  font-size: 32px;
  opacity: 0.95;
  box-shadow: 0 2px 12px rgba(45, 12, 20, 0.08);
  border: 1px solid var(--line-soft);
}

.display-item-img.no-img {
  background: linear-gradient(135deg, var(--cream-warm), var(--parchment));
}

.display-item-body {
  flex: 1;
  min-width: 0;
}

.display-item-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 6px;
}

.display-item-name {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 500;
  color: var(--burgundy-deep);
  margin: 0;
  letter-spacing: 0.01em;
  line-height: 1.1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.display-item-dots {
  flex: 1;
  border-bottom: 2px dotted var(--gold-soft);
  margin-bottom: 6px;
  min-width: 20px;
  opacity: 0.6;
}

.display-item-price {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 600;
  color: var(--burgundy);
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.display-item-desc {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 15px;
  color: var(--ink-soft);
  margin: 4px 0 0;
  line-height: 1.5;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* ======================================================
   SECCIÓN DE COMBOS (bottom 1/3, solo si existen combos)
   ====================================================== */

.combos-section {
  background: linear-gradient(180deg, var(--cream-soft) 0%, var(--parchment) 100%);
  position: relative;
  min-height: 0;
  border-top: 1px solid var(--gold-soft);
}

.combos-section .slide-page {
  padding: 24px 48px 24px;
}

.combos-title-row {
  display: flex;
  align-items: center;
  gap: 24px;
  margin: 0 0 18px;
  flex-shrink: 0;
}
.combos-title-row::before,
.combos-title-row::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--gold-soft);
  opacity: 0.5;
}

.section-title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.45em;
  color: var(--burgundy);
  margin: 0;
  white-space: nowrap;
  text-transform: uppercase;
}

.combos-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  flex: 1;
  min-height: 0;
}

/* Combo card — puede tener imagen a la derecha */
.display-combo {
  background: linear-gradient(135deg, var(--burgundy) 0%, var(--burgundy-deep) 100%);
  color: var(--cream-soft);
  position: relative;
  overflow: hidden;
  border: 1px solid var(--gold-soft);
  box-shadow: 0 4px 20px rgba(45, 12, 20, 0.15);
  display: grid;
  grid-template-columns: 1fr;
  min-height: 0;
}

.display-combo.has-img {
  grid-template-columns: 1fr auto;
}

.display-combo::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 80px;
  height: 80px;
  background: radial-gradient(circle at top right, rgba(212, 168, 74, 0.25), transparent 70%);
  pointer-events: none;
  z-index: 1;
}

.display-combo-body {
  padding: 22px 26px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  position: relative;
  z-index: 2;
}

.display-combo-img {
  background-size: cover;
  background-position: center;
  width: 240px;
  height: 100%;
  align-self: stretch;
  position: relative;
  z-index: 2;
}

.display-combo-kicker {
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 8px;
  font-weight: 500;
}

.display-combo-name {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 500;
  margin: 0 0 10px;
  letter-spacing: 0.01em;
  line-height: 1.15;
  color: var(--cream-soft);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.display-combo-items {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 14px;
  color: var(--gold-pale);
  line-height: 1.6;
  margin-bottom: 14px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.plus-sign {
  color: var(--gold-light);
  font-weight: 700;
  margin: 0 6px;
  font-style: normal;
}

.display-combo-price-row {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding-top: 10px;
  border-top: 1px solid rgba(212, 168, 74, 0.3);
}

.display-combo-price {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 600;
  color: var(--gold-light);
  letter-spacing: 0.02em;
}

.display-combo-save {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  background: var(--gold);
  color: var(--burgundy-dark);
  padding: 4px 10px;
  border-radius: var(--radius);
}

/* ======================================================
   FOOTER
   ====================================================== */

.pantalla-footer {
  padding: 12px 20px;
  background: var(--burgundy-dark);
  color: var(--gold-pale);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  border-top: 1px solid var(--gold);
}

.pantalla-footer-cross {
  color: var(--gold-light);
  font-size: 14px;
}

.pantalla-empty {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 40px;
  text-align: center;
  color: var(--ink-mute);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 18px;
}

.no-carousel-images .carousel-section {
  background: linear-gradient(135deg, var(--burgundy) 0%, var(--burgundy-deep) 50%, var(--burgundy-dark) 100%);
}
