/* ============================================================
   edicion.css · EL MODO AUTOADMINISTRABLE Y LOS AVISOS
   ------------------------------------------------------------
   Tres cosas viven acá:
     · El botón "Ingresar" y la pantalla de clave.
     · El modo edición: la barra de arriba y los tres botones que
       aparecen sobre cada producto.
     · El aviso de "estamos cerrados" que sale solo según la hora.

   Se carga al final de todo, después de ajustes.css.
   ============================================================ */

/* ============================================================
   1 · ÚLTIMAS UNIDADES: ROJO Y PALPITANDO
   ------------------------------------------------------------
   experiencia.css lo había pasado a amarillo, argumentando que el
   rojo repetido en varias tarjetas deja de ser acento y se vuelve
   un tercer color permanente, que es lo que el brandbook prohíbe.
   Lukas lo pidió rojo y palpitando, para que se note de verdad.
   Manda el dueño. Si alguna vez se ven cuatro o cinco tarjetas en
   rojo al mismo tiempo, vale la pena revisar esta decisión.
   ============================================================ */

.badge-estado.es-pocas {
  background: rgba(230, 57, 70, .2) !important;
  color: #ff9aa1 !important;
  border: 1px solid rgba(230, 57, 70, .65) !important;
  animation: latir-pocas 1.5s ease-in-out infinite;
}

.badge-estado.es-pocas::before {
  content: '' !important;
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #E63946 !important;
  animation: pulso-pocas 1.5s infinite;
}

@keyframes latir-pocas {
  0%, 100% { transform: scale(1);    box-shadow: 0 0 0 0 rgba(230, 57, 70, .45); }
  50%      { transform: scale(1.04); box-shadow: 0 0 14px 2px rgba(230, 57, 70, .35); }
}

.producto--pocas { border-color: rgba(230, 57, 70, .45) !important; }


/* ============================================================
   2 · BOTÓN "INGRESAR"
   ------------------------------------------------------------
   Discreto a propósito: es para el equipo, no para el cliente.
   No debe competir con "Ver menú" ni con "Pedir por WhatsApp".
   ============================================================ */

.btn-ingresar {
  margin-top: 2px;
  padding: 9px 20px;
  background: none;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 999px;
  color: #8A8A8A;
  font-family: var(--f-cond, 'Barlow Condensed', sans-serif);
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color .22s ease, color .22s ease, background .22s ease;
}

