/* ============================================================================
   Rematón · VIDA (25-sep-2026): sombras, luces, destellos y movimiento suave
   ----------------------------------------------------------------------------
   Hoja propia: NO se toca el CSS de Valeria (redisenio-v2.css / tema-claro.css).
   Reglas de la casa:
     · Nada cambia de lugar ni de color de texto: solo sombras, brillos, relieve
       y movimiento corto. El contraste AA queda igual (los destellos van DEBAJO
       del texto, entre el fondo y las letras, y nunca sobre texto claro).
     · La aparición al hacer scroll mueve (transform), nunca desvanece (opacity):
       así el texto es legible desde el primer cuadro.
     · Quien pide "menos movimiento" no ve nada de esto (redisenio-v2.css apaga
       toda animación y aquí además se quitan los desplazamientos).
     · Selectores con `html body …` para ganar a tema-claro.css sin !important.
   Variables al principio.
   ========================================================================== */
:root {
  --vida-sombra-suave: 0 1px 2px rgba(20, 30, 45, .06), 0 10px 26px -14px rgba(20, 30, 45, .22);
  --vida-sombra-alta:  0 2px 4px rgba(20, 30, 45, .07), 0 22px 40px -18px rgba(20, 30, 45, .34);
  --vida-borde-calido: #f2c96b;                 /* borde al pasar el mouse: dorado suave */
  --vida-halo-rojo:    rgba(218, 33, 49, .22);  /* halo de los botones rojos */
  --vida-halo-amarillo:rgba(255, 205, 51, .38); /* halo del botón amarillo del hero */
  --vida-luz:          rgba(255, 255, 255, .55);/* destello (rayo de luz) */
  --vida-dur:          .55s;
  --vida-curva:        cubic-bezier(.22, .9, .3, 1);
}

/* ---------------- 1. Aparición al hacer scroll (solo movimiento) ---------------- */
/* Espera desplazada; al entrar a la vista sube con una animación corta (en cascada por --vida-orden).
   Es animación y no transición; al terminar (animationend → .vida-fin) se suelta, y así el hover y las
   animaciones propias de cada pieza (marco ⭐, latidos) mandan otra vez. */
html.vida-listo .vida-revela:not(.vida-visto) { transform: translateY(22px) scale(.985); }
html.vida-listo .vida-revela.vida-visto:not(.vida-fin) {
  animation: vida-sube var(--vida-dur) var(--vida-curva) both;
  animation-delay: calc(var(--vida-orden, 0) * 70ms);
}
@keyframes vida-sube { from { transform: translateY(22px) scale(.985); } to { transform: none; } }

/* ---------------- 2. Sombras, relieve y luz en tarjetas ---------------- */
html body .product-card, html body .tarjeta, html body .carrusel-tarjeta, html body .way-card,
html body .subasta-fila, html body .collection-cards > div, html body .condition-section article {
  box-shadow: var(--vida-sombra-suave);
  transition: transform .28s var(--vida-curva), box-shadow .28s ease, border-color .28s ease;
}
html body .product-card:hover, html body .tarjeta:hover, html body .carrusel-tarjeta:hover, html body .way-card:hover,
html body .subasta-fila:hover, html body .collection-cards > div:hover {
  transform: translateY(-5px);
  box-shadow: var(--vida-sombra-alta);
  border-color: var(--vida-borde-calido);
}
html body .product-card:focus-within, html body .tarjeta:focus-within, html body .carrusel-tarjeta:focus-within {
  box-shadow: var(--vida-sombra-alta);
}
/* La foto se acerca un poco al pasar el mouse: la tarjeta se siente viva */
html body .product-image img, html body .tarjeta .foto img, html body .carrusel-foto img {
  transition: transform .6s var(--vida-curva);
}
html body .product-card:hover .product-image img, html body .tarjeta:hover .foto img, html body .carrusel-tarjeta:hover .carrusel-foto img {
  transform: scale(1.045);
}
/* Luz que cae desde arriba (relieve): un brillo blanco en el borde superior */
html body .product-card, html body .tarjeta, html body .carrusel-tarjeta, html body .way-card, html body .collection-cards > div {
  background-image: linear-gradient(180deg, rgba(255, 255, 255, .9), rgba(255, 255, 255, 0) 38%);
  background-repeat: no-repeat;
}

