:root{
  --bg:#f4f5f7; --surface:#ffffff; --surface-2:#eef0f3; --line:#e2e5ea;
  --text:#151a21; --muted:#5b6672; --brand:#e8531a; --brand-ink:#fff;
  --accent:#1f6feb; --ok:#0f9d58; --shadow:0 1px 3px rgba(20,26,33,.08),0 6px 20px rgba(20,26,33,.06);
  --radius:14px;
}
@media (prefers-color-scheme:dark){
  :root{--bg:#0e1116;--surface:#171b22;--surface-2:#1f242d;--line:#2a303a;
    --text:#e7ebf0;--muted:#95a1b0;--brand:#ff6a35;--accent:#4c8dff;
    --shadow:0 1px 3px rgba(0,0,0,.4),0 8px 28px rgba(0,0,0,.35);}
}
*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Inter,system-ui,sans-serif;
  background:var(--bg);color:var(--text);line-height:1.45;
  -webkit-font-smoothing:antialiased;
}
button{font-family:inherit}
a{color:var(--accent);text-decoration:none}

/* topo */
header{
  position:sticky;top:0;z-index:20;background:var(--surface);
  border-bottom:1px solid var(--line);box-shadow:var(--shadow);
}
.hwrap{max-width:860px;margin:0 auto;padding:14px 16px}
.brandrow{display:flex;align-items:center;gap:10px;margin-bottom:12px}
.logo{width:34px;height:34px;flex:0 0 auto}
.brandrow h1{font-size:19px;margin:0;letter-spacing:-.3px}
.brandrow small{color:var(--muted);font-weight:500}
.tabs{display:flex;gap:6px;margin-bottom:10px}
.tab{flex:1;padding:9px;border:1px solid var(--line);background:var(--surface-2);
  color:var(--muted);border-radius:10px;font-weight:600;font-size:14px;cursor:pointer}
.tab.active{background:var(--brand);color:var(--brand-ink);border-color:var(--brand)}
.searchbox{position:relative}
.searchbox input{
  width:100%;padding:13px 44px 13px 16px;font-size:16px;border-radius:12px;
  border:1px solid var(--line);background:var(--bg);color:var(--text);outline:none;
}
.searchbox input:focus{border-color:var(--accent)}
.searchbox .go{position:absolute;right:6px;top:6px;bottom:6px;width:38px;border:0;
  background:var(--brand);color:#fff;border-radius:9px;font-size:17px;cursor:pointer}
.hint{color:var(--muted);font-size:12.5px;margin-top:7px}
.suggest{position:absolute;left:0;right:0;top:calc(100% + 4px);background:var(--surface);
  border:1px solid var(--line);border-radius:12px;box-shadow:var(--shadow);overflow:hidden;z-index:30}
.suggest div{padding:11px 14px;cursor:pointer;display:flex;justify-content:space-between;gap:8px}
.suggest div:hover{background:var(--surface-2)}
.suggest .b{color:var(--muted);font-size:12px}

/* conteúdo */
main{max-width:860px;margin:0 auto;padding:16px}
.status{color:var(--muted);font-size:13px;margin:4px 2px 12px}
.card{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);
  box-shadow:var(--shadow);padding:14px 16px;margin-bottom:11px;cursor:pointer;
  transition:transform .06s ease}
.card:active{transform:scale(.995)}
.card .top{display:flex;justify-content:space-between;align-items:baseline;gap:10px}
.pn{font-size:17px;font-weight:700;letter-spacing:-.2px}
.badge{font-size:11px;font-weight:700;padding:3px 8px;border-radius:20px;white-space:nowrap}
.badge.codigo{background:rgba(31,111,235,.14);color:var(--accent)}
.badge.oem{background:rgba(232,83,26,.16);color:var(--brand)}
.badge.descricao{background:var(--surface-2);color:var(--muted)}
.card .grp{color:var(--text);font-weight:500;margin-top:2px}
.card .meta{color:var(--muted);font-size:12.5px;margin-top:6px;display:flex;flex-wrap:wrap;gap:6px 12px}
.card .via{color:var(--brand);font-weight:600}

