/* ==========================================================================
   Temática BLACK FRIDAY · se carga después de main.css cuando está activa (panel → Temática).
   Negro total con el rojo Strongest encendido y amarillo de etiqueta de oferta. Solo cambia colores y suma adornos:
   nada se mueve de lugar. Las fotos de producto siguen sobre placa clara (usan mix-blend-mode: multiply).
   Sobre negro un solo rojo no llega a 4,5:1 como letra y a la vez con letra blanca encima, así que van dos:
   --red (rellenos, botones, bordes) y --red-hot (el rojo cuando es letra), que las letras rojas toman abajo.
   Contrastes (WCAG): texto 17,8:1 (15,9:1 sobre tarjetas) · gris 8,1:1 (7,3:1) · blanco sobre el rojo 4,8:1 ·
   blanco sobre el rojo al pasar el mouse 5,8:1 · rojo de letra 6,5:1 (5,8:1 sobre tarjetas) · amarillo 13,6:1 y
   negro sobre el amarillo 13,6:1 · verde «Ahorras» 9,7:1.
   ========================================================================== */

:root[data-theme="black-friday"] {
  --bg: #0b0b0c;
  --bg-rgb: 11, 11, 12;
  --bg-alt: #121214;
  --surface: #18181b;
  --surface-2: #232327;
  --text: #f5f3ef;
  --muted: #a9a6a0;
  --line: rgba(245, 243, 239, 0.1);
  --line-strong: rgba(245, 243, 239, 0.22);
  /* --ink queda negro: se usa como fondo de las bandas negras (pie, beneficios) y en etiquetas. */
  --ink: #050506;
  --ink-rgb: 5, 5, 6;
  --red: #e01e17;
  --red-deep: #a81812;
  --red-glow: rgba(224, 30, 23, 0.45);
  --red-hot: #ff5c52;
  /* Amarillo de etiqueta de oferta: las promociones (que usan --gold) se ven en amarillo con letra negra. */
  --deal: #ffd23f;
  --gold: var(--deal);
  --tile: #f6f5f2;
  --ok: #3ccf7a;
  --shadow: 0 14px 30px -16px rgba(0, 0, 0, 0.85);
  color-scheme: dark;
}

/* Letras rojas: toman el rojo claro (el de los rellenos no llega a 4,5:1 sobre negro). */
:root[data-theme="black-friday"] :is(
  .display em, .accent, .eyebrow, .nav__cats a[aria-current="page"], .nav .mega__list a:hover, .nav .mega__card--sale b,
  .p-card__name a:hover, .guide-card__meta, .guide__answer b, .guide-product:hover b, .account-order:hover b,
  .account-order .status-pill--cancelled, .account-link.is-in, .not-found__code, .cat-card__body small, .filter--sale,
  .field__error, .field__suggest-btn, .testimonial figcaption span, .status.is-closed, .site-footer__grid a:hover,
  .newsletter__msg.is-error, .facet__link.is-active, .variants__error, .pdp-gift b, .cart-line__name:hover,
  .suggest__name:hover, .flash-card__kicker, .flash-card__title b, .pts-pop__title em, .pts-pop__steps li,
  .legal__contact a, .cr-tile__num, .points-example__value, .creators-band .creator-code__note, .tag--points,
  .points-card__balance b, .notify__msg.is-error, .gym-steps a, .trainer__specialty, .benefit__highlight
) { --red: var(--red-hot); }

