/* ============================================================================
 * [SPX_TOOL_BADGES TB-1] Coluna de badges flutuantes do canto inferior direito.
 *
 * Réplica do mockup aprovado (docs/tool_badges_mockup/mockup.html), com prefixo
 * `spx-tb-` em TUDO e variáveis PRÓPRIAS (`--spxtb-*`).
 *
 * ⚠️ POR QUE VARIÁVEIS PRÓPRIAS E NÃO AS DO TEMA: o storm.css define
 *    `--accent-glow: rgba(98,0,234,.3)` (roxo TRANSLÚCIDO), enquanto o mockup usa
 *    `--accent-glow: #9b4dff` (violeta SÓLIDO). Herdar a do tema apagaria metade
 *    dos brilhos aprovados. Só `--accent-primary` (#6200ea) coincide nos dois — e
 *    mesmo esse fica com fallback local.
 *
 * ⚠️ CACHE-BUST MANUAL: este arquivo entra no footer.twig com `?v=N` FIXO
 *    (patcher `_p2_footer_twig.php`). MEXEU AQUI → BUMPE o `?v=` no footer.twig
 *    (nos 2 lugares: CSS e JS) senão o browser segura o antigo. Regra da casa.
 *
 * Camadas (deliberadamente ACIMA do esquema 1099/1100 do tema — este componente
 * não é Bootstrap, tem backdrop próprio e precisa cobrir o offcanvas do menu):
 *    coluna 9999 (mesmo nível do orb) · overlay 15000 · modal 15001 · trilha 15002
 * ==========================================================================*/

:root {
  --spxtb-primary:   #6200ea;
  --spxtb-glow:      #9b4dff;
  --spxtb-wa:        #25d366;
  --spxtb-deep:      #10102a;
  --spxtb-panel:     #0e0e26;
  --spxtb-grad-a:    #1a0a2e;
  --spxtb-grad-b:    #2d1052;
  --spxtb-ink-hi:    #efe9ff;
  --spxtb-ink-mid:   #b9aee0;
  --spxtb-ink-low:   #7d74a8;
  --spxtb-tech:      'Rajdhani', system-ui, sans-serif;
  --spxtb-sans:      'Inter', system-ui, sans-serif;
}

/* ============================ COLUNA ==================================== */
/* O orb do tema é fixed em bottom:30px/right:30px, 50x100px (storm.css §CYBER
   SCROLL ORB). A coluna senta LOGO ACIMA dele: 30+100+12 = 142px; e right:26px
   centraliza os badges de 58px no eixo do orb (30+25-29). */
