/* =====================================================================
   PSIU — TEMA DE HALLOWEEN 2026            css/tema-halloween.css
   Par deste arquivo: js/tema-halloween.js

   • Só vale quando o JS coloca a classe "tema-halloween" no <body>.
     Sem a classe nada daqui é aplicado: o site fica exatamente como era.
   • DESLIGAR: em js/tema-halloween.js troque  ativo: 'auto'  por  ativo: false.
   • REMOVER DE VEZ: apague este arquivo, js/tema-halloween.js e as linhas que
     carregam os dois (procure "tema-halloween" em index.html, meus-pedidos.html,
     404.html, as páginas da pasta produto e scripts/gerar-paginas-produtos.mjs).
   • O verde PSIU continua sendo a cor principal; laranja #f97316, roxo #7c3aed e
     o fundo escuro #0f0a1a aparecem só em detalhes.
   • Arte 100% original em SVG. Sem imagens externas, fontes ou CDN.
   • Animações só com transform/opacity (leves) e desligadas para quem pede
     "reduzir movimento" no aparelho.
   ===================================================================== */

body.tema-halloween{
  --hw-link:#c2410c;
  --hw-pumpkin:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cellipse cx='17.5' cy='38' rx='13.5' ry='17' fill='%23ea580c'/%3E%3Cellipse cx='46.5' cy='38' rx='13.5' ry='17' fill='%23ea580c'/%3E%3Cellipse cx='32' cy='37.5' rx='14' ry='19.5' fill='%23f97316'/%3E%3Cpath d='M24 20.5C20 30 20 46 24.5 55.5M40 20.5C44 30 44 46 39.5 55.5' fill='none' stroke='%23c2410c' stroke-width='1.4' stroke-linecap='round'/%3E%3Cpath d='M28.5 21C28 14 31 9.5 36.5 8.5L38.5 11.5C35 12.5 34 15.5 34.5 21Z' fill='%2316a34a'/%3E%3Cpath d='M20.5 31 26.5 40H14.5ZM43.5 31 49.5 40H37.5Z' fill='%232e1065'/%3E%3Cpath d='M18 46 24 50 28 46 32 51 36 46 40 50 46 46Q44 55 32 55Q20 55 18 46Z' fill='%232e1065'/%3E%3C/svg%3E");
  --hw-pumpkin-dk:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cellipse cx='17.5' cy='38' rx='13.5' ry='17' fill='%232e1065'/%3E%3Cellipse cx='46.5' cy='38' rx='13.5' ry='17' fill='%232e1065'/%3E%3Cellipse cx='32' cy='37.5' rx='14' ry='19.5' fill='%233b0764'/%3E%3Cpath d='M24 20.5C20 30 20 46 24.5 55.5M40 20.5C44 30 44 46 39.5 55.5' fill='none' stroke='%234c1d95' stroke-width='1.4' stroke-linecap='round'/%3E%3Cpath d='M28.5 21C28 14 31 9.5 36.5 8.5L38.5 11.5C35 12.5 34 15.5 34.5 21Z' fill='%234ade80'/%3E%3Cpath d='M20.5 31 26.5 40H14.5ZM43.5 31 49.5 40H37.5Z' fill='%23fdba74'/%3E%3Cpath d='M18 46 24 50 28 46 32 51 36 46 40 50 46 46Q44 55 32 55Q20 55 18 46Z' fill='%23fdba74'/%3E%3C/svg%3E");
  --hw-hat:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 28'%3E%3Cpath d='M8.5 22.5 15 6C16.2 3.2 20 2.2 23.5 4.2 20.6 4.2 19.3 6.2 19.5 8.5L24 22.5Z' fill='%236d28d9'/%3E%3Cpath d='M11.65 14.5H21.43L22.9 19.5H9.9Z' fill='%23f97316'/%3E%3Cpath d='M14.6 14.9h4v4.2h-4z' fill='none' stroke='%23fde68a' stroke-width='.9'/%3E%3Cellipse cx='16' cy='23' rx='14.8' ry='3.6' fill='%234c1d95'/%3E%3Cpath d='M2.5 22.4Q16 19.2 29.5 22.4' fill='none' stroke='%237c3aed' stroke-width='.8' stroke-linecap='round'/%3E%3C/svg%3E");
}
body.tema-halloween.dark-theme{--hw-link:#fdba74}

/* sprite SVG (abóbora, morcego e teia) injetado pelo JS: nunca display:none */
body.tema-halloween .hw-sprite{position:absolute;width:0;height:0;overflow:hidden}

/* ---------- 1) Faixa no topo: fechável e não fixa ---------- */
body.tema-halloween .hw-faixa{position:relative;background:linear-gradient(90deg,#120a24 0%,#2b1254 50%,#120a24 100%);color:#f5f3ff;border-bottom:1px solid rgba(249,115,22,.55)}
body.tema-halloween .hw-faixa-in{display:flex;align-items:center;justify-content:center;gap:10px;min-height:40px;padding:6px 46px 6px 14px}
body.tema-halloween .hw-faixa-ico{flex:0 0 auto;width:24px;height:24px}
body.tema-halloween .hw-faixa-txt{margin:0;min-width:0;font-size:.84rem;line-height:1.3;font-weight:600}
body.tema-halloween .hw-faixa-txt b{color:#fdba74;font-weight:900}
body.tema-halloween .hw-faixa-link{flex:0 0 auto;padding:6px 13px;border-radius:999px;background:linear-gradient(135deg,#4ade80,#22c55e);color:#052e14;font-size:.78rem;font-weight:900;line-height:1.2;text-decoration:none;white-space:nowrap;box-shadow:0 0 0 2px rgba(249,115,22,.4);transition:transform .18s,box-shadow .18s}
body.tema-halloween .hw-faixa-link:hover{transform:translateY(-1px);box-shadow:0 0 0 3px rgba(249,115,22,.65)}
body.tema-halloween .hw-faixa-x{position:absolute;right:4px;top:50%;width:36px;height:36px;margin:-18px 0 0;padding:0;border:0;border-radius:50%;background:transparent;color:#e9d5ff;font:400 1.4rem/1 system-ui,sans-serif;cursor:pointer;transition:background .18s,color .18s}
body.tema-halloween .hw-faixa-x:hover{background:rgba(255,255,255,.13);color:#fff}
body.tema-halloween .hw-faixa a:focus-visible,
body.tema-halloween .hw-faixa button:focus-visible{outline:2px solid #fdba74;outline-offset:2px}
@media (max-width:560px){
  body.tema-halloween .hw-faixa-longo{display:none}
  body.tema-halloween .hw-faixa-in{gap:8px;padding:6px 42px 6px 10px}
  body.tema-halloween .hw-faixa-txt{font-size:.78rem}
}

/* ---------- 2) Cabeçalho roxo com linha laranja→roxo e logo com chapéu de bruxa ---------- */
body.tema-halloween .topbar{background:linear-gradient(180deg,#0a2a1a 0%,#150c2b 100%);border-bottom:0}
body.tema-halloween .topbar::after{content:"";position:absolute;left:0;right:0;bottom:0;height:2px;background:linear-gradient(90deg,#f97316 0%,#7c3aed 65%,#4c1d95 100%);pointer-events:none}
body.tema-halloween .brand,
body.tema-halloween .brand-area{overflow:visible}
body.tema-halloween .brand-mark{position:relative}
body.tema-halloween .brand-mark::before{content:"";position:absolute;left:-7px;top:-14px;width:27px;height:23px;background:var(--hw-hat) center/contain no-repeat;transform:rotate(-13deg);transform-origin:50% 100%;pointer-events:none}

/* ---------- 3) Banner (hero): anel de brilho + teia e morcegos pequenos ---------- */
body.tema-halloween .hero{box-shadow:0 0 0 1.5px rgba(249,115,22,.55),0 0 22px 1px rgba(249,115,22,.22),0 18px 44px rgba(46,16,101,.32)}
body.tema-halloween .hero::after{content:"";position:absolute;top:0;right:0;bottom:0;left:0;z-index:1;border-radius:inherit;pointer-events:none;box-shadow:inset 0 0 0 2px rgba(249,115,22,.5),inset 0 0 30px rgba(124,58,237,.38);animation:hwAnel 4.8s ease-in-out infinite alternate}
body.tema-halloween .banner-arrow,
body.tema-halloween .banner-dots{z-index:2}
body.tema-halloween .hw-deco{position:absolute;top:0;right:0;bottom:0;left:0;z-index:1;pointer-events:none}
body.tema-halloween .hw-teia{position:absolute;left:0;top:0;width:clamp(24px,5.2vw,64px);height:auto;aspect-ratio:1/1;opacity:.85}
body.tema-halloween .hw-mini{position:absolute;width:clamp(16px,2.6vw,34px);height:auto;aspect-ratio:2/1;opacity:.95}
body.tema-halloween .hw-mini-a{right:3.2%;top:8%}
body.tema-halloween .hw-mini-b{right:7.4%;top:20%;transform:scale(.72) rotate(-9deg)}
body.tema-halloween .hw-mini-c{right:1.6%;top:30%;transform:scale(.55) rotate(8deg)}

/* ---------- 4) Detalhes nos cards, selo de oferta, título, botões e carrinho ---------- */
body.tema-halloween.clip-blue-theme .product-card:hover{border-color:rgba(249,115,22,.65);box-shadow:0 20px 40px -12px rgba(46,16,101,.32),0 0 0 1px rgba(249,115,22,.25)}
body.tema-halloween.clip-blue-theme .product-offer-badge{background:linear-gradient(135deg,#c2410c,#9a3412);box-shadow:0 5px 12px rgba(154,52,18,.32);animation:hwPulsoSelo 1.5s ease-in-out 2}
body.tema-halloween.clip-blue-theme .product-offer-badge::before{content:"";flex:0 0 auto;width:11px;height:11px;margin-right:4px;background:var(--hw-pumpkin-dk) center/contain no-repeat}
body.tema-halloween .catalog-page-title::after{content:"";display:inline-block;width:.85em;height:.85em;margin-left:.35em;vertical-align:-.08em;background:var(--hw-pumpkin) center/contain no-repeat}
@media (max-width:480px){
  /* em tela estreita o título já ocupa a linha toda: a abóbora iria sozinha para a linha de baixo */
  body.tema-halloween .catalog-page-title::after{display:none}
}
body.tema-halloween.clip-blue-theme .primary-btn:hover{box-shadow:0 12px 26px var(--neon-glow),0 0 0 3px rgba(249,115,22,.3)}
body.tema-halloween.clip-blue-theme .floating-cart{box-shadow:0 0 0 3px rgba(249,115,22,.7),0 10px 24px rgba(46,16,101,.38)}
body.tema-halloween.clip-blue-theme .floating-cart:hover{box-shadow:0 0 0 4px rgba(249,115,22,.85),0 14px 30px var(--neon-glow)}

/* ---------- 5) Morcegos: até 5, só CSS, no topo do documento ---------- */
body.tema-halloween .hw-morcegos{position:absolute;top:0;left:0;right:0;height:230px;overflow:hidden;pointer-events:none;z-index:55;contain:layout paint}
body.tema-halloween .hw-m{position:absolute;left:0;top:var(--y,20px);width:var(--w,34px);will-change:transform;animation:hwVoo var(--d,28s) linear var(--a,0s) infinite}
body.tema-halloween .hw-m-rev{animation-name:hwVooR}
body.tema-halloween .hw-m-b{display:block;animation:hwBalanco var(--b,2.8s) ease-in-out infinite alternate}
body.tema-halloween .hw-m-b svg{display:block;width:100%;height:auto;aspect-ratio:2/1;transform-origin:50% 35%;animation:hwAsa .42s ease-in-out infinite alternate}
@media (max-width:640px){
  body.tema-halloween .hw-m:nth-child(n+4){display:none}
}

/* ---------- 6) Rodapé com abóboras (injetado pelo JS) ---------- */
body.tema-halloween .hw-rodape{position:relative;margin-top:40px;padding:28px 14px 24px;overflow:hidden;text-align:center;color:#c4b5fd;background:linear-gradient(90deg,#7c3aed,#f97316,#7c3aed) top/100% 2px no-repeat,linear-gradient(180deg,#1a1133 0%,#0f0a1a 100%)}
body.tema-halloween .hw-rodape-com-carrinho{padding-bottom:92px}
body.tema-halloween .hw-rodape::before{content:"";position:absolute;left:50%;bottom:-50px;width:min(560px,92%);height:130px;transform:translateX(-50%);background:radial-gradient(closest-side,rgba(249,115,22,.5),rgba(249,115,22,0));opacity:.5;pointer-events:none;animation:hwHalo 5s ease-in-out infinite alternate}
body.tema-halloween .hw-rodape{--hw-s:1}
body.tema-halloween .hw-rodape-ab{position:relative;display:flex;align-items:flex-end;justify-content:center;gap:calc(12px * var(--hw-s));margin:0 auto 12px}
body.tema-halloween .hw-rodape-ab svg{flex:0 0 auto;width:calc(30px * var(--hw-s));height:calc(30px * var(--hw-s))}
body.tema-halloween .hw-rodape-ab svg:nth-child(1),
body.tema-halloween .hw-rodape-ab svg:nth-child(7){width:calc(26px * var(--hw-s));height:calc(26px * var(--hw-s))}
body.tema-halloween .hw-rodape-ab svg:nth-child(2),
body.tema-halloween .hw-rodape-ab svg:nth-child(6){width:calc(34px * var(--hw-s));height:calc(34px * var(--hw-s));transform:rotate(-5deg)}
body.tema-halloween .hw-rodape-ab svg:nth-child(4){width:calc(42px * var(--hw-s));height:calc(42px * var(--hw-s))}
body.tema-halloween .hw-rodape-ab svg:nth-child(6){transform:rotate(5deg)}
@media (min-width:900px){
  body.tema-halloween .hw-rodape{--hw-s:1.35}
}
body.tema-halloween .hw-rodape-txt{position:relative;margin:0;font-size:.82rem;font-weight:800;letter-spacing:.09em;text-transform:uppercase}

/* ---------- 7) "Ver ofertas": filtro só em CSS (precisa de :has) + aviso ---------- */
body.tema-halloween .hw-modo{display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px;margin:0 0 12px;padding:9px 12px;border:1px solid rgba(249,115,22,.5);border-radius:12px;background:rgba(249,115,22,.1);background:color-mix(in srgb,#f97316 11%,var(--card));color:var(--text);font-size:.86rem;font-weight:700;scroll-margin-top:88px}
body.tema-halloween .hw-modo-ico{flex:0 0 auto;width:22px;height:22px}
body.tema-halloween .hw-modo-t{min-width:0}
body.tema-halloween .hw-modo-x{margin-left:auto;padding:4px 2px;border:0;background:transparent;color:var(--hw-link);font:inherit;font-weight:900;text-decoration:underline;cursor:pointer}
body.tema-halloween .hw-aviso .hw-modo-x{display:none}
body.tema-halloween .hw-modo-x:focus-visible{outline:2px solid var(--hw-link);outline-offset:2px;border-radius:4px}
@supports selector(:has(*)){
  body.tema-halloween.hw-ofertas .product-grid .product-card:not(:has(.product-price del)){display:none}
  body.tema-halloween.hw-ofertas #perfumeSection:not(:has(.product-price del)),
  body.tema-halloween.hw-ofertas #recentSection{display:none}
}

/* ---------- 8) Animações ---------- */
@keyframes hwVoo{0%{transform:translate3d(-130px,0,0)}60%,100%{transform:translate3d(calc(100vw + 130px),0,0)}}
@keyframes hwVooR{0%{transform:translate3d(calc(100vw + 130px),0,0)}60%,100%{transform:translate3d(-130px,0,0)}}
@keyframes hwBalanco{from{transform:translate3d(0,-7px,0)}to{transform:translate3d(0,7px,0)}}
@keyframes hwAsa{from{transform:scaleY(1)}to{transform:scaleY(.45)}}
@keyframes hwAnel{from{opacity:.45}to{opacity:1}}
@keyframes hwHalo{from{opacity:.4}to{opacity:.95}}
@keyframes hwPulsoSelo{0%,100%{box-shadow:0 0 0 0 rgba(249,115,22,.6)}50%{box-shadow:0 0 0 7px rgba(249,115,22,0)}}

/* Quem pede "reduzir movimento": sem morcegos e sem nenhuma animação do tema */
@media (prefers-reduced-motion:reduce){
  body.tema-halloween .hw-morcegos{display:none}
  body.tema-halloween .hero::after,
  body.tema-halloween .hw-rodape::before,
  body.tema-halloween.clip-blue-theme .product-offer-badge{animation:none}
  body.tema-halloween .hw-faixa-link{transition:none}
}

/* Na impressão (catálogo, comprovantes) o tema não aparece */
@media print{
  body.tema-halloween .hw-faixa,
  body.tema-halloween .hw-morcegos,
  body.tema-halloween .hw-deco,
  body.tema-halloween .hw-rodape,
  body.tema-halloween .hw-modo{display:none!important}
}

/* ---------- BANNER ANIMADO (SVG feito no js/tema-halloween.js) ---------- */
/* o espaço do banner é reservado desde o primeiro desenho: nada "pula" quando ele aparece */
body.tema-halloween.clip-blue-theme #storeBanner{aspect-ratio:1600/380;background:#150a29}
body.tema-halloween #storeBanner .banner-track,
body.tema-halloween #storeBanner .banner-arrow,
body.tema-halloween #storeBanner .banner-dots,
body.tema-halloween #storeBanner .hw-mini{display:none!important}
body.tema-halloween .hw-banner{position:absolute;top:0;right:0;bottom:0;left:0;display:block;color:inherit;text-decoration:none;-webkit-tap-highlight-color:transparent}
body.tema-halloween .hw-banner:focus-visible{outline:3px solid #fde047;outline-offset:-5px;border-radius:inherit}
body.tema-halloween .hb{position:absolute;top:0;left:0;width:100%;height:100%;display:block}
body.tema-halloween .hb-c{display:none}
@media (max-width:640px){
  body.tema-halloween.clip-blue-theme #storeBanner{aspect-ratio:800/440}
  body.tema-halloween .hb-w{display:none}
  body.tema-halloween .hb-c{display:block}
}
/* só transform e opacity (leve, sem repintar) */
.hb-e{opacity:.35;animation:hbBrilha 2.8s ease-in-out infinite alternate;animation-delay:var(--a)}
.hb-halo{animation:hbHalo 3.2s ease-in-out infinite alternate}
.hb-luz{animation:hbChama 3.4s linear infinite;animation-delay:var(--a)}
.hb-brilho{opacity:.18;animation:hbHalo 2.6s ease-in-out infinite alternate}
.hb-v{transform:translate(-160px,var(--y));animation:hbVoo var(--d) linear infinite;animation-delay:var(--a)}
.hb-c .hb-v{animation-name:hbVooC}
.hb-asa{transform-box:fill-box;transform-origin:50% 50%;animation:hbAsa .22s ease-in-out infinite alternate}
.hb-f{animation:hbFlutua var(--d) ease-in-out infinite alternate;animation-delay:var(--a)}
.hb-n{opacity:.09;animation:hbNevoa var(--d) ease-in-out infinite alternate;animation-delay:var(--a)}
.hb-btn{transform-box:fill-box;transform-origin:50% 50%;animation:hbPulso 2.2s ease-in-out infinite}
@keyframes hbBrilha{from{opacity:.2}to{opacity:1}}
@keyframes hbHalo{from{opacity:.45}to{opacity:1}}
@keyframes hbChama{0%,100%{opacity:1}12%{opacity:.78}26%{opacity:.96}41%{opacity:.7}58%{opacity:1}73%{opacity:.85}}
@keyframes hbVoo{from{transform:translate(-160px,var(--y))}50%{transform:translate(860px,calc(var(--y) + 26px))}to{transform:translate(1760px,var(--y))}}
@keyframes hbVooC{from{transform:translate(-120px,var(--y))}50%{transform:translate(430px,calc(var(--y) + 20px))}to{transform:translate(920px,var(--y))}}
@keyframes hbAsa{from{transform:scaleY(1)}to{transform:scaleY(.4)}}
@keyframes hbFlutua{from{transform:translate(0,0) rotate(-3deg)}to{transform:translate(0,-14px) rotate(3deg)}}
@keyframes hbNevoa{from{transform:translateX(-70px)}to{transform:translateX(70px)}}
@keyframes hbPulso{from{transform:scale(1)}to{transform:scale(1.05)}}
@media (prefers-reduced-motion:reduce){
  .hb *{animation:none!important}
  .hb-v{display:none}
  .hb-e{opacity:.8}
  .hb-brilho{opacity:.3}
}
@media print{body.tema-halloween .hw-banner{display:none!important}}
/* ---------- FIM BANNER ANIMADO ---------- */