/* ---------------- 3. Botones: halo y destello ---------------- */
html body .btn, html body .boton { transition: transform .18s ease, box-shadow .22s ease, filter .18s ease; }
html body .btn-red:hover, html body .boton:not(.secundario):hover { box-shadow: 0 8px 20px rgba(0, 0, 0, .13), 0 0 0 5px var(--vida-halo-rojo); }
html body .btn-yellow:hover { box-shadow: 0 8px 20px rgba(0, 0, 0, .13), 0 0 0 5px var(--vida-halo-amarillo); }
html body .btn:active, html body .boton:active { transform: translateY(0) scale(.98); }

/* Destello: un rayo de luz que cruza cada tanto. Va DEBAJO del texto (z-index -1 dentro de
   la capa aislada del elemento) y solo en superficies CLARAS con texto oscuro: nunca baja el
   contraste. Se aplica al botón amarillo del hero y a la cinta ⭐ PRECIO ESTRELLA. */
html body .hero-button, html body .estrella-cinta, html body .app-invita-accion .btn-yellow {
  position: relative; overflow: hidden; isolation: isolate;
}
html body .hero-button::before, html body .estrella-cinta::before, html body .app-invita-accion .btn-yellow::before {
  content: ""; position: absolute; top: -20%; bottom: -20%; left: -60%; width: 38%; z-index: -1;
  background: linear-gradient(105deg, rgba(255, 255, 255, 0) 0%, var(--vida-luz) 50%, rgba(255, 255, 255, 0) 100%);
  transform: skewX(-18deg);
  animation: vida-destello 6.5s ease-in-out infinite;
  pointer-events: none;
}
html body .estrella-cinta::before { animation-delay: 1.4s; }
@keyframes vida-destello {
  0%   { left: -60%; }
  18%  { left: 130%; }
  100% { left: 130%; }
}

/* ---------------- 4. Hero: luces que respiran y el título con brillo ---------------- */
html body .hero-section::before, html body .hero-section::after {
  content: ""; position: absolute; z-index: 0; pointer-events: none; border-radius: 50%;
  filter: blur(46px); opacity: .75; will-change: transform;
}
html body .hero-section::before {
  width: 42vw; height: 42vw; max-width: 560px; max-height: 560px; left: -8%; top: -18%;
  background: radial-gradient(circle, rgba(255, 224, 120, .9) 0%, rgba(255, 224, 120, 0) 68%);
  animation: vida-flota-a 14s ease-in-out infinite alternate;
}
html body .hero-section::after {
  width: 30vw; height: 30vw; max-width: 420px; max-height: 420px; left: 34%; bottom: -22%;
  background: radial-gradient(circle, rgba(255, 120, 110, .45) 0%, rgba(255, 120, 110, 0) 70%);
  animation: vida-flota-b 18s ease-in-out infinite alternate;
}
html body .hero-content { position: relative; z-index: 1; }
@keyframes vida-flota-a { from { transform: translate(0, 0) scale(1); } to { transform: translate(9%, 12%) scale(1.12); } }
@keyframes vida-flota-b { from { transform: translate(0, 0) scale(1); } to { transform: translate(-12%, -10%) scale(1.15); } }

/* "GANGA!" late con un brillo rojo suave; el color de la letra no cambia */
html body .hero-ganga { animation: vida-late 3.6s ease-in-out infinite; }
@keyframes vida-late {
  0%, 100% { text-shadow: 0 0 0 rgba(255, 72, 68, 0); }
  50%      { text-shadow: 0 0 22px rgba(255, 72, 68, .38), 0 8px 26px rgba(255, 72, 68, .18); }
}
/* La píldora "¡OPORTUNIDADES QUE VUELAN!" se mueve como colgada de un hilo */
html body .flash-pill { animation: vida-pildora 5s ease-in-out infinite; transform-origin: 12% 50%; }
@keyframes vida-pildora {
  0%, 100% { transform: rotate(-2deg); }
  50%      { transform: rotate(-.5deg) translateY(-1px); }
}
/* Los tres íconos del hero flotan, cada uno a su ritmo */
html body .hero-perks b { display: inline-block; animation: vida-flota-icono 4.2s ease-in-out infinite; }
html body .hero-perks span:nth-child(2) b { animation-delay: .7s; }
html body .hero-perks span:nth-child(3) b { animation-delay: 1.4s; }
@keyframes vida-flota-icono { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }

