/* Flyers animados: los usa la tienda (index.html) y la vista previa del panel (admin/index.html).
   Variables de la tienda con valores de respaldo para el panel. */
.flyer { --ease: cubic-bezier(.2, .7, .2, 1); }
/* ---------- Flyers de promociones (delivery, ofertas, descuentos especiales, temporada, cultura pop) ---------- */
.flyers { padding-block: 16px 2px; }
.flyers__pista {
  display: grid; grid-auto-flow: column; grid-auto-columns: clamp(286px, calc((100% - 3 * 14px) / 4), 440px); gap: 14px;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 4px 2px 10px;
}
.flyers__pista::-webkit-scrollbar { display: none; }
.flyer {
  --flyer-acento: #ff3d6e; --flyer-chaqueta: #ff3d6e; --flyer-casco: #ffd34d;
  position: relative; overflow: hidden; isolation: isolate; scroll-snap-align: start;
  display: grid; grid-template-columns: 1fr 50%; align-items: stretch; min-height: 158px;
  border: 0; border-radius: 22px; padding: 0; cursor: pointer; text-align: left; color: #fff;
  background: linear-gradient(130deg, var(--flyer-fondo-1), var(--flyer-fondo-2));
  box-shadow: 0 14px 30px -18px rgba(20, 8, 40, 0.65), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.flyer::before {
  /* Brillo que cruza el flyer de vez en cuando. */
  content: ""; position: absolute; inset: -40% auto -40% -60%; width: 40%; z-index: 2; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.22), transparent);
  transform: skewX(-18deg); animation: fl-brillo 6.5s ease-in-out infinite;
}
.flyer:nth-child(2n)::before { animation-delay: 2.2s; }
.flyer:nth-child(3n)::before { animation-delay: 4.1s; }
.flyer:hover { transform: translateY(-3px); box-shadow: 0 20px 36px -18px rgba(20, 8, 40, 0.75), inset 0 0 0 1px rgba(255, 255, 255, 0.14); }
.flyer.activo { box-shadow: 0 0 0 3px var(--bg, #fff), 0 0 0 6px var(--gold, #d4a017), 0 18px 34px -18px rgba(20, 8, 40, 0.7); }
.flyer:focus-visible { outline: 3px solid var(--gold, #d4a017); outline-offset: 3px; }
.flyer__texto { position: relative; z-index: 1; display: flex; flex-direction: column; justify-content: center; gap: 3px; padding: 16px 0 16px 18px; min-width: 0; }
.flyer__kicker { font-size: 0.64rem; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; color: rgba(255, 255, 255, 0.78); }
.flyer__titulo { font-family: var(--font-display, 'Inter', system-ui, sans-serif); font-size: 1.32rem; font-weight: 800; line-height: 1.05; letter-spacing: -0.02em; text-wrap: balance; text-shadow: 0 2px 10px rgba(0, 0, 0, 0.25); }
.flyer__sub { font-size: 0.74rem; line-height: 1.3; color: rgba(255, 255, 255, 0.86); }
.flyer__cta {
  align-self: flex-start; margin-top: 8px; padding: 6px 12px; border-radius: 999px;
  background: #fff; color: #17121f; font-size: 0.74rem; font-weight: 800; box-shadow: 0 6px 14px -8px rgba(0, 0, 0, 0.6);
  transition: transform 0.25s var(--ease);
}
.flyer:hover .flyer__cta { transform: translateX(3px); }
.flyer__arte { position: relative; display: block; min-width: 0; }
/* Más específico que la regla general de íconos (svg[aria-hidden]: 20px, sin relleno y con contorno). */
svg.flyer__svg[aria-hidden="true"] { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; fill: #000; stroke: none; stroke-width: 1; }
.flyer__fotos { position: absolute; left: 4%; bottom: 12px; display: flex; z-index: 1; }
.flyer__fotos img {
  width: 46px; height: 56px; object-fit: cover; border-radius: 9px; border: 2px solid #fff; margin-left: -14px;
  box-shadow: 0 6px 12px -6px rgba(0, 0, 0, 0.6); animation: fl-flota 3.4s ease-in-out infinite alternate;
}
.flyer__fotos img:first-child { margin-left: 0; transform: rotate(-8deg); }
.flyer__fotos img:nth-child(2) { animation-delay: 0.5s; }
.flyer__fotos img:nth-child(3) { transform: rotate(8deg); animation-delay: 1s; }
/* Estilos de los flyers de descuento especial (se eligen en el panel). */
.flyer--dorado { --esp-1: #17120a; --esp-2: #6b4b0c; --flyer-acento: #b8860b; }
.flyer--dorado .flyer__titulo { color: #ffd76a; }
.flyer--rojo { --esp-1: #7f0d1f; --esp-2: #e11d48; --flyer-acento: #c8102e; }
.flyer--rosa { --esp-1: #5b1fa8; --esp-2: #ec4899; --flyer-acento: #c026d3; }
.flyer--azul { --esp-1: #0b1f6b; --esp-2: #2563eb; --flyer-acento: #1d4ed8; }
.flyer--verde { --esp-1: #064e3b; --esp-2: #16a34a; --flyer-acento: #15803d; }
.flyer--ofertas { --flyer-acento: #d7263d; }
.flyer--delivery { --flyer-acento: var(--accent, #6d28d9); --flyer-chaqueta: #ff3d6e; --flyer-casco: #ffd34d; }
.chip-flyer {
  display: inline-flex; align-items: center; gap: 8px; border: 0; cursor: pointer; padding: 6px 12px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent); font-size: 0.78rem; font-weight: 700; margin-right: auto;
}
.chip-flyer:hover { background: var(--accent); color: var(--accent-ink); }

/* Animaciones de los dibujos (suaves; transform-box para girar cada pieza sobre sí misma). */
.flyer__svg g, .flyer__svg circle, .flyer__svg rect { transform-box: fill-box; }
.fl-rueda { transform-box: view-box !important; animation: fl-girar 0.55s linear infinite; }
.fl-moto { animation: fl-bote 0.45s ease-in-out infinite alternate; }
.fl-casco { animation: fl-bote 0.9s ease-in-out infinite alternate; }
.fl-caja { transform-origin: 50% 100%; animation: fl-caja 0.9s ease-in-out infinite alternate; }
.fl-carretera { animation: fl-carretera 0.5s linear infinite; }
.fl-ciudad { animation: fl-ciudad 16s linear infinite; }
.fl-viento path { animation: fl-viento 1.1s ease-in infinite; animation-delay: var(--d, 0s); }
.fl-faro { animation: fl-titila 1.6s ease-in-out infinite; }
.fl-etiqueta { transform-box: view-box !important; transform-origin: 36px 8px; animation: fl-balanceo 2.6s ease-in-out infinite alternate; }
.fl-bolsa { animation: fl-flota 2.8s ease-in-out infinite alternate; }
.fl-titila { animation: fl-titila 2.2s ease-in-out infinite; animation-delay: var(--d, 0s); }
.fl-cae { animation: fl-cae var(--dur, 5s) linear infinite; animation-delay: calc(var(--d, 0s) * -1); }
.fl-sube { animation: fl-sube var(--dur, 5s) linear infinite; animation-delay: calc(var(--d, 0s) * -1); }
.fl-flota { animation: fl-flota 2.6s ease-in-out infinite alternate; }
.fl-pulso { transform-origin: center; animation: fl-pulso 1.8s ease-in-out infinite alternate; }
.fl-giro-lento { transform-origin: center; animation: fl-girar 22s linear infinite; }
.fl-claqueta { transform-origin: 0% 100%; animation: fl-claqueta 1.6s ease-in-out infinite; }
.fl-palomita { animation: fl-palomita 1.4s ease-in-out infinite; animation-delay: var(--d, 0s); }
.fl-cinta-cine { animation: fl-cinta 6s linear infinite; }
.fl-eq { transform-origin: 50% 100%; animation: fl-eq 0.9s ease-in-out infinite alternate; animation-delay: var(--d, 0s); }
.fl-neon { animation: fl-neon 2.4s ease-in-out infinite; }
.fl-ola { animation: fl-ola 3s ease-in-out infinite alternate; }
.fl-rebote { animation: fl-rebote 0.9s cubic-bezier(.5, 0, .5, 1) infinite alternate; }
.fl-giro { transform-origin: center; animation: fl-girar 1.8s linear infinite; }
.fl-sombra { transform-origin: 50% 50%; animation: fl-sombra 0.9s cubic-bezier(.5, 0, .5, 1) infinite alternate; }

@keyframes fl-brillo { 0%, 70% { left: -60%; } 100% { left: 130%; } }
@keyframes fl-girar { to { transform: rotate(360deg); } }
@keyframes fl-bote { from { transform: translateY(0); } to { transform: translateY(-1.6px); } }
@keyframes fl-caja { from { transform: rotate(0); } to { transform: rotate(-1.5deg); } }
@keyframes fl-carretera { to { transform: translateX(-24px); } }
@keyframes fl-ciudad { to { transform: translateX(-220px); } }
@keyframes fl-viento { 0% { transform: translateX(14px); opacity: 0; } 30% { opacity: 1; } 100% { transform: translateX(-18px); opacity: 0; } }
@keyframes fl-titila { 0%, 100% { opacity: 0.35; } 50% { opacity: 1; } }
@keyframes fl-balanceo { from { transform: rotate(-7deg); } to { transform: rotate(6deg); } }
@keyframes fl-cae { from { transform: translateY(-14px) rotate(0); opacity: 0; } 10% { opacity: 1; } 85% { opacity: 1; } to { transform: translateY(170px) rotate(220deg); opacity: 0; } }
@keyframes fl-sube { from { transform: translateY(170px); opacity: 0; } 15% { opacity: 1; } 80% { opacity: 1; } to { transform: translateY(-10px); opacity: 0; } }
@keyframes fl-flota { from { transform: translateY(2px); } to { transform: translateY(-5px); } }
@keyframes fl-pulso { from { transform: scale(0.96); } to { transform: scale(1.05); } }
@keyframes fl-claqueta { 0%, 55%, 100% { transform: rotate(0); } 70% { transform: rotate(-22deg); } 85% { transform: rotate(0); } }
@keyframes fl-palomita { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes fl-cinta { to { transform: translateX(-120px); } }
@keyframes fl-eq { from { transform: scaleY(0.25); } to { transform: scaleY(1); } }
@keyframes fl-neon { 0%, 100% { opacity: 1; } 45% { opacity: 1; } 50% { opacity: 0.45; } 55% { opacity: 1; } }
@keyframes fl-ola { from { transform: translateX(0); } to { transform: translateX(-30px); } }
@keyframes fl-rebote { from { transform: translateY(-34px); } to { transform: translateY(18px); } }
@keyframes fl-sombra { from { transform: scaleX(0.45); opacity: 0.4; } to { transform: scaleX(1); opacity: 1; } }

@media (max-width: 700px) {
  .flyers { padding-block: 10px 0; }
  .flyers__pista { grid-auto-columns: 86%; gap: 10px; }
  .flyer { min-height: 142px; border-radius: 18px; }
  .flyer__titulo { font-size: 1.15rem; }
}


/* Animaciones de los temas nuevos y de las otras piezas (redes, divisas). */
.fl-bate { transform-box: view-box !important; transform-origin: 86px 148px; animation: fl-bate 2.4s ease-in-out infinite; }
.fl-lanzamiento { animation: fl-lanzamiento 2.4s ease-in infinite; }
.fl-pantalla { animation: fl-pantalla 3s ease-in-out infinite; }
.fl-play { transform-origin: center; animation: fl-pulso 1.2s ease-in-out infinite alternate; }
.fl-progreso { transform-origin: 0 50%; animation: fl-progreso 6s linear infinite; }
.fl-lapiz { animation: fl-flota 2s ease-in-out infinite alternate; }
.fl-notif { animation: fl-notif 3.2s ease-in-out infinite; }
.fl-billete { animation: fl-billete 3.6s ease-in infinite; animation-delay: var(--d, 0s); }
.fl-moneda { animation: fl-rebote 0.8s cubic-bezier(.5, 0, .5, 1) infinite alternate; }
@keyframes fl-bate { 0%, 60%, 100% { transform: rotate(0); } 72% { transform: rotate(-34deg); } 82% { transform: rotate(10deg); } }
@keyframes fl-lanzamiento { 0% { transform: translate(60px, 20px) scale(0.5); opacity: 0; } 20% { opacity: 1; } 70% { transform: translate(-46px, 30px) scale(1); opacity: 1; } 78% { transform: translate(-40px, 26px); } 100% { transform: translate(40px, -60px) scale(0.6); opacity: 0; } }
@keyframes fl-pantalla { 0%, 100% { fill: #e50914; } 33% { fill: #7c3aed; } 66% { fill: #0ea5e9; } }
@keyframes fl-progreso { from { transform: scaleX(0.05); } to { transform: scaleX(1); } }
@keyframes fl-notif { 0%, 15% { transform: translate(12px, 10px) scale(0.6); opacity: 0; } 30%, 75% { transform: translate(0, 0) scale(1); opacity: 1; } 100% { transform: translate(0, -14px); opacity: 0; } }
@keyframes fl-billete { 0% { transform: translateY(-30px) rotate(-8deg); opacity: 0; } 15% { opacity: 1; } 70% { opacity: 1; } 100% { transform: translateY(80px) rotate(10deg); opacity: 0; } }

/* Flyer de redes sociales: no es un botón (lleva un enlace por red). */
.flyer--redes { cursor: default; }
.flyer__redes { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.flyer__red {
  display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: 999px; text-decoration: none;
  background: #fff; color: #17121f; font-size: 0.72rem; font-weight: 800; box-shadow: 0 6px 14px -8px rgba(0, 0, 0, 0.6);
  transition: transform 0.2s;
}
.flyer__red:hover { transform: translateY(-2px); }
.flyer__red svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; }
.fl-ruta { animation: fl-ruta 1s linear infinite; }
.fl-pin { animation: fl-rebote-pin 1s ease-in-out infinite alternate; }
@keyframes fl-ruta { to { stroke-dashoffset: -16; } }
@keyframes fl-rebote-pin { from { transform: translateY(0); } to { transform: translateY(-5px); } }

/* Tarjetas de promoción dentro del catálogo (otro modelo de los flyers de divisas y delivery). */
.promo-tile {
  position: relative; overflow: hidden; isolation: isolate; display: flex; flex-direction: column; justify-content: flex-end;
  min-height: 100%; border-radius: 16px; padding: 14px; color: #fff;
  background: linear-gradient(160deg, var(--flyer-fondo-1), var(--flyer-fondo-2));
  box-shadow: 0 14px 30px -18px rgba(20, 8, 40, 0.65);
}
.promo-tile::before {
  content: ""; position: absolute; inset: -40% auto -40% -60%; width: 40%; z-index: 2; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.22), transparent);
  transform: skewX(-18deg); animation: fl-brillo 6.5s ease-in-out infinite;
}
.promo-tile__arte { position: absolute; inset: 0 0 42% 0; }
.promo-tile__arte .flyer__svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.promo-tile__kicker { font-size: 0.6rem; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; color: rgba(255, 255, 255, 0.8); }
.promo-tile__titulo { font-family: var(--font-display, system-ui); font-size: 1.35rem; font-weight: 800; line-height: 1.05; margin: 3px 0 4px; }
.promo-tile__texto { font-size: 0.74rem; line-height: 1.3; color: rgba(255, 255, 255, 0.88); margin: 0; }
.promo-tile__cta {
  align-self: flex-start; margin-top: 10px; padding: 6px 12px; border-radius: 999px; border: 0; cursor: pointer;
  background: #fff; color: #17121f; font-size: 0.74rem; font-weight: 800;
}
/* Con varias redes, botones redondos solo con el ícono (caben todas). */
.flyer__red--icono { width: 34px; height: 34px; padding: 0; justify-content: center; }
.flyer__red--icono svg { width: 17px; height: 17px; }
.flyer--redes .flyer__sub { max-width: 95%; }
/* Tienda virtual: bolsas que salen del teléfono, ondas de señal y el dedo que toca "Comprar". */
.fl-bolsa-vuela { animation: fl-bolsa-vuela 3.3s ease-out infinite; animation-delay: var(--d, 0s); opacity: 0; }
.fl-ondas path { animation: fl-titila 1.5s ease-in-out infinite; animation-delay: var(--d, 0s); }
.fl-toque { animation: fl-toque 2.2s ease-in-out infinite; }
.fl-toque-onda { transform-origin: center; animation: fl-toque-onda 2.2s ease-out infinite; }
@keyframes fl-bolsa-vuela { 0% { transform: translate(0, 40px) scale(0.4); opacity: 0; } 20% { opacity: 1; } 100% { transform: translate(-28px, -46px) scale(1) rotate(-12deg); opacity: 0; } }
@keyframes fl-toque { 0%, 100% { transform: translate(10px, 12px); } 40%, 55% { transform: translate(0, 0); } 48% { transform: translate(0, 2px); } }
@keyframes fl-toque-onda { 0%, 45% { transform: scale(0.4); opacity: 0; } 50% { opacity: 1; } 80%, 100% { transform: scale(2.2); opacity: 0; } }

/* Emoji del flyer (Flyers del momento): flota y se mece sobre el dibujo. */
.flyer__emoji {
  position: absolute; top: 8%; right: 7%; z-index: 2; font-size: clamp(26px, 3.2vw, 40px); line-height: 1;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.35)); animation: fl-emoji 3.2s ease-in-out infinite; pointer-events: none;
}
@keyframes fl-emoji {
  0%, 100% { transform: translateY(0) rotate(-8deg) scale(1); }
  50% { transform: translateY(-8px) rotate(8deg) scale(1.08); }
}