/* Fondo: signos de porcentaje y destellos muy tenues en vez del bulldog (que sobre negro no se ve). */
:root[data-theme="black-friday"] body {
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(224, 30, 23, 0.14), transparent 60%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='320' height='320' viewBox='0 0 320 320'%3E%3Cg fill='none' stroke='%23f5f3ef' stroke-opacity='.05' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M58 98 92 52'/%3E%3Ccircle cx='62' cy='58' r='7'/%3E%3Ccircle cx='88' cy='92' r='7'/%3E%3Cpath d='M232 252 254 222'/%3E%3Ccircle cx='235' cy='226' r='4.5'/%3E%3Ccircle cx='251' cy='248' r='4.5'/%3E%3C/g%3E%3Cg fill='%23f5f3ef' fill-opacity='.05'%3E%3Cpath d='M250 70l2 6 6 2-6 2-2 6-2-6-6-2 6-2z'/%3E%3Cpath d='M110 230l1.5 4.5 4.5 1.5-4.5 1.5-1.5 4.5-1.5-4.5-4.5-1.5 4.5-1.5z'/%3E%3Ccircle cx='170' cy='150' r='1.4'/%3E%3Ccircle cx='30' cy='200' r='1.2'/%3E%3Ccircle cx='290' cy='290' r='1.4'/%3E%3C/g%3E%3C/svg%3E") 0 0 / 320px 320px,
    var(--bg);
}

/* El logo del encabezado pasa al de fondo oscuro (el mismo del pie): lo cambia header.html con `theme.dark`. */
:root[data-theme="black-friday"] .site-header.is-scrolled { box-shadow: 0 12px 24px -18px rgba(0, 0, 0, 0.95); }

/* Barra de anuncio: rojo profundo parejo con una línea amarilla abajo (blanco encima 7,5:1). */
:root[data-theme="black-friday"] .announce { background: var(--red-deep); box-shadow: inset 0 -2px 0 var(--deal); }

/* Títulos: el acento brilla como un letrero de neón. */
:root[data-theme="black-friday"] .display em { text-shadow: 0 0 26px rgba(255, 60, 50, 0.55); }