.btn-ingresar:hover,
.btn-ingresar:focus-visible {
  border-color: var(--y, #F5C518);
  color: var(--y, #F5C518);
}

body.modo-edicion .btn-ingresar {
  border-color: var(--y, #F5C518);
  background: var(--y, #F5C518);
  color: #080808;
}


/* ============================================================
   3 · LA PANTALLA DE INGRESO
   ============================================================ */

.ingreso-overlay {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(4, 4, 4, .86);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: aparecer-ingreso .2s ease;
}

@keyframes aparecer-ingreso { from { opacity: 0; } to { opacity: 1; } }

.ingreso-caja {
  width: 100%;
  max-width: 350px;
  padding: 28px 26px 22px;
  background: #111;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 18px;
  text-align: center;
}

.ingreso-pudu { width: 62px; height: auto; margin-bottom: 12px; }

.ingreso-caja h2 {
  font-family: var(--f-display, 'Anton', Impact, sans-serif);
  font-size: 26px;
  letter-spacing: .6px;
  text-transform: uppercase;
  color: #fff;
}

.ingreso-sub { margin: 6px 0 22px; font-size: 13px; color: #8A8A8A; }

.ingreso-campo { display: block; text-align: left; margin-bottom: 14px; }

.ingreso-campo span {
  display: block;
  margin-bottom: 6px;
  font-family: var(--f-cond, 'Barlow Condensed', sans-serif);
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: #B8B8B8;
}

.ingreso-campo input {
  width: 100%;
  padding: 13px 15px;
  background: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 11px;
  color: #fff;
  font-size: 16px; /* 16px evita el zoom automático de iOS */
  font-family: var(--f-body, 'Barlow', sans-serif);
}

.ingreso-campo input:focus { outline: none; border-color: var(--y, #F5C518); }

.ingreso-error {
  margin-bottom: 12px;
  padding: 9px 12px;
  background: rgba(230, 57, 70, .12);
  border: 1px solid rgba(230, 57, 70, .4);
  border-radius: 9px;
  color: #ff9aa1;
  font-size: 13px;
  font-weight: 600;
}

.ingreso-botones { display: flex; gap: 9px; margin-top: 4px; }

.ingreso-botones button {
  flex: 1;
  min-height: 46px;
  border: 1px solid transparent;
  border-radius: 11px;
  font-family: var(--f-cond, 'Barlow Condensed', sans-serif);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  cursor: pointer;
}

.ingreso-cancelar {
  background: #1a1a1a;
  color: #8A8A8A;
  border-color: rgba(255, 255, 255, .1) !important;
}

.ingreso-entrar { background: var(--y, #F5C518); color: #080808; }

.ingreso-panel {
  display: inline-block;
  margin-top: 16px;
  font-size: 12.5px;
  color: #6a6a6a;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.ingreso-panel:hover { color: var(--y, #F5C518); }


/* ============================================================
   4 · MODO EDICIÓN
   ------------------------------------------------------------
   La carta se ve igual que para el cliente. Lo único que cambia
   es la barra de arriba y los tres botones bajo cada producto.
   Esa es toda la idea: editar viendo el resultado real.
   ============================================================ */

.barra-edicion {
  position: sticky;
  top: 0;
  z-index: 1500;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px clamp(14px, 4vw, 26px);
  background: #141414;
  border-bottom: 2px solid var(--y, #F5C518);
}

.barra-punto {
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--y, #F5C518);
  animation: latir-punto 1.6s ease-in-out infinite;
}

@keyframes latir-punto { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

.barra-texto { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.barra-texto strong {
  font-family: var(--f-cond, 'Barlow Condensed', sans-serif);
  font-size: 13.5px;
  font-weight: 900;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--y, #F5C518);
}

.barra-texto em { font-style: normal; font-size: 11.5px; color: #8A8A8A; }

.barra-panel {
  padding: 8px 12px;
  font-family: var(--f-cond, 'Barlow Condensed', sans-serif);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #B8B8B8;
  text-decoration: none;
  white-space: nowrap;
}

.barra-panel:hover { color: var(--y, #F5C518); }

.barra-salir {
  min-height: 38px;
  padding: 8px 16px;
  background: var(--y, #F5C518);
  color: #080808;
  border: none;
  border-radius: 9px;
  font-family: var(--f-cond, 'Barlow Condensed', sans-serif);
  font-size: 12.5px;
  font-weight: 900;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  cursor: pointer;
}

/* --- Los tres botones sobre cada producto --- */

.editor-producto {
  display: none;
  gap: 5px;
  width: 100%;
  padding: 9px;
  background: #0d0d0d;
  border-top: 1px solid rgba(245, 197, 24, .28);
}

body.modo-edicion .editor-producto { display: flex; }

/* La tarjeta pasa a permitir que el editor caiga abajo del todo
   en vez de encimarse sobre la foto. */
body.modo-edicion .product-card,
body.modo-edicion .fries-card,
body.modo-edicion .drink-card {
  position: relative;
  flex-wrap: wrap;
  overflow: hidden;
}

.ed-op {
  flex: 1;
  min-height: 40px;
  padding: 8px 4px;
  background: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 8px;
  color: #8A8A8A;
  font-family: var(--f-cond, 'Barlow Condensed', sans-serif);
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: .8px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease, color .16s ease;
}

.ed-op:active { transform: scale(.96); }

.ed-ok.activa      { background: rgba(37, 211, 102, .16); border-color: rgba(37, 211, 102, .5); color: #25D366; }
.ed-pocas.activa   { background: rgba(230, 57, 70, .2);   border-color: rgba(230, 57, 70, .6);  color: #ff9aa1; }
.ed-agotado.activa { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .3); color: #fff; }

/* Mientras se edita, un agotado no se apaga del todo: hay que
   poder verlo bien para volver a activarlo. */
body.modo-edicion .producto--agotado { opacity: .92; }
body.modo-edicion .producto--agotado .card-img,
body.modo-edicion .producto--agotado img { filter: grayscale(.7) brightness(.65); }


/* ============================================================
   5 · AVISO DE LOCAL CERRADO
   ------------------------------------------------------------
   Sale solo cuando la hora del visitante cae fuera de horario.
   No esconde la carta: la deja mirar y ofrece agendar el pedido,
   que es lo único que esa persona sí puede hacer a esa hora.
   ============================================================ */

.aviso-horario {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 14px 16px;
  max-width: 760px;
  margin: 0 auto clamp(26px, 5vw, 38px);
  padding: clamp(18px, 4vw, 24px);
  background: linear-gradient(135deg, #16130a, #0e0e0e);
  border: 1px solid rgba(245, 197, 24, .3);
  border-radius: 18px;
}

.aviso-pudu { width: clamp(46px, 11vw, 58px); height: auto; opacity: .92; }

.aviso-texto { display: flex; flex-direction: column; gap: 4px; }

.aviso-texto strong {
  font-family: var(--f-display, 'Anton', Impact, sans-serif);
  font-size: clamp(19px, 5vw, 25px);
  line-height: 1;
  letter-spacing: .6px;
  text-transform: uppercase;
  color: var(--y, #F5C518);
}

.aviso-texto span {
  font-family: var(--f-body, 'Barlow', sans-serif);
  font-size: 14.5px;
  line-height: 1.45;
  color: #C6C6C6;
}

.aviso-cta {
  grid-column: 1 / -1;
  display: block;
  min-height: 48px;
  padding: 14px 22px;
  background: var(--whatsapp, #25D366);
  color: #062e14;
  border-radius: 12px;
  font-family: var(--f-cond, 'Barlow Condensed', sans-serif);
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  text-align: center;
  text-decoration: none;
  transition: filter .2s ease;
}

.aviso-cta:hover { filter: brightness(1.08); }

.aviso-horarios {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, .08);
}

.aviso-horarios span {
  font-family: var(--f-body, 'Barlow', sans-serif);
  font-size: 13.5px;
  color: #8A8A8A;
}

.aviso-horarios b {
  display: inline-block;
  min-width: 72px;
  font-weight: 700;
  color: #fff;
}

@media (min-width: 680px) {
  .aviso-horario { grid-template-columns: auto 1fr auto; }
  .aviso-cta { grid-column: auto; align-self: center; }
  .aviso-horarios { grid-column: 1 / -1; flex-direction: row; gap: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  .badge-estado.es-pocas,
  .badge-estado.es-pocas::before,
  .barra-punto { animation: none; }
}


/* ============================================================
   6 · AVISO DE CERRADO — VERSIÓN CORTA
   ------------------------------------------------------------
   La primera versión tenía tres párrafos y la tabla de horarios
   completa. Demasiado que leer para alguien que solo quiere
   comer. Ahora hay UN dato grande —a qué hora abren— una línea
   corta, y dos botones. El horario completo se pide.
   ============================================================ */

.aviso-horario {
  grid-template-columns: auto 1fr !important;
  gap: 12px 16px !important;
  padding: clamp(16px, 3.5vw, 22px) !important;
}

.aviso-texto strong {
  font-size: clamp(26px, 7vw, 40px) !important;
  line-height: .98 !important;
}

.aviso-texto span {
  font-size: clamp(14px, 3.6vw, 17px) !important;
  color: #B8B8B8 !important;
}

.aviso-botones {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 8px;
}

.aviso-cta {
  grid-column: auto !important;
  font-size: clamp(14px, 3.8vw, 16px) !important;
  padding: 15px 16px !important;
}

.aviso-horario-btn {
  min-height: 48px;
  background: none;
  border: 1px solid rgba(245, 197, 24, .45);
  border-radius: 12px;
  color: var(--y, #F5C518);
  font-family: var(--f-cond, 'Barlow Condensed', sans-serif);
  font-size: clamp(13px, 3.4vw, 15px);
  font-weight: 900;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .2s ease;
}
.aviso-horario-btn:hover { background: rgba(245, 197, 24, .12); }

/* La tabla vieja ya no se usa. */
.aviso-horarios { display: none !important; }


/* ============================================================
   7 · EL HORARIO, GRANDE Y CLARO
   ------------------------------------------------------------
   Se abre solo cuando lo piden, y entonces sí ocupa la pantalla
   con letra grande. Es el patrón contrario al de antes: en vez de
   mostrarle todo a todos por si acaso, se muestra poco y se deja
   pedir el detalle.
   ============================================================ */

.horario-modal {
  position: fixed;
  inset: 0;
  z-index: 2500;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(4, 4, 4, .88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: aparecer-ingreso .2s ease;
}

.horario-caja {
  position: relative;
  width: 100%;
  max-width: 420px;
  padding: clamp(28px, 6vw, 38px) clamp(24px, 5vw, 34px);
  background: #111;
  border: 1px solid rgba(245, 197, 24, .3);
  border-radius: 20px;
}

.horario-cerrar {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  color: #8A8A8A;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}
.horario-cerrar:hover { color: #fff; }

.horario-caja h2 {
  margin-bottom: clamp(18px, 4vw, 26px);
  font-family: var(--f-display, 'Anton', Impact, sans-serif);
  font-size: clamp(30px, 8vw, 42px);
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--y, #F5C518);
  line-height: 1;
}

.horario-dias {
  display: flex;
  flex-direction: column;
  gap: clamp(14px, 3vw, 20px);
  list-style: none;
  padding: 0;
  margin: 0;
}

.horario-dias li {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-bottom: clamp(12px, 3vw, 18px);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.horario-dias li:last-child { border-bottom: none; padding-bottom: 0; }

.horario-dias b {
  font-family: var(--f-cond, 'Barlow Condensed', sans-serif);
  font-size: clamp(13px, 3.4vw, 15px);
  font-weight: 800;
  letter-spacing: 2.4px;
  text-transform: uppercase;
  color: #8A8A8A;
}

.horario-dias span {
  font-family: var(--f-display, 'Anton', Impact, sans-serif);
  font-size: clamp(26px, 7vw, 34px);
  line-height: 1.1;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.horario-nota {
  margin-top: clamp(18px, 4vw, 26px);
  font-family: var(--f-cond, 'Barlow Condensed', sans-serif);
  font-size: clamp(12.5px, 3.2vw, 14px);
  font-weight: 800;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: #6a6a6a;
  text-align: center;
}