/* ---------------- 5. Cabecera que reacciona al scroll ---------------- */
html body .site-header { transition: box-shadow .3s ease, background-color .3s ease; }
html.vida-scrolled body .site-header {
  box-shadow: 0 6px 24px rgba(21, 49, 85, .14), 0 1px 0 rgba(21, 49, 85, .06);
  background-color: rgba(255, 255, 255, .96);
  backdrop-filter: saturate(1.2) blur(8px); -webkit-backdrop-filter: saturate(1.2) blur(8px);
}

/* ---------------- 6. Títulos y cejas: una raya que crece al aparecer ---------------- */
/* Subrayado que aparece bajo el texto mismo (sirva la ceja en línea o de bloque centrada) */
html body .eyebrow {
  text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px;
  text-decoration-color: transparent;
  transition: text-decoration-color .7s ease .15s;
}
html body .vida-visto .eyebrow, html body .eyebrow.vida-visto { text-decoration-color: currentColor; }

/* ---------------- 7. Chips, sellos y relojes ---------------- */
/* "Última pieza" y "🔨 EN SUBASTA" laten con su sombra: el texto ya lo dice, el latido solo llama la vista */
html body .existencia.es-ultima, html body .carrusel-sello { animation: vida-latido 2.8s ease-in-out infinite; }
@keyframes vida-latido {
  0%, 100% { box-shadow: 0 0 0 0 rgba(122, 46, 0, 0); }
  50%      { box-shadow: 0 0 0 5px rgba(122, 46, 0, .12); }
}
/* La cinta ⭐ titila con un brillo dorado */
html body .estrella-cinta { animation: vida-titila 3s ease-in-out infinite; }
@keyframes vida-titila {
  0%, 100% { text-shadow: 0 0 0 rgba(184, 134, 11, 0); }
  50%      { text-shadow: 0 0 10px rgba(184, 134, 11, .45); }
}
/* El marco dorado de las tarjetas estrella respira */
html body .es-estrella { animation: vida-marco 4s ease-in-out infinite; }
@keyframes vida-marco {
  0%, 100% { box-shadow: 0 0 0 4px rgba(255, 213, 79, .45); }
  50%      { box-shadow: 0 0 0 7px rgba(255, 213, 79, .22), 0 14px 30px -14px rgba(184, 134, 11, .45); }
}
/* Los íconos de la franja de confianza flotan */
html body .trust-icon { display: inline-block; animation: vida-flota-icono 5s ease-in-out infinite; }
html body .trust-grid > div:nth-child(2) .trust-icon { animation-delay: .8s; }
html body .trust-grid > div:nth-child(3) .trust-icon { animation-delay: 1.6s; }
html body .trust-grid > div:nth-child(4) .trust-icon { animation-delay: 2.4s; }

/* ---------------- 8. Carrusel: flechas con luz y avance solo ---------------- */
html body .carrusel-flecha { transition: transform .2s ease, box-shadow .25s ease; }
html body .carrusel-flecha:not([disabled]):hover { transform: translateY(-50%) scale(1.08); box-shadow: 0 8px 20px rgba(0, 0, 0, .16); }
/* Barra de progreso del avance automático: texto "avanza solo" + barra (no solo color) */
html body .vida-auto {
  display: block; height: 3px; margin: 8px 6px 0; border-radius: 3px; overflow: hidden;
  background: rgba(21, 49, 85, .1);
}
html body .vida-auto > i { display: block; height: 100%; width: 0; background: #b8860b; transition: width .2s linear; }
html body .vida-auto.pausado > i { background: #545a61; }
html body .vida-auto-texto { display: block; margin: 4px 6px 0; font-size: 11px; font-weight: 700; color: #545a61; }

/* ---------------- 9. Menos movimiento: nada se desplaza ---------------- */
@media (prefers-reduced-motion: reduce) {
  html.vida-listo .vida-revela:not(.vida-visto) { transform: none; }
  html body .product-card:hover, html body .tarjeta:hover, html body .carrusel-tarjeta:hover, html body .way-card:hover,
  html body .subasta-fila:hover, html body .collection-cards > div:hover { transform: none; }
  html body .product-card:hover .product-image img, html body .tarjeta:hover .foto img, html body .carrusel-tarjeta:hover .carrusel-foto img { transform: none; }
  html body .hero-section::before, html body .hero-section::after { display: none; }
  html body .hero-button::before, html body .estrella-cinta::before, html body .app-invita-accion .btn-yellow::before { display: none; }
  html body .eyebrow { text-decoration-color: currentColor; }
  html body .vida-auto { display: none; }
}
