/* ═══════════════════════════════════════════════════════════════════
   Tienda Astrality — TEMA DE HALLOWEEN
   Es una capa encima de tienda.css: solo actúa cuando halloween.js
   pone la clase "hw" en <html> (ver "temporada" en config.js).
   Para quitar el tema basta con cambiar config.js; este archivo puede
   quedarse en el sitio sin hacer nada.
   ═══════════════════════════════════════════════════════════════════ */

html.hw {
  --void: #09060e;
  --panel: #150d1d;
  --panel-2: #1c1127;
  --glass: rgba(26, 15, 32, .76);
  --line: rgba(255, 214, 180, .10);
  --line-2: rgba(255, 214, 180, .17);
  --nova: #a46bff;
  --nova-soft: #c9a6ff;
  --solar: #ff8a2b;
  --solar-ink: #1e0c00;
  --live: #a3ff63;
  --hw-flame: #ffd25e;
  --hw-ember: #ff7a1a;
  --hw-moon: #ffe3a6;
  --hw-spooky: "Creepster", "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
}
/* El cuerpo deja ver el cielo (luna, niebla, murciélagos) que va detrás */
html.hw body { background: transparent; }

/* ───── Cielo ───── */
html.hw .aurora i:nth-child(1) { background: radial-gradient(circle, #5b1fb8 0%, transparent 65%); opacity: .34; }
html.hw .aurora i:nth-child(2) { background: radial-gradient(circle, #ff6a00 0%, transparent 65%); opacity: .14; }
html.hw .aurora i:nth-child(3) { background: radial-gradient(circle, #3b9a2b 0%, transparent 65%); opacity: .10; }
html.hw .stars { opacity: .38; }

.hw-scene { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
/* La luna y las nubes se quedan arriba de la página (no siguen al hacer scroll) */
.hw-sky { position: absolute; top: 0; left: 0; width: 100%; height: 760px; z-index: -1; pointer-events: none; overflow: hidden; }

/* Luna */
.hw-moon {
  position: absolute; top: 92px; right: max(4vw, 28px);
  width: clamp(120px, 15vw, 210px); aspect-ratio: 1; border-radius: 50%;
  background:
    radial-gradient(circle at 30% 34%, rgba(176, 104, 46, .30) 0 7%, transparent 7.5%),
    radial-gradient(circle at 62% 26%, rgba(176, 104, 46, .22) 0 5%, transparent 5.5%),
    radial-gradient(circle at 56% 62%, rgba(176, 104, 46, .26) 0 10%, transparent 10.5%),
    radial-gradient(circle at 28% 70%, rgba(176, 104, 46, .18) 0 4.5%, transparent 5%),
    radial-gradient(circle at 76% 48%, rgba(176, 104, 46, .16) 0 3.5%, transparent 4%),
    radial-gradient(circle at 36% 32%, #fff6dc 0%, var(--hw-moon) 42%, #f0a65c 100%);
  box-shadow: 0 0 60px 18px rgba(255, 168, 80, .26), 0 0 180px 70px rgba(255, 110, 30, .12);
  animation: hw-moonin 1.6s cubic-bezier(.2,.8,.2,1) both, hw-float 14s ease-in-out 1.6s infinite alternate;
}
@keyframes hw-moonin { from { opacity: 0; transform: translateY(30px) scale(.92); } }
@keyframes hw-float { to { transform: translateY(10px); } }

/* Nubes que pasan por delante de la luna */
.hw-cloud {
  position: absolute; left: 100%; width: 520px; height: 90px; opacity: .92;
  background:
    radial-gradient(closest-side, #150b1e 62%, transparent) 0 30px / 190px 60px no-repeat,
    radial-gradient(closest-side, #150b1e 62%, transparent) 110px 6px / 220px 84px no-repeat,
    radial-gradient(closest-side, #150b1e 62%, transparent) 260px 26px / 200px 64px no-repeat,
    radial-gradient(closest-side, #150b1e 62%, transparent) 380px 40px / 140px 46px no-repeat;
  animation: hw-cloud 58s linear infinite;
}
.hw-cloud.c2 { top: 190px; transform: scale(.7); animation-duration: 86s; animation-delay: -40s; opacity: .8; }
.hw-cloud.c1 { top: 118px; animation-delay: -12s; }
@keyframes hw-cloud { to { left: -560px; } }
@media (max-width: 700px) {
  .hw-moon { width: 118px; top: 34px; right: -34px; opacity: .6; }
  .hw-cloud { display: none; }
}

/* Brasas que suben */
.hw-embers i {
  position: absolute; bottom: -14px; left: var(--x); width: var(--sz); height: var(--sz); border-radius: 50%;
  background: radial-gradient(circle, #ffe0a0 0%, var(--hw-ember) 55%, transparent 72%);
  box-shadow: 0 0 10px 2px rgba(255, 122, 26, .55);
  opacity: 0; animation: hw-rise var(--d) linear var(--dl) infinite;
}
@keyframes hw-rise {
  0% { transform: translate3d(0, 0, 0); opacity: 0; }
  12% { opacity: .95; }
  50% { transform: translate3d(var(--sw), -52vh, 0); opacity: .7; }
  100% { transform: translate3d(calc(var(--sw) * -1), -108vh, 0); opacity: 0; }
}

/* Niebla del suelo */
.hw-fog {
  position: absolute; left: 0; right: 0; bottom: 0; height: 44vh;
  -webkit-mask-image: linear-gradient(to top, #000 35%, transparent);
  mask-image: linear-gradient(to top, #000 35%, transparent);
}
.hw-fog i {
  position: absolute; inset: 0; width: 200%;
  background-image:
    radial-gradient(ellipse 24% 58% at 12% 88%, rgba(196, 164, 255, .17), transparent 70%),
    radial-gradient(ellipse 18% 46% at 37% 96%, rgba(255, 168, 110, .10), transparent 70%),
    radial-gradient(ellipse 26% 56% at 63% 90%, rgba(196, 164, 255, .15), transparent 70%),
    radial-gradient(ellipse 20% 44% at 88% 97%, rgba(163, 255, 99, .06), transparent 70%);
  background-size: 50% 100%; background-repeat: repeat-x;
  animation: hw-fog 75s linear infinite;
}
.hw-fog i + i { top: 14%; opacity: .75; animation-duration: 120s; animation-direction: reverse; }
@keyframes hw-fog { to { transform: translate3d(-50%, 0, 0); } }

/* Murciélagos */
.hw-bat {
  position: absolute; left: 0; top: 0; width: 64px; height: 32px; margin: -16px 0 0 -32px;
  animation: hw-fly var(--d) linear forwards;
}
.hw-bat .b { animation: hw-bob var(--bob, 1.1s) ease-in-out infinite alternate; }
.hw-bat svg { width: 64px; height: 32px; display: block; overflow: visible; filter: drop-shadow(0 0 3px rgba(255, 140, 60, .55)); }
.hw-bat .w { transform-box: view-box; transform-origin: 32px 15px; animation: hw-flap var(--flap, .2s) ease-in-out infinite alternate; }
@keyframes hw-fly {
  from { transform: translate(var(--x0), var(--y0)) scale(var(--s0)); opacity: 0; }
  8% { opacity: 1; }
  to { transform: translate(var(--x1), var(--y1)) scale(var(--s1)); opacity: 1; }
}
@keyframes hw-bob { to { transform: translateY(-16px); } }
@keyframes hw-flap { to { transform: scaleY(-.45); } }

/* ───── Barra superior ───── */
html.hw .topbar-in { border-color: rgba(255, 138, 43, .2); box-shadow: 0 18px 40px -22px rgba(0,0,0,.85), 0 0 26px -12px rgba(255, 122, 26, .45), inset 0 1px 0 rgba(255,255,255,.07); }
html.hw .catnav a[aria-current="page"], html.hw .nav-more.has-current > button { background: rgba(255, 138, 43, .18); }

/* Carrito = calabaza */
html.hw .cart-btn {
  background: radial-gradient(circle at 36% 30%, #ffb768 0%, #ff8a2b 52%, #d75a0b 100%);
  box-shadow: inset 6px 0 0 -4px rgba(150, 50, 0, .35), inset -6px 0 0 -4px rgba(150, 50, 0, .35), 0 0 18px -4px rgba(255, 122, 26, .7);
}
html.hw .cart-btn::before {
  content: ""; position: absolute; top: -6px; left: 50%; width: 6px; height: 9px; border-radius: 3px 3px 1px 1px;
  background: #6b8f2e; transform: translateX(-50%) rotate(10deg); box-shadow: 3px 1px 0 -1px #4e6b1f;
}

/* Araña que cuelga de la barra (solo arriba de la página) */
.hw-spider { position: absolute; top: calc(100% - 4px); left: 62%; width: 30px; pointer-events: auto; cursor: pointer; transform-origin: 15px 0; animation: hw-swing 3.4s ease-in-out 2s infinite alternate; }
.hw-spider .th { display: block; width: 1px; height: 64px; margin: 0 auto; background: linear-gradient(rgba(255,255,255,.08), rgba(255,255,255,.4)); animation: hw-drop 1.8s cubic-bezier(.3,1.35,.5,1) .6s both; transition: height .6s cubic-bezier(.5,0,.3,1); }
.hw-spider svg { width: 30px; height: 30px; display: block; margin-top: -3px; filter: drop-shadow(0 0 1px rgba(255, 214, 180, .55)) drop-shadow(0 0 6px rgba(255, 122, 26, .45)); }
.hw-spider.up .th { height: 0; }
.hw-spider.up svg { opacity: 0; transition: opacity .3s .4s; }
@keyframes hw-drop { from { height: 0; } }
@keyframes hw-swing { from { transform: rotate(-5deg); } to { transform: rotate(5deg); } }
@media (max-width: 860px) { .hw-spider { display: none; } }

/* ───── Hero ───── */
html.hw .hero > div > .eyebrow { display: none; }
.hw-badge {
  display: inline-flex; align-items: center; gap: 10px; padding: 6px 14px 6px 8px; border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 138, 43, .16), rgba(164, 107, 255, .12));
  border: 1px solid rgba(255, 138, 43, .35);
  animation: hw-in .7s cubic-bezier(.2,.8,.2,1) .2s both;
}
.hw-badge svg { width: 30px; height: 28px; flex: none; }
.hw-badge .t { font-family: var(--hw-spooky); font-size: 1.3rem; line-height: 1; color: var(--solar); letter-spacing: .04em; text-shadow: 0 0 14px rgba(255, 122, 26, .55); }
.hw-badge .c { font-family: var(--mono); font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); font-weight: 700; }
.hw-badge .c b { color: var(--hw-flame); font-weight: 700; }
@keyframes hw-in { from { opacity: 0; transform: translateY(8px); } }
html.hw .hero h1 em {
  background: linear-gradient(100deg, #ffe2b8 0%, var(--solar) 45%, #c06bff 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 18px rgba(255, 122, 26, .32));
}
html.hw .who-card {
  position: relative;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cg transform='matrix(-1 0 0 1 100 0)'%3E%3Cpath d='M0 0L139.7 9.8M0 0L131.6 47.9M0 0L110.3 86.2M0 0L78.3 116.1M0 0L43.3 133.1M0 0L9.8 139.7M16.0 1.1Q13.3 2.8 15.0 5.5Q11.9 6.6 12.6 9.9Q9.3 9.9 8.9 13.3Q6.0 12.2 4.9 15.2Q2.6 13.4 1.1 16.0M30.9 2.2Q25.8 5.5 29.1 10.6Q23.0 12.8 24.4 19.1Q18.0 19.3 17.3 25.7Q11.6 23.7 9.6 29.5Q5.0 26.0 2.2 30.9M47.9 3.3Q40.0 8.5 45.1 16.4Q35.7 19.8 37.8 29.6Q27.8 29.8 26.8 39.8Q17.9 36.7 14.8 45.7Q7.8 40.2 3.3 47.9M66.8 4.7Q55.8 11.9 63.0 22.9Q49.8 27.6 52.8 41.2Q38.8 41.6 37.5 55.5Q25.0 51.3 20.7 63.7Q10.9 56.1 4.7 66.8M89.8 6.3Q75.0 15.9 84.6 30.8Q66.9 37.1 70.9 55.4Q52.1 55.9 50.3 74.6Q33.6 68.9 27.8 85.6Q14.7 75.4 6.3 89.8' fill='none' stroke='white' stroke-opacity='.22' stroke-width='.7'/%3E%3C/g%3E%3C/svg%3E") no-repeat right top / 92px 92px,
    linear-gradient(180deg, rgba(30, 18, 40, .9), rgba(18, 11, 26, .9));
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
html.hw .steps li::before { background: var(--solar); }
.hw-pumpkin {
  position: absolute; right: -20px; bottom: -36px; width: 78px; height: 74px; border: 0; padding: 0; background: none;
  cursor: pointer; filter: drop-shadow(0 6px 14px rgba(0,0,0,.6));
  animation: hw-in .8s cubic-bezier(.2,.8,.2,1) .5s both;
}
.hw-pumpkin svg { width: 100%; height: 100%; display: block; }
.hw-pumpkin.laugh { animation: hw-laugh .7s ease-in-out; }
@keyframes hw-laugh { 20% { transform: rotate(-12deg) scale(1.1); } 45% { transform: rotate(10deg) scale(1.12); } 70% { transform: rotate(-6deg) scale(1.05); } }
.hw-face { fill: var(--hw-flame); animation: hw-flicker 2.6s steps(1, end) infinite; }
.hw-glow { animation: hw-flicker 2.6s steps(1, end) infinite; }
.hw-pumpkin.laugh .hw-face { fill: #fff3b0; }
@keyframes hw-flicker {
  0%, 100% { opacity: 1; } 18% { opacity: .82; } 22% { opacity: 1; } 51% { opacity: .7; } 54% { opacity: .95; } 77% { opacity: .85; }
}
@media (max-width: 860px) { .hw-pumpkin { width: 60px; height: 57px; right: -8px; bottom: -30px; } }
@media (max-width: 520px) { .hw-badge .o { display: none; } }

/* ───── Botones ───── */
html.hw .btn-solar {
  background: linear-gradient(180deg, #ffa24d, #ff7b1c);
  box-shadow: 0 10px 24px -12px rgba(255, 123, 28, .85), inset 0 1px 0 rgba(255, 255, 255, .35);
}
html.hw .btn-solar:hover { background: linear-gradient(180deg, #ffb46b, #ff8a2b); box-shadow: 0 12px 30px -10px rgba(255, 123, 28, .95), inset 0 1px 0 rgba(255,255,255,.4); }
html.hw .seg input:checked + span, html.hw .rmode button[aria-checked="true"] { background: var(--solar); color: var(--solar-ink); }

/* ───── Rangos y paquetes ───── */
html.hw .rank {
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M0 0L139.7 9.8M0 0L131.6 47.9M0 0L110.3 86.2M0 0L78.3 116.1M0 0L43.3 133.1M0 0L9.8 139.7M16.0 1.1Q13.3 2.8 15.0 5.5Q11.9 6.6 12.6 9.9Q9.3 9.9 8.9 13.3Q6.0 12.2 4.9 15.2Q2.6 13.4 1.1 16.0M30.9 2.2Q25.8 5.5 29.1 10.6Q23.0 12.8 24.4 19.1Q18.0 19.3 17.3 25.7Q11.6 23.7 9.6 29.5Q5.0 26.0 2.2 30.9M47.9 3.3Q40.0 8.5 45.1 16.4Q35.7 19.8 37.8 29.6Q27.8 29.8 26.8 39.8Q17.9 36.7 14.8 45.7Q7.8 40.2 3.3 47.9M66.8 4.7Q55.8 11.9 63.0 22.9Q49.8 27.6 52.8 41.2Q38.8 41.6 37.5 55.5Q25.0 51.3 20.7 63.7Q10.9 56.1 4.7 66.8M89.8 6.3Q75.0 15.9 84.6 30.8Q66.9 37.1 70.9 55.4Q52.1 55.9 50.3 74.6Q33.6 68.9 27.8 85.6Q14.7 75.4 6.3 89.8' fill='none' stroke='white' stroke-opacity='.22' stroke-width='.7'/%3E%3C/svg%3E") no-repeat left top / 86px 86px,
    linear-gradient(180deg, color-mix(in srgb, var(--rc) 14%, transparent), rgba(255,255,255,.02) 55%), rgba(18, 11, 26, .55);
  transition: box-shadow .3s, border-color .3s;
}
html.hw .rank:hover { border-color: color-mix(in srgb, var(--rc) 55%, transparent); box-shadow: 0 22px 54px -24px color-mix(in srgb, var(--rc) 70%, transparent); }
html.hw .pkg { background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02)), rgba(18, 11, 26, .55); }
html.hw .pkg:hover { border-color: rgba(255, 138, 43, .4); box-shadow: 0 18px 40px -22px rgba(255, 122, 26, .6); }
html.hw .pkg .art, html.hw .pkg-head .art { background: radial-gradient(120% 90% at 50% 0%, rgba(255, 138, 43, .24), rgba(164, 107, 255, .10) 45%, rgba(9, 6, 14, .2) 75%); }
html.hw .widget { background: rgba(21, 13, 29, .92); }
html.hw .goal .bar i { background: linear-gradient(90deg, var(--nova), var(--solar)); }
html.hw .tag { background: rgba(255, 138, 43, .14); border-color: rgba(255, 138, 43, .35); }
html.hw code { background: rgba(255, 138, 43, .13); }

/* ───── Cementerio y pie ───── */
.hw-grave {
  height: 80px; margin-top: 20px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 420 80'%3E%3Cg fill='%23130a1c'%3E %3Cpath d='M0 80V69Q60 63 120 69T240 67T360 69T420 67V80Z'/%3E %3Cpath d='M24 71V47a11 11 0 0 1 22 0V71Z'/%3E %3Crect x='76' y='38' width='5' height='33'/%3E%3Crect x='69' y='46' width='19' height='5'/%3E %3Cpath d='M117 71L119.5 34L124 27L128.5 34L131 71Z'/%3E %3Cpath d='M156 71V53a9 9 0 0 1 18 0V71Z' transform='rotate(-7 165 71)'/%3E %3Cpath d='M302 71V51Q302 45 308 45H320Q326 45 326 51V71Z'/%3E %3Crect x='359' y='50' width='4' height='21'/%3E%3Crect x='354' y='55' width='14' height='4'/%3E %3Crect x='386' y='52' width='3' height='19'/%3E%3Crect x='396' y='52' width='3' height='19'/%3E%3Crect x='406' y='52' width='3' height='19'/%3E%3Crect x='383' y='57' width='30' height='2.5'/%3E%3Crect x='383' y='64' width='30' height='2.5'/%3E %3C/g%3E%3Cg fill='none' stroke='%23130a1c' stroke-linecap='round'%3E %3Cpath d='M250 71C250 58 248 50 252 40C255 32 252 26 256 17' stroke-width='5'/%3E %3Cpath d='M252 45C259 39 266 39 273 30' stroke-width='3'/%3E%3Cpath d='M251 53C244 47 238 47 231 40' stroke-width='3'/%3E %3Cpath d='M254 31C258 27 262 27 267 20' stroke-width='2'/%3E%3Cpath d='M253 37C249 33 246 31 242 24' stroke-width='2'/%3E %3Cpath d='M231 40C229 36 228 33 228 29' stroke-width='1.6'/%3E%3Cpath d='M273 30C276 28 278 25 279 21' stroke-width='1.6'/%3E %3C/g%3E%3C/svg%3E") repeat-x left bottom / 420px 80px,
              linear-gradient(to top, rgba(255, 110, 30, .10), transparent 80%);
}
html.hw .foot { border-top-color: rgba(255, 138, 43, .16); background: rgba(9, 6, 14, .9); }

/* ───── Barra del cupón de Halloween ───── */
html.hw .promo-bar {
  background: linear-gradient(90deg, rgba(255, 122, 26, .26), rgba(164, 107, 255, .2), rgba(255, 122, 26, .26));
  background-size: 200% 100%; animation: hw-shine 9s linear infinite;
  border-bottom-color: rgba(255, 138, 43, .4); color: #f3e3d3;
}
html.hw .promo-bar strong { color: var(--hw-flame); font-family: var(--hw-spooky); font-weight: 400; font-size: 1.12rem; letter-spacing: .03em; }
@keyframes hw-shine { to { background-position: -200% 0; } }

/* ───── Movimiento reducido: todo quieto ───── */
@media (prefers-reduced-motion: reduce) {
  .hw-embers, .hw-bats, .hw-cloud { display: none; }
}
