/* Asegurarse que el body ocupe toda la altura */
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  max-width: 100vw;
}

* {
  box-sizing: border-box;
}

.pedido-listo-aviso {
  background-color: #ffdf00;
  color: #172117 !important;
  border: 3px solid #198754 !important;
  font-weight: 800;
  white-space: normal;
  max-width: 100%;
  animation: aviso-pedido-listo 1.4s ease-in-out infinite;
}

@keyframes aviso-pedido-listo {
  50% { background-color: #9cf0b0; box-shadow: 0 0 0 6px rgba(255, 223, 0, .35); }
}

@media (prefers-reduced-motion: reduce) {
  .pedido-listo-aviso { animation: none; }
}

.selector-entrega {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.pedido-card.panel-pedido-listo {
  border: 4px solid #146c43 !important;
  outline: 5px solid #ffcf00;
  outline-offset: 2px;
  background-color: #fff8c4 !important;
  margin-top: 12px;
  margin-bottom: 24px !important;
  animation: borde-panel-listo 1.6s ease-in-out infinite;
}

.panel-pedido-listo .badge {
  font-size: 1.15rem;
  padding: 10px 14px;
}

@keyframes borde-panel-listo {
  50% { outline-color: #ff6500; outline-offset: 5px; }
}

@media (prefers-reduced-motion: reduce) {
  .pedido-card.panel-pedido-listo { animation: none; }
}

.entrega-opcion {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  border: 3px solid #aab2bd;
  border-radius: 14px;
  cursor: pointer;
  padding: 16px 10px 10px;
  text-align: center;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform .15s ease, box-shadow .15s ease;
}

@media (hover: hover) {
  .entrega-opcion:hover { transform: translateY(-3px); }
}
.entrega-opcion:active { transform: scale(.97); }
@media (prefers-reduced-motion: reduce) {
  .entrega-opcion { transition: none; }
  .entrega-opcion:hover, .entrega-opcion:active { transform: none; }
}

.entrega-icono { font-size: 2rem; line-height: 1.2; }
.entrega-opcion strong { font-size: 1.1rem; }
.entrega-opcion small { font-size: .8rem; line-height: 1.4; }
.entrega-local { background: #f0f9f4; color: #14532d; border-color: #82b99a; }
.entrega-domicilio { background: #fff7ec; color: #783b08; border-color: #d9a568; }
.entrega-seleccion { visibility: hidden; font-size: .75rem; font-weight: 700; }
.selector-entrega input:checked + .entrega-opcion .entrega-seleccion { visibility: visible; }

.selector-entrega input:checked + .entrega-opcion {
  background: #ffe6c2;
  border-color: #a94b00;
  color: #783b08;
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px #a94b00;
  font-weight: 700;
}

.selector-entrega input:checked + .entrega-local {
  background: #d5f3df;
  border-color: #146c43;
  color: #14532d;
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px #146c43;
}

.selector-entrega input:focus-visible + .entrega-opcion {
  outline: 3px solid rgba(255, 152, 0, 0.35);
  outline-offset: 2px;
}

.resumen-delivery {
  background: #fff8e1;
  border-left: 4px solid #ff9800;
  border-radius: 6px;
  padding: 12px;
}

.pedido-delivery {
  background-color: #fff3cd;
  border: 3px solid #ff9800 !important;
}

.pedido-delivery-detalle {
  background-color: #fff3cd;
  border-left: 5px solid #ff9800;
  border-radius: 6px;
  padding: 12px;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-y: auto;
}

body > .footer {
  flex-shrink: 0;
  margin-top: auto !important;
  position: relative;
  z-index: 1;
}

body > main,
body > #panelCocina {
  flex-shrink: 0;
}

body.home-page {
  display: flex;
  flex-direction: column;
  overflow-x: clip;
  overflow-y: visible;
  height: auto;
  min-height: 100vh;
  min-height: 100dvh;
}

html:has(body.home-page) {
  height: auto;
  overflow-x: hidden;
  overflow-y: auto;
}

body.home-page .footer {
  display: block !important;
  flex-shrink: 0;
  margin-top: auto !important;
  padding-top: 8px !important;
  padding-bottom: 8px !important;
}

body.home-page .footer .row {
  --bs-gutter-y: 0;
}

body.home-page .footer h5,
body.home-page .footer h6 {
  margin-bottom: 4px !important;
}

body.home-page .footer .fs-2 {
  font-size: 1.35rem !important;
}

.home-welcome {
  flex-shrink: 0;
  padding: clamp(40px, 6vw, 64px) 16px 0;
  text-align: center;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.65), transparent);
}

body.home-page .home-welcome {
  margin-top: var(--home-header-offset, 0px);
}

.cocina-sin-pedidos {
  color: #ffc107;
  background: rgba(0, 0, 0, 0.85);
  border-radius: 12px;
}

.cocina-sin-pedidos h4 {
  font-weight: 700;
}

.home-welcome-brand {
  color: #d71920;
}

.home-welcome-title {
  margin: 0;
  color: var(--bs-warning, #ffc107);
  font-family: 'Montserrat', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  font-size: clamp(1.2rem, 6.2vw, 3.5rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  white-space: nowrap;
  text-shadow: 0 2px 6px rgba(0, 0, 0, .8);
}


.home-menu-entry {
  /* Espacio reservado para volver a mostrar el aviso de horarios. */
  margin-top: clamp(140px, 25dvh, 240px);
}

/* La portada vacía ocupa la pantalla; el carrito conserva su scroll natural. */
body.home-page:has(#pedidoCarrito[hidden]) {
  height: 100dvh;
}

body.home-page:has(#pedidoCarrito[hidden]) .home-menu-entry {
  margin-top: max(0px, calc(clamp(64px, calc(100dvh - 480px), 260px) - var(--home-header-offset, 0px)));
}

body.home-page:has(#pedidoCarrito[hidden]) .home-empty-order {
  flex: 1 0 auto;
  min-height: 150px;
  align-items: center;
  margin-top: 28px;
  padding: 16px;
}

body.home-page:has(#pedidoCarrito[hidden]) .home-empty-order-message {
  transform: none;
  padding: 10px 16px;
}

@media (max-width: 767.98px) {
  .home-welcome-title {
    font-size: clamp(1.3rem, 7.1vw, 3rem);
  }

  body.home-page .home-welcome {
    margin-top: calc(var(--home-header-offset, 0px) + 12px);
  }

  body.home-page:has(#pedidoCarrito[hidden]) .home-menu-entry {
    margin-top: max(0px, calc(clamp(40px, calc(100dvh - 550px), 220px) - var(--home-header-offset, 0px)));
  }

  body.home-page:has(#pedidoCarrito[hidden]) .footer {
    padding: 8px !important;
  }

  body.home-page:has(#pedidoCarrito[hidden]) .footer .row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }

  body.home-page:has(#pedidoCarrito[hidden]) .footer .col-12 {
    width: auto;
    padding: 0;
    margin: 0;
    font-size: .75rem;
  }

  body.home-page:has(#pedidoCarrito[hidden]) .footer .col-12:last-child {
    grid-column: 1 / -1;
  }

  body.home-page:has(#pedidoCarrito[hidden]) .footer h5,
  body.home-page:has(#pedidoCarrito[hidden]) .footer h6 {
    font-size: .85rem;
  }
}

body.home-page #avisoHorarioCarta:not([hidden]) ~ .home-menu-entry {
  margin-top: 24px;
}

body.home-page #avisoHorarioCarta:not([hidden]) ~ #pedidoVacio {
  display: none;
}

.home-welcome-intro {
  display: block;
  margin-bottom: 0;
  font-size: clamp(1rem, 3vw, 1.4rem);
  font-weight: 500;
  letter-spacing: 0.12em;
}

.menu-app {
  min-height: 0;
  display: block;
  padding: 0;
  overflow: hidden;
}

.menu-app .container-fluid {
  height: auto;
  overflow: visible !important;
}

#modalMenu .modal-dialog {
  max-width: 92vw;
  height: calc(100vh - 80px);
  margin: 20px auto;
}

#modalMenu .modal-content {
  height: 100%;
}

#modalMenu .modal-body {
  max-height: calc(100vh - 210px);
  overflow-y: auto;
}

/* Animación de pulso para el botón principal */
.menu-callout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #212529;
  font-size: 1.15rem;
  font-weight: 800;
}

