/* ============================================================
   ENSUTEX MOTION ENGINE CSS — v1.0 (2026-07-02)
   Keyframes y componentes del sistema de animación de alto valor.
   Solo transform/opacity. Spring Ensutex + overshoot pop.
   ============================================================ */

/* ---------- WORD-POP (heading con rebote por palabra) ---------- */
[data-word-pop] .wp-word {
  display: inline-block;
  opacity: 0;
  will-change: transform, opacity;
}
[data-word-pop].wp-in .wp-word {
  animation: wp-pop 0.9s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
@keyframes wp-pop {
  0%   { opacity: 0; transform: translateY(56px) scale(0.72) rotate(-3deg); filter: blur(7px); }
  60%  { opacity: 1; transform: translateY(-6px) scale(1.03) rotate(0.5deg); filter: blur(0); }
  100% { opacity: 1; transform: translateY(0) scale(1) rotate(0); filter: blur(0); }
}

/* ---------- REVEAL GENÉRICO (fade + up) ---------- */
.motion-ready [data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity;
}
.motion-ready [data-reveal].rv-in { opacity: 1; transform: translateY(0); }
.motion-ready [data-reveal="photo"] { transform: translateY(64px) scale(1.02); }
.motion-ready [data-reveal="photo"].rv-in { transform: translateY(0) scale(1); }
.motion-ready [data-reveal="left"]  { transform: translateX(-40px); }
.motion-ready [data-reveal="right"] { transform: translateX(40px); }
.motion-ready [data-reveal="left"].rv-in,
.motion-ready [data-reveal="right"].rv-in { transform: translateX(0); }

/* ---------- HERO VITRINA VIVA — cards de producto flotantes ---------- */
.hv-card {
  position: absolute;
  z-index: 12;
  border-radius: 1rem;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.08);
  box-shadow: 0 18px 44px rgba(0,0,0,0.10);
  overflow: hidden;
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
  text-decoration: none;
  display: block;
}
.hv-card:hover,
.hv-card:focus-visible {
  box-shadow: 0 26px 60px rgba(0,0,0,0.16);
  border-color: rgba(226,6,19,0.35);
}
.hv-card:focus-visible { outline: 3px solid #E20613; outline-offset: 3px; }
.hv-card img { width: 100%; height: auto; display: block; aspect-ratio: 1/1; object-fit: cover; background: #f7f8fa; }
.hv-card .hv-meta {
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.5rem; padding: 0.6rem 0.75rem;
}
.hv-card .hv-name {
  font-size: 0.68rem; font-weight: 700; color: #3f3f46;
  text-transform: uppercase; letter-spacing: 0.04em; line-height: 1.2;
}
.hv-card .hv-price {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 0.8rem; font-weight: 800; color: #000; white-space: nowrap;
}
.hv-card .hv-add {
  position: absolute; top: 0.5rem; right: 0.5rem;
  width: 2.2rem; height: 2.2rem; border-radius: 9999px;
  background: #E20613; color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.1rem; font-weight: 900; line-height: 1;
  box-shadow: 0 6px 16px rgba(226,6,19,0.35);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.hv-card:hover .hv-add { transform: scale(1.15) rotate(90deg); }

/* posiciones desktop de la constelación (4 cards) */
@media (min-width: 1024px) {
  .hv-card { width: clamp(150px, 13vw, 215px); }
  .hv-card--tl { top: 9%;  left: 2.5%; }
  .hv-card--bl { bottom: 12%; left: 5%; }
  .hv-card--tr { top: 9%;  right: 2.5%; }
  .hv-card--br { bottom: 12%; right: 5%; }
}
/* tablet: solo 2 cards laterales */
@media (min-width: 768px) and (max-width: 1023px) {
  .hv-card { width: 150px; }
  .hv-card--tl { top: 12%; left: 1rem; }
  .hv-card--tr { top: 12%; right: 1rem; }
  .hv-card--bl, .hv-card--br { display: none; }
}
/* mobile: las cards pasan a fila scrolleable bajo el copy */
@media (max-width: 767px) {
  .hv-card { position: static; flex: 0 0 46%; scroll-snap-align: start; }
  .hv-strip {
    display: flex; gap: 0.75rem; overflow-x: auto; padding: 0.25rem 1rem 1rem;
    scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
  }
  .hv-strip::-webkit-scrollbar { display: none; }
}
@media (min-width: 768px) {
  .hv-strip { display: contents; }
}

/* chips de microbeneficios del hero */
.hv-chip {
  display: inline-flex; align-items: center; gap: 0.35rem;
  border-radius: 9999px; border: 1px solid #e4e4e7; background: #fafafa;
  padding: 0.32rem 0.8rem; font-size: 0.66rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.06em; color: #3f3f46;
  white-space: nowrap;
}
.hv-chip .dot { width: 5px; height: 5px; border-radius: 9999px; background: #E20613; flex: 0 0 auto; }

/* ---------- STICKY STACK (packs/equipaciones) ---------- */
[data-stack] { position: relative; }
[data-stack-card] {
  border-radius: 1.5rem;
  transform-origin: center top;
}

/* ---------- GALLERY SCALE ---------- */
[data-gal] { position: relative; }
[data-gal-card] {
  transform: scale(0.001);
  border-radius: 1rem;
  overflow: hidden;
}
[data-gal-card] img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- CHAR REVEAL ---------- */
[data-char-reveal] span { transition: opacity 0.12s linear; }

/* ---------- SCROLL VIDEO (showcase Higgsfield) ---------- */
[data-scroll-video] { position: relative; }
[data-scroll-video] .sv-pin {
  position: sticky; top: 0; height: 100vh; height: 100dvh;
  overflow: hidden; display: flex; align-items: center; justify-content: center;
}
[data-scroll-video] .sv-stage { position: absolute; inset: 0; background: #0a0a0a; }
[data-scroll-video] .sv-overlay {
  position: absolute; inset: 0; z-index: 2;
  background: linear-gradient(to top, rgba(0,0,0,0.55), transparent 40%, transparent 75%, rgba(0,0,0,0.35));
  pointer-events: none;
}
[data-scroll-video] .sv-copy {
  position: relative; z-index: 3; text-align: center; color: #fff; padding: 0 1.5rem;
}

/* ---------- CARRITO COTIZADOR (drawer / bottom sheet) ---------- */
.qc-drawer {
  position: fixed; z-index: 90; background: #fff;
  box-shadow: -18px 0 60px rgba(0,0,0,0.18);
  display: flex; flex-direction: column;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}
@media (min-width: 768px) {
  .qc-drawer {
    top: 0; right: 0; bottom: 0; width: min(430px, 92vw);
    transform: translateX(105%);
    border-left: 1px solid #e4e4e7;
  }
  .qc-drawer.qc-open { transform: translateX(0); }
}
@media (max-width: 767px) {
  .qc-drawer {
    left: 0; right: 0; bottom: 0; max-height: 86dvh;
    transform: translateY(105%);
    border-radius: 1.25rem 1.25rem 0 0;
    box-shadow: 0 -18px 60px rgba(0,0,0,0.22);
  }
  .qc-drawer.qc-open { transform: translateY(0); }
  .qc-drawer::before {
    content: ""; display: block; width: 42px; height: 4px; border-radius: 9999px;
    background: #d4d4d8; margin: 0.6rem auto 0;
  }
}
.qc-backdrop {
  position: fixed; inset: 0; z-index: 89; background: rgba(0,0,0,0.45);
  opacity: 0; pointer-events: none; transition: opacity 0.3s ease;
}
.qc-backdrop.qc-open { opacity: 1; pointer-events: auto; }

/* resumen sticky inferior mientras se cotiza */
.qc-summary-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 80;
  background: #000; color: #fff;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.8rem 1.25rem calc(0.8rem + env(safe-area-inset-bottom));
  transform: translateY(110%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.qc-summary-bar[hidden] { display: none; }
.qc-summary-bar.qc-visible { transform: translateY(0); }
.qc-summary-bar .qc-total {
  font-family: 'JetBrains Mono', monospace; font-weight: 800; font-size: 1rem;
}
.qc-summary-bar .qc-count { font-size: 0.72rem; color: #a1a1aa; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; }
.qc-summary-bar .qc-review {
  background: #E20613; color: #fff; border-radius: 9999px;
  padding: 0.65rem 1.4rem; font-size: 0.75rem; font-weight: 900;
  text-transform: uppercase; letter-spacing: 0.08em; white-space: nowrap;
  min-height: 44px; display: inline-flex; align-items: center;
}
.qc-summary-bar .qc-review:hover { background: #c00511; }

/* badge de ahorro */
.qc-save {
  display: inline-flex; align-items: center; gap: 0.3rem;
  background: #eff6ff; border: 1px solid #bfdbfe; color: #1d4ed8;
  border-radius: 9999px; padding: 0.25rem 0.7rem;
  font-size: 0.68rem; font-weight: 900; text-transform: uppercase; letter-spacing: 0.05em;
}

/* ---------- ACCESIBILIDAD / REDUCED MOTION ---------- */
@media (prefers-reduced-motion: reduce) {
  [data-word-pop] .wp-word { animation: none !important; opacity: 1 !important; }
  [data-reveal] { opacity: 1 !important; transform: none !important; transition: none !important; }
  [data-gal-card] { transform: scale(1) !important; }
  .hv-card, .qc-drawer, .qc-summary-bar { transition: none !important; }
}