/* Botones: el hover se oscurece (el de main.css aclara y baja de 4,5:1). */
:root[data-theme="black-friday"] .btn--primary:hover { --btn-bg: #c81a14; }
:root[data-theme="black-friday"] .btn--light:hover { --btn-bg: #fff; box-shadow: 0 14px 36px -12px rgba(0, 0, 0, 0.85); }

/* Hero: el disco gira en rojo, negro y amarillo; la tarjeta del producto pasa a negro. */
:root[data-theme="black-friday"] .hero__tile { background: var(--tile); border-color: transparent; box-shadow: 0 14px 26px -18px rgba(0, 0, 0, 0.9); }
:root[data-theme="black-friday"] .hero__wall { opacity: 0.55; }
:root[data-theme="black-friday"] .hero__stage[data-plate="1"] .hero__plate { --plate: #141416; --plate-ink: var(--deal); }
:root[data-theme="black-friday"] .hero__stage[data-plate="2"] .hero__plate { --plate: var(--deal); --plate-ink: #0b0b0c; }
:root[data-theme="black-friday"] .hero__plate { box-shadow: 0 0 90px -20px rgba(224, 30, 23, 0.55), 0 50px 70px -40px rgba(0, 0, 0, 0.95); }
:root[data-theme="black-friday"] .hero__card { background: var(--surface); box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.95); }

/* Bandas que en main.css fijan su propio rojo. */
:root[data-theme="black-friday"] .wholesale { --red: #e01e17; }
:root[data-theme="black-friday"] .offer-band { background: linear-gradient(120deg, #6e0f0b, var(--red-deep) 50%, #1a1a1d); }
:root[data-theme="black-friday"] .tag--points { background: var(--surface); }

/* Tarjeta de Strong Puntos: negro mate con brillo rojo y un filo amarillo. */
:root[data-theme="black-friday"] .points-pass {
  background: radial-gradient(circle at 100% 0, rgba(224, 30, 23, 0.6), transparent 55%), linear-gradient(135deg, #1f1f23, var(--ink) 60%);
  border: 1px solid rgba(255, 210, 63, 0.28);
}

/* Tarjetas: el producto sigue sobre su placa clara, el resto de la tarjeta va de negro. */
:root[data-theme="black-friday"] .p-card:hover { border-color: rgba(255, 92, 82, 0.55); box-shadow: 0 18px 40px -18px rgba(224, 30, 23, 0.45); }

/* Categorías: letra clara y las fotos sobre una placa clara (sin ella el multiply las hundía en el negro). */
:root[data-theme="black-friday"] .cat-card { color: var(--text); }
:root[data-theme="black-friday"] .cat-card:hover { border-color: rgba(255, 92, 82, 0.55); box-shadow: 0 24px 50px -24px rgba(224, 30, 23, 0.5); }
:root[data-theme="black-friday"] .cat-card__media:not(.cat-card__media--photo) { background: var(--tile); border-radius: 12px; }
:root[data-theme="black-friday"] .cat-card__media:not(.cat-card__media--photo) img { height: 88%; top: 6%; }
:root[data-theme="black-friday"] .field__suggest { color: var(--text); }

/* Textos largos (descripción de la ficha, guías, páginas legales): en main.css van en gris oscuro fijo. */
:root[data-theme="black-friday"] .prose { color: #dcd9d3; }

/* El pie fija su propio rojo y sus superficies. */
:root[data-theme="black-friday"] .site-footer { --red: #e01e17; --surface: #18181b; --surface-2: #232327; }

/* Formularios: campos oscuros con letra clara. */
:root[data-theme="black-friday"] input:not([type="checkbox"]):not([type="radio"]),
:root[data-theme="black-friday"] select,
:root[data-theme="black-friday"] textarea { background-color: var(--surface); color: var(--text); }
:root[data-theme="black-friday"] ::placeholder { color: var(--muted); opacity: 1; }

/* ---------- Ambiente por sección de la portada (solo fondos: nada encima del contenido) ---------- */
/* Brillos rojos y amarillos hacia adentro (no en los bordes, para que no se note el corte entre secciones). */
:root[data-theme="black-friday"] .section {
  background:
    radial-gradient(60% 31% at 12% 22%, rgba(224, 30, 23, 0.1), transparent 70%),
    radial-gradient(50% 31% at 88% 78%, rgba(255, 210, 63, 0.05), transparent 70%),
    var(--bg);
}
/* Secciones alternas: rayas diagonales muy tenues, como la cinta de una vitrina de ofertas, que se funden arriba y
   abajo con --bg. */
:root[data-theme="black-friday"] .section--alt,
:root[data-theme="black-friday"] .points-band {
  background:
    linear-gradient(180deg, var(--bg), rgba(var(--bg-rgb), 0) 22%, rgba(var(--bg-rgb), 0) 78%, var(--bg)),
    repeating-linear-gradient(-45deg, rgba(245, 243, 239, 0.025) 0 14px, transparent 14px 40px),
    radial-gradient(70% 31% at 50% 22%, rgba(224, 30, 23, 0.14), transparent 70%),
    radial-gradient(40% 31% at 88% 78%, rgba(255, 210, 63, 0.06), transparent 70%),
    linear-gradient(180deg, var(--bg), #141416 22%, #111113 78%, var(--bg));
}
/* Destacados: un foco de vitrina cae sobre los productos. */
:root[data-theme="black-friday"] #destacados {
  background:
    radial-gradient(45% 31% at 50% 22%, rgba(255, 236, 200, 0.1), transparent 70%),
    radial-gradient(120% 30% at 50% 78%, rgba(224, 30, 23, 0.1), transparent 70%),
    linear-gradient(180deg, var(--bg), #141416 22%, #111113 78%, var(--bg));
}

/* Encabezados de sección: un rayo antes del texto chico («Los más pedidos»…). */
:root[data-theme="black-friday"] .eyebrow::before {
  content: ""; display: inline-block; width: 0.8em; height: 1.15em; margin-right: 0.5em; vertical-align: -0.2em;
  background: var(--deal);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 24'%3E%3Cpath d='M10 0 0 14h6l-2 10L16 9h-6.5z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 24'%3E%3Cpath d='M10 0 0 14h6l-2 10L16 9h-6.5z'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Tarjetas en oferta (precio «antes» tachado, sea oferta manual o promoción): una etiqueta negra «BF» colgando en la
   esquina de la foto (las etiquetas van a la izquierda). Solo en .p-card--sale: en una tarjeta sin descuento real
   prometería una oferta que no existe. Al pasar el mouse se balancea. */
:root[data-theme="black-friday"] .p-card--sale .p-card__media::after {
  content: ""; position: absolute; top: 6px; right: 8px; width: 30px; height: 40px; pointer-events: none;
  transform-origin: 50% 4px; transition: transform 0.6s cubic-bezier(0.34, 1.6, 0.64, 1);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 40'%3E%3Cpath d='M15 1v8' stroke='%23a81812' stroke-width='1.5'/%3E%3Cpath d='M7 12l8-5 8 5v24a3 3 0 0 1-3 3H10a3 3 0 0 1-3-3z' fill='%230b0b0c'/%3E%3Ccircle cx='15' cy='13' r='2' fill='%23f6f5f2'/%3E%3Ctext x='15' y='30' text-anchor='middle' font-family='Arial,sans-serif' font-weight='900' font-size='9' fill='%23ffd23f'%3EBF%3C/text%3E%3C/svg%3E") center / contain no-repeat;
}
:root[data-theme="black-friday"] .p-card--sale:hover .p-card__media::after { transform: rotate(14deg); }

/* ---------- Adornos (partials/themes/black-friday/*.html) ---------- */
/* Capa de la primera pantalla: al bajar se va con la página y no tapa productos ni el carrito. */
.bf-fx { position: absolute; top: 0; left: 0; right: 0; height: 100svh; z-index: 40; pointer-events: none; overflow: hidden; }
/* Etiquetas de precio colgando de los bordes: el hilo es el borde del span y la etiqueta su ícono. */
.bf-hang { position: absolute; top: calc(var(--header-h) + 36px); width: 34px; height: var(--len, 90px); transform-origin: 50% 0; animation: bf-swing var(--t, 5s) ease-in-out infinite; }
.bf-hang::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 40px; border-left: 1px solid rgba(245, 243, 239, 0.35); }
.bf-hang svg { position: absolute; left: 0; bottom: 0; width: 34px; height: 46px; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.6)); }
.bf-hang--1 { left: 8px; --len: 104px; --t: 5.5s; }
.bf-hang--2 { right: 34px; --len: 70px; --t: 4.6s; animation-delay: -1.4s; }
@keyframes bf-swing { 0%, 100% { rotate: -6deg; } 50% { rotate: 6deg; } }
/* Papel picado rojo, amarillo y blanco que cae detrás del título de la portada (va en hero.html). */
.bf-confetti { position: absolute; inset: 0; }
.bf-confetti i {
  position: absolute; top: -20px; left: var(--x); width: 7px; height: 12px; border-radius: 1px; background: var(--c, #e01e17); opacity: 0;
  animation: bf-fall var(--t, 9s) linear var(--d, 0s) infinite;
}
.bf-confetti i:nth-child(1) { --x: 6%; --t: 10s; --d: 0s; }
.bf-confetti i:nth-child(2) { --x: 18%; --t: 12s; --d: -4s; --c: #ffd23f; }
.bf-confetti i:nth-child(3) { --x: 31%; --t: 9s; --d: -7s; --c: #f5f3ef; width: 5px; height: 9px; }
.bf-confetti i:nth-child(4) { --x: 47%; --t: 13s; --d: -2s; }
.bf-confetti i:nth-child(5) { --x: 62%; --t: 11s; --d: -9s; --c: #ffd23f; }
.bf-confetti i:nth-child(6) { --x: 74%; --t: 10s; --d: -5s; --c: #f5f3ef; width: 5px; height: 9px; }
.bf-confetti i:nth-child(7) { --x: 86%; --t: 12s; --d: -1s; }
.bf-confetti i:nth-child(8) { --x: 95%; --t: 9.5s; --d: -6s; --c: #ffd23f; }
@keyframes bf-fall {
  0% { opacity: 0; transform: translateY(0) rotate(0); }
  6% { opacity: 0.85; }
  70% { opacity: 0.6; }
  100% { opacity: 0; transform: translateY(100svh) translateX(var(--dx, 30px)) rotate(540deg); }
}

/* Portada: sello «Black Friday» que gira, rayos de vitrina, una bolsa de compras haciendo press y cajas con moño. */
.bf-hero { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.bf-beams {
  position: absolute; inset: -20% -10% auto auto; width: 70%; height: 90%; opacity: 0.5;
  background: conic-gradient(from 200deg at 100% 0, transparent 0deg, rgba(224, 30, 23, 0.22) 8deg, transparent 16deg, transparent 26deg, rgba(255, 210, 63, 0.12) 32deg, transparent 38deg, transparent 50deg, rgba(224, 30, 23, 0.16) 56deg, transparent 64deg);
  filter: blur(6px); animation: bf-beams 9s ease-in-out infinite alternate; transform-origin: 100% 0;
}
@keyframes bf-beams { from { transform: rotate(-4deg); } to { transform: rotate(5deg); } }
.bf-seal { position: absolute; top: 5%; right: 3%; width: clamp(120px, 14vw, 200px); aspect-ratio: 1; filter: drop-shadow(0 0 40px rgba(224, 30, 23, 0.45)); }
.bf-seal svg { display: block; width: 100%; height: 100%; }
.bf-seal__spin { transform-origin: 50% 50%; animation: bf-spin 28s linear infinite; }
@keyframes bf-spin { to { transform: rotate(360deg); } }
.bf-lifter {
  position: absolute; top: 9%; right: 7%; width: 78px; height: 96px;
  filter: drop-shadow(0 0 16px rgba(255, 210, 63, 0.3)); animation: bf-bob 4.5s ease-in-out infinite;
}
.bf-press { animation: bf-press 1.6s ease-in-out infinite; }
.bf-sweat { animation: bf-sweat 1.6s ease-in infinite; }
@keyframes bf-bob { 50% { translate: 0 -10px; } }
@keyframes bf-press { 0%, 100% { transform: translateY(6px); } 45%, 60% { transform: translateY(-6px); } }
@keyframes bf-sweat { 0%, 40% { opacity: 0; transform: none; } 55% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }
.bf-patch { position: absolute; left: 4%; bottom: 10px; display: flex; align-items: flex-end; gap: 6px; }
.bf-patch svg { display: block; filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.7)); }
.bf-patch__big { width: 74px; height: 70px; }
.bf-patch__small { width: 50px; height: 48px; }
.bf-patch__tag { width: 30px; height: 40px; rotate: -14deg; animation: bf-swing 5s ease-in-out infinite; transform-origin: 50% 0; }
/* Escritorio: el sello y la bolsa van en la franja entre el título y el disco (arriba a la derecha los tapaba el disco). */
@media (min-width: 960px) {
  .bf-seal { top: 5%; right: auto; left: calc(50% - 178px); width: 150px; }
  .bf-lifter { top: 42%; right: auto; left: calc(50% - 150px); width: 100px; height: 125px; }
  .bf-patch { left: max(16px, calc(50% - 600px)); bottom: 16px; }
  .bf-patch__big { width: 96px; height: 90px; }
  .bf-patch__small { width: 64px; height: 61px; }
}
/* Celular: solo el sello, arriba a la derecha (el título va a la izquierda); la bolsa encima lo tapaba. */
@media (max-width: 959px) {
  .bf-seal { top: 9%; right: 3%; width: 116px; }
  .bf-lifter { display: none; }
  .bf-beams { width: 100%; opacity: 0.35; }
  .bf-patch { display: none; }
}

/* Pie: la boleta de las «ofertas» del gimnasio, con borde troquelado y código de barras. */
:root[data-theme="black-friday"] .site-footer { padding-top: 0; }
.bf-deals { position: relative; margin-bottom: 56px; padding: 44px 0 0; background: linear-gradient(180deg, #0f0f11 0%, var(--ink) 100%); overflow: hidden; }
.bf-deals__tape {
  display: flex; width: max-content; gap: 0; margin-bottom: 30px; rotate: -2deg; background: var(--deal);
  font-family: var(--font-display); font-weight: 400; font-size: 1.05rem; letter-spacing: 0.12em; text-transform: uppercase; color: #0b0b0c;
  animation: bf-tape 40s linear infinite;
}
.bf-deals__tape span { padding: 8px 22px; white-space: nowrap; }
.bf-deals__tape span::after { content: "✦"; margin-left: 22px; color: var(--red-deep); }
@keyframes bf-tape { to { transform: translateX(-50%); } }
.bf-deals__row { display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(12px, 3vw, 32px); }
.bf-ticket {
  position: relative; display: grid; justify-items: center; gap: 4px; width: var(--w, 168px); padding: 18px 14px 14px; text-align: center;
  background: #f6f5f2; color: #0b0b0c; rotate: var(--r, 0deg);
  -webkit-mask: radial-gradient(circle 7px at 0 50%, transparent 98%, #000) left / 51% 100% no-repeat, radial-gradient(circle 7px at 100% 50%, transparent 98%, #000) right / 51% 100% no-repeat;
          mask: radial-gradient(circle 7px at 0 50%, transparent 98%, #000) left / 51% 100% no-repeat, radial-gradient(circle 7px at 100% 50%, transparent 98%, #000) right / 51% 100% no-repeat;
}
.bf-ticket b { font-family: var(--font-display); font-weight: 400; font-size: 2rem; line-height: 1; color: #a81812; }
.bf-ticket small { font-size: 0.72rem; font-weight: 800; line-height: 1.25; text-transform: uppercase; letter-spacing: 0.04em; color: #2a2a2e; }
.bf-ticket i {
  display: block; width: 80%; height: 18px; margin-top: 6px;
  background: repeating-linear-gradient(90deg, #0b0b0c 0 2px, transparent 2px 4px, #0b0b0c 4px 5px, transparent 5px 8px, #0b0b0c 8px 11px, transparent 11px 12px);
}
.bf-ticket--1 { --r: -4deg; }
.bf-ticket--2 { --r: 2deg; --w: 186px; background: var(--deal); }
.bf-ticket--3 { --r: -1.5deg; }
.bf-ticket--4 { --r: 4deg; }
.bf-deals__bags { display: block; width: 100%; height: 40px; margin-top: 20px; fill: #18181b; }
@media (max-width: 767px) {
  .bf-ticket--4 { display: none; }
  .bf-ticket { --w: 104px; padding: 14px 8px 10px; }
  .bf-ticket--2 { --w: 112px; }
  .bf-ticket b { font-size: 1.45rem; }
  .bf-ticket small { font-size: 0.6rem; }
  .bf-ticket i { height: 12px; }
  /* Las etiquetas colgantes tocaban el título: en el celular no salen. */
  .bf-hang { display: none; }
  /* El texto y los botones del inicio ocupan todo el ancho: el papel picado cae solo por los márgenes (dentro de
     --gutter), en línea recta, y nunca pasa por encima de ellos. */
  .bf-confetti i { --dx: 0; width: 5px; height: 9px; }
  .bf-confetti i:nth-child(n + 5) { display: none; }
  .bf-confetti i:nth-child(1) { --x: 2px; }
  .bf-confetti i:nth-child(2) { --x: calc(100% - 8px); }
  .bf-confetti i:nth-child(3) { --x: 5px; }
  .bf-confetti i:nth-child(4) { --x: calc(100% - 12px); }
}

/* Quien pide menos movimiento ve los adornos quietos. */
@media (prefers-reduced-motion: reduce) {
  .bf-confetti { display: none; }
  .bf-hang, .bf-beams, .bf-seal__spin, .bf-lifter, .bf-press, .bf-sweat, .bf-patch__tag, .bf-deals__tape { animation: none; }
  :root[data-theme="black-friday"] .p-card--sale .p-card__media::after { transition: none; }
  :root[data-theme="black-friday"] .p-card--sale:hover .p-card__media::after { transform: none; }
}