.menu-callout-text {
  background: #ffc107;
  border: 2px solid #212529;
  border-radius: 999px;
  padding: 5px 14px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.35);
}

.menu-callout-hand {
  display: inline-block;
  font-size: 2rem;
  animation: apuntar-menu 0.8s ease-in-out infinite alternate;
}

@keyframes apuntar-menu {
  from { transform: translateY(-4px); }
  to { transform: translateY(5px); }
}

.menu-button-neon {
  position: relative;
  display: inline-flex;
  padding: 4px;
  border-radius: 0.8rem;
  overflow: hidden;
  background: #332900;
  box-shadow: 0 0 12px rgba(255, 193, 7, 0.75), 0 0 28px rgba(255, 193, 7, 0.35);
}

.menu-button-neon::before {
  content: "";
  position: absolute;
  width: 160%;
  aspect-ratio: 1;
  left: -30%;
  top: 50%;
  background: conic-gradient(transparent 0deg 275deg, rgba(255, 193, 7, 0.15) 295deg, #fff7b2 325deg, #ffc107 350deg, transparent 360deg);
  animation: girar-neon-menu 2.1s linear infinite;
}

.menu-primary-button {
  position: relative;
  z-index: 1;
  border: 0 !important;
  border-radius: 0.6rem;
}

@keyframes girar-neon-menu {
  from { transform: translateY(-50%) rotate(0deg); }
  to { transform: translateY(-50%) rotate(360deg); }
}

.pulse-animation {
    animation: pulse 2s infinite;
    border: 2px solid #ffc107;
}


/*
Efecto blur para el modal del panel*/

#loginCocinaModal .modal-content {
  background: rgba(255, 255, 255, 0.15); /* Transparente */
  backdrop-filter: blur(10px);           /* Difuminado */
  -webkit-backdrop-filter: blur(10px);   /* Safari */
  border: 1px solid rgba(255, 255, 255, 0.2);
}