.spx-tb-col {
  position: fixed;
  right: 26px;
  bottom: 142px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

/* ======================= SHELL COMUM DOS BADGES ========================= */
.spx-tb-badge {
  width: 58px; height: 58px;
  border-radius: 50%;
  cursor: pointer;
  position: relative;
  padding: 0;
  border: 2px solid var(--spxtb-primary);
  background: linear-gradient(150deg, var(--spxtb-grad-a), var(--spxtb-grad-b));
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 5px 20px rgba(98,0,234,.35), inset 0 0 14px rgba(98,0,234,.18);
  transition: transform .25s cubic-bezier(.175,.885,.32,1.275), box-shadow .25s;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.spx-tb-badge:hover { transform: scale(1.08); }
.spx-tb-badge:focus-visible {
  outline: 3px solid var(--spxtb-glow);
  outline-offset: 3px;
}

/* --------------------------- Carrinho ---------------------------------- */
/* Sempre no DOM (markup byte-estável p/ o Full Page Cache), visível só quando
   o carrinho tem item — o JS liga a classe de ESTADO `spx-tb-on-cart` no <body>
   a partir do `data-cart` que o servidor escreveu.
   ⚠️ O PREFIXO `spx-tb-on-` DAS CLASSES DE ESTADO NÃO É ENFEITE: elas moram no
      <body>, e se uma delas repetisse o nome de uma classe de ELEMENTO
      (`.spx-tb-modal`, `.spx-tb-trail`) o próprio <body> herdaria as regras do
      elemento — o body vira a caixa do modal e a tela inteira fica navy. Foi
      exatamente o que aconteceu na 1ª versão, pego no render local. */
.spx-tb-badge--cart { display: none; }
body.spx-tb-on-cart .spx-tb-badge--cart { display: flex; }
body.spx-tb-on-cart .spx-tb-badge--cart.spx-tb-pop { animation: spxtbCartPop .5s cubic-bezier(.34,1.56,.64,1); }
@keyframes spxtbCartPop { 0% { transform: scale(.25); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
.spx-tb-badge--cart svg { width: 26px; height: 26px; fill: #d9c8ff; filter: drop-shadow(0 0 6px rgba(155,77,255,.45)); }
.spx-tb-badge--cart:hover { border-color: var(--spxtb-glow); }
.spx-tb-badge--cart:hover svg { fill: #fff; }
.spx-tb-qty {
  position: absolute; top: -5px; right: -5px;
  min-width: 22px; height: 22px; border-radius: 11px;
  background: linear-gradient(135deg, var(--spxtb-primary), var(--spxtb-glow));
  color: #fff;
  font-family: var(--spxtb-tech); font-weight: 700; font-size: 12px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 5px;
  border: 2px solid var(--spxtb-deep);
  box-shadow: 0 2px 8px rgba(98,0,234,.6);
}
/* anel do pulso — só existe enquanto o JS marca `spx-tb-pop` */
.spx-tb-badge--cart.spx-tb-pop::after {
  content: ''; position: absolute; inset: -3px; border-radius: 50%;
  border: 2px solid rgba(155,77,255,0);
  animation: spxtbCartRing 1s ease-out .15s 1;
  pointer-events: none;
}
@keyframes spxtbCartRing {
  0%   { border-color: rgba(155,77,255,.7); transform: scale(.8); }
  100% { border-color: rgba(155,77,255,0);  transform: scale(1.6); }
}

/* --------------------------- WhatsApp ---------------------------------- */
.spx-tb-badge--wa svg { width: 30px; height: 30px; fill: var(--spxtb-wa); filter: drop-shadow(0 0 6px rgba(37,211,102,.45)); }
.spx-tb-badge--wa:hover {
  border-color: var(--spxtb-wa);
  box-shadow: 0 5px 22px rgba(37,211,102,.4), inset 0 0 14px rgba(37,211,102,.14);
}
.spx-tb-badge--wa::after {
  content: ''; position: absolute; inset: -2px; border-radius: 50%;
  border: 2px solid rgba(37,211,102,0);
  animation: spxtbWaPing 3.2s ease-out infinite;
  pointer-events: none;
}
@keyframes spxtbWaPing {
  0%, 64% { border-color: rgba(37,211,102,0); transform: scale(1); }
  70%     { border-color: rgba(37,211,102,.55); }
  100%    { border-color: rgba(37,211,102,0); transform: scale(1.45); }
}

/* ---------------------- Baú Spellbox (leque) --------------------------- */
/* O invólucro existe por uma razão de HTML, não de estilo: <a> DENTRO de <button>
   é markup inválido — o parser hoistaria as ferramentas para fora do botão e o
   leque desmontaria. Então o baú é um <button> de verdade e as ferramentas são
   IRMÃS dele, posicionadas contra este wrapper (que tem exatamente o tamanho do
   baú). Bônus: `:hover` do wrapper vale enquanto o ponteiro estiver sobre
   qualquer descendente — inclusive os itens em órbita, que ficam fora da caixa. */
.spx-tb-chest-wrap { position: relative; display: flex; }
.spx-tb-badge--chest { overflow: visible; animation: spxtbBreath 4s ease-in-out infinite; background: #fff; }
.spx-tb-badge--chest img {
  width: 64%; height: 64%; border-radius: 0;
  object-fit: contain; background: transparent;
  position: relative; z-index: 1;
  transition: transform .3s cubic-bezier(.175,.885,.32,1.275);
}
@keyframes spxtbBreath {
  0%, 100% { box-shadow: 0 4px 14px rgba(98,0,234,.26), inset 0 0 10px rgba(98,0,234,.12); }
  50%      { box-shadow: 0 4px 18px rgba(155,77,255,.38), inset 0 0 14px rgba(155,77,255,.2); }
}
/* vazamento de luz quando aberto — halo POR TRÁS do disco */
.spx-tb-badge--chest::before {
  content: ''; position: absolute; inset: -20px; border-radius: 50%;
  pointer-events: none; z-index: 0;
  background: radial-gradient(circle, rgba(190,120,255,.9) 0%, rgba(122,40,255,.45) 40%, transparent 68%);
  opacity: 0; transform: scale(.35);
  transition: opacity .3s, transform .45s cubic-bezier(.175,.885,.32,1.275);
}
body.spx-tb-on-fan .spx-tb-badge--chest::before { opacity: 1; transform: scale(1.15); }
body.spx-tb-on-fan .spx-tb-badge--chest img { transform: rotate(-9deg) scale(1.05); }
body.spx-tb-on-fan .spx-tb-badge--chest { border-color: var(--spxtb-glow); }

/* ------------------ Ferramentas em órbita (o leque) -------------------- */
/* Os slots vêm do registry (setting `module_spx_tool_badges_fan`): ferramenta
   nova plugga sem CSS novo enquanto couber em 5 posições. */
.spx-tb-fan-item {
  position: absolute; right: 6px; bottom: 6px;
  width: 46px; height: 46px; border-radius: 50%;
  cursor: pointer; padding: 0;
  border: 2px solid var(--spxtb-primary);
  background: linear-gradient(150deg, #221040, #341a5e);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(98,0,234,.45);
  opacity: 0; transform: translate(0,0) scale(.25);
  pointer-events: none;
  transition: transform .38s cubic-bezier(.34,1.56,.64,1), opacity .22s;
  text-decoration: none;
}
.spx-tb-fan-item svg { width: 21px; height: 21px; fill: #d9c8ff; }
.spx-tb-fan-item:hover { border-color: var(--spxtb-glow); background: linear-gradient(150deg, #2c1552, #42227a); }
.spx-tb-fan-item:hover svg { fill: #fff; }
.spx-tb-fan-item:focus-visible { outline: 3px solid var(--spxtb-glow); outline-offset: 2px; }
body.spx-tb-on-fan .spx-tb-fan-item { opacity: 1; pointer-events: auto; }
body.spx-tb-on-fan .spx-tb-fan-item[data-slot="1"] { transform: translate(-74px, -14px) scale(1); }
body.spx-tb-on-fan .spx-tb-fan-item[data-slot="2"] { transform: translate(-46px, -70px) scale(1); }
body.spx-tb-on-fan .spx-tb-fan-item[data-slot="3"] { transform: translate(  6px, -92px) scale(1); }
body.spx-tb-on-fan .spx-tb-fan-item[data-slot="4"] { transform: translate(-92px, -78px) scale(1); }
body.spx-tb-on-fan .spx-tb-fan-item[data-slot="5"] { transform: translate(-14px,-150px) scale(1); }

.spx-tb-tip {
  position: absolute; right: calc(100% + 10px); top: 50%;
  transform: translateY(-50%); white-space: nowrap;
  background: linear-gradient(135deg, #1a0a2e 0%, #2d1052 100%);
  color: #e0d0ff;
  font-family: var(--spxtb-tech); font-weight: 600; font-size: 12px;
  letter-spacing: 1px; text-transform: uppercase;
  padding: 6px 14px; border-radius: 4px 10px 10px 4px;
  border: 1px solid rgba(170,0,255,.35);
  opacity: 0; transition: opacity .2s .12s; pointer-events: none;
}
body.spx-tb-on-fan .spx-tb-fan-item .spx-tb-tip { opacity: .97; }

/* dica de primeira visita da SESSÃO (injetada pelo JS, some sozinha) */
.spx-tb-hint {
  position: absolute; right: calc(100% + 12px); top: 50%;
  transform: translateY(-50%); white-space: nowrap;
  font-family: var(--spxtb-tech); font-weight: 600; font-size: 12px;
  letter-spacing: 1.2px; color: #cbb8ff; text-transform: uppercase;
  background: rgba(26,10,46,.92);
  padding: 6px 13px; border-radius: 4px 10px 10px 4px;
  border: 1px solid rgba(170,0,255,.35);
  animation: spxtbHintFade 6s ease forwards;
  pointer-events: none;
}
@keyframes spxtbHintFade { 0%, 70% { opacity: .95; } 100% { opacity: 0; visibility: hidden; } }
body.spx-tb-on-fan .spx-tb-hint { display: none; }
/* [SPX QA16-L2 A1-07/A2-17/A7-17] No celular e no tablet a dica nasce A ESQUERDA
   do bau, POR CIMA do conteudo, e fica ~6s: mediu 3.547px2 sobre o CTA do hero
   das sub-homes, 18% do <h1> da PDP do vale e ~35% da largura da tela sobre a
   grade de qualquer listagem. Nao ha faixa livre a esquerda da coluna abaixo de
   1024px - a goteira do Lote 1 reserva espaco para os BADGES, nao para um balao
   de 137px. No desktop ela continua (ha margem de sobra e o bau e menos obvio). */
@media (max-width: 1023.98px) { .spx-tb-hint { display: none !important; } }

/* ======================= OVERLAY (backdrop próprio) ===================== */
.spx-tb-overlay {
  position: fixed; inset: 0;
  background: rgba(5,5,18,.72);
  -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px);
  z-index: 15000; opacity: 0; pointer-events: none;
  transition: opacity .25s;
}
body.spx-tb-on-modal .spx-tb-overlay--modal { opacity: 1; pointer-events: auto; }
body.spx-tb-on-trail .spx-tb-overlay--trail { opacity: 1; pointer-events: auto; }

/* ========================== MODAL DE FEEDBACK ========================== */
.spx-tb-modal {
  position: fixed; z-index: 15001;
  top: 50%; left: 50%;
  transform: translate(-50%,-46%) scale(.96);
  opacity: 0; pointer-events: none; visibility: hidden;
  width: min(740px, 94vw);
  max-height: 94vh; overflow: auto;
  border-radius: 18px;
  display: flex;
  background: #141433;
  border: 1px solid rgba(155,77,255,.35);
  box-shadow: 0 30px 80px rgba(0,0,0,.6), 0 0 40px rgba(98,0,234,.25);
  transition: transform .3s cubic-bezier(.175,.885,.32,1.275), opacity .25s;
}
body.spx-tb-on-modal .spx-tb-modal { transform: translate(-50%,-50%) scale(1); opacity: 1; pointer-events: auto; visibility: visible; }

.spx-tb-modal-left {
  width: 265px; flex: 0 0 265px;
  background: linear-gradient(160deg, var(--spxtb-grad-a) 0%, var(--spxtb-grad-b) 78%);
  padding: 34px 26px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 18px; position: relative; overflow: hidden;
}
.spx-tb-modal-left::before {
  content: ''; position: absolute; width: 230px; height: 230px; border-radius: 50%;
  border: 1px dashed rgba(190,120,255,.28); top: -60px; left: -70px;
  animation: spxtbSpin 26s linear infinite;
}
.spx-tb-modal-left::after {
  content: ''; position: absolute; width: 160px; height: 160px; border-radius: 50%;
  border: 1px dashed rgba(190,120,255,.2); bottom: -40px; right: -50px;
  animation: spxtbSpin 34s linear infinite reverse;
}
@keyframes spxtbSpin { to { transform: rotate(360deg); } }
.spx-tb-modal-left img {
  width: 78px; height: 78px; object-fit: cover; border-radius: 18px; background: #fff;
  box-shadow: 0 0 26px rgba(155,77,255,.65), 0 4px 14px rgba(0,0,0,.4);
  position: relative; z-index: 1;
}
.spx-tb-modal-left h3 {
  font-family: var(--spxtb-tech); font-weight: 700; font-size: 19px;
  letter-spacing: 2px; text-transform: uppercase; text-align: center;
  color: #f1e8ff; margin: 0; position: relative; z-index: 1;
}
.spx-tb-modal-left p {
  font-size: 12.5px; line-height: 1.55; color: #c4b4e8; text-align: center;
  margin: 0; position: relative; z-index: 1;
}

.spx-tb-modal-right { flex: 1; padding: 30px 32px 26px; min-width: 0; }
.spx-tb-modal-right h4 {
  font-family: var(--spxtb-tech); font-weight: 700; font-size: 17px;
  letter-spacing: 2.5px; text-transform: uppercase; color: var(--spxtb-ink-hi);
  text-align: center; margin: 0;
}
.spx-tb-modal-sub { font-size: 12px; color: var(--spxtb-ink-mid); text-align: center; margin-top: 5px; }

.spx-tb-field { margin-top: 14px; }
.spx-tb-field input,
.spx-tb-field textarea {
  width: 100%;
  background: var(--spxtb-deep);
  border: 1px solid #353560; border-radius: 10px;
  color: var(--spxtb-ink-hi);
  font-family: var(--spxtb-sans); font-size: 13.5px;
  padding: 12px 14px; outline: none;
  transition: border .2s, box-shadow .2s;
}
.spx-tb-field input:focus,
.spx-tb-field textarea:focus { border-color: var(--spxtb-glow); box-shadow: 0 0 0 3px rgba(155,77,255,.18); }
.spx-tb-field textarea { height: 96px; resize: none; display: block; }
.spx-tb-field ::placeholder { color: #6e659a; }

/* honeypot — fora da tela, jamais display:none (bot bom detecta display:none) */
.spx-tb-hp {
  position: absolute !important;
  left: -9999px !important; top: auto !important;
  width: 1px !important; height: 1px !important;
  opacity: 0 !important; overflow: hidden;
}

/* caixa do Turnstile — o widget da CF é carregado SÓ ao abrir o modal */
.spx-tb-turnstile {
  margin-top: 14px; min-height: 66px;
  display: flex; align-items: center; gap: 12px;
  background: #0d0d22; border: 1px solid #2f2f55; border-radius: 10px;
  padding: 12px 16px;
}
.spx-tb-turnstile-note { font-size: 11.5px; color: #8d83b8; line-height: 1.4; }

.spx-tb-send {
  margin-top: 16px; width: 100%;
  border: none; cursor: pointer; border-radius: 10px; padding: 13px;
  font-family: var(--spxtb-tech); font-weight: 700; font-size: 14px;
  letter-spacing: 2.5px; text-transform: uppercase; color: #fff;
  background: linear-gradient(90deg, var(--spxtb-primary), var(--spxtb-glow));
  box-shadow: 0 6px 22px rgba(98,0,234,.5);
  transition: filter .2s, transform .15s;
}
.spx-tb-send:hover { filter: brightness(1.12); }
.spx-tb-send[disabled] { filter: grayscale(.5) brightness(.8); cursor: progress; }

.spx-tb-msg { margin-top: 12px; font-size: 12px; line-height: 1.5; text-align: center; border-radius: 8px; padding: 9px 12px; }
.spx-tb-msg--err { color: #ffc7c7; background: rgba(190,60,60,.16); border: 1px solid rgba(220,90,90,.4); }
.spx-tb-msg--ok  { color: #b8f5d1; background: rgba(45,170,105,.16); border: 1px solid rgba(60,200,130,.4); }

.spx-tb-ctx { margin-top: 12px; font-size: 11px; color: var(--spxtb-ink-low); text-align: center; line-height: 1.5; }
.spx-tb-ctx code { color: #ae97e8; font-size: 11px; word-break: break-all; }

.spx-tb-close {
  position: absolute; top: 12px; right: 16px;
  color: #8d83b8; font-size: 22px; line-height: 1;
  cursor: pointer; background: none; border: none; padding: 4px 8px;
  transition: color .2s; z-index: 2;
}
.spx-tb-close:hover { color: #fff; }

/* ==================== TRILHA (offcanvas da direita) ==================== */
.spx-tb-trail {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: min(400px, 92vw); z-index: 15002;
  background: var(--spxtb-panel);
  border-left: 1px solid rgba(155,77,255,.4);
  box-shadow: -24px 0 60px rgba(0,0,0,.55);
  transform: translateX(105%);
  transition: transform .34s cubic-bezier(.22,.9,.36,1);
  display: flex; flex-direction: column;
  visibility: hidden;
}
body.spx-tb-on-trail .spx-tb-trail { transform: translateX(0); visibility: visible; }

.spx-tb-trail-head {
  padding: 22px 24px 16px; border-bottom: 1px solid #232345;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 10px;
}
.spx-tb-trail-head h3 {
  font-family: var(--spxtb-tech); font-weight: 700; font-size: 19px;
  letter-spacing: 2.5px; text-transform: uppercase; margin: 0;
  background: linear-gradient(90deg, #efe9ff, #b78aff);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.spx-tb-trail-sub { font-size: 11.5px; color: var(--spxtb-ink-low); margin-top: 3px; }
.spx-tb-trail-clear {
  font-family: var(--spxtb-tech); font-weight: 600; font-size: 11px;
  letter-spacing: 1.5px; text-transform: uppercase;
  color: #9d8fd0; background: none; border: 1px solid #3a3a63;
  border-radius: 8px; padding: 6px 11px; cursor: pointer; transition: all .2s;
}
.spx-tb-trail-clear:hover { color: #ff9d9d; border-color: #a05656; }
.spx-tb-trail-x {
  color: #8d83b8; font-size: 20px; line-height: 1; cursor: pointer;
  background: none; border: none; padding: 2px 6px; margin-left: 2px;
}
.spx-tb-trail-x:hover { color: #fff; }

.spx-tb-trail-body { flex: 1; overflow-y: auto; padding: 20px 22px 20px 26px; position: relative; }
.spx-tb-trail-body::-webkit-scrollbar { width: 6px; }
.spx-tb-trail-body::-webkit-scrollbar-thumb { background: #2e2e55; border-radius: 3px; }
/* o fio */
.spx-tb-trail-body::before {
  content: ''; position: absolute; top: 0; bottom: 0; left: 37px; width: 2px;
  background: linear-gradient(180deg, transparent, var(--spxtb-primary) 12%, var(--spxtb-glow) 55%, var(--spxtb-primary) 88%, transparent);
  box-shadow: 0 0 10px rgba(155,77,255,.5);
}
.spx-tb-trail-body.spx-tb-empty::before { display: none; }

.spx-tb-item { position: relative; padding-left: 36px; margin-bottom: 16px; }
.spx-tb-item::before {
  content: ''; position: absolute; left: 7px; top: 20px;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--spxtb-panel); border: 2px solid var(--spxtb-glow);
  box-shadow: 0 0 9px rgba(155,77,255,.8);
}
.spx-tb-tcard {
  display: flex; gap: 12px; background: #151534;
  border: 1px solid #2b2b52; border-radius: 12px; padding: 10px;
  cursor: pointer; text-decoration: none;
  transition: border .2s, transform .2s, box-shadow .2s;
}
.spx-tb-tcard:hover { border-color: var(--spxtb-glow); transform: translateX(-3px); box-shadow: 0 6px 18px rgba(98,0,234,.3); }
.spx-tb-thumb {
  width: 52px; height: 70px; border-radius: 7px; flex: 0 0 52px;
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, #241a4f, #6a48c9);
  font-family: var(--spxtb-tech); font-weight: 700; font-size: 15px;
  color: rgba(255,255,255,.85); text-shadow: 0 1px 4px rgba(0,0,0,.6);
}
.spx-tb-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.spx-tb-thumb::after { content: ''; position: absolute; inset: 3px; border: 1px solid rgba(255,255,255,.28); border-radius: 5px; }
.spx-tb-info { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 3px; }
.spx-tb-name { font-size: 13px; font-weight: 600; color: #e9e2ff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.spx-tb-meta { font-size: 11px; color: var(--spxtb-ink-low); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.spx-tb-price { font-family: var(--spxtb-tech); font-weight: 700; font-size: 14px; letter-spacing: .5px; color: #8ef0b2; }
.spx-tb-price.spx-tb-out { color: #8d83b8; font-size: 11.5px; letter-spacing: 1.5px; text-transform: uppercase; }
.spx-tb-when { font-size: 10px; color: #5f578a; align-self: flex-start; margin-top: 5px; white-space: nowrap; }

/* chips (busca / categoria) presos ao fio */
.spx-tb-chip { position: relative; padding-left: 36px; margin-bottom: 14px; }
.spx-tb-chip::before {
  content: ''; position: absolute; left: 9px; top: 9px;
  width: 6px; height: 6px; border-radius: 50%;
  background: #4a4a80; box-shadow: 0 0 6px rgba(122,110,190,.6);
}
.spx-tb-chip a {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 11.5px; color: #bdb3dd; background: #171736;
  border: 1px solid #2c2c52; border-radius: 20px; padding: 5px 13px;
  cursor: pointer; transition: border .2s; text-decoration: none;
  max-width: 100%; overflow: hidden;
}
.spx-tb-chip a:hover { border-color: var(--spxtb-glow); }
.spx-tb-chip svg { width: 12px; height: 12px; fill: #8d83b8; flex: 0 0 12px; }
.spx-tb-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.spx-tb-trail-none { color: var(--spxtb-ink-low); font-size: 12.5px; line-height: 1.6; text-align: center; padding: 40px 10px; }
.spx-tb-trail-foot {
  padding: 14px 22px; border-top: 1px solid #232345;
  font-size: 13px; color: #b9aee0; text-align: center; line-height: 1.6;
}

/* ============================== MOBILE ================================= */
/* [SPX 2026-09-16] A .mobile-bottom-nav do tema saiu. Carrinho e WhatsApp, que
   moravam NELA, voltam para a coluna: no celular ela carrega a pilha inteira
   (carrinho condicional · lista de venda · baú · WhatsApp) em badges de 48px.
   A coluna senta acima do orb do tema — 46px do orb + 14 do chão + 10 de folga —
   e sobe junto com a barra fixa da tela pelo piso `--spx-piso`, que cada tela
   declara no <body> (conta/wizard/venda = 72px; 0 quando não há barra). */
@media (max-width: 767px) {
  .spx-tb-col { right: 14px; bottom: calc(var(--spx-piso, 0px) + env(safe-area-inset-bottom, 0px) + 70px); gap: 10px; }
  .spx-tb-badge { width: 48px; height: 48px; }
  .spx-tb-badge--cart svg { width: 22px; height: 22px; }
  .spx-tb-badge--wa svg { width: 25px; height: 25px; }
  .spx-tb-badge--sell i { font-size: 22px; }
  .spx-tb-badge--chest { width: 48px; height: 48px; }
  .spx-tb-hint { font-size: 10.5px; letter-spacing: .8px; padding: 5px 10px; }
  .spx-tb-modal { flex-direction: column; width: 94vw; }
  .spx-tb-modal-left { width: 100%; flex: 0 0 auto; padding: 20px 22px; flex-direction: row; gap: 14px; text-align: left; }
  .spx-tb-modal-left img { width: 54px; height: 54px; flex: 0 0 54px; }
  .spx-tb-modal-left h3 { font-size: 16px; text-align: left; }
  .spx-tb-modal-left p { display: none; }
  .spx-tb-modal-right { padding: 22px 20px 20px; }
}

/* [SPX 2026-09-16] o 4º slot (Zap) da barra mobile foi embora com a própria barra:
   quem atende o WhatsApp no celular agora é o badge .spx-tb-badge--wa da coluna. */

/* ==================== MOVIMENTO REDUZIDO (a11y) ======================== */
@media (prefers-reduced-motion: reduce) {
  .spx-tb-badge,
  .spx-tb-badge--chest,
  .spx-tb-badge--chest img,
  .spx-tb-badge--chest::before,
  .spx-tb-badge--wa::after,
  .spx-tb-badge--cart.spx-tb-pop,
  .spx-tb-badge--cart.spx-tb-pop::after,
  .spx-tb-fan-item,
  .spx-tb-tip,
  .spx-tb-hint,
  .spx-tb-overlay,
  .spx-tb-modal,
  .spx-tb-modal-left::before,
  .spx-tb-modal-left::after,
  .spx-tb-trail,
  .spx-tb-tcard {
    animation: none !important;
    transition: none !important;
  }
  .spx-tb-badge:hover { transform: none; }
  .spx-tb-hint { opacity: .95; }
}

/* [TB v3] links do rodapé da trilha (contato) */
.spx-tb-trail-foot a { color: #d3c3ff; text-decoration: underline; font-weight: 600; }
.spx-tb-trail-foot a:hover { color: #ffffff; }

/* ------------------------ Lista de Venda (SL-1) ------------------------- */
/* Irmão do carrinho, logo ABAIXO dele: mesma mecânica de classe de ESTADO no
   <body> (`spx-tb-on-selllist`), ligada pelo `spx_sell_list_badge.js` a partir
   do número que o servidor escreveu. Ícone Bootstrap Icons (o catálogo carrega
   a fonte no header; `fa` renderiza em branco aqui). */
:root { --spxtb-sell: #00e676; }
.spx-tb-badge--sell { display: none; border-color: var(--spxtb-sell); box-shadow: 0 5px 20px rgba(0,230,118,.3), inset 0 0 14px rgba(0,230,118,.14); }
body.spx-tb-on-selllist .spx-tb-badge--sell { display: flex; }
.spx-tb-badge--sell i { font-size: 26px; line-height: 1; color: #9dffc9; filter: drop-shadow(0 0 6px rgba(0,230,118,.45)); }
.spx-tb-badge--sell:hover { border-color: #6dffb0; }
.spx-tb-badge--sell:hover i { color: #fff; }
.spx-tb-badge--sell .spx-tb-qty { background: linear-gradient(135deg, #00b355, var(--spxtb-sell)); color: #06210f; }
/* <768px a coluna vira só o baú (carrinho e WhatsApp já vivem na barra de baixo);
   a Lista de Venda segue a MESMA regra — no celular ela está no header e no menu. */
/* [SPX 2026-09-16] a lista de venda TAMBEM aparece no celular: sem a barra
   inferior, a coluna e a unica porta flutuante que sobrou. */

/* ═══════════════ [SPX QA16-L7 18/09] O FAB DO CELULAR ═══════════════
 * Decisão do dono: abaixo de 1024px a coluna deixa de ser uma PILHA sempre acesa
 * com calha reservada e vira UM botão (o baú) no canto inferior direito, POR CIMA
 * do conteúdo. Ao toque ele abre a pilha inteira — carrinho, lista de venda,
 * WhatsApp, as ferramentas do leque e o "subir" — e toque fora, rolagem ou 4s
 * parado recolhem.
 *
 * Três decisões de desenho que as regras abaixo materializam:
 *  1. o FAB é o ÚLTIMO item do flex (`order: 9`) e a coluna está ancorada pelo
 *     `bottom`: a pilha cresce para CIMA e o botão NUNCA se move ao abrir;
 *  2. o orb "subir" do tema entra DENTRO da coluna no celular (o JS reparenta) —
 *     assim é o flex que resolve a geometria e ele some junto com o FAB;
 *  3. tudo vive dentro de `@media (max-width: 1023.98px)`. Regra de celular solta
 *     já escondeu a coluna no desktop uma vez (lição 3 do Lote 1).
 * ======================================================================== */

/* o contador do FAB é criado pelo JS e só no celular: no desktop nem existe */
.spx-tb-fab-qty { display: none; }

@media (max-width: 1023.98px) {
  /* ── a coluna volta para o canto ─────────────────────────────── */
  .spx-tb-col {
    right: 14px;
    bottom: calc(var(--spx-piso, 0px) + env(safe-area-inset-bottom, 0px) + 14px);
    gap: 10px;
    transition: opacity .18s ease, transform .18s ease;
  }
  .spx-tb-badge { width: 48px; height: 48px; }
  .spx-tb-badge--chest { width: 56px; height: 56px; }
  .spx-tb-badge--cart svg { width: 22px; height: 22px; }
  .spx-tb-badge--wa svg { width: 25px; height: 25px; }
  .spx-tb-badge--sell i { font-size: 22px; }
  .spx-tb-fan-item svg { width: 20px; height: 20px; }

  /* ordem visual de cima para baixo: carrinho, lista de venda, WhatsApp,
     subir, [Trilha, Feedback], FAB */
  .spx-tb-badge--cart { order: 1; }
  .spx-tb-badge--sell { order: 2; }
  .spx-tb-badge--wa   { order: 3; }
  .spx-tb-col > .cyber-scroll-orb { order: 4; }
  .spx-tb-chest-wrap { order: 9; flex-direction: column-reverse; align-items: center; gap: 10px; }

  /* ── fechado: só o FAB ──────────────────────────────────── */
  .spx-tb-col > *:not(.spx-tb-chest-wrap) { display: none !important; }
  .spx-tb-chest-wrap .spx-tb-fan-item { display: none; }
  .spx-tb-badge--chest > .spx-tb-fab-qty { top: -4px; right: -4px; }

  /* o orb do tema veste a mesma roupa dos badges enquanto mora na coluna */
  .spx-tb-col > .cyber-scroll-orb {
    position: static; width: 48px; height: 48px; border-radius: 50%;
    background: linear-gradient(150deg, var(--spxtb-grad-a), var(--spxtb-grad-b));
    border: 2px solid var(--spxtb-primary);
    -webkit-backdrop-filter: none; backdrop-filter: none;
    box-shadow: 0 5px 20px rgba(98,0,234,.35), inset 0 0 14px rgba(98,0,234,.18);
  }
  .spx-tb-col > .cyber-scroll-orb::after { display: none; }
  .spx-tb-col > .cyber-scroll-orb .orb-btn { color: #e6dbff; font-size: 20px; }
  .spx-tb-col > .cyber-scroll-orb .orb-btn-down { display: none; }

  /* ── aberto ────────────────────────────────────────── */
  /* cada um com a SUA condição: um `> *` genérico acenderia o carrinho vazio */
  body.spx-tb-on-fan .spx-tb-col > .spx-tb-badge--wa { display: flex !important; }
  body.spx-tb-on-fan .spx-tb-col > .cyber-scroll-orb { display: flex !important; }
  body.spx-tb-on-fan.spx-tb-on-cart .spx-tb-col > .spx-tb-badge--cart { display: flex !important; }
  body.spx-tb-on-fan.spx-tb-on-selllist .spx-tb-col > .spx-tb-badge--sell { display: flex !important; }
  body.spx-tb-on-fan .spx-tb-chest-wrap .spx-tb-fan-item[data-slot] {
    display: flex; position: relative; transform: none;
    opacity: 1; pointer-events: auto; width: 48px; height: 48px;
  }
  body.spx-tb-on-fan .spx-tb-badge--chest { border-color: var(--spxtb-glow); }

  /* animação curta e FINITA (nada de loop) */
  body.spx-tb-on-fan .spx-tb-col > .spx-tb-badge--cart,
  body.spx-tb-on-fan .spx-tb-col > .spx-tb-badge--sell,
  body.spx-tb-on-fan .spx-tb-col > .spx-tb-badge--wa,
  body.spx-tb-on-fan .spx-tb-col > .cyber-scroll-orb,
  body.spx-tb-on-fan .spx-tb-chest-wrap .spx-tb-fan-item[data-slot] {
    animation: spxtbFabIn .18s cubic-bezier(.22,.9,.36,1) both;
  }

  /* ── contador no botão fechado ───────────────────────────── */
  body.spx-tb-fab-count:not(.spx-tb-on-fan) .spx-tb-badge--chest > .spx-tb-fab-qty { display: flex; }

  /* ── sumir enquanto a página rola ────────────────────────── */
  body.spx-tb-fab-away .spx-tb-col { opacity: 0; transform: translateY(14px); }
  body.spx-tb-fab-away .spx-tb-col > * { pointer-events: none; }
}

/* O orb só aparece DENTRO da pilha aberta. `:has()` em regra SEPARADA (lição 3 do
   Lote 1) e com argumento de CLASSE de propósito: `:has(#id)` daria peso de id e
   venceria até a regra que o traz de volta quando a pilha abre. */
@media (max-width: 1023.98px) {
  body:has(.spx-tb-col) .cyber-scroll-orb { display: none !important; }
}

@keyframes spxtbFabIn {
  from { opacity: 0; transform: translateY(10px) scale(.86); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .spx-tb-col { transition: none !important; }
  body.spx-tb-on-fan .spx-tb-col > *,
  body.spx-tb-on-fan .spx-tb-chest-wrap .spx-tb-fan-item[data-slot] { animation: none !important; }
}

/* ── [SPX QA16-L7c] efeito colateral MEDIDO de devolver a largura ───────────
 * Alargar o conteúdo DESEMBRULHA rótulo: o CTA "Ver todos os decks Pokémon"
 * media 52px só porque quebrava em duas linhas num container de 302px; com 362px
 * ele cabe numa linha e cai para 31px. O irmão dele ("Ver todos os decks", rótulo
 * mais curto) JÁ estava em 31px ANTES do lote — o piso de alvo do Lote 3 nunca
 * cobriu esses dois botões. Cobre aqui, e os dois sobem para 44px.
 * É tratamento LOCAL, na superfície onde a medição apontou — não um piso novo
 * para todo `.btn` do catálogo, que seria mudança de layout sem medida.
 * ─────────────────────────────────────────────────────────── */
@media (max-width: 1023.98px) {
  .deck-carousel-section .btn {
    min-height: var(--spx-toque, 44px);
    display: inline-flex; align-items: center; justify-content: center;
  }
}

/* ── [SPX QA16-L7d] o mesmo efeito, no rodapé ─────────────────────────
 * Os dois chips de confiança ("Site limpo", "Loja verificada") são links, e no
 * tablet mediam 57,7px porque o rótulo quebrava numa faixa de 90px reservada. Com
 * o rodapé de volta à largura inteira cabem numa linha e caem para 43,9px — 0,1px
 * abaixo do piso do Lote 3. A 390 eles JÁ estavam abaixo de 44 antes do lote
 * (8 de 8, medido): o piso aqui conserta os dois casos de uma vez.
 * ─────────────────────────────────────────────────────────── */
@media (max-width: 1023.98px) {
  .storm-footer .ftr-tchip { min-height: var(--spx-toque, 44px); }
}

/* ── [SPX QA16-L7g] os dois lugares em que o FAB cobre o CENTRO de um controle ──
 * A conferencia reprovou a PROVA do lote, nao o desenho: a sonda rolava com
 * `scrollTo(0,y)`, o `<html>` do tema tem `scroll-behavior: smooth` e a medida caia
 * com o FAB ainda apagado — placar 0 por construção. Com o instrumento consertado
 * (rolagem instantânea + guarda "parada com o FAB apagado não conta") e varredura
 * FINA de 40px, aparecem DOIS controles cujo centro fica sob o botão em repouso:
 *
 *   1. o "Salvar" das telas de conta — `input.btn-primary` de 71×36 encostado na
 *      borda direita por um `justify-content: space-between` (medido: caixa
 *      294,811 × 71×36 contra o FAB em 320,774 × 56×56; `elementFromPoint` no
 *      centro devolvia `spx-tb-chest`). 2 de 2 posições em `account/edit`, 1 de 2
 *      em `account/address/add`, a 390 e a 412;
 *   2. o último ícone social do rodapé (o WhatsApp de `.ftr-socials`), que a 390
 *      cai com o centro em x≈331 — dentro da faixa do botão.
 *
 * O tratamento é o que o brief manda: MARGEM, só nessas duas superfícies. Não é a
 * calha global de volta — nenhum container de página consome `--spx-fab-faixa`, só
 * as duas regras abaixo; o conteúdo segue com a largura inteira.
 * ─────────────────────────────────────────────────────────── */
@media (max-width: 1023.98px) {
  /* a faixa que o botão ocupa: 56px de largura + 14px de folga até a borda.
     Fonte única da geometria para quem precisa desviar DELE — e só para esses. */
  :root { --spx-fab-faixa: 70px; }

  /* 1. a linha de botões das telas de conta (`.buttons`, convenção do OpenCart):
        o primario é o último item de um `space-between`, entao a margem empurra
        exatamente ele para fora da faixa e não mexe no "Voltar" da esquerda. */
  [id^="account-"] .buttons > .d-flex,
  [id^="account-"] .buttons.clearfix { padding-right: var(--spx-fab-faixa); }

  /* 2. a fileira de ícones sociais do rodapé */
  .storm-footer .ftr-socials { padding-right: var(--spx-fab-faixa); }
}




