/* Black Friday 2026 — page-black-friday.php. Toda la campaña en noche:
   naranja de la marca para actuar, dorado solo para Black Friday. */

.bf {
  --bg: #0f1113;
  --surface: #17181b;
  --surface-2: #202125;
  --ink: #f6f4f1;
  --muted: #a3a09b;
  --line-soft: rgba(255, 255, 255, .09);
  --accent: #ff6b35;
  --accent-press: #ef4d16;
  --accent-ink: #ff8a5c;          /* naranja para texto sobre la noche (7,4:1) */
  --accent-soft: rgba(255, 107, 53, .12);
  --edge: #b23c0e;                /* canto de los botones en relieve */
  --on-accent: #1d1d1f;           /* texto sobre naranja o dorado */
  /* Color de campaña: solo Black Friday, para distinguirla del naranja de siempre. */
  --promo: #ffd23f;
  --promo-glow: 255, 196, 0;
  --night: #0b0b0c;
  --wrap: 1180px;
  --m: clamp(20px, 3vw, 32px);
  --gap-section: clamp(96px, 11vw, 160px);
  --r: 28px;
  --r-s: 20px;
  --ease-out: cubic-bezier(.23, 1, .32, 1);
  --t-hero: clamp(28px, 9vw, 88px);
  --t-xl: clamp(30px, 5.6vw, 64px);
  --t-l: clamp(22px, 2.4vw, 32px);
  --t-m: clamp(18px, 1.5vw, 21px);
  --t-s: 17px;
  --t-xs: 14px;
  /* Pared de baldosas redondeadas (la textura del hero y del cierre). */
  --tiles: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='76' height='76'%3E%3Crect x='3.5' y='3.5' width='69' height='69' rx='14' fill='none' stroke='%23fff' stroke-opacity='.07'/%3E%3C/svg%3E");

  overflow-x: clip;
  background: var(--bg);
  color: var(--ink);
  font-family: 'PolySans', -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif;
  font-size: var(--t-s);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  color-scheme: dark;
}
.bf *, .bf *::before, .bf *::after { box-sizing: border-box; }
.bf :where(h1, h2, h3, p, ol, ul) { margin: 0; }
.bf :where(ol, ul) { padding: 0; list-style: none; }
.bf :where(h1, h2, h3) { font-weight: 500; letter-spacing: -.03em; line-height: 1.04; text-wrap: balance; }
.bf :where(p) { text-wrap: pretty; }
.bf :where(a) { color: inherit; text-decoration: none; }
.bf em { font-style: normal; color: var(--accent); }
.bf ::selection { background: var(--accent); color: var(--on-accent); }