.modal-backdrop.show {
  background-color: rgba(0, 0, 0, 0.2); /* Más transparente */
  backdrop-filter: blur(5px);
}


@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 193, 7, 0.7);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 15px rgba(255, 193, 7, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 193, 7, 0);
    }
}

/* Efecto hover adicional */
.pulse-animation:hover {
    animation: none;
    transform: scale(1.1);
    transition: all 0.3s ease;
}

/* Checkboxes con borde visible */
.form-check-input.item-checkbox {
    border: 2px solid #6c757d !important;
    width: 20px;
    height: 20px;
    cursor: pointer;
}

/* Checkboxes cuando están checked */
.form-check-input.item-checkbox:checked {
    background-color: #198754;
    border-color: #198754 !important;
}

/* Efecto hover en checkboxes */
.form-check-input.item-checkbox:hover {
    border-color: #0d6efd !important;
}


/* Footer Profesional y Sobrio */
.footer-pro {
  flex-shrink: 0;
  background-color: #ffffff;
  border-top: 1px solid #dee2e6;
  color: #495057;
  padding: 20px 0;
}

/* Contenedor del Carrito (Discreto y Elegante) */
.carrito-wrapper {
  width: min(700px, calc(100vw - 18px));
  max-width: 700px;
  margin: 0 auto 12px auto;
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid #e9ecef;
  box-shadow: 0 10px 40px rgba(0,0,0,0.08);
}

.carrito-wrapper button,
.carrito-wrapper .btn {
  max-width: 100%;
}

body.home-page .text-center.p-3 {
  padding-top: 10px !important;
  padding-bottom: 10px !important;
}

body.home-page .btn,
body.home-page button,
body.home-page .btn-close {
  position: relative;
  z-index: 2;
  opacity: 1 !important;
}

body.home-page .btn-dark {
  background-color: #111111 !important;
  border-color: #111111 !important;
  color: #ffffff !important;
}

body.home-page .btn-warning {
  background-color: #ffc107 !important;
  border-color: #ffc107 !important;
  color: #111111 !important;
}

body.home-page .btn-success {
  background-color: #198754 !important;
  border-color: #198754 !important;
  color: #ffffff !important;
}

body.home-page .btn-secondary {
  background-color: #6c757d !important;
  border-color: #6c757d !important;
  color: #ffffff !important;
}

#notificacion-flotante {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10005; /* Por encima de todo */
  width: 350px !important; /* Forzamos un ancho generoso */
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  pointer-events: none;
}

.toast-exito {
  background-color: #198754 !important;
  color: white !important;
  padding: 15px 20px;
  border-radius: 8px;
  margin-bottom: 10px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
  width: 100%; /* Que ocupe los 350px del contenedor */
  display: block !important;
  font-weight: bold;
  font-size: 1rem;
  text-align: left; /* Alineado a la izquierda para que se lea "Agregado: Producto" */
  border-left: 5px solid #0f5132;
  white-space: normal !important; /* Permitir que el texto baje si es muy largo */
  overflow: visible !important;
}

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.caja-dia-header {
  position: sticky;
  top: 0;
  z-index: 5;
  margin-bottom: 14px;
  padding: 10px 14px;
  border-left: 5px solid #ffc107;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 4px 14px rgba(0,0,0,.12);
  font-size: 1.2rem;
  font-weight: 800;
}

.cliente-caja {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  background: #212529;
  color: #ffc107;
  font-size: 1.05rem;
  font-weight: 800;
}

.metrica-icono {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border-radius: 14px;
  color: white;
  font-size: 1.35rem;
}

.caja-metrica,
.caja-pedido {
  transition: transform .2s ease, box-shadow .2s ease;
}

.caja-pedido:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,.16) !important;
}

.pago-pendiente-check {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border: 1px solid #e0a800;
  border-radius: 8px;
  background: #fff3cd;
  color: #664d03;
  font-weight: 700;
  cursor: pointer;
}

