/* ==========================================================================
   BE INLINE GT · Productos estrella (bloque #catalogo)

   Dos modos:
   1. Simplificado (por defecto): composición estática con los tres envases.
      Se usa sin WebGL, con "reducir movimiento" o abriendo el archivo
      directamente desde el disco.
   2. 3D (.is-3d): escenario fijo durante el scroll; lo activa
      js/estrella3d/modo.js y lo anima js/estrella3d/main.js.
   Todo queda dentro de .estrella: no afecta a ninguna otra sección.
   ========================================================================== */

.estrella{position:relative;background:var(--orange);color:var(--forest);border-top:1px solid var(--rule)}
.estrella h2,.estrella h3{text-transform:uppercase;font-weight:900;letter-spacing:-.055em;line-height:.95;margin:0}
.estrella h2{font-size:clamp(2.5rem,7.2vw,6.6rem)}
.estrella h3{font-size:clamp(2.1rem,5vw,5.2rem)}
.estrella .eyebrow{margin-bottom:12px}
.estrella-cta{padding:1rem 1.6rem;font-size:clamp(1rem,1.5vw,1.2rem);text-transform:uppercase;letter-spacing:.06em;box-shadow:0 5px 0 #0d1c17}
.estrella-cta:hover{filter:none;background:#22443a}

/* --- Modo simplificado ---------------------------------------------------- */
.estrella-stage{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:clamp(14px,2.4vw,32px);width:min(1320px,92%);margin:auto;padding:clamp(44px,7vw,92px) 0}
.estrella-intro,.estrella-final{grid-column:1/-1}
.estrella-final{display:grid;justify-items:start;gap:18px;margin-top:12px}
.estrella-product{display:grid;align-content:start;gap:10px;min-width:0;padding:14px;border-radius:18px;background:var(--paper)}
.estrella-product>*{min-width:0}
.estrella-product .btn{justify-self:start}
.estrella-product h3{font-size:clamp(1.5rem,2.6vw,2.3rem)}
.estrella-shot{position:relative;width:100%;margin:0 0 6px;aspect-ratio:1/1.05;overflow:hidden;border-radius:12px;background:radial-gradient(circle at 50% 51%,#ffe8cd 0 39%,transparent 40%),linear-gradient(145deg,#ffd8b7,#ffb982)}
.estrella-shot img{position:absolute;inset:8% 15%;width:70%;height:84%;object-fit:contain;filter:drop-shadow(0 9px 9px #49210d42)}
.estrella-canvas,.estrella-glow,.estrella-progress,.estrella-skip,.estrella-loading,.estrella-hint{display:none}
@media(max-width:760px){.estrella-stage{grid-template-columns:minmax(0,1fr)}.estrella-shot{aspect-ratio:1/.8}}

/* --- Modo 3D -------------------------------------------------------------- */
.estrella.is-3d{height:560vh}
.is-3d .estrella-stage{position:sticky;top:0;display:block;width:100%;height:100vh;height:100svh;padding:0;margin:0;overflow:hidden}
.is-3d .estrella-canvas{display:block;position:absolute;inset:0;width:100%;height:100%;pointer-events:none}
.is-3d .estrella-shot{display:none}

/* Viraje de color detrás del producto: el naranja sigue dominando. */
.is-3d .estrella-glow{display:block;position:absolute;inset:0;opacity:0;pointer-events:none;--gx:69%;--gy:52%}
.estrella-glow--verde{background:radial-gradient(circle at var(--gx) var(--gy),rgb(23 45 37 / 92%) 0%,rgb(23 45 37 / 62%) 26%,rgb(23 45 37 / 0%) 60%)}
.estrella-glow--azul{background:radial-gradient(circle at var(--gx) var(--gy),rgb(35 61 135 / 92%) 0%,rgb(35 61 135 / 60%) 26%,rgb(35 61 135 / 0%) 60%)}

/* Paneles de texto: los muestra y oculta la línea de tiempo. */
.is-3d .estrella-panel{position:absolute;z-index:2;opacity:0;visibility:hidden;margin:0}
.is-3d:not(.is-ready) .estrella-intro{opacity:1;visibility:visible}
.is-3d .estrella-intro{top:clamp(26px,7vh,72px);left:0;right:0;text-align:center;padding-inline:4%}
.is-3d .estrella-product{display:grid;justify-items:start;gap:14px;left:6vw;top:50%;width:min(40vw,34rem);padding:0;border-radius:0;background:none;transform:translateY(-50%)}
.is-3d .estrella-product h3{font-size:clamp(2.3rem,5vw,5.2rem)}
.is-3d .estrella-product p:not(.eyebrow){font-size:clamp(1.05rem,1.6vw,1.35rem);max-width:30ch;margin:0}
.is-3d .estrella-product .eyebrow{margin:0}
.is-3d .estrella-product .btn{background:var(--paper);color:var(--forest);box-shadow:0 4px 0 var(--forest);padding:.75rem 1.2rem}
.is-3d .estrella-final{display:block;justify-items:normal;top:clamp(26px,7vh,72px);left:0;right:0;margin:0;text-align:center;padding-inline:4%;height:calc(100% - clamp(26px,7vh,72px))}
.is-3d .estrella-final h3{font-size:clamp(2.3rem,6.4vw,6rem)}
.is-3d .estrella-final .estrella-cta{position:absolute;left:50%;bottom:clamp(54px,11vh,110px);transform:translateX(-50%);white-space:nowrap}

.is-3d .estrella-hint{display:block;margin-top:14px;font-weight:700;font-size:.9rem;letter-spacing:.04em}
.estrella-hint span{display:inline-block;animation:estrella-nudge 1.6s ease-in-out infinite}
@keyframes estrella-nudge{50%{transform:translateY(5px)}}

.is-3d .estrella-progress{display:flex;flex-direction:column;gap:9px;position:absolute;z-index:3;right:clamp(12px,2.2vw,30px);top:50%;transform:translateY(-50%);list-style:none;margin:0;padding:0}
.estrella-progress li{width:7px;height:7px;border-radius:50%;background:var(--forest);opacity:.28;transition:opacity .3s,height .3s}
.estrella-progress li.is-on{opacity:1;height:22px;border-radius:100px}
.is-3d .estrella-skip{display:inline-flex;position:absolute;z-index:3;left:clamp(14px,4vw,60px);bottom:clamp(12px,3vh,26px);font-size:.82rem;font-weight:700;text-decoration:none;padding:.4rem .8rem;border:1px solid var(--forest);border-radius:100px;background:#fa5d1ccc}
.is-3d:not(.is-ready) .estrella-loading{display:block;position:absolute;left:0;right:0;top:54%;text-align:center;font-weight:700;margin:0}

@media(max-width:860px),(max-aspect-ratio:9/10){
  .is-3d .estrella-glow{--gx:50%;--gy:68%}
  .is-3d .estrella-product{left:6%;right:6%;top:clamp(20px,5vh,48px);width:auto;transform:none;gap:10px}
  .is-3d .estrella-product h3{font-size:clamp(2rem,9.5vw,3.4rem)}
  .is-3d .estrella-product p:not(.eyebrow){font-size:1rem;max-width:34ch}
  .is-3d .estrella-product .btn{padding:.6rem 1rem;font-size:.92rem}
  .is-3d .estrella-intro h2{font-size:clamp(2.1rem,10.5vw,3.8rem)}
  .is-3d .estrella-final h3{font-size:clamp(2rem,9.6vw,3.6rem)}
  .is-3d .estrella-final .estrella-cta{bottom:clamp(62px,11vh,96px)}
  .is-3d .estrella-progress{right:8px}
}
@media(prefers-reduced-motion:reduce){.estrella-hint span{animation:none}}
