/* Loja em Nitro (client/shop.js, docs/loja.md). Ícones em assets/shop.png (tools/shop-icons.mjs, 16×16 cada). */
.window[data-kind="shop"] { width: min(1120px, 100%); }
.nshop { display: flex; flex-direction: column; gap: 10px; }

/* saldo e "Comprar Nitro" */
.shop-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.shop-bal { display: flex; align-items: center; gap: 8px; padding: 4px 12px 4px 6px; border-radius: 8px; background: #0a0614; box-shadow: inset 0 0 0 2px var(--gold2); }
.shop-bal small { display: block; font: 700 10.5px/1 var(--pixel); color: var(--ink2); }
.shop-bal b { font: 700 20px/1.1 var(--pixel); color: var(--gold); font-variant-numeric: tabular-nums; }

/* deal of the day */
.shop-deal { position: relative; display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 4px 12px; padding: 14px 12px 8px; border-radius: 8px;
  background: linear-gradient(90deg, #3a1660, #24104a 60%); box-shadow: inset 0 0 0 2px var(--mythic), 0 0 0 2px var(--line); }
.sd-flag { position: absolute; top: -9px; left: 10px; display: flex; align-items: center; gap: 4px; padding: 2px 8px 2px 4px; border-radius: 4px; background: var(--mythic); color: var(--line); font: 700 11px/1.2 var(--pixel); }
.sd-txt b { display: block; font: 700 15px/1.2 var(--pixel); color: #fff; text-shadow: var(--outline); }
.sd-txt small { color: var(--ink2); }
.sd-off { display: flex; flex-direction: column; align-items: center; font-family: var(--pixel); }
.sd-off s { color: var(--ink2); font-size: 12px; } .sd-off span { color: var(--mythic); font-size: 18px; font-weight: 700; }

.shop-tabs { height: 34px; }
.shop-tabs .tab { font-size: 12.5px; }
/* subabas de Cosméticos (Veículo, Capacetes, Auras): a linha inteira da grade, menores que as abas da loja */
.shop-subtabs { grid-column: 1 / -1; height: 28px; margin: 0; }
.shop-subtabs .tab { font-size: 11px; flex: 0 1 160px; }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.shop-note { grid-column: 1 / -1; margin: 0; padding: 8px 10px; border-radius: 6px; background: #120c22; box-shadow: inset 0 0 0 2px var(--p-dark); color: var(--ink2); }
.shop-note.warn { color: var(--gold); box-shadow: inset 0 0 0 2px var(--gold2); }
.shop-foot { margin: 0; color: var(--ink2); font-size: 11.5px; text-align: center; }

/* card: a borda e o brilho seguem o tier do selo */
.shop-card { --tc: var(--common); position: relative; display: flex; flex-direction: column; gap: 6px; padding: 10px; border-radius: 8px;
  background: linear-gradient(#251b44, #1a1230); box-shadow: inset 0 0 0 2px var(--tc), 0 3px 0 var(--line); }
.shop-card.t-uncommon { --tc: var(--uncommon); } .shop-card.t-rare { --tc: var(--rare); } .shop-card.t-epic { --tc: var(--epic); }
.shop-card.t-mythic { --tc: var(--mythic); } .shop-card.t-legendary { --tc: var(--legendary); }
.shop-card.deal::after { content: ''; position: absolute; inset: -3px; border-radius: 10px; box-shadow: 0 0 0 2px var(--mythic); pointer-events: none; animation: dealPulse 1.6s steps(4) infinite; }
@keyframes dealPulse { 50% { box-shadow: 0 0 0 3px var(--gold2); } }
.sc-top { display: flex; align-items: center; gap: 8px; }
.sc-name { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; }
.sc-name b { font: 700 14px/1.15 var(--pixel); color: #fff; text-shadow: var(--outline); }
.sc-desc { margin: 0; color: var(--ink2); font-size: 12px; flex: 1; }
.sc-status { font-size: 12px; }
.sc-on { color: var(--cash); font-weight: 700; }
.sc-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.sc-chips .fchip { height: 26px; padding: 0 7px; font-size: 11px; }
.sc-dealtag { font: 700 11px/1 var(--pixel); color: var(--mythic); } .sc-dealtag s { color: var(--ink2); }

/* arte: ícone 16×16 ampliado 2× numa tela de 48 (o espaço de cima é para a aura) */
.shop-art { position: relative; display: block; width: 48px; height: 48px; flex: none; }
.shop-art canvas.shop-ico { position: relative; z-index: 1; width: 48px; height: 48px; image-rendering: pixelated; }
.shop-mini { display: inline-block; width: var(--s); height: var(--s); flex: none; image-rendering: pixelated;
  background: url('assets/shop.png') calc(var(--i) * var(--s) * -1) 0 / calc(var(--s) * 16) var(--s) no-repeat; }

/* preço: Nitro em destaque, reais ao lado */
.shop-buy { display: flex; align-items: center; gap: 8px; margin-top: 2px; }
.shop-buy .btn { flex: 1; min-height: 38px; justify-content: center; gap: 6px; }
.shop-price { display: inline-flex; align-items: center; gap: 5px; }
.shop-price b { font: 700 16px/1 var(--pixel); color: #fff; }
.shop-brl { color: var(--ink2); font-size: 11.5px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.shop-buy .btn.short { --b-base: #3a2c66; --b-clear: #4a3a80; --b-hi: #6a5aa0; flex-direction: column; gap: 0; line-height: 1.1; }
.shop-buy .btn.short small { font-size: 10px; color: var(--gold); }
.shop-buy .btn.confirm { animation: pop .25s steps(4); }

/* cosméticos */
.sc-livery { display: flex; align-items: center; gap: 8px; }
.sc-livery > div:last-child { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.sc-prev { width: 96px; flex: none; }
.sc-prev canvas.hero { width: 96px; height: auto; image-rendering: pixelated; }
.sc-check { display: flex; align-items: center; gap: 4px; font-size: 12px; }
.sc-vanity { display: grid; grid-template-columns: 1fr; gap: 4px; }
.sc-plate-in { height: 32px; padding: 0 8px; border: 0; border-radius: 4px; background: #f4f0dc; color: #140d1e; font: 700 15px/1 var(--pixel); letter-spacing: 2px; text-transform: uppercase; box-shadow: inset 0 0 0 2px #2c4670; }
.sc-helmet { display: flex; justify-content: center; }
.tag.vanity { background: #f4f0dc; color: #140d1e; box-shadow: inset 0 0 0 2px #2c4670; letter-spacing: 1px; }
canvas.hero.livery { filter: drop-shadow(0 0 2px #ffffff40); }
.portrait.gear-shop { display: grid; place-items: center; }

/* boosts ativos: cartão do piloto, gaveta e palco */
.buffs-list { display: flex; flex-direction: column; gap: 4px; }
.boost-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.boost-chip { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 6px 0 4px; border: 0; border-radius: 5px; cursor: pointer;
  font: 700 11px/1 var(--pixel); color: #fff; text-shadow: var(--outline); background: #120c22; box-shadow: inset 0 0 0 2px var(--bc, var(--neon)); }
.boost-chip b { color: var(--bc, var(--neon)); font-variant-numeric: tabular-nums; }
.boost-chip.b-driver_xp { --bc: #ff7a6a; } .boost-chip.b-car_xp { --bc: var(--neon); } .boost-chip.b-loot { --bc: var(--cash); }
.boost-chip.b-closer { --bc: var(--gold); } .boost-chip.b-plate { --bc: #c8d4ee; }
.boost-chip:hover { filter: brightness(1.15); }
#boostHud { position: absolute; top: 56px; left: 20px; display: none; flex-direction: column; align-items: flex-start; gap: 4px; padding: 0; background: none; box-shadow: none; }
html.mobile #boostHud { display: flex; top: 44px; left: 10px; flex-direction: row; flex-wrap: wrap; max-width: calc(100% - 120px); }
#boostHud:empty { display: none; }

html.mobile .shop-grid { grid-template-columns: 1fr; }
html.mobile .shop-deal { grid-template-columns: auto 1fr auto; }
html.mobile .shop-deal .shop-buy { grid-column: 1 / -1; }
html.mobile .shop-tabs .tab { font-size: 10.5px; padding: 0 2px; }
@media (prefers-reduced-motion: reduce) { .shop-card.deal::after, .shop-buy .btn.confirm { animation: none; } }
html.mobile .shop-tabs { overflow-x: auto; scrollbar-width: none; }
html.mobile .shop-tabs .tab { flex: none; padding: 0 10px; font-size: 11px; }
.sc-owned { display: flex; align-items: center; justify-content: space-between; gap: 8px; } .sc-owned .btn { min-height: 30px; padding: 0 10px; }
.shop-buy.confirming { flex-wrap: wrap; }
.shop-norefund { flex-basis: 100%; color: var(--gold); font-size: 11px; }

/* textos e números da Loja (Lucas, 28/11: "melhora as escritas aq"): números em fonte normal tabular (na pixel o 5 vira $),
   tipo do item no lugar do selo de tier, "Você tem N" separado, preço numa linha e o botão embaixo */
.nshop .qn, .shop-price b, .sc-chips .fchip, .sc-dealtag, .sd-off, .shop-bal b { font-family: var(--sans); font-variant-numeric: tabular-nums; }
.sc-name b .qn { font-weight: 700; color: var(--gold); }
.sc-kind { font: 700 10px/1 var(--pixel); letter-spacing: .5px; text-transform: uppercase; color: var(--ink2); padding: 3px 6px; border-radius: 3px; background: #0a0614; box-shadow: inset 0 0 0 1px var(--p-dark); }
.sc-desc { font-size: 12.5px; line-height: 1.4; color: var(--ink); }
.sc-have { font-size: 12px; color: var(--ink2); }
.shop-buy { flex-direction: column; align-items: stretch; gap: 6px; }
.shop-pricerow { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.shop-price small { font-size: 11.5px; color: var(--ink2); }
.shop-price b { font-size: 16px; }
.shop-buy .btn { flex: none; width: 100%; white-space: nowrap; }

/* Oficina $ (client/main.js shopContent): cards em grade, Ofertas e Reparo, e a caixa das peças */
.ws { display: flex; flex-direction: column; gap: 8px; }
.ws-h { margin: 6px 0 0; font: 700 13px/1 var(--pixel); color: var(--gold); text-shadow: var(--outline); }
.ws-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.ws-card .sc-top .ico { flex: none; }
.ws-price { font-size: 13px; color: var(--cash); } .ws-price .qn { font-weight: 700; }
.ws-card .sc-have::first-letter { text-transform: uppercase; }
.ws-buy { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; } .ws-buy .btn { min-height: 30px; padding: 0 4px; font-family: var(--sans); font-weight: 700; }
.ws-parts { margin-top: 4px; padding: 10px; border-radius: 8px; background: #120c22; box-shadow: inset 0 0 0 2px var(--p-dark); display: flex; flex-direction: column; gap: 8px; }
.ws-ph { display: flex; flex-direction: column; gap: 2px; } .ws-ph b { font: 700 13px/1.1 var(--pixel); color: #fff; } .ws-ph small { color: var(--ink2); font-size: 12px; }
.ws-plist { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.ws-part { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 6px; background: #1a1230; box-shadow: inset 0 0 0 1px var(--p-dark); }
.ws-pn { display: flex; flex-direction: column; flex: 1; min-width: 0; font-size: 12.5px; color: var(--ink); } .ws-pn small { color: var(--ink2); font-size: 11px; }
.ws-part .qn { font-size: 15px; color: var(--gold); }
html.mobile .ws-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
html.mobile .ws-plist { grid-template-columns: repeat(2, 1fr); }
html.mobile .ws-card .sc-top { flex-direction: column; align-items: flex-start; }

.shop-card.t-event { --tc: var(--event); } .shop-card.t-champion { --tc: var(--champion); }