body.page-template-page-black-friday { background: var(--bf-bg, #0f1113); }

.bf-wrap { width: min(var(--wrap), 100% - 2 * var(--m)); margin-inline: auto; }
.bf-sec { padding-block: calc(var(--gap-section) / 2); }
.bf-h2 { font-size: var(--t-xl); letter-spacing: -.035em; }
.bf-lead { margin-top: 20px; color: var(--muted); font-size: var(--t-m); }
.bf-head { max-width: 820px; margin: 0 auto clamp(40px, 5vw, 72px); text-align: center; }

/* Botones en relieve: el canto inferior se hunde al pulsar. */
.bf-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 50px; padding: 0 26px; border: 0; border-radius: 14px;
  background: var(--accent); color: var(--on-accent) !important; font: inherit; font-weight: 500;
  box-shadow: 0 4px 0 var(--edge), 0 14px 34px rgba(255, 107, 53, .22);
  cursor: pointer;
  transition: transform 120ms var(--ease-out), box-shadow 120ms var(--ease-out), background-color 200ms var(--ease-out);
}
.bf-btn svg { width: 18px; height: 18px; }
.bf-btn--lg { height: 58px; padding: 0 34px; font-size: 18px; }
.bf-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--edge), 0 6px 18px rgba(255, 107, 53, .18); }
.bf-btn[hidden] { display: none; }
.bf-link { padding: 0; border: 0; background: none; color: var(--muted); font: inherit; font-size: var(--t-xs); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.bf-link[hidden] { display: none; }
.bf-more { color: var(--accent-ink); white-space: nowrap; }
.bf-more span { display: inline-block; transition: transform 200ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .bf-btn:hover { background: #ff8456; }
  .bf-more:hover span { transform: translateX(3px); }
  .bf-link:hover { color: var(--ink); }
}
.bf :focus-visible { outline: 2px solid var(--promo); outline-offset: 3px; }

/* Etiquetas inclinadas, en mayúsculas cursivas gruesas. */
.bf-tag {
  display: inline-block; padding: 4px 13px 3px;
  background: var(--promo); color: var(--on-accent);
  font: italic 700 12px/1.2 'PolySans', sans-serif; letter-spacing: .02em; text-transform: uppercase; white-space: nowrap;
  clip-path: polygon(9px 0, 100% 0, calc(100% - 9px) 100%, 0 100%);
}
.bf-tag--light { background: #fff; }
.bf-tag--dark { background: var(--on-accent); color: var(--promo); }

/* La cabecera carbón enlaza con la noche de la página: sin línea entre ambas. */
body.page-template-page-black-friday :is(#wrapper-navbar, #micuba-mobile-topbar) { border-bottom: 0 !important; }
body.page-template-page-black-friday #wrapper-navbar { background: #171717; }

/* ── Hero ─────────────────────────────────────────────────────────────── */
.bf-hero {
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: 1fr auto; justify-items: center;
  min-height: min(900px, calc(100svh - 64px));
  background: var(--bg); color: #fff; text-align: center;
}
/* Pared de baldosas, encendida desde arriba. */
.bf-hero__tiles {
  position: absolute; inset: 0; z-index: -3;
  background: var(--tiles) center top / 76px 76px;
  -webkit-mask-image: radial-gradient(ellipse 75% 85% at 50% 0%, #000 25%, transparent 80%);
          mask-image: radial-gradient(ellipse 75% 85% at 50% 0%, #000 25%, transparent 80%);
}
/* Haces de luz que bajan del foco. */
.bf-hero__beams {
  position: absolute; left: 50%; top: -12%; z-index: -2;
  width: min(1500px, 220vw); height: 95%; transform: translateX(-50%);
  background: conic-gradient(from 180deg at 50% 0%,
    transparent 142deg,
    rgba(255, 107, 53, .16) 152deg, transparent 160deg,
    rgba(var(--promo-glow), .1) 170deg, transparent 176deg,
    rgba(255, 107, 53, .2) 180deg, transparent 184deg,
    rgba(var(--promo-glow), .1) 190deg, transparent 196deg,
    rgba(255, 107, 53, .16) 206deg, transparent 216deg);
  -webkit-mask-image: linear-gradient(to bottom, #000 20%, transparent 90%);
          mask-image: linear-gradient(to bottom, #000 20%, transparent 90%);
  filter: blur(6px);
}
.bf-hero__glow {
  position: absolute; left: 50%; top: 22%; z-index: -1;
  width: min(1100px, 150vw); aspect-ratio: 2 / 1;
  background: radial-gradient(closest-side, rgba(255, 107, 53, .4), rgba(239, 77, 22, .12) 55%, transparent);
  transform: translate(-50%, -50%);
  animation: bf-breathe 8s ease-in-out infinite;
}
@keyframes bf-breathe {
  0%, 100% { opacity: .75; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.06); }
}
.bf-hero__inner {
  position: relative; align-self: center; display: grid; justify-items: center;
  padding: clamp(32px, 3.6vw, 52px) var(--m) clamp(24px, 2.6vw, 36px);
}

/* Título: dos líneas gruesas con ecos en contorno, como un zoom. */
.bf-title { display: grid; justify-items: center; gap: clamp(8px, 1vw, 14px); }
.bf-title__main {
  position: relative; display: grid; justify-items: center;
  font-size: clamp(48px, 7.2vw, 104px); line-height: .9; font-weight: 700; letter-spacing: -.02em; text-transform: uppercase;
}
.bf-title__line {
  position: relative; z-index: 1; color: #fff4ec;
  text-shadow: 0 0 2px rgba(255, 255, 255, .6), 0 0 22px rgba(255, 107, 53, .6), 0 0 70px rgba(255, 107, 53, .38);
  animation: bf-neon-on 1.1s steps(1, end) .15s both;
}
.bf-title__line b { font-weight: inherit; font-variant-numeric: tabular-nums; }
@keyframes bf-neon-on {
  0% { opacity: 0; }
  12% { opacity: 1; }
  18% { opacity: .25; }
  24% { opacity: 1; }
  42% { opacity: .55; }
  48%, 100% { opacity: 1; }
}
.bf-title__echoes { position: absolute; inset: 0; pointer-events: none; }
.bf-title__echo {
  position: absolute; inset: 0; display: grid; justify-items: center;
  color: transparent; -webkit-text-stroke: 1px rgba(255, 107, 53, calc(.62 - var(--k) * .075));
  transform: scale(calc(1 + var(--k) * .024));
  animation: bf-echo 1.3s var(--ease-out) calc(1.1s + var(--k) * 40ms) both;
}
.bf-title__echo:nth-child(even) { -webkit-text-stroke-color: rgba(var(--promo-glow), calc(.5 - var(--k) * .06)); }
@keyframes bf-echo {
  from { opacity: 0; transform: scale(1); }
  to { opacity: 1; transform: scale(calc(1 + var(--k) * .024)); }
}
.bf-title__scope { font-size: clamp(20px, 2.2vw, 30px); font-weight: 500; letter-spacing: -.02em; color: rgba(255, 255, 255, .9); text-transform: none; animation: bf-rise .9s var(--ease-out) .45s both; }
@keyframes bf-rise {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
.bf-hero__lead {
  margin-top: clamp(22px, 2.4vw, 30px); max-width: 42ch; color: rgba(255, 255, 255, .72); font-size: var(--t-m);
  animation: bf-rise .9s var(--ease-out) .55s both;
}

/* Niveles: una sola escala, de menos a más. */
.bf-tiers {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  width: min(880px, 100%); margin-top: 18px; padding: 6px; border-radius: 26px;
  background: var(--surface);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), inset 0 0 0 1px rgba(255, 255, 255, .07), 0 24px 60px rgba(0, 0, 0, .5);
  animation: bf-rise .8s var(--ease-out) .6s both;
}
.bf-tier {
  --lvl: rgba(255, 107, 53, 1);
  position: relative; display: grid; grid-template-rows: auto auto auto; justify-items: center; align-content: start; gap: 10px;
  padding: 20px 12px 16px; border-radius: 20px;
  animation: bf-rise .7s var(--ease-out) calc(.7s + var(--i) * 60ms) both;
}
.bf-tier + .bf-tier::before {
  content: ''; position: absolute; left: 0; top: 22%; bottom: 22%; width: 1px; background: rgba(255, 255, 255, .08);
}
/* Medidor: tantas barras encendidas como el nivel. */
.bf-tier__meter { display: flex; align-items: flex-end; gap: 3px; height: 14px; }
.bf-tier__meter i { width: 5px; border-radius: 2px; background: rgba(255, 255, 255, .14); }
.bf-tier__meter i:nth-child(1) { height: 5px; }
.bf-tier__meter i:nth-child(2) { height: 8px; }
.bf-tier__meter i:nth-child(3) { height: 11px; }
.bf-tier__meter i:nth-child(4) { height: 14px; }
.bf-tier:nth-child(1) .bf-tier__meter i:nth-child(-n+1),
.bf-tier:nth-child(2) .bf-tier__meter i:nth-child(-n+2),
.bf-tier:nth-child(3) .bf-tier__meter i:nth-child(-n+3),
.bf-tier:nth-child(4) .bf-tier__meter i { background: var(--lvl); }
.bf-tier__pct { font-size: clamp(40px, 4.6vw, 60px); line-height: .9; font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; color: #fff; }
.bf-tier__pct small { font-size: .46em; letter-spacing: 0; margin-left: .04em; color: var(--accent); }
.bf-tier__rule { display: grid; gap: 1px; color: #fff; font-size: 15px; line-height: 1.25; }
.bf-tier__in { color: rgba(255, 255, 255, .5); font-size: 13px; }
.bf-tier__tag { position: absolute; top: -10px; left: 50%; transform: translateX(-50%); }
/* El máximo, iluminado desde abajo en el color de la campaña. */
.bf-tier:last-child {
  --lvl: var(--promo);
  background: radial-gradient(120% 90% at 50% 120%, rgba(var(--promo-glow), .3), transparent 62%), var(--surface-2);
  box-shadow: inset 0 0 0 1px rgba(var(--promo-glow), .42), 0 0 40px rgba(var(--promo-glow), .12);
}
.bf-tier:last-child::before { display: none; }
.bf-tier:last-child .bf-tier__pct { color: var(--promo); text-shadow: 0 0 28px rgba(var(--promo-glow), .4); }
.bf-tier:last-child .bf-tier__pct small { color: var(--promo); }
/* Tu nivel. */
.bf-tier.is-mine { background: var(--accent); box-shadow: 0 4px 0 var(--edge), 0 14px 40px rgba(255, 107, 53, .4); }
.bf-tier.is-mine::before, .bf-tier.is-mine + .bf-tier::before { display: none; }
.bf-tier.is-mine :is(.bf-tier__pct, .bf-tier__pct small, .bf-tier__rule) { color: var(--on-accent); text-shadow: none; }
.bf-tier.is-mine .bf-tier__in { color: rgba(29, 29, 31, .72); }
.bf-tier.is-mine .bf-tier__meter i { background: rgba(29, 29, 31, .22); }
.bf-tier.is-mine:nth-child(1) .bf-tier__meter i:nth-child(-n+1),
.bf-tier.is-mine:nth-child(2) .bf-tier__meter i:nth-child(-n+2),
.bf-tier.is-mine:nth-child(3) .bf-tier__meter i:nth-child(-n+3),
.bf-tier.is-mine:nth-child(4) .bf-tier__meter i { background: var(--on-accent); }
.bf-tiers__note { margin-top: 12px; color: rgba(255, 255, 255, .55); font-size: var(--t-xs); animation: bf-rise .8s var(--ease-out) .9s both; }

/* Cuenta atrás: mosaicos con el borde superior encendido. */
.bf-count { margin: clamp(18px, 2vw, 26px) 0 clamp(18px, 2vw, 24px); animation: bf-rise .8s var(--ease-out) .9s both; }
.bf-count__label { margin-bottom: 12px; color: rgba(255, 255, 255, .6); font-size: var(--t-xs); }
.bf-count__tiles { display: flex; justify-content: center; gap: clamp(8px, 1.2vw, 12px); }
.bf-count__tile { display: grid; justify-items: center; gap: 8px; }
.bf-count__num {
  display: grid; place-items: center; overflow: hidden;
  width: clamp(64px, 6.2vw, 84px); height: clamp(66px, 6.4vw, 86px);
  border: 1px solid transparent; border-radius: 18px;
  background:
    radial-gradient(90% 60% at 50% 0%, rgba(255, 107, 53, .28), transparent 70%) padding-box,
    linear-gradient(180deg, #19191c, #111214) padding-box,
    linear-gradient(180deg, rgba(255, 107, 53, .85), rgba(255, 107, 53, .1) 55%, rgba(255, 255, 255, .06)) border-box;
  box-shadow: 0 -8px 28px -12px rgba(255, 107, 53, .7), 0 16px 40px rgba(0, 0, 0, .55);
  font-size: clamp(30px, 3.4vw, 46px); font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.02em;
  color: #fff; text-shadow: 0 0 18px rgba(255, 107, 53, .35);
}
.bf-count__num.is-tick { animation: bf-tick 380ms var(--ease-out); }
@keyframes bf-tick {
  from { transform: translateY(-14%); opacity: .2; }
  to { transform: translateY(0); opacity: 1; }
}
.bf-count__unit { color: rgba(255, 255, 255, .5); font-size: 13px; }
.bf-hero .bf-btn { animation: bf-rise .8s var(--ease-out) 1s both; }

/* Cinta de cursos reales, con la etiqueta fija delante. */
.bf-ticker {
  display: flex; align-items: stretch; width: 100%; min-width: 0; overflow: hidden;
  border-top: 1px solid var(--line-soft);
  background: rgba(15, 17, 19, .85);
}
.bf-ticker__label {
  display: flex; align-items: center; flex-shrink: 0; padding: 0 22px;
  background: var(--accent); color: var(--on-accent); font-size: 14px; font-weight: 500; white-space: nowrap;
}
.bf-ticker__track {
  display: flex; flex: 1; min-width: 0; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.bf-ticker__list {
  display: flex; flex-shrink: 0; align-items: center;
  animation: bf-belt 80s linear infinite;
}
.bf-ticker__list li {
  display: flex; align-items: center; gap: 28px; padding: 18px 0 18px 28px;
  color: rgba(255, 255, 255, .78); font-size: 15px; white-space: nowrap;
}
.bf-ticker__list li::after { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
@keyframes bf-belt { to { transform: translateX(-100%); } }

/* ── Rasca y gana ─────────────────────────────────────────────────────── */
.bf-scratch { padding-block: var(--gap-section) calc(var(--gap-section) / 2); }
.bf-scratch__grid {
  display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: clamp(40px, 6vw, 96px); align-items: center;
}

.bf-scratch__copy .bf-h2 { font-size: clamp(32px, 3.8vw, 50px); }
.bf-progress { margin-top: 32px; max-width: 440px; }
.bf-progress__ends { display: flex; justify-content: space-between; margin-bottom: 8px; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.bf-progress__bar { height: 10px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.bf-progress__bar span {
  display: block; height: 100%; border-radius: inherit; background: var(--accent);
  transform-origin: left; transform: scaleX(var(--p, 0));
  transition: transform 1.2s var(--ease-out) .2s;
}
.bf--js .bf-progress:not(.is-in) .bf-progress__bar span { transform: scaleX(0); }
.bf-progress p { margin-top: 14px; color: var(--muted); font-size: 15px; }
.bf-progress strong { color: var(--ink); font-weight: 500; }

.bf-howto { display: grid; margin-top: clamp(32px, 4vw, 48px); border-top: 1px solid var(--line-soft); }
.bf-howto li { display: flex; align-items: center; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line-soft); color: var(--muted); }
.bf-howto__n {
  flex-shrink: 0; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  box-shadow: inset 0 0 0 1.5px var(--accent); color: var(--accent-ink); font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.bf-howto strong { color: var(--ink); font-weight: 500; }

.bf-ticket-wrap { display: grid; justify-items: center; gap: 18px; }
.bf-ticket {
  --notch: 20px;
  position: relative; width: 100%; max-width: 600px; aspect-ratio: 1.6 / 1;
  border-radius: var(--r); overflow: hidden;
  background: radial-gradient(ellipse at 50% 120%, rgba(255, 107, 53, .22), transparent 60%), #1c1d21;
  -webkit-mask: radial-gradient(circle var(--notch) at 0 50%, #0000 98%, #000) left / 51% 100% no-repeat,
                radial-gradient(circle var(--notch) at 100% 50%, #0000 98%, #000) right / 51% 100% no-repeat;
          mask: radial-gradient(circle var(--notch) at 0 50%, #0000 98%, #000) left / 51% 100% no-repeat,
                radial-gradient(circle var(--notch) at 100% 50%, #0000 98%, #000) right / 51% 100% no-repeat;
  user-select: none; -webkit-user-select: none;
  transform: rotate(-2deg);
  transition: transform 600ms var(--ease-out);
}
.bf-ticket-wrap::before {
  /* Halo bajo el cupón (la máscara recorta las sombras del propio cupón). */
  content: ''; position: absolute; z-index: -1; width: min(520px, 80%); aspect-ratio: 2 / 1;
  background: radial-gradient(closest-side, rgba(255, 107, 53, .22), transparent);
  filter: blur(20px);
}
.bf-ticket-wrap { position: relative; isolation: isolate; }
.bf-ticket::after {
  content: ''; position: absolute; inset: 0; z-index: 3; pointer-events: none; border-radius: inherit;
  box-shadow: inset 0 1px 0 rgba(255, 107, 53, .7), inset 0 0 0 1px rgba(255, 255, 255, .12);
}
.bf-ticket.is-revealed, .bf-ticket.is-scratching { transform: rotate(0); }
.bf-prize {
  position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 6px;
  padding: 24px; text-align: center;
  background: var(--tiles) center / 76px 76px;
}
.bf-prize__label { color: var(--accent-ink); font-size: var(--t-xs); }
.bf-prize__pct {
  font-size: clamp(80px, 12vw, 140px); line-height: .9; letter-spacing: -.03em; font-weight: 700;
  color: var(--promo); text-shadow: 0 0 40px rgba(var(--promo-glow), .35); font-variant-numeric: tabular-nums;
}
.bf-prize__pct small { font-size: .45em; letter-spacing: 0; color: var(--promo); }
.bf-prize__code {
  display: inline-flex; align-items: center; gap: 4px; margin-top: 10px; padding: 5px 5px 5px 16px;
  border: 1px dashed rgba(255, 138, 92, .5); border-radius: 14px; background: var(--surface-2);
}
.bf-prize__code code { color: var(--ink); font: 500 15px/1 ui-monospace, 'SF Mono', Menlo, monospace; letter-spacing: .06em; user-select: all; -webkit-user-select: all; }
.bf-copy {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px;
  border: 0; border-radius: 10px; background: var(--ink); color: var(--on-accent); font: inherit; font-size: 13px; cursor: pointer;
  transition: transform 160ms var(--ease-out);
}
.bf-copy svg { width: 15px; height: 15px; }
@media (pointer: coarse) { .bf-copy { min-height: 44px; padding-inline: 16px; } }
.bf-copy:active { transform: scale(.97); }
.bf-prize__when { margin-top: 8px; color: var(--muted); font-size: 13px; }
.bf-ticket[data-state="locked"] .bf-prize { visibility: hidden; }
.bf-ticket.is-revealed .bf-prize__pct { animation: bf-pop 700ms var(--ease-out) both; }
@keyframes bf-pop {
  0% { transform: scale(.85); opacity: .4; }
  60% { transform: scale(1.04); opacity: 1; }
  100% { transform: scale(1); }
}

.bf-foil {
  position: absolute; inset: 0; width: 100%; height: 100%;
  touch-action: none; cursor: grab;
  transition: opacity 600ms var(--ease-out);
}
.bf-foil:active { cursor: grabbing; }
.bf-ticket.is-revealed .bf-foil { opacity: 0; pointer-events: none; }

.bf-hint { position: absolute; inset: 0; pointer-events: none; }
.bf-hint__coin {
  position: absolute; left: 26%; top: 60%; width: 44px; height: 44px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff3c4, #f2b33d 55%, #b77a12);
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .2), 0 6px 14px rgba(0, 0, 0, .35);
  animation: bf-coin 2.6s var(--ease-out) infinite;
}
@keyframes bf-coin {
  0% { transform: translate(0, 0) rotate(-20deg); opacity: 0; }
  10% { opacity: 1; }
  35% { transform: translate(90px, -40px) rotate(10deg); }
  60% { transform: translate(40px, 10px) rotate(-10deg); }
  85% { transform: translate(150px, -30px) rotate(15deg); opacity: 1; }
  100% { transform: translate(170px, -34px) rotate(15deg); opacity: 0; }
}
.bf-ticket.is-scratching .bf-hint,
.bf-ticket.is-revealed .bf-hint { display: none; }

/* Sin cuenta: la pared de baldosas, encendida desde abajo. */
.bf-lock {
  position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 14px;
  background:
    radial-gradient(ellipse at 50% 120%, rgba(255, 107, 53, .38), transparent 60%),
    var(--tiles) center / 76px 76px,
    #1c1d21;
  color: #fff;
}
.bf-lock svg { width: 32px; height: 32px; color: var(--accent); }
.bf-lock p { font-size: var(--t-l); letter-spacing: -.02em; }

.bf-ticket-actions { display: flex; align-items: center; gap: 20px; min-height: 54px; }
.bf-ticket-msg { min-height: 1.4em; color: var(--accent-ink); font-size: var(--t-xs); text-align: center; }
.bf-confetti { position: fixed; inset: 0; z-index: 9999; pointer-events: none; }

/* ── Reseñas ──────────────────────────────────────────────────────────── */
.bf-reviews { padding-top: var(--gap-section); }
.bf-reviews__belt {
  display: flex; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.bf-reviews__list { display: flex; flex-shrink: 0; gap: 16px; padding-right: 16px; animation: bf-belt 90s linear infinite; }
.bf-review {
  display: flex; flex-direction: column; gap: 14px;
  width: 340px; padding: 24px; border-radius: var(--r-s);
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-soft);
}
.bf-review__stars { display: flex; gap: 2px; color: var(--promo); }
.bf-review__stars svg { width: 16px; height: 16px; fill: currentColor; }
.bf-review__text { flex: 1; font-size: 16px; line-height: 1.5; color: rgba(246, 244, 241, .9); }
.bf-review__who { display: flex; align-items: center; gap: 12px; }
.bf-review__av {
  display: grid; place-items: center; flex-shrink: 0; width: 38px; height: 38px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent-ink); font-weight: 500;
}
.bf-review__who strong { display: block; font-size: 15px; font-weight: 500; }
.bf-review__who small { color: var(--muted); font-size: 13px; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }

/* ── Preguntas ─────────────────────────────────────────────────────────── */
.bf-faq { padding-top: var(--gap-section); }
.bf-faq__grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.bf-faq__grid > .bf-h2 { position: sticky; top: 110px; }
.bf-faq__list { border-top: 1px solid var(--line-soft); }
.bf-faq__item { border-bottom: 1px solid var(--line-soft); }
.bf-faq__item summary {
  display: flex; justify-content: space-between; gap: 16px; padding: 22px 0;
  font-size: var(--t-m); cursor: pointer; list-style: none;
}
.bf-faq__item summary::-webkit-details-marker { display: none; }
.bf-faq__item summary::after { content: '+'; color: var(--accent-ink); font-size: 1.3em; line-height: 1; transition: transform 200ms var(--ease-out); }
.bf-faq__item[open] summary::after { transform: rotate(45deg); }
.bf-faq__item p { padding: 0 0 22px; color: var(--muted); max-width: 56ch; }

/* ── Cierre: la pared de baldosas encendida, como el hero ─────────────── */
.bf-close { padding-bottom: var(--gap-section); }
.bf-close__card {
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; justify-items: center; gap: 36px;
  padding: clamp(72px, 10vw, 128px) var(--m);
  border-radius: var(--r); text-align: center;
  background: var(--tiles) center / 76px 76px, var(--surface);
  box-shadow: inset 0 0 0 1px var(--line-soft);
  color: #fff;
}
.bf-close__card::before {
  content: ''; position: absolute; left: 50%; bottom: -40%; z-index: -1;
  width: min(1000px, 160%); aspect-ratio: 2 / 1; transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(255, 107, 53, .4), rgba(var(--promo-glow), .1) 55%, transparent);
}
.bf-close__title { max-width: 16ch; font-size: var(--t-hero); letter-spacing: -.04em; }
.bf-close__title em { color: var(--promo); text-shadow: 0 0 32px rgba(var(--promo-glow), .35); }

/* ── Entradas al hacer scroll ─────────────────────────────────────────── */
.bf--js .bf-reveal { opacity: 0; transform: translateY(24px); transition: opacity 700ms var(--ease-out) calc(var(--i, 0) * 80ms), transform 700ms var(--ease-out) calc(var(--i, 0) * 80ms); }
.bf--js .bf-reveal.is-in { opacity: 1; transform: none; }

/* Bucles congelados fuera de pantalla (solo los bucles: las entradas terminan siempre). */
.bf .is-off :is(.bf-hero__glow, .bf-ticker__list, .bf-hint__coin, .bf-reviews__list) { animation-play-state: paused; }

/* ── Tablet y móvil ───────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .bf-scratch__grid, .bf-faq__grid { grid-template-columns: 1fr; }
  .bf-tiers { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 460px; gap: 6px; }
  .bf-tier:nth-child(3)::before { display: none; }
  .bf-scratch__copy { text-align: center; }
  /* En móvil el cupón va justo tras el título; los pasos, debajo. */
  .bf-scratch__grid { row-gap: 0; }
  .bf-scratch__copy { display: contents; }
  .bf-scratch__copy > * { text-align: center; }
  .bf-ticket-wrap { order: 1; margin-top: 32px; }
  .bf-howto { order: 2; width: 100%; margin-top: 12px; }
  .bf-progress, .bf-howto { margin-inline: auto; max-width: 440px; text-align: left; }
  .bf-faq__grid > .bf-h2 { position: static; }
  .bf-close .bf-wrap { width: 100%; }
  .bf-close__card { border-radius: 0; box-shadow: none; }
}
@media (max-width: 560px) {
  .bf-title__main { font-size: 12.4vw; }
  .bf-title__scope { font-size: 19px; }
  .bf-tier { padding: 18px 8px 14px; gap: 8px; }
  .bf-tier__rule { font-size: 14px; }
  .bf-count__num { width: 64px; height: 68px; font-size: 32px; }
  .bf-ticket { --notch: 14px; aspect-ratio: 1.25 / 1; transform: none; }
  .bf-review { width: 280px; }
  .bf-ticker__list li { font-size: 14px; padding-block: 14px; }
  .bf-ticker__label { padding: 0 14px; font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  .bf *, .bf *::before, .bf *::after { animation: none !important; transition-duration: 1ms !important; }
  .bf-hint { display: none; }
  .bf--js .bf-reveal { opacity: 1; transform: none; }
  .bf-ticker, .bf-reviews__belt { overflow-x: auto; }
}

/* Botón flotante: el cupón siempre a un toque. */
.bf-float {
  position: fixed; z-index: 1030; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom));
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 14px 12px 18px; border-radius: 14px;
  background: var(--promo); color: var(--on-accent) !important; font-weight: 500; font-size: 15px;
  box-shadow: 0 4px 0 #b88f10, 0 14px 34px rgba(0, 0, 0, .4);
  transition: transform 220ms var(--ease-out), opacity 220ms var(--ease-out), box-shadow 120ms var(--ease-out);
}
.bf-float svg { width: 18px; height: 18px; transition: transform 220ms var(--ease-out); }
.bf-float.is-up svg { transform: rotate(180deg); }
.bf-float.is-hidden { opacity: 0; transform: translateY(16px); pointer-events: none; }
.bf-float:active { transform: translateY(3px); box-shadow: 0 1px 0 #b88f10, 0 8px 20px rgba(0, 0, 0, .35); }
@media (max-width: 560px) {
  .bf-float { left: 16px; right: 16px; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) { .bf-float { transition: opacity 200ms ease; } .bf-float.is-hidden { transform: none; } }

/* Pie en la noche de la campaña (solo en esta página). */
body.page-template-page-black-friday .mcb-footer {
  --footer-bg: #0f1113;
  --footer-heading: #f6f4f1;
  --footer-text: #a3a09b;
  --footer-line: rgba(255, 255, 255, .09);
  --footer-accent: #ff6b35;
}
body.page-template-page-black-friday .mcb-footer h5.text-dark { color: var(--footer-heading) !important; }
body.page-template-page-black-friday .mcb-footer .micuba-logo { color: #f6f4f1; }
body.page-template-page-black-friday .mcb-footer__socials a { background: #17181b; color: #f6f4f1; }
@media (hover: hover) and (pointer: fine) {
  body.page-template-page-black-friday .mcb-footer__socials a:hover { color: #1d1d1f; }
}
body.page-template-page-black-friday .mcb-footer__socials a:focus-visible { color: #1d1d1f; }