.btn-mercado-pago {
  background: #009ee3 !important;
  border-color: #009ee3 !important;
  color: #ffffff !important;
  font-weight: 700;
}

.btn-mercado-pago:hover {
  background: #008ed0 !important;
  border-color: #008ed0 !important;
  color: #ffffff !important;
}

.mp-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #ffffff;
  color: #009ee3;
  font-size: 0.7rem;
  font-weight: 900;
}

#modalNombre .modal-footer {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
}

#modalNombre .modal-footer > .btn {
  margin: 0;
}

#modalNombre #btnConfirmarPago {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  white-space: normal;
}

#btnConfirmarPago .mp-icon {
  flex-shrink: 0;
}

#modalNombre #pagoEfectivo {
  --bs-form-switch-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23000'/%3e%3c/svg%3e");
  width: 2.5em;
  height: 1.4em;
  border: 2px solid #000;
  background-image: var(--bs-form-switch-bg);
  background-color: #fff;
  cursor: pointer;
}

#modalNombre #pagoEfectivo:checked {
  background-color: #ffc107;
}

#modalNombre #pagoEfectivo:focus-visible {
  outline: 3px solid #111;
  outline-offset: 3px;
  box-shadow: none;
}

#modalNombre .form-switch {
  padding-left: 3.25em;
}

#modalNombre #pagoEfectivo {
  margin-left: -3.25em;
}

@media (max-width: 767.98px) {
  html:has(body.home-page) {
    height: auto;
    min-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
  }

  body.home-page {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 100dvh;
    overflow-x: clip;
    overflow-y: visible;
  }

  body.home-page > .text-center.p-3 {
    padding: 12px !important;
  }

  body.home-page > .text-center.p-3 .btn-lg {
    width: 100%;
    max-width: 440px;
    padding: 14px 16px !important;
    font-size: clamp(1rem, 4.5vw, 1.2rem) !important;
    white-space: normal;
  }

  body.home-page .carrito-wrapper {
    width: calc(100% - 20px);
    margin: 0 10px 16px;
    padding: 10px !important;
  }

  body.home-page .carrito-header h5,
  body.home-page #listaCarrito {
    font-size: 1.15rem !important;
  }


  body.home-page .carrito-footer {
    padding: 8px !important;
  }

  body.home-page .carrito-footer .fs-3 {
    font-size: 1.25rem !important;
  }

  body.home-page .footer {
    margin-top: auto !important;
    padding: 14px 8px !important;
  }

  body.home-page .footer .row {
    row-gap: 12px;
  }

  body.home-page .footer .col-12 {
    text-align: center !important;
  }

  #notificacion-flotante {
    left: 10px;
    right: 10px;
    width: auto !important;
  }

  #modalMenu .modal-dialog {
    max-width: calc(100vw - 12px);
    height: calc(100dvh - 24px);
    margin: 12px auto;
  }

  #modalMenu .modal-body {
    padding: 12px !important;
    max-height: calc(100dvh - 165px);
  }

  #modalMenu .modal-title {
    font-size: 1rem;
  }

  #modalMenu .modal-footer {
    flex-wrap: nowrap;
    padding: 10px !important;
  }

  #modalMenu .modal-footer .btn {
    flex: 1;
    font-size: 0.9rem;
  }
}

/* La página crece con el pedido; el footer nunca se superpone al contenido. */
body.home-page [hidden] {
  display: none !important;
}

