/* Afiches del banner (js/afiches.js). Cada afiche tiene su color (t-rojo, t-verde, ...), rayos que giran,
   el producto que cae y flota, el precio en una estrella y partículas. Solo se anima transform y opacity. */

.hero-banner.con-afiches{height:460px}
.banner-slide.afiche{
  --ease-pop:cubic-bezier(.34,1.56,.64,1);--ease-out:cubic-bezier(.16,1,.3,1);
  --estrella:polygon(50% 0%,59% 13%,74% 6%,77% 22%,93% 22%,88% 38%,100% 50%,88% 62%,93% 78%,77% 78%,74% 94%,59% 87%,50% 100%,41% 87%,26% 94%,23% 78%,7% 78%,12% 62%,0% 50%,12% 38%,7% 22%,23% 22%,26% 6%,41% 13%);
  isolation:isolate;cursor:pointer;color:#fff;background:var(--fondo)}

/* Colores */
.afiche.t-rojo{--fondo:linear-gradient(115deg,#7a0a12 0%,#c8102e 45%,#ff5a1f 100%);--rayo:rgba(255,210,63,.22);--foco:rgba(255,190,40,.55);--eco:rgba(255,255,255,.16);--acento:#ffd23f}
.afiche.t-cafe{--fondo:linear-gradient(115deg,#2b1206 0%,#7a3410 50%,#d9661f 100%);--rayo:rgba(255,182,39,.2);--foco:rgba(255,170,60,.5);--eco:rgba(255,200,120,.18);--acento:#ffb627}
.afiche.t-verde{--fondo:linear-gradient(115deg,#05361c 0%,#0f7a3d 50%,#3cb85f 100%);--rayo:rgba(255,255,255,.12);--foco:rgba(255,240,170,.45);--eco:rgba(255,255,255,.14);--acento:#ffcf3a;--cinta:#ff3b30;--cinta-tinta:#fff;--sello:#ff3b30;--sello-tinta:#fff}
.afiche.t-morado{--fondo:linear-gradient(115deg,#160629 0%,#4a1580 50%,#8e2bd1 100%);--rayo:rgba(245,168,0,.2);--foco:rgba(245,168,0,.45);--eco:rgba(245,168,0,.22);--acento:#f5a800}
.afiche.t-turquesa{--fondo:linear-gradient(115deg,#032a30 0%,#06606b 50%,#0ea5a8 100%);--rayo:rgba(255,230,140,.16);--foco:rgba(255,220,120,.5);--eco:rgba(255,230,140,.2);--acento:#ffd86b}
.afiche.t-opiniones{--fondo:linear-gradient(115deg,#0d0b09 0%,#2a1d0c 55%,#5a3a0a 100%);--rayo:rgba(245,168,0,.14);--foco:rgba(245,168,0,.35);--eco:rgba(245,168,0,.14);--acento:#f5a800}

/* Fondo: rayos, brillo y palabra gigante */
.afiche .af-rayos{position:absolute;width:1600px;height:1600px;left:calc(72% - 800px);top:calc(50% - 800px);z-index:-3;
  background:repeating-conic-gradient(from 0deg,var(--rayo) 0deg 7deg,transparent 7deg 18deg);
  -webkit-mask:radial-gradient(circle,#000 8%,transparent 52%);mask:radial-gradient(circle,#000 8%,transparent 52%);
  animation:af-girar 40s linear infinite}
@keyframes af-girar{to{transform:rotate(360deg)}}
.afiche .af-foco{position:absolute;left:72%;top:52%;width:620px;height:620px;translate:-50% -50%;z-index:-2;border-radius:50%;
  background:radial-gradient(circle,var(--foco) 0%,transparent 62%)}
.afiche .af-eco{position:absolute;bottom:-.14em;left:0;z-index:-1;white-space:nowrap;pointer-events:none;
  font:400 clamp(160px,24vw,300px)/1 'Bebas Neue',sans-serif;letter-spacing:4px;color:transparent;
  -webkit-text-stroke:2px var(--eco);animation:af-deslizar 22s linear infinite}
@keyframes af-deslizar{to{transform:translateX(-50%)}}

/* Partículas */
.afiche .af-particulas{position:absolute;inset:0;z-index:0;pointer-events:none;overflow:hidden}
.afiche .pt{position:absolute;top:-30px;left:var(--x);width:var(--t);height:var(--t);background:var(--c);border-radius:var(--r,50%);
  opacity:0;animation:af-caer var(--d) linear var(--w) infinite}
@keyframes af-caer{0%{transform:translateY(0) rotate(0);opacity:0}10%,90%{opacity:.95}100%{transform:translateY(520px) rotate(var(--g,360deg));opacity:0}}
.afiche .pt.brillo{top:var(--y);border-radius:0;clip-path:polygon(50% 0,61% 39%,100% 50%,61% 61%,50% 100%,39% 61%,0 50%,39% 39%);
  animation:af-titilar var(--d) ease-in-out var(--w) infinite}
@keyframes af-titilar{0%,100%{transform:scale(0) rotate(0);opacity:0}50%{transform:scale(1) rotate(90deg);opacity:1}}

/* Producto: cae rebotando y después flota */
.afiche .af-producto{position:absolute;right:max(4%,calc(50% - 560px));top:50%;height:84%;max-width:52%;z-index:2;translate:0 -50%;pointer-events:none;
  opacity:0;transform:translateY(-70px) scale(.8) rotate(-8deg)}
.afiche.active .af-producto{opacity:1;transform:none;transition:transform .9s var(--ease-pop) .15s,opacity .35s .15s}
.afiche .af-producto img{display:block;height:100%;width:auto;max-width:100%;object-fit:contain;
  filter:drop-shadow(0 26px 28px rgba(0,0,0,.55));animation:af-flotar 3.6s ease-in-out infinite}
@keyframes af-flotar{0%,100%{transform:translateY(0) rotate(-1.5deg)}50%{transform:translateY(-14px) rotate(1.5deg)}}

/* Precio en una estrella */
.afiche .af-sello{position:absolute;left:-70px;top:-4px;z-index:3;width:150px;height:150px;display:grid;place-content:center;text-align:center;
  color:var(--sello-tinta,#111);opacity:0;transform:scale(0) rotate(-40deg)}
.afiche .af-sello::before{content:'';position:absolute;inset:0;z-index:-1;background:var(--sello,var(--acento));clip-path:var(--estrella);
  filter:drop-shadow(0 6px 0 rgba(0,0,0,.25))}
.afiche .af-sello small{font:800 12px 'Barlow',sans-serif;letter-spacing:3px}
.afiche .af-sello strong{font:400 40px/1 'Bebas Neue',sans-serif;letter-spacing:1px}
.afiche.active .af-sello{opacity:1;transform:rotate(-10deg);transition:transform .7s var(--ease-pop) .7s,opacity .2s .7s;animation:af-latir 1.8s ease-in-out 1.6s infinite}
@keyframes af-latir{0%,100%{scale:1}50%{scale:1.08}}

/* Texto */
.afiche .af-texto{position:absolute;inset:0 auto 0 0;z-index:4;width:min(54%,600px);padding:0 clamp(24px,6vw,90px);
  display:flex;flex-direction:column;justify-content:center;align-items:flex-start;padding-block:26px 34px}
.afiche .af-texto > *{opacity:0;translate:-30px 0}
.afiche.active .af-texto > *{opacity:1;translate:0 0;transition:opacity .5s,translate .6s var(--ease-out)}
.afiche.active .af-texto > :nth-child(2){transition-delay:.1s}
.afiche.active .af-texto > :nth-child(3){transition-delay:.2s}
.afiche.active .af-texto > :nth-child(4){transition-delay:.3s}
.afiche.active .af-texto > :nth-child(n+5){transition-delay:.4s}
.afiche .af-cinta{display:inline-block;background:var(--cinta,var(--acento));color:var(--cinta-tinta,#111);font:800 13px 'Barlow',sans-serif;
  letter-spacing:4px;text-transform:uppercase;padding:6px 14px;rotate:-3deg;box-shadow:4px 4px 0 rgba(0,0,0,.3);margin-bottom:14px}
.afiche .af-pre{font:800 clamp(13px,1.6vw,16px) 'Barlow',sans-serif;letter-spacing:5px;text-transform:uppercase;color:var(--acento);margin-bottom:4px}
.afiche .af-titulo{font:400 clamp(52px,7vw,96px)/.86 'Bebas Neue',sans-serif;letter-spacing:1px;text-shadow:5px 5px 0 rgba(0,0,0,.28);margin-bottom:14px}
.afiche .af-titulo em{font-style:normal;color:var(--acento);display:block}
.afiche .af-desc{font:600 clamp(14px,1.5vw,17px)/1.45 'Barlow',sans-serif;max-width:400px;margin-bottom:18px;color:rgba(255,255,255,.92)}
.afiche .af-persona{font:600 15px 'Barlow',sans-serif;margin:-6px 0 18px;color:var(--acento)}
.afiche .af-chips{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:14px;max-width:440px}
.afiche .af-chips span{background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.25);border-radius:999px;padding:5px 12px;font:600 13px 'Barlow',sans-serif}

/* Opciones que van cambiando ("con TOCINO / POLLO / ...") */
.afiche .af-rota{display:inline-grid;vertical-align:bottom}
.afiche .af-rota span{grid-area:1/1;color:var(--acento);font-weight:800;text-transform:uppercase;opacity:0;translate:0 60%;transition:opacity .35s,translate .35s}
.afiche .af-rota span.ver{opacity:1;translate:0 0}

/* Comentarios reales de clientes */
.afiche .af-cita{font:600 italic clamp(13px,1.4vw,15px)/1.4 'Barlow',sans-serif;max-width:400px;margin-bottom:18px;padding-left:12px;border-left:3px solid var(--acento);color:rgba(255,255,255,.9)}
.afiche .af-cita cite{display:block;font:800 11px 'Barlow',sans-serif;font-style:normal;letter-spacing:2px;text-transform:uppercase;color:var(--acento);margin-top:4px}
.afiche .af-estrellas{color:var(--acento);font-size:28px;letter-spacing:4px;margin-bottom:12px}
.afiche .af-citas{display:grid;max-width:520px;margin-bottom:18px}
.afiche .af-citas .af-cita{grid-area:1/1;font-size:clamp(17px,2vw,22px);margin:0;opacity:0;translate:0 12px;transition:opacity .5s,translate .5s}
.afiche .af-citas .af-cita.ver{opacity:1;translate:0 0}
.afiche.t-opiniones .af-texto{width:min(70%,760px)}
.afiche.t-opiniones .af-titulo{font-size:clamp(48px,6vw,80px)}
/* Con un comentario el afiche tiene más texto: título un poco más chico */
.afiche.con-cita .af-titulo{font-size:clamp(48px,6.2vw,84px);margin-bottom:10px}
.afiche.con-cita .af-desc{margin-bottom:12px}
.afiche.con-cita .af-cita{font-size:clamp(14px,1.3vw,17px);max-width:440px}

/* Botón */
.afiche .af-cta{border:none;cursor:pointer;background:var(--acento);color:#111;font:400 22px 'Bebas Neue',sans-serif;letter-spacing:2px;
  padding:13px 28px;border-radius:999px;display:inline-flex;align-items:center;gap:10px;box-shadow:0 6px 0 rgba(0,0,0,.3);transition:transform .15s,box-shadow .15s}
.afiche .af-cta:hover{transform:translateY(-2px);box-shadow:0 8px 0 rgba(0,0,0,.3)}
.afiche .af-cta:active{transform:translateY(4px);box-shadow:0 2px 0 rgba(0,0,0,.3)}
.afiche .af-cta:focus-visible{outline:3px solid #fff;outline-offset:3px}
.afiche .af-cta i{font-style:normal;display:inline-block;animation:af-empujar 1.2s ease-in-out infinite}
@keyframes af-empujar{0%,100%{transform:translateX(0)}50%{transform:translateX(5px)}}

/* Puntos como barras que se llenan con el tiempo */
.con-afiches .banner-dots{bottom:16px}
.con-afiches .b-dot{width:42px;height:5px;border-radius:3px;background:rgba(255,255,255,.3);overflow:hidden;position:relative}
.con-afiches .b-dot.active{width:42px;background:rgba(255,255,255,.3)}
.con-afiches .b-dot::after{content:'';position:absolute;inset:0;background:#fff;transform:scaleX(0);transform-origin:left}
.con-afiches .b-dot.active::after{animation:af-llenar var(--dur-afiche,6.5s) linear forwards}
.con-afiches:hover .b-dot.active::after{animation-play-state:paused}
@keyframes af-llenar{to{transform:scaleX(1)}}

/* La tarjeta a la que lleva PEDIR AHORA se marca un momento */
.card.card-destacada{animation:af-destacar 2.4s ease-out}
@keyframes af-destacar{0%,60%{box-shadow:0 0 0 3px var(--gold),0 0 32px rgba(245,168,0,.55)}100%{box-shadow:0 0 0 0 transparent}}

/* Celular: el producto grande arriba y el texto abajo */
@media(max-width:640px){
  .hero-banner.con-afiches{height:560px}
  .afiche .af-rayos{left:calc(50% - 800px);top:calc(30% - 800px)}
  .afiche .af-foco{left:50%;top:30%;width:420px;height:420px}
  .afiche .af-producto{right:auto;left:50%;top:26px;translate:-50% 0;height:42%;max-width:82%}
  .afiche .af-producto.ancho{height:auto;width:94%;max-width:94%;top:48px}
  .afiche .af-producto.ancho img{width:100%;height:auto}
  .afiche .af-sello{left:auto;right:-46px;top:-14px;width:104px;height:104px}
  .afiche .af-producto.ancho .af-sello{right:-8px;top:-30px}
  /* Con comentario el texto es más alto: la foto ancha se achica para no quedar debajo del texto */
  .afiche.con-cita .af-producto.ancho{width:74%;max-width:74%;top:14px}
  .afiche.con-cita .af-producto.ancho .af-sello{right:-36px;top:-8px}
  .afiche .af-sello strong{font-size:29px}.afiche .af-sello small{font-size:10px;letter-spacing:2px}
  .afiche .af-texto{inset:auto 0 0 0;width:100%;padding:0 18px 40px;justify-content:flex-end}
  .afiche .af-texto::before{content:'';position:absolute;inset:-60px 0 0 0;z-index:-1;background:linear-gradient(180deg,transparent,rgba(0,0,0,.7) 40%)}
  .afiche .af-titulo{font-size:58px;margin-bottom:8px}
  .afiche .af-desc{font-size:14px;margin-bottom:12px}
  .afiche .af-cinta{margin-bottom:8px;font-size:11px}
  .afiche .af-chips{margin-bottom:10px}.afiche .af-chips span{font-size:12px;padding:4px 10px}
  .afiche .af-cita{font-size:13px;margin-bottom:12px}
  .afiche .af-cta{font-size:20px;padding:11px 24px}
  .afiche .af-eco{bottom:auto;top:6%;font-size:150px}   /* detrás de la foto, no del título */
  .afiche.t-opiniones .af-texto{width:100%;justify-content:center;padding-top:30px}
  .afiche.t-opiniones .af-texto::before{display:none}
  .afiche .af-citas .af-cita{font-size:19px}
}
@media(prefers-reduced-motion:reduce){
  .afiche *,.afiche *::before,.afiche *::after,.con-afiches .b-dot::after{animation:none !important;transition:none !important}
  .afiche .af-producto,.afiche .af-sello{opacity:1;transform:none}
  .afiche .af-texto > *{opacity:1;translate:none}
  .con-afiches .b-dot.active::after{transform:scaleX(1)}
}
