/* ============================================================
   estados.css · AGOTADOS, ÚLTIMAS UNIDADES, BANNERS Y AVISOS
   ------------------------------------------------------------
   Base funcional de todo lo que el panel puede encender.
   Se carga después de app.css y antes de experiencia.css, así que
   el equipo de diseño puede afinar cualquier cosa de acá encima.

   Regla de marca respetada: el Smash Red (#E63946) aparece SOLO
   como acento de alerta, nunca como tercer color permanente.
   ============================================================ */

:root {
  /* Puente: las variables viejas de la carta apuntan ahora a los
     tokens oficiales del brandbook v1.0. Cambiando acá cambia todo. */
  --y:        #F5C518;
  --y-deep:   #D4A800;
  --y-soft:   #FFE066;
  --bg:       #080808;
  --ink:      #111111;
  --char:     #1a1a1a;
  --red:      #E63946;

  /* La carta original mandaba Bebas Neue; el brandbook manda Anton. */
  --font-display: 'Anton', Impact, sans-serif;
  --f-display:    'Anton', Impact, sans-serif;
  --f-cond:       'Barlow Condensed', sans-serif;
  --f-body:       'Barlow', sans-serif;
}

/* Anton es más alta y compacta que Bebas: sin este ajuste los
   titulares quedan apretados unos con otros. */
.card-name,
.section-title,
h1, h2, h3 {
  letter-spacing: 0.5px;
}

/* ============================================================
   SELLO DE ESTADO SOBRE LA TARJETA
   ============================================================ */
.badge-estado {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: 999px;
  font-family: var(--f-cond);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  line-height: 1;
  white-space: nowrap;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* Agotado: apagado, sin gritar. No es una alarma, es un hecho. */
.badge-estado.es-agotado {
  background: rgba(8, 8, 8, 0.82);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.22);
}

/* Últimas unidades: acá sí urge, y por eso entra el rojo de marca. */
.badge-estado.es-pocas {
  background: rgba(230, 57, 70, 0.16);
  color: #ff8d95;
  border: 1px solid rgba(230, 57, 70, 0.5);
}
.badge-estado.es-pocas::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 0 rgba(230, 57, 70, 0.7);
  animation: pulso-pocas 1.8s infinite;
}

@keyframes pulso-pocas {
  0%   { box-shadow: 0 0 0 0 rgba(230, 57, 70, 0.6); }
  70%  { box-shadow: 0 0 0 7px rgba(230, 57, 70, 0); }
  100% { box-shadow: 0 0 0 0 rgba(230, 57, 70, 0); }
}

/* ============================================================
   TARJETA AGOTADA
   ------------------------------------------------------------
   Se apaga, pero NO se esconde: que el cliente vea que existe y
   vuelva mañana. Desaturada y sin brillo, no borrosa: la foto
   sigue dando hambre, que para eso está.
   ============================================================ */
.producto--agotado {
  cursor: not-allowed;
  position: relative;
}
.producto--agotado .card-img,
.producto--agotado img {
  filter: grayscale(0.85) brightness(0.5) contrast(0.95);
  transition: filter 0.4s ease;
}
.producto--agotado .card-name,
.producto--agotado .card-desc,
.producto--agotado .card-price {
  opacity: 0.42;
}
.producto--agotado .card-cta,
.producto--agotado .includes-fries {
  opacity: 0.22;
}
.producto--agotado .card-glow {
  display: none;
}
/* Anulamos el hover: una tarjeta agotada no debe prometer nada. */
.producto--agotado:hover {
  transform: none !important;
  border-color: inherit !important;
  box-shadow: none !important;
}
/* Al tocarla igual responde, para que se note que el toque registró. */
.producto--agotado:active {
  transform: scale(0.985);
  transition: transform 0.12s ease;
}

/* Últimas unidades sí se puede pedir: se resalta en vez de apagarse. */
.producto--pocas {
  border-color: rgba(230, 57, 70, 0.28) !important;
}

.producto--oculto {
  display: none !important;
}

/* ============================================================
   BANNER DE CAMPAÑA (barra superior)
   ============================================================ */
.smachil-banner {
  position: sticky;
  top: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 11px clamp(14px, 4vw, 28px);
  background: linear-gradient(90deg, var(--y) 0%, var(--y-soft) 50%, var(--y) 100%);
  color: #080808;
  text-align: center;
  animation: bajar-banner 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes bajar-banner {
  from { transform: translateY(-100%); }
  to   { transform: translateY(0); }
}

.smachil-banner .banner-texto {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 4px 10px;
}
.smachil-banner strong {
  font-family: var(--f-cond);
  font-size: clamp(13px, 3.4vw, 15px);
  font-weight: 900;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}
.smachil-banner span {
  font-family: var(--f-body);
  font-size: clamp(12px, 3.2vw, 14px);
  font-weight: 600;
  opacity: 0.82;
}
.smachil-banner .banner-cerrar {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  color: #080808;
  font-size: 24px;
  line-height: 1;
  padding: 4px 10px;
  cursor: pointer;
  opacity: 0.55;
  transition: opacity 0.2s ease;
}
.smachil-banner .banner-cerrar:hover { opacity: 1; }

/* ============================================================
   LOCAL CERRADO
   ------------------------------------------------------------
   El pudú aparece durmiendo la siesta. Es la marca haciendo el
   trabajo de dar una mala noticia sin que se sienta mala.
   ============================================================ */
.smachil-cerrado {
  display: flex;
  align-items: center;
  gap: 18px;
  max-width: 720px;
  margin: 0 auto 30px;
  padding: 20px 24px;
  background: var(--ink);
  border: 1px solid rgba(245, 197, 24, 0.28);
  border-radius: 18px;
}
.smachil-cerrado .cerrado-pudu {
  width: 62px;
  height: auto;
  flex-shrink: 0;
  opacity: 0.9;
  transform: rotate(-8deg);
  animation: siesta 4s ease-in-out infinite;
}
@keyframes siesta {
  0%, 100% { transform: rotate(-8deg) translateY(0); }
  50%      { transform: rotate(-8deg) translateY(-5px); }
}
.smachil-cerrado div {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.smachil-cerrado strong {
  font-family: var(--f-display);
  font-size: clamp(19px, 5vw, 25px);
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--y);
}
.smachil-cerrado span {
  font-family: var(--f-body);
  font-size: 14.5px;
  line-height: 1.5;
  color: #B8B8B8;
}

@media (max-width: 520px) {
  .smachil-cerrado {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }
}

/* ============================================================
   AVISO FLOTANTE
   ============================================================ */
.smachil-aviso {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%) translateY(20px);
  z-index: 2000;
  max-width: min(90vw, 380px);
  padding: 13px 22px;
  background: var(--char);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  font-family: var(--f-body);
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease, transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}
.smachil-aviso.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Respeta a quien pidió menos animación en su sistema. */
@media (prefers-reduced-motion: reduce) {
  .badge-estado.es-pocas::before,
  .smachil-cerrado .cerrado-pudu,
  .smachil-banner {
    animation: none;
  }
}