.home-empty-order {
  flex: 1 0 auto;
  min-height: clamp(180px, 32dvh, 420px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 24px 16px;
  text-align: center;
  color: #fff;
}

.home-empty-order-message {
  max-width: 390px;
  transform: translateY(-24px);
  padding: 18px 24px;
  border-radius: 16px;
  background: rgba(15, 10, 10, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.home-empty-order-eyebrow {
  color: #ffce62;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.home-empty-order h2 {
  margin: 8px 0;
  font-family: 'Montserrat', Arial, sans-serif;
  font-size: clamp(1.35rem, 4vw, 1.75rem);
  font-weight: 700;
}

.home-empty-order p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
  color: #f2e9df;
}

body.home-page .home-tracking-button {
  width: min(350px, calc(100% - 32px));
  margin: 0 auto 20px;
  flex-shrink: 0;
  background-color: rgba(15, 10, 10, 0.8);
}

body.home-page .home-tracking-button.pedido-listo-aviso {
  position: relative;
  width: min(480px, calc(100% - 32px));
  min-height: 108px;
  padding: 23px 42px 23px 66px;
  border: 1px solid #708fba !important;
  border-radius: 20px;
  background: linear-gradient(135deg, #243e63, #14243e);
  color: #fff !important;
  font-size: clamp(1.2rem, 5vw, 1.5rem);
  font-weight: 700;
  line-height: 1.3;
  text-align: left;
  box-shadow: 0 12px 30px #0005;
  animation: none;
  transition: background .2s, box-shadow .2s;
}
body.home-page .home-tracking-button.pedido-listo-aviso::before {
  content: '✓'; position: absolute; left: 18px; top: 27px;
  display: grid; place-items: center; width: 34px; height: 34px;
  border-radius: 50%; background: #ffffff18; color: #e1edff;
  border: 1px solid #ffffff40; font-size: 20px;
}
body.home-page .home-tracking-button.pedido-listo-aviso::after {
  content: 'Ver seguimiento →'; display: block; margin-top: 7px;
  color: #d2e0f4; font-size: .88rem; font-weight: 500;
}
body.home-page .home-tracking-button.pedido-listo-aviso:hover {
  background: #29496f; box-shadow: 0 14px 34px #0006;
}
body.home-page .home-tracking-button.pedido-listo-aviso:focus-visible {
  outline: 3px solid #b6d4ff; outline-offset: 4px;
}

body.home-page > .carrito-wrapper,
body.home-page > .text-center.p-3 {
  flex-shrink: 0;
}

/* Aprovechar la altura disponible también en celulares y notebooks bajos. */
@media (max-height: 800px) {
  body.home-page .home-welcome {
    padding-top: clamp(28px, 5dvh, 40px);
  }

  body.home-page > .text-center.p-3 .menu-primary-button {
    padding: 10px 16px !important;
    font-size: clamp(1rem, 2.5dvh, 1.5rem) !important;
    white-space: normal;
  }

  body.home-page .carrito-wrapper {
    padding: 8px !important;
    margin-bottom: 8px;
  }

  body.home-page .carrito-header h5 {
    font-size: 1.25rem !important;
  }

  body.home-page #listaCarrito > p {
    font-size: 1rem !important;
    padding: 6px 0 !important;
    margin-bottom: 0;
  }

  body.home-page .carrito-footer {
    padding: 6px !important;
  }

  body.home-page .carrito-footer > div {
    margin-bottom: 0 !important;
    font-size: 1.25rem !important;
  }

  body.home-page .carrito-body > .d-flex {
    gap: 6px !important;
  }
}

/* Campos de contacto con borde oscuro y foco visible. */
.horarios-carta {
  background: #fff;
  color: #111;
  border: 3px solid #dc3545;
  box-shadow: 0 6px 22px rgba(0, 0, 0, .18);
}
.horario-aviso { border: 3px solid #dc3545; border-radius: 24px; overflow: hidden; box-shadow: 0 20px 60px rgba(0, 0, 0, .3); }
.horario-turno { background: #f7f7f7; color: #222; }

.horarios-carta:has(#detalleCierreEspecial:not([hidden])),
.horario-aviso:has(#marcaModalHorario:not([hidden])) {
  background: #fff;
}
.horarios-carta:has(#detalleCierreEspecial:not([hidden])) #tituloAvisoHorario,
.horario-aviso:has(#marcaModalHorario:not([hidden])) #tituloHorario {
  background: #f7f7f7;
  color: #222;
  padding: 16px;
  border-radius: 14px;
  font-weight: 800;
  line-height: 1.45;
}
.cierre-marca {
  display: block;
  margin-top: 8px;
  color: #d71920;
  font-family: 'Montserrat', system-ui, sans-serif;
  font-size: 1.35em;
  font-weight: 800;
}
.cierre-marca[hidden] { display: none; }

.instalar-app {
  width: min(460px, calc(100% - 32px));
  margin: 18px auto 24px;
  padding: 18px;
  border: 1px solid #e7e7e7;
  border-radius: 18px;
  background: #fff;
  color: #222;
  box-shadow: 0 6px 20px #0002;
}
.instalar-app[hidden], .instalar-app-ayuda[hidden] { display: none; }
.instalar-app-cabecera { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.instalar-app-cabecera img { flex: 0 0 52px; border-radius: 12px; }
.instalar-app h2 { font-size: 1.1rem; font-weight: 700; color: #d71920; margin: 0 0 4px; }
.instalar-app p { font-size: .9rem; line-height: 1.5; margin: 0; }
.instalar-app > button { width: 100%; white-space: normal; min-height: 44px; }
.instalar-app-ayuda { background: #f7f7f7; border-radius: 12px; padding: 14px; margin-top: 14px; font-size: .9rem; }
.instalar-app-ayuda ol { padding-left: 20px; margin: 10px 0; }
.instalar-app-ayuda li + li { margin-top: 8px; }
.instalar-app-estado:not(:empty) { margin-top: 10px; }

/* Conserva el tamaño del aviso y suaviza la transición entre modales. */
#modalHorario.modal.fade {
  transition: opacity .45s ease-in-out;
}

#modalHorario.modal.fade .modal-dialog {
  transform: translateY(10px);
  transition: transform .45s ease-out;
}

#modalHorario.modal.show .modal-dialog {
  transform: none;
}

#modalMenu.modal.fade,
#modalNombre.modal.fade {
  transition: opacity .3s ease-in-out;
}

@media (prefers-reduced-motion: reduce) {
  #modalHorario.modal.fade,
  #modalHorario.modal.fade .modal-dialog,
  #modalMenu.modal.fade,
  #modalNombre.modal.fade { transition: none; }
}

.dialogo-app {
  width: min(460px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  margin: auto;
  padding: 28px;
  border: 1px solid #e5e7eb;
  border-top: 5px solid #dc3545;
  border-radius: 22px;
  color: #212529;
  background: #fff;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .3);
}
.dialogo-app::backdrop { background: rgba(15, 23, 42, .65); backdrop-filter: blur(4px); }
.dialogo-app-icono {
  display: grid; place-items: center; width: 52px; height: 52px;
  margin-bottom: 18px; border-radius: 16px; background: #fff0ee;
  color: #b42332; font-size: 28px; font-weight: 700;
}
.dialogo-app h2 { font-size: 1.4rem; font-weight: 700; margin-bottom: 12px; }
.dialogo-app p { color: #59616c; line-height: 1.6; white-space: pre-line; overflow-wrap: anywhere; }
.dialogo-app-acciones { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.dialogo-app-acciones .btn { min-height: 44px; border-radius: 12px; padding: 10px 20px; font-weight: 600; }
#modalNombre .nombre-cliente-destacado {
  border: 2px solid #212529;
  border-radius: 10px;
  background: #fff;
  padding: 11px 12px;
  font-size: 1rem;
  box-shadow: none;
}
#modalNombre .nombre-cliente-destacado:focus {
  border-color: #111;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(33, 37, 41, .12);
}

#modalNombre .entrega-opcion {
  position: relative;
  background: #fff;
  color: #45494d;
  border: 1px solid #d8dadd;
  border-radius: 10px;
  padding: 14px 24px;
  gap: 4px;
  transform: none;
}
#modalNombre .entrega-icono { font-size: 1.25rem; }
#modalNombre .entrega-opcion strong { font-size: .95rem; }
#modalNombre .entrega-opcion small { color: #656a70; font-weight: 400; }
#modalNombre .entrega-seleccion { position: absolute; top: 7px; right: 10px; }
#modalNombre .selector-entrega input:checked + .entrega-opcion {
  background: #edf7f0;
  border-color: #198754;
  color: #146c43;
  box-shadow: inset 0 0 0 1px #198754;
}
#modalNombre .selector-entrega input:focus-visible + .entrega-opcion {
  outline: 3px solid #90969c;
  outline-offset: 3px;
}
#modalNombre .resumen-delivery {
  background: #f5f6f7;
  border: 1px solid #e2e4e6;
  border-radius: 10px;
}
#modalNombre #totalDelivery { color: #212529 !important; }
#modalNombre #btnConfirmarPago {
  --bs-btn-bg: #212529;
  --bs-btn-border-color: #212529;
  --bs-btn-hover-bg: #343a40;
  --bs-btn-hover-border-color: #343a40;
  --bs-btn-active-bg: #111;
  --bs-btn-active-border-color: #111;
}

/* Separación superior de las dos secciones principales del footer. */
body.home-page .footer .row > .col-12:nth-child(-n+2),
body.home-page:has(#pedidoCarrito[hidden]) .footer .row > .col-12:nth-child(-n+2) {
  padding-top: 12px;
}

/* Detalle de productos: conserva la carta abierta debajo del diálogo. */
.producto-ver-foto { border: 0; background: none; padding: 0; flex-shrink: 0; cursor: zoom-in; }
.producto-ver-detalle { border: 0; background: none; padding: 6px 0; color: #755000; font-weight: 700; text-decoration: underline; font-size: .85rem; }
.producto-ver-foto:focus-visible, .producto-ver-detalle:focus-visible,
.producto-detalle button:focus-visible { outline: 3px solid #ffc107; outline-offset: 3px; }
.producto-detalle {
  width: min(880px, calc(100vw - 24px)); max-width: none;
  max-height: calc(100dvh - 24px); margin: auto; padding: 0;
  color: #fff4dd; background: #151515; border: 1px solid #6e592b;
  border-radius: 20px; overflow: auto; overscroll-behavior: contain;
  box-shadow: 0 24px 90px #0009;
}
.producto-detalle::backdrop { background: #000b; }
.producto-detalle-cabecera { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px; color: #ffc107; font-size: .75rem; letter-spacing: .08em; }
.producto-detalle-cerrar { width: 44px; height: 44px; border: 1px solid #666; border-radius: 50%; color: #fff4dd; background: #242424; font-size: 1.8rem; line-height: 1; flex-shrink: 0; }
.producto-detalle-contenido { display: grid; grid-template-columns: 1fr 1fr; align-items: start; gap: 24px; padding: 0 20px 20px; }
.producto-detalle-foto { position: relative; width: 100%; padding: 0; border: 0; border-radius: 12px; background: #050505; color: white; overflow: hidden; cursor: zoom-in; }
.producto-detalle-foto img { display: block; width: 100%; max-height: 52dvh; object-fit: contain; }
.producto-detalle-foto span { display: block; padding: 10px; background: #242424; font-size: .8rem; }
.producto-detalle-info { overflow-wrap: anywhere; }
.producto-detalle-info h2 { font-size: clamp(1.4rem, 4vw, 2rem); font-weight: 700; }
.producto-detalle-precio { color: #ffc107; font-size: 1.6rem; font-weight: 700; margin: 12px 0 24px; }
.producto-detalle-info h3 { font-size: 1rem; font-weight: 700; }
.producto-detalle-descripcion { white-space: pre-line; line-height: 1.7; color: #e2ddd3; }
.aderezos-producto { margin-top: 24px; padding-top: 20px; border-top: 1px solid #ffffff26; }
.aderezos-producto h3 { font-size: 1.15rem; margin-bottom: 6px; }
.aderezos-ayuda { color: #bbb8b1; font-size: .82rem; line-height: 1.5; }
.aderezos-grupo { min-width: 0; padding: 16px; margin: 16px 0; border: 1px solid #ffffff26; border-radius: 14px; background: #1c1c1c; }
.aderezos-grupo legend { float: none; width: auto; padding: 0 6px; margin: 0; font-size: .95rem; font-weight: 700; }
.aderezos-contador { display: block; font-size: .75rem; color: #bbb8b1; margin-bottom: 12px; }
.aderezos-opciones { display: grid; gap: 8px; }
.aderezo-opcion { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px; border: 1px solid #ffffff1f; border-radius: 9px; transition: border-color .15s, background .15s; }
.aderezo-opcion:has(input:checked) { border-color: #73a983; background: #25372a; }
.aderezo-opcion:has(input:disabled) { opacity: .45; }
.aderezo-opcion label { display: flex; align-items: center; gap: 9px; cursor: pointer; font-size: .86rem; flex: 1; }
.aderezo-opcion input { width: 18px; height: 18px; accent-color: #75b087; flex-shrink: 0; }
.aderezo-opcion select { width: 90px; padding: 5px; border: 1px solid #ffffff38; border-radius: 6px; background: #202420; color: #fff4dd; font-size: .78rem; }
.aderezo-opcion select:disabled { visibility: hidden; }
.aderezo-opcion :focus-visible { outline: 2px solid #a6d8b5; outline-offset: 3px; }
.aderezos-nota { margin-bottom: 0; font-size: .75rem; }
.cocina-aderezos { margin-top: 8px; padding: 8px 12px; border-left: 3px solid #b59a68; border-radius: 4px; background: #faf7f0; font-size: .85rem; line-height: 1.8; }
.cocina-aderezos-titulo { display: block; color: #57534e; font-size: .75rem; font-weight: 600; }
.cocina-aderezos-grupo { color: #57534e; }
.cocina-aderezo { display: inline-block; }
.cocina-aderezo-nombre { color: #292524; font-weight: 700; }
.cocina-aderezo-cantidad { color: #805216; background: #f3e7cd; border-radius: 4px; padding: 2px 6px; font-weight: 600; }
.producto-detalle-pie { position: sticky; bottom: 0; display: flex; flex-wrap: wrap; gap: 10px; padding: 16px 20px; background: #151515; border-top: 1px solid #3c3525; }
.producto-detalle-pie .btn { flex: 1 1 180px; }
.producto-detalle.foto-ampliada .producto-detalle-contenido { grid-template-columns: 1fr; }
.producto-detalle.foto-ampliada .producto-detalle-foto { cursor: zoom-out; }
.producto-detalle.foto-ampliada img { max-height: none; }
.producto-detalle [hidden] { display: none !important; }
@media (max-width: 575px) {
  .producto-detalle-contenido { grid-template-columns: 1fr; gap: 18px; padding: 0 16px 16px; }
  .producto-detalle-cabecera { padding: 10px 16px; }
  .producto-detalle-foto img { max-height: 38dvh; }
  .producto-detalle-pie { padding: 12px 16px; }
  .producto-detalle-pie .btn { flex-basis: 100%; }
}

.home-actions { display: contents; }
/* Portada móvil: bloques compactos con separación constante. */

@media (max-width: 767.98px) {
  body.home-page,
  body.home-page:has(#pedidoCarrito[hidden]) {
    height: auto;
    min-height: 100svh;
    background-attachment: scroll;
  }
  body.home-page:has(#pedidoCarrito[hidden]) .menu-app {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 0;
    transform: none;
  }
  /* Solo se sube el grupo visible de la portada; los modales quedan en su lugar. */
  body.home-page:has(#pedidoCarrito[hidden]) .home-menu-entry,
  body.home-page:has(#pedidoCarrito[hidden]) .home-empty-order {
    transform: none;
  }
  body.home-page .home-welcome {
    margin: 0;
    padding: 44px 12px 0;
  }
  body.home-page .home-welcome-title {
    font-size: clamp(1.25rem, 6.5vw, 1.95rem);
    margin: 0 0 10px;
    position: relative;
    top: 18px;
    z-index: 2;
  }
  body.home-page .horarios-carta {
    padding: 12px !important;
    font-size: .82rem;
    line-height: 1.35;
  }
  body.home-page .horarios-carta h2,
  body.home-page .horarios-carta .fs-5 {
    font-size: 1rem !important;
  }
  body.home-page .horarios-carta h2 { margin-bottom: 6px; }
  body.home-page .horarios-carta .mt-2 { margin-top: 6px !important; }
  body.home-page .home-menu-entry,
  body.home-page:has(#pedidoCarrito[hidden]) .home-menu-entry {
    margin: 0;
    padding: 0 16px !important;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
  }
  body.home-page:has(#pedidoCarrito[hidden]) .home-menu-entry {
    position: fixed;
    top: 50%;
    left: 0;
    right: 0;
    z-index: 10;
  }
  body.home-page:has(#pedidoCarrito[hidden]) .home-empty-order {
    position: fixed;
    top: 62%;
    left: 0;
    right: 0;
    z-index: 9;
  }
  body.home-page .home-menu-entry .menu-button-neon {
    margin-inline: auto;
  }
  body.home-page > .text-center.p-3 .menu-primary-button {
    padding: 13px 14px !important;
    font-size: .95rem !important;
    line-height: 1.4;
    min-height: 48px;
    width: 100%;
  }
  body.home-page .home-empty-order,
  body.home-page:has(#pedidoCarrito[hidden]) .home-empty-order {
    flex: 0 0 auto;
    min-height: 0;
    margin: 22px 0 0;
    padding: 0 16px;
    align-items: center;
  }
  body.home-page .home-empty-order-message,
  body.home-page:has(#pedidoCarrito[hidden]) .home-empty-order-message {
    transform: none;
    padding: 12px 16px;
    width: 100%;
    max-width: 390px;
  }
  .home-empty-order-eyebrow { font-size: .57rem; letter-spacing: .08em; }
  .home-empty-order h2 { font-size: 1.25rem; margin: 5px 0; }
  .home-empty-order p { font-size: .8rem; }
  body.home-page .footer .row > .col-12:nth-child(-n+2),
  body.home-page:has(#pedidoCarrito[hidden]) .footer .row > .col-12:nth-child(-n+2) {
    padding-top: 2px;
  }
  body.home-page .footer { line-height: 1.35; }
  body.home-page .footer p.mt-2 { margin: 4px 0 !important; }

  /* Fuera de horario, el aviso y las acciones comparten el flujo para no taparse. */
  body.home-page:has(#avisoHorarioCarta:not([hidden])) .home-welcome-title {
    top: 0;
  }
  body.home-page:has(#avisoHorarioCarta:not([hidden])) .menu-app {
    flex: 0 0 auto;
  }
  body.home-page:has(#avisoHorarioCarta:not([hidden])) .home-menu-entry {
    position: static;
    margin-top: 18px;
  }
  body.home-page:has(#avisoHorarioCarta:not([hidden])) .home-empty-order {
    position: static;
    margin: 18px 0;
  }
  body.home-page:has(#pedidoCarrito[hidden]) .menu-app { flex: 0 0 auto; }
  body.home-page:has(#pedidoCarrito[hidden]) .home-actions {
    display: flex;
    flex: 1 0 auto;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    padding: 24px 16px 80px;
    width: 100%;
  }
  body.home-page:has(#pedidoCarrito[hidden]) .home-actions .home-menu-entry,
  body.home-page:has(#pedidoCarrito[hidden]) .home-actions .home-empty-order {
    position: static;
    transform: none;
    margin: 0;
    padding: 0 !important;
    width: 100%;
    flex: 0 0 auto;
  }
  body.home-page .home-actions .menu-primary-button {
    padding: 13px 14px !important;
    font-size: .95rem !important;
    line-height: 1.4;
    min-height: 48px;
    white-space: normal;
  }
}
