/* =========================================================
   Golden Parts — chave de aparência (04/11/2026, decisão do Valter)
   Carregado DEPOIS do tema-b.css, só quando a chave está ligada
   (includes/aparencia.php). Sem ele o site fica como antes: sempre escuro.

   - Automático: segue o aparelho (prefers-color-scheme).
   - <html data-tema="claro"> ou <html data-tema="escuro">: escolha da pessoa em Minha conta › Ajustes.
   - A barra de cima continua preta e dourada nos dois modos, com o logo de hoje.
   - Cores da marca não mudam: claro = fundo branco e letra preta; escuro = fundo preto e letra branca;
     dourado de destaque nos dois.
   - Acabamento: transições suaves, hover nos botões e sombra leve só no claro.
   ========================================================= */

/* ---------- MODO CLARO (escolhido, ou automático com o aparelho no claro) ---------- */
html[data-tema="claro"] body.tema-b{
  --preto:#F3F1EC; --grafite:#FFFFFF; --grafite2:#F6F4EF; --linha:#E3E0DA; --line-strong:#CFC8BA;
  --ouro:#B4860E; --ouro-claro:#8A6A1C; --ouro-escuro:#E3CF93; --ouro-fundo:#FBF3DC;
  --marfim:#1F1B16; --ink-soft:#3A342C; --cinza:#6F685E; --muted-2:#8A8378;
  --verde:#1F7A4D; --verm:#B3261E;
  --shadow:0 14px 30px -18px rgba(60,40,0,.25);
  --gp-sombra:0 1px 2px rgba(31,27,22,.05), 0 8px 24px -16px rgba(31,27,22,.28);
  --gp-sombra-hover:0 2px 4px rgba(31,27,22,.06), 0 16px 32px -16px rgba(31,27,22,.35);
  color-scheme:light;
}
@media (prefers-color-scheme: light){
  html:not([data-tema]) body.tema-b{
    --preto:#F3F1EC; --grafite:#FFFFFF; --grafite2:#F6F4EF; --linha:#E3E0DA; --line-strong:#CFC8BA;
    --ouro:#B4860E; --ouro-claro:#8A6A1C; --ouro-escuro:#E3CF93; --ouro-fundo:#FBF3DC;
    --marfim:#1F1B16; --ink-soft:#3A342C; --cinza:#6F685E; --muted-2:#8A8378;
    --verde:#1F7A4D; --verm:#B3261E;
    --shadow:0 14px 30px -18px rgba(60,40,0,.25);
    --gp-sombra:0 1px 2px rgba(31,27,22,.05), 0 8px 24px -16px rgba(31,27,22,.28);
    --gp-sombra-hover:0 2px 4px rgba(31,27,22,.06), 0 16px 32px -16px rgba(31,27,22,.35);
    color-scheme:light;
  }
}
/* sem sombra no escuro (no fundo preto ela não aparece; o site usa bordas) */
body.tema-b{ --gp-sombra:none; --gp-sombra-hover:none; --gp-ouro-1:#F1CF6B; --gp-ouro-2:#D4A531; --gp-ouro-hover:#E2B84A; }

/* a barra de cima fica preta e dourada nos dois modos */
.tema-b .tb-topo{
  --preto:#000000; --grafite:#121214; --grafite2:#1B1B1F; --linha:#2B2B31;
  --ouro:#D4A531; --ouro-claro:#F1CF6B; --ouro-escuro:#8A6A1C; --ouro-fundo:#1A1608;
  --marfim:#F4EEDF; --cinza:#9A9385;
  --bg:var(--preto); --surface:var(--grafite); --surface-2:var(--grafite2); --line:var(--linha);
  --ink:var(--marfim); --muted:var(--cinza); --gold:var(--ouro);
  color-scheme:dark; color:var(--marfim); background:#000;
}

/* botões dourados: o mesmo dourado da marca nos dois modos */
.tema-b .tb-cta-ouro, .tema-b .btn-primary, .tema-b .cart-fab{ background:linear-gradient(180deg, var(--gp-ouro-1), var(--gp-ouro-2)); color:#000; }

/* textos pequenos em dourado: tom mais escuro no claro, para ler bem no branco */
html[data-tema="claro"] .tema-b .tb-cat, html[data-tema="claro"] .tema-b .cmeta, html[data-tema="claro"] .tema-b .tb-rodape a{ color:var(--ouro-claro); }
html[data-tema="claro"] .tema-b .tb-servs span{ background:rgba(255,255,255,.6); }
@media (prefers-color-scheme: light){
  html:not([data-tema]) .tema-b .tb-cat, html:not([data-tema]) .tema-b .cmeta, html:not([data-tema]) .tema-b .tb-rodape a{ color:var(--ouro-claro); }
  html:not([data-tema]) .tema-b .tb-servs span{ background:rgba(255,255,255,.6); }
}

/* avisos (salvo, erro, informação) legíveis no claro */
html[data-tema="claro"] .tema-b .alert-ok{ background:#E2F6E9; color:#17643A; border-color:#B9E3C8; }
html[data-tema="claro"] .tema-b .alert-error{ background:#FDE2E2; color:#8A1C1C; border-color:#F0B9B9; }
html[data-tema="claro"] .tema-b .alert-info{ background:#DFF0FF; color:#0B4F8A; border-color:#B8D9F5; }
@media (prefers-color-scheme: light){
  html:not([data-tema]) .tema-b .alert-ok{ background:#E2F6E9; color:#17643A; border-color:#B9E3C8; }
  html:not([data-tema]) .tema-b .alert-error{ background:#FDE2E2; color:#8A1C1C; border-color:#F0B9B9; }
  html:not([data-tema]) .tema-b .alert-info{ background:#DFF0FF; color:#0B4F8A; border-color:#B8D9F5; }
}

/* ---------- ACABAMENTO (os dois modos) ---------- */
.tema-b .tb-ta, .tema-b .tb-busca button, .tema-b .tb-cta, .tema-b .tb-vit, .tema-b .tb-prod, .tema-b .tb-marca,
.tema-b .tb-trilho a, .tema-b .tb-vermais, .tema-b .tb-preco, .tema-b .tb-fx, .tema-b .btn, .tema-b .card,
.tema-b .chip, .tema-b .btab, .tema-b .tb-wa, .tema-b .aj-opc, .tema-b .aj-abas a{
  transition:background-color .18s ease, border-color .18s ease, color .18s ease, box-shadow .2s ease, transform .2s ease, filter .18s ease;
}
.tema-b .tb-busca button:hover, .tema-b .tb-ta.tb-ouro:hover{ background:var(--gp-ouro-hover); border-color:var(--gp-ouro-hover); }
.tema-b .tb-cta-ouro:hover, .tema-b .btn-primary:hover{ transform:translateY(-1px); filter:brightness(1.05); box-shadow:0 10px 24px -10px rgba(212,165,49,.55); }
.tema-b .tb-cta-linha:hover{ border-color:var(--ouro); color:var(--ouro-claro); }
.tema-b .tb-vermais:hover, .tema-b .tb-preco:hover{ border-color:var(--ouro); }
.tema-b .tb-vit:hover{ transform:translateY(-2px); }
.tema-b .tb-wa:hover{ transform:translateY(-2px); filter:brightness(1.05); }
/* sombra leve (só aparece no claro; no escuro a variável é "none") */
.tema-b .tb-vit, .tema-b .tb-prod, .tema-b .tb-marca, .tema-b .tb-fx, .tema-b .tb-assist, .tema-b .card, .tema-b .form-card, .tema-b .gp-cc{ box-shadow:var(--gp-sombra); }
.tema-b .tb-vit:hover, .tema-b .tb-prod:hover, .tema-b .tb-marca:hover, .tema-b .card:hover{ box-shadow:var(--gp-sombra-hover); }

/* ---------- celular da página inicial: conversa simples da loja (só enfeite, sem ação) ---------- */
.tema-b .tb-os{ display:none; }
.tema-b .tb-chat[hidden]{ display:flex; }
.tb-chat{ position:relative; z-index:1; display:flex; flex-direction:column; gap:8px; }
.tb-chat-cab{ display:flex; align-items:center; gap:8px; padding:0 2px 10px; margin-bottom:2px; border-bottom:1px solid rgba(241,207,107,.14); color:#CFC8B8; font-size:12px; font-weight:700; }
.tb-chat-cab i{ width:8px; height:8px; border-radius:50%; background:#5FBF8A; display:block; }
.tb-chat-cab small{ margin-left:auto; font-size:10.5px; font-weight:500; color:#F1CF6B; }
.tb-bal{ margin:0; max-width:86%; padding:8px 10px; border-radius:12px; font-size:11.5px; line-height:1.4; color:#CFC8B8; }
.tb-bal.cli{ align-self:flex-start; background:#1B1B1F; border-top-left-radius:4px; }
.tb-bal.loja{ align-self:flex-end; background:#1A1608; border:1px solid #8A6A1C; border-top-right-radius:4px; color:#F4EEDF; }
.tb-chat-fim{ display:grid; justify-items:end; }
.tb-chat-fim .tb-bal{ grid-area:1 / 1; }
.tb-bal.dig{ display:flex; gap:4px; align-items:center; opacity:0; }
.tb-bal.dig i{ width:5px; height:5px; border-radius:50%; background:#F1CF6B; display:block; }
@media (prefers-reduced-motion: no-preference){
  .tb-bal.b1{ animation:gpb1 12s ease infinite; } .tb-bal.b2{ animation:gpb2 12s ease infinite; } .tb-bal.b3{ animation:gpb3 12s ease infinite; }
  .tb-bal.b4{ animation:gpb4 12s ease infinite; } .tb-bal.dig{ animation:gpdig 12s ease infinite; }
  .tb-bal.dig i{ animation:gppingo 1s ease-in-out infinite; } .tb-bal.dig i:nth-child(2){ animation-delay:.15s; } .tb-bal.dig i:nth-child(3){ animation-delay:.3s; }
}
@keyframes gpb1{ 0%,4%{ opacity:0; transform:translateY(6px); } 8%,88%{ opacity:1; transform:none; } 94%,100%{ opacity:0; } }
@keyframes gpb2{ 0%,18%{ opacity:0; transform:translateY(6px); } 22%,88%{ opacity:1; transform:none; } 94%,100%{ opacity:0; } }
@keyframes gpb3{ 0%,36%{ opacity:0; transform:translateY(6px); } 40%,88%{ opacity:1; transform:none; } 94%,100%{ opacity:0; } }
@keyframes gpdig{ 0%,46%{ opacity:0; } 49%,60%{ opacity:1; } 63%,100%{ opacity:0; } }
@keyframes gpb4{ 0%,61%{ opacity:0; transform:translateY(6px); } 65%,88%{ opacity:1; transform:none; } 94%,100%{ opacity:0; } }
@keyframes gppingo{ 0%,100%{ transform:none; opacity:.5; } 50%{ transform:translateY(-2px); opacity:1; } }

/* ---------- Minha conta › Ajustes (cliente/ajustes.php) e abas de Minha conta ---------- */
.tema-b .aj-volta{ display:inline-flex; align-items:center; gap:6px; height:38px; margin-top:20px; padding:0 16px; border-radius:999px; border:1px solid var(--linha); color:var(--marfim); font-weight:600; font-size:14px; }
.tema-b .aj-volta:hover{ border-color:var(--ouro); }
.tema-b .aj-volta + .aj-abas{ margin-top:14px; }
.tema-b .aj-abas{ display:flex; gap:20px; max-width:760px; margin:20px 0 18px; border-bottom:1px solid var(--linha); }
.tema-b .aj-abas a{ padding:10px 0; margin-bottom:-1px; border-bottom:2px solid transparent; color:var(--cinza); font-weight:600; font-size:15px; }
.tema-b .aj-abas a:hover{ color:var(--marfim); }
.tema-b .aj-abas a.on{ color:var(--marfim); border-bottom-color:var(--ouro); }
.tema-b .aj-card{ max-width:760px; display:flex; flex-direction:column; gap:12px; padding:clamp(18px, 3vw, 28px); border-radius:18px; background:var(--grafite); border:1px solid var(--linha); box-shadow:var(--gp-sombra); }
.tema-b .aj-tit{ margin:0; font-size:22px; font-weight:800; }
.tema-b .aj-sub, .tema-b .aj-nota{ margin:0; color:var(--cinza); font-size:14px; }
.tema-b .aj-form{ display:flex; flex-direction:column; gap:14px; margin:0; }
.tema-b .aj-opcoes{ display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:14px; }
.tema-b .aj-opc{ position:relative; display:flex; flex-direction:column; gap:10px; padding:10px; border-radius:14px; border:1.5px solid var(--linha); background:var(--grafite); cursor:pointer; min-width:0; }
.tema-b .aj-opc:hover{ border-color:var(--ouro); }
.tema-b .aj-opc input{ position:absolute; opacity:0; width:1px; height:1px; margin:0; }
.tema-b .aj-opc:has(input:checked){ border-color:var(--ouro); box-shadow:0 0 0 3px var(--ouro-fundo); }
.tema-b .aj-opc:has(input:focus-visible){ outline:2px solid var(--ouro-claro); outline-offset:3px; }
.tema-b .aj-mini{ position:relative; display:block; aspect-ratio:4/3; max-width:100%; border-radius:9px; overflow:hidden; border:1px solid var(--linha); }
.tema-b .aj-mini i{ position:absolute; inset:0; display:block; }
.tema-b .aj-mini .l{ background:#FFFFFF; } .tema-b .aj-mini .d{ background:#000000; }
.tema-b .aj-mini i::before{ content:""; position:absolute; left:10%; top:14%; width:50%; height:8%; border-radius:4px; background:#D4A531; }
.tema-b .aj-mini i::after{ content:""; position:absolute; left:10%; top:30%; width:72%; height:6%; border-radius:3px; opacity:.75; }
.tema-b .aj-mini .l::after{ background:#1F1B16; } .tema-b .aj-mini .d::after{ background:#F4EEDF; }
.tema-b .aj-mini-auto .d{ clip-path:polygon(100% 0, 100% 100%, 0 100%); }
.tema-b .aj-mini-claro .d, .tema-b .aj-mini-escuro .l{ display:none; }
.tema-b .aj-txt{ display:flex; flex-direction:column; gap:4px; min-width:0; }
.tema-b .aj-txt b{ display:flex; align-items:center; gap:8px; font-size:15px; overflow-wrap:anywhere; }
.tema-b .aj-txt b::before{ content:""; flex:0 0 16px; width:16px; height:16px; border-radius:50%; border:1.5px solid var(--linha); box-sizing:border-box; }
.tema-b .aj-opc:has(input:checked) .aj-txt b::before{ border:5px solid var(--ouro); }
.tema-b .aj-txt small{ color:var(--cinza); font-size:12.5px; line-height:1.35; }
.tema-b .aj-salvar{ align-self:flex-start; height:44px; padding:0 22px; border-radius:999px; border:0; background:linear-gradient(180deg, var(--gp-ouro-1), var(--gp-ouro-2)); color:#000; font:inherit; font-weight:700; cursor:pointer; }
/* tela estreita (celular, ou zoom grande): uma opção por linha, desenho à esquerda — nenhum texto cortado */
@media (max-width:640px){
  .tema-b .aj-opcoes{ grid-template-columns:minmax(0, 1fr); gap:10px; }
  .tema-b .aj-opc{ flex-direction:row; align-items:center; gap:12px; }
  .tema-b .aj-mini{ flex:0 0 76px; width:76px; }
}

@media (prefers-reduced-motion: reduce){
  .tema-b *, .tema-b *::before, .tema-b *::after{ transition:none !important; }
  .tema-b .tb-vit:hover, .tema-b .tb-wa:hover, .tema-b .tb-cta-ouro:hover, .tema-b .btn-primary:hover{ transform:none; }
}

/* ---------- 05/11/2026 (decisão do Valter, opção A): o que está ESCOLHIDO fica dourado cheio com ✓ — padrão do site todo ----------
   Menu do catálogo, marcas, filtros, Grade/Lista, Meus pedidos/Ajustes e as opções de Ajustes. Claro e escuro
   (!important e ":not(#gp-esc)" só deixam a regra mais forte que as cores de cada modo). */
html body .tb-trilho a.ativo:not(#gp-esc){ background:#D4A531 !important; color:#1F1B16 !important; font-weight:800 !important; }
html body .tb-trilho a.ativo:not(#gp-esc) svg{ stroke:#1F1B16 !important; color:#1F1B16 !important; }
html body .tb-trilho a.ativo:not(#gp-esc)::after{ content:"✓"; margin-left:auto; padding-left:6px; font-weight:800; }
html body .brandtabs a.btab.active:not(#gp-esc),
html body a.chip.active:not(#gp-esc),
html body .view-toggle .view-toggle-btn.active:not(#gp-esc),
html body .aj-abas a.on:not(#gp-esc){ background:#D4A531 !important; border-color:#D4A531 !important; color:#1F1B16 !important; font-weight:800 !important; }
html body .brandtabs a.btab.active:not(#gp-esc)::before,
html body a.chip.active:not(#gp-esc)::before,
html body .view-toggle .view-toggle-btn.active:not(#gp-esc)::before,
html body .aj-abas a.on:not(#gp-esc)::before{ content:"✓"; margin-right:5px; font-weight:800; }
html body .aj-opc:has(input:checked):not(#gp-esc){ position:relative; border:2px solid #D4A531 !important; background:rgba(212, 165, 49, .14) !important; }
html body .aj-opc:has(input:checked):not(#gp-esc)::after{ content:"✓"; position:absolute; top:-9px; right:-9px; width:22px; height:22px; border-radius:50%; background:#D4A531; color:#1F1B16; font-size:13px; font-weight:800; display:flex; align-items:center; justify-content:center; }