/* detalhe */
.detail-head{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);
  box-shadow:var(--shadow);padding:16px;margin-bottom:14px}
.detail-head .pn{font-size:23px}
.chips{display:flex;flex-wrap:wrap;gap:7px;margin-top:10px}
.chip{background:var(--surface-2);border:1px solid var(--line);color:var(--muted);
  padding:5px 10px;border-radius:20px;font-size:12.5px;font-weight:600}
.section h3{font-size:14px;text-transform:uppercase;letter-spacing:.6px;color:var(--muted);
  margin:20px 2px 9px;display:flex;align-items:center;gap:8px}
.section h3 .n{background:var(--brand);color:#fff;border-radius:20px;font-size:11px;padding:1px 8px}
.grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.spec{background:var(--surface);border:1px solid var(--line);border-radius:10px;padding:9px 12px}
.spec .k{color:var(--muted);font-size:12px}
.spec .v{font-weight:600;margin-top:1px}
.xref{background:var(--surface);border:1px solid var(--line);border-radius:10px;
  padding:10px 13px;display:flex;justify-content:space-between;align-items:center;margin-bottom:7px}
.xref .brand{color:var(--muted);font-size:12.5px;font-weight:600}
.xref .code{font-weight:700;font-family:ui-monospace,SFMono-Regular,Menlo,monospace}
.vehbrand{margin-bottom:12px}
.vehbrand .bname{font-weight:700;margin:6px 2px;display:flex;gap:8px;align-items:center}
.vehbrand .bname .n{background:var(--surface-2);color:var(--muted);border-radius:20px;font-size:11px;padding:1px 8px}
.veh{background:var(--surface);border:1px solid var(--line);border-radius:9px;padding:8px 12px;margin-bottom:6px}
.veh .m{font-weight:600}.veh .e{color:var(--muted);font-size:12.5px}
.prodgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:10px;margin-bottom:12px}
.prod{background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:10px;
  text-decoration:none;color:inherit;display:flex;flex-direction:column;gap:8px;
  transition:transform .06s ease,border-color .15s ease}
.prod:hover{border-color:#ffe600;transform:translateY(-2px)}
.prod img{width:100%;aspect-ratio:1;object-fit:contain;background:#fff;border-radius:8px}
.prod .noimg{width:100%;aspect-ratio:1;display:grid;place-items:center;font-size:34px;background:var(--surface-2);border-radius:8px}
.prod .pn2{font-size:12.5px;line-height:1.35;font-weight:500;
  display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.prod .ml{margin-top:auto;font-size:11.5px;font-weight:700;color:#2d3277;background:#fff159;
  border-radius:6px;padding:3px 7px;text-align:center}
@media (prefers-color-scheme:dark){.prod .ml{color:#2d3277}}
.buybox{display:flex;flex-direction:column;gap:8px}
.buy{display:flex;align-items:center;gap:10px;background:#fff159;color:#2d3277;
  border:1px solid #e6d94a;border-radius:11px;padding:11px 14px;text-decoration:none;
  font-weight:600;transition:transform .06s ease,filter .15s ease}
.buy:active{transform:scale(.99)}.buy:hover{filter:brightness(.97)}
.buy .store{font-weight:800;font-size:12.5px;background:#2d3277;color:#fff159;
  padding:3px 8px;border-radius:7px;white-space:nowrap}
.buy .lbl{flex:1;font-size:14px}
.buy.codigo{outline:2px solid rgba(45,50,119,.25)}
.buynote{color:var(--muted);font-size:11.5px;margin-top:8px;text-align:center}
.back{display:inline-flex;align-items:center;gap:6px;background:none;border:0;color:var(--accent);
  font-size:15px;font-weight:600;padding:8px 2px;cursor:pointer;margin-bottom:4px}
.empty{text-align:center;color:var(--muted);padding:50px 20px}
.empty .big{font-size:40px;margin-bottom:8px}
.spinner{text-align:center;color:var(--muted);padding:36px}
footer{max-width:860px;margin:20px auto;padding:0 16px;color:var(--muted);font-size:12px;text-align:center}
@media (min-width:560px){.detail-head .pn{font-size:26px}}
@media (max-width:420px){.grid{grid-template-columns:1fr}}
