/* ==========================================================================
   Eletrocar Auto Eletrica — storefront
   Cores da logo (stores/eletrocar/logo): marinho do carro e do "ELETRO" e o azul
   do "CAR". Amarelo "eletrico" so como destaque (botoes do seletor, selos).
   Estrutura de vitrine de autopecas (referencia: Varimax): topo branco com busca
   grande, barra de departamentos, cards com marca/codigo/preco e "Comprar".
   ========================================================================== */

:root {
  --navy: #0B1A4F;
  --navy-2: #13277A;
  --blue: #1B5FD0;
  --blue-600: #1449B0;
  --blue-50: #EEF4FF;
  --accent: #FFC21A;
  --accent-600: #F2A900;
  --green: #12A150;
  --green-50: #E9F8EF;
  --red: #D92D3A;
  --red-50: #FDECEE;

  --bg: #F4F6FA;
  --surface: #FFFFFF;
  --border: #E3E8F0;
  --text: #111B33;
  --muted: #5C6781;

  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 3px rgba(11, 26, 79, .08);
  --shadow: 0 10px 28px rgba(11, 26, 79, .10);
  --wrap: 1280px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif; font-size: 15px; line-height: 1.5;
  overflow-x: hidden;
}
h1, h2, h3, h4 { font-family: 'Barlow Semi Condensed', 'Segoe UI', sans-serif; font-weight: 700; margin: 0; letter-spacing: .005em; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
ul { margin: 0; padding: 0; list-style: none; }
a { color: var(--blue); }
img { max-width: 100%; }
[hidden] { display: none !important; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

/* ---------- botoes ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none; border-radius: var(--radius-sm); padding: 11px 18px; font-weight: 700; font-size: 14px;
  text-decoration: none; transition: background .18s, transform .12s, box-shadow .18s; white-space: nowrap;
}
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-600); }
.btn-buy { background: var(--blue); color: #fff; text-transform: uppercase; letter-spacing: .04em; }
.btn-buy:hover { background: var(--navy-2); }
.btn-buy.added { animation: pop .45s ease; }
.btn-accent { background: var(--accent); color: var(--navy); }
.btn-accent:hover { background: var(--accent-600); }
.btn-ghost { background: var(--surface); color: var(--navy); border: 1px solid var(--border); }
.btn-ghost:hover { border-color: var(--blue); color: var(--blue); }
.btn-wa { background: #25D366; color: #fff; }
.btn-wa:hover { background: #1FB457; }
.btn-block { width: 100%; }
.btn-sm { padding: 7px 12px; font-size: 13px; }
.btn-lg { padding: 14px 26px; font-size: 16px; }
.link-btn { border: none; background: none; padding: 0; color: var(--blue); font-weight: 600; font-size: inherit; }
.link-btn:hover { text-decoration: underline; }
@keyframes pop { 40% { transform: scale(1.08); } }

/* ---------- faixa do topo ---------- */
.topbar { background: var(--navy); color: #C9D5F5; font-size: 12.5px; }
.topbar-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 34px; }
.topbar-links { display: flex; gap: 16px; }
.topbar a { color: #fff; text-decoration: none; font-weight: 600; }
.topbar a:hover { text-decoration: underline; }

/* ---------- topo ---------- */
.site-header { position: sticky; top: 0; z-index: 60; background: var(--surface); box-shadow: 0 1px 0 var(--border); }
.header-inner { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 24px; align-items: center; padding-top: 14px; padding-bottom: 14px; transition: padding .2s; }
.brand img { display: block; height: 60px; width: auto; transition: height .2s; }
.site-header.shrink .header-inner { padding-top: 8px; padding-bottom: 8px; }
.site-header.shrink .brand img { height: 44px; }

.searchbar { position: relative; display: flex; }
.searchbar input {
  flex: 1; min-width: 0; height: 48px; border: 2px solid var(--blue); border-right: none;
  border-radius: 999px 0 0 999px; padding: 0 20px; outline: none; background: #fff;
}
.searchbar input:focus { box-shadow: 0 0 0 4px rgba(27, 95, 208, .12); }
.search-btn { width: 58px; border: none; border-radius: 0 999px 999px 0; background: var(--blue); color: #fff; display: grid; place-items: center; }
.search-btn:hover { background: var(--blue-600); }
.search-btn svg { width: 22px; height: 22px; }
.search-suggestions {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 70; background: #fff;
  border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
}
.suggestion { display: flex; align-items: center; gap: 12px; padding: 10px 14px; text-decoration: none; color: var(--text); border-bottom: 1px solid var(--border); }
.suggestion:hover { background: var(--blue-50); }
.sg-ico { width: 42px; height: 42px; border-radius: 8px; background: var(--blue-50); display: grid; place-items: center; font-size: 20px; flex-shrink: 0; overflow: hidden; }
.sg-ico img { width: 100%; height: 100%; object-fit: cover; }
.sg-text { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 13.5px; }
.sg-text small { color: var(--muted); font-size: 12px; }
.sg-price { font-weight: 700; color: var(--blue); font-size: 14px; }
.sg-all { display: block; width: 100%; border: none; background: var(--bg); padding: 11px; font-weight: 700; color: var(--blue); font-size: 13px; }
.sg-empty { padding: 16px; color: var(--muted); font-size: 13.5px; }

.header-actions { display: flex; align-items: center; gap: 6px; }
.hd-btn {
  display: flex; align-items: center; gap: 9px; border: none; background: none; padding: 8px 10px;
  border-radius: 10px; color: var(--navy); text-align: left; transition: background .15s;
}
.hd-btn:hover { background: var(--blue-50); }
.hd-btn svg { width: 26px; height: 26px; flex-shrink: 0; }
.hd-btn span { display: flex; flex-direction: column; line-height: 1.2; }
.hd-btn small { font-size: 11.5px; color: var(--muted); }
.hd-btn strong { font-size: 13.5px; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.garage-btn { border: 1.5px dashed #B9C6E6; }
.garage-btn.set { border: 1.5px solid var(--green); background: var(--green-50); }
.garage-btn.set svg { color: var(--green); }
.cart-ico { position: relative; display: block; }
.cart-count {
  position: absolute; top: -6px; right: -8px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px;
  background: var(--accent); color: var(--navy); font-size: 11px; font-weight: 800; display: grid; place-items: center;
}

/* ---------- departamentos ---------- */
.deptbar { background: var(--blue); position: relative; }
.deptbar-inner { display: flex; align-items: stretch; gap: 4px; }
.all-cats {
  display: flex; align-items: center; gap: 9px; border: none; background: var(--navy-2); color: #fff;
  padding: 0 18px; min-height: 44px; font-weight: 700; font-size: 14px; flex-shrink: 0;
}
.all-cats svg { width: 20px; height: 20px; }
.all-cats:hover, .all-cats[aria-expanded="true"] { background: var(--navy); }
.dept-links { display: flex; overflow-x: auto; scrollbar-width: none; }
.dept-links::-webkit-scrollbar { display: none; }
.dept-links a {
  display: flex; align-items: center; padding: 0 14px; color: #fff; text-decoration: none; font-weight: 600;
  font-size: 13.5px; white-space: nowrap; border-bottom: 3px solid transparent;
}
.dept-links a:hover, .dept-links a.active { background: rgba(255,255,255,.1); border-bottom-color: var(--accent); }
.mega { position: absolute; left: 0; right: 0; top: 100%; background: #fff; box-shadow: var(--shadow); border-top: 3px solid var(--accent); z-index: 65; }
.mega-inner { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 18px 24px; padding-top: 22px; padding-bottom: 24px; }
.mega-col { display: flex; flex-direction: column; gap: 4px; }
.mega-col a { color: var(--muted); text-decoration: none; font-size: 13.5px; padding: 2px 0; }
.mega-col a:hover { color: var(--blue); }
.mega-col .mega-parent { display: flex; gap: 8px; align-items: center; color: var(--navy); font-weight: 700; font-size: 14.5px; margin-bottom: 4px; }

/* ---------- banner + seletor de veiculo ---------- */
.hero {
  background:
    linear-gradient(115deg, rgba(11,26,79,.97) 0%, rgba(19,39,122,.95) 55%, rgba(27,95,208,.9) 100%),
    repeating-linear-gradient(135deg, transparent 0 22px, rgba(255,255,255,.04) 22px 23px);
  color: #fff; position: relative; overflow: hidden;
}
.hero::after {
  content: '⚡'; position: absolute; right: -40px; bottom: -80px; font-size: 360px; opacity: .06; transform: rotate(12deg);
}
.hero-inner { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 40px; align-items: center; padding-top: 46px; padding-bottom: 50px; position: relative; z-index: 1; }
.hero-kicker { display: inline-block; background: rgba(255,194,26,.16); color: var(--accent); font-weight: 700; font-size: 13px; padding: 6px 12px; border-radius: 999px; margin-bottom: 14px; }
.hero h1 { font-size: clamp(30px, 4vw, 48px); line-height: 1.05; margin-bottom: 14px; }
.hero h1 span { color: var(--accent); }
.hero p { color: #C9D5F5; font-size: 16px; max-width: 54ch; margin: 0 0 18px; }
.hero-points { display: flex; flex-wrap: wrap; gap: 10px 18px; font-weight: 600; font-size: 14px; }
.hero-card { background: #fff; color: var(--text); border-radius: 16px; padding: 24px; box-shadow: 0 24px 60px rgba(0,0,0,.25); }
.hero-card h2 { font-size: 24px; color: var(--navy); }
.hero-card p { color: var(--muted); font-size: 14px; margin: 4px 0 16px; }

.vs { display: grid; gap: 10px; }
.vs-row { grid-template-columns: 1fr 1fr; }
.vs-row .vs-submit { grid-column: 1 / -1; }
.vs-stack { grid-template-columns: 1fr; }
.vs-field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.vs-field select {
  height: 46px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); padding: 0 12px;
  background: #fff; font-size: 15px; text-transform: none; letter-spacing: 0; color: var(--text); font-weight: 500;
}
.vs-field select:focus { outline: none; border-color: var(--blue); }
.vs-field select:disabled { background: var(--bg); color: var(--muted); }
.vs-submit { height: 48px; font-size: 15px; }

/* ---------- vantagens ---------- */
.benefits { background: #fff; border-bottom: 1px solid var(--border); }
.benefits-inner { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; padding-top: 18px; padding-bottom: 18px; }
.benefits-inner div { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; align-items: center; }
.benefits-inner span { grid-row: span 2; font-size: 28px; }
.benefits-inner strong { font-size: 14px; color: var(--navy); }
.benefits-inner small { color: var(--muted); font-size: 12.5px; }

/* ---------- secoes ---------- */
.block { margin-top: 36px; }
.section-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; gap: 12px; }
.section-head h2 { font-size: 26px; color: var(--navy); position: relative; padding-left: 14px; }
.section-head h2::before { content: ''; position: absolute; left: 0; top: 4px; bottom: 4px; width: 5px; border-radius: 4px; background: var(--accent); }
.rail-nav { display: flex; gap: 6px; }
.rail-nav button { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--border); background: #fff; font-size: 22px; color: var(--navy); line-height: 1; }
.rail-nav button:hover { border-color: var(--blue); color: var(--blue); }

.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.cat-tile {
  display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; padding: 18px 10px;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius); text-decoration: none; color: var(--navy);
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.cat-tile:hover { border-color: var(--blue); transform: translateY(-3px); box-shadow: var(--shadow); }
.cat-ico { width: 58px; height: 58px; border-radius: 50%; background: var(--blue-50); display: grid; place-items: center; font-size: 28px; margin-bottom: 6px; }
.cat-tile strong { font-size: 14px; }
.cat-tile small { color: var(--muted); font-size: 12px; }

.rail { display: grid; grid-auto-flow: column; grid-auto-columns: 232px; gap: 14px; overflow-x: auto; padding: 4px 2px 14px; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.rail > * { scroll-snap-align: start; }

.brand-strip { display: flex; flex-wrap: wrap; gap: 10px; }
.brand-chip {
  border: 1px solid var(--border); background: #fff; border-radius: 10px; padding: 12px 18px; font-weight: 800; color: var(--navy);
  font-family: 'Barlow Semi Condensed', sans-serif; font-size: 18px; letter-spacing: .02em; display: flex; gap: 8px; align-items: center;
}
.brand-chip small { font-family: 'Inter', sans-serif; font-size: 11px; color: var(--muted); font-weight: 600; }
.brand-chip:hover { border-color: var(--blue); color: var(--blue); }

/* ---------- card de produto ---------- */
.card {
  position: relative; background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  display: flex; flex-direction: column; overflow: hidden; transition: box-shadow .18s, border-color .18s;
  animation: cardIn .35s ease both; animation-delay: calc(var(--i, 0) * 30ms);
}
.card:hover { box-shadow: var(--shadow); border-color: #C9D5F5; }
@keyframes cardIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.card-hit { position: absolute; inset: 0; z-index: 1; }
.card-hit:focus-visible { outline: 3px solid var(--blue); outline-offset: -3px; }
.card-media { position: relative; aspect-ratio: 1 / 1; background: linear-gradient(160deg, #F7F9FD, #E9EFFA); display: grid; place-items: center; }
.card-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 12px; }
.card-ph { font-size: 64px; filter: drop-shadow(0 6px 10px rgba(11,26,79,.15)); transition: transform .25s; }
.card:hover .card-ph { transform: scale(1.08); }
.card-badges { position: absolute; top: 8px; left: 8px; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.badge { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 6px; }
.badge-fit { background: var(--green); color: #fff; }
.badge-universal { background: var(--navy); color: #fff; }
.badge-low { background: var(--red-50); color: var(--red); }
.card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 3px; flex: 1; }
.card-brand { font-size: 11.5px; font-weight: 800; color: var(--blue); text-transform: uppercase; letter-spacing: .05em; }
.card-name { font-family: 'Inter', sans-serif; font-weight: 600; font-size: 14px; line-height: 1.35; min-height: 2.7em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--text); }
.card-code { font-size: 12px; color: var(--muted); }
.card-price { font-family: 'Barlow Semi Condensed', sans-serif; font-weight: 800; font-size: 24px; color: var(--navy); margin-top: 6px; }
.card-buy { display: flex; gap: 8px; margin-top: auto; padding-top: 10px; position: relative; z-index: 2; }
.card-buy .btn-buy { flex: 1; padding: 9px 10px; font-size: 13px; }
.card-out { color: var(--muted); font-weight: 600; font-size: 13px; padding: 9px 0; }

.stepper { display: flex; align-items: center; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; background: #fff; }
.stepper button { width: 30px; height: 38px; border: none; background: var(--bg); font-size: 16px; font-weight: 700; color: var(--navy); }
.stepper button:hover { background: var(--blue-50); color: var(--blue); }
.stepper input { width: 34px; border: none; text-align: center; font-weight: 700; outline: none; background: transparent; }
.stepper-sm button { width: 28px; height: 30px; }
.stepper-sm input { width: 28px; }
.stepper-lg button { width: 44px; height: 50px; font-size: 20px; }
.stepper-lg input { width: 48px; font-size: 17px; }

/* ---------- catalogo ---------- */
.catalog { scroll-margin-top: 150px; }
.catalog-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 12px; flex-wrap: wrap; }
.catalog-head h2 { font-size: 30px; color: var(--navy); }
.catalog-count { color: var(--muted); font-size: 13.5px; }
.sort { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--muted); }
.sort select { height: 40px; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0 10px; background: #fff; color: var(--text); }
.vehicle-chip { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; background: var(--green-50); border: 1px solid #BDE7CD; color: #0E5D30; border-radius: var(--radius-sm); padding: 10px 14px; margin-bottom: 12px; font-size: 14px; }
.active-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 12px; }
.active-chips:empty { display: none; }
.chip { border: none; background: var(--blue-50); color: var(--blue); border-radius: 999px; padding: 5px 12px; font-size: 12.5px; font-weight: 700; }
.chip:hover { background: #DCE7FF; }
.catalog-body { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 20px; align-items: start; }
.filters { position: sticky; top: 150px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; max-height: calc(100vh - 170px); overflow: auto; }
.filters-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.filters-head h3 { font-size: 20px; color: var(--navy); }
.filters-toggle { display: none; margin-bottom: 12px; }
.f-group { border-top: 1px solid var(--border); padding: 12px 0 6px; }
.f-group h4 { font-family: 'Inter', sans-serif; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 6px; }
.f-opt { display: flex; justify-content: space-between; align-items: center; width: 100%; border: none; background: none; padding: 6px 8px; border-radius: 6px; font-size: 13.5px; text-align: left; }
.f-opt small { color: var(--muted); font-size: 11.5px; }
.f-opt:hover { background: var(--bg); }
.f-opt.active { background: var(--blue-50); color: var(--blue); font-weight: 700; }
.f-opt.sub { padding-left: 20px; font-size: 13px; }
.price-range { display: flex; gap: 6px; margin-bottom: 8px; }
.price-range input { width: 100%; min-width: 0; height: 36px; border: 1px solid var(--border); border-radius: 6px; padding: 0 8px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.load-more { text-align: center; margin-top: 26px; color: var(--muted); font-size: 13.5px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.load-more p { margin: 0; }
.lm-bar { width: min(260px, 70%); height: 5px; border-radius: 999px; background: var(--border); overflow: hidden; }
.lm-bar span { display: block; height: 100%; background: var(--blue); transition: width .5s; }

/* vazio e carregando */
.empty { grid-column: 1 / -1; text-align: center; padding: 50px 20px; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.empty-ico { font-size: 44px; }
.empty h1 { color: var(--navy); font-size: 30px; }
.sk { background: linear-gradient(90deg, #EAEEF5 25%, #F5F7FB 37%, #EAEEF5 63%); background-size: 400% 100%; animation: shimmer 1.4s ease infinite; border-radius: 8px; }
.sk-media { aspect-ratio: 1 / 1; border-radius: 0; }
.sk-line { height: 12px; margin: 10px 14px; }
.sk-line.lg { height: 30px; }
.sk-box { height: 220px; margin-top: 16px; }
.sk-card { padding-bottom: 12px; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

/* ---------- troca de pagina ---------- */
.product-page, .help-page { display: none; }
body[data-page="product"] .product-page { display: block; }
body[data-page="help"] .help-page { display: block; }
body[data-page="product"] .home-only, body[data-page="help"] .home-only { display: none !important; }

/* ---------- pagina de produto ---------- */
.pp { padding-top: 18px; padding-bottom: 10px; }
.pp.enter { animation: cardIn .4s ease both; }
.crumbs, .pp-crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--muted); margin-bottom: 16px; }
.crumbs a, .pp-crumbs a { color: var(--blue); text-decoration: none; font-weight: 600; }
.crumbs a:hover, .pp-crumbs a:hover { text-decoration: underline; }
.crumbs [aria-current], .pp-crumbs [aria-current] { color: var(--text); font-weight: 600; }
.pp-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.pp-gallery { position: sticky; top: 150px; }
.pp-stage { position: relative; aspect-ratio: 1 / 1; background: #fff; border: 1px solid var(--border); border-radius: 16px; overflow: hidden; display: grid; place-items: center; }
.pp-stage.sk { border: none; }
#pp-media { position: absolute; inset: 0; display: grid; place-items: center; }
#pp-media img { width: 100%; height: 100%; object-fit: contain; padding: 18px; transition: transform .3s; }
.pp-stage.zoomable { cursor: zoom-in; }
.pp-stage.zooming img { transform: scale(2); }
.pp-stage.is-video { aspect-ratio: 16 / 9; background: #000; }
#pp-media iframe { width: 100%; height: 100%; border: 0; }
.pp-ph { font-size: 130px; filter: drop-shadow(0 10px 18px rgba(11,26,79,.15)); }
.pp-thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; }
.pp-thumb { width: 70px; height: 70px; flex-shrink: 0; border: 2px solid var(--border); border-radius: 10px; overflow: hidden; background: #fff; padding: 0; }
.pp-thumb.active { border-color: var(--blue); }
.pp-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pp-info { display: flex; flex-direction: column; gap: 12px; }
.pp-brand { font-weight: 800; color: var(--blue); text-transform: uppercase; letter-spacing: .05em; font-size: 13px; }
.pp-title { font-size: clamp(26px, 3vw, 36px); line-height: 1.1; color: var(--navy); }
.pp-codes { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; color: var(--muted); }
.pp-codes strong { color: var(--text); }
.fit-box { border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.fit-box p { margin: 0; color: inherit; opacity: .9; }
.fit-box .link-btn { align-self: flex-start; font-size: 13px; }
.fit-yes { background: var(--green-50); border: 1px solid #BDE7CD; color: #0E5D30; }
.fit-no { background: var(--red-50); border: 1px solid #F5C2C7; color: #8A1C26; }
.fit-ask { background: var(--blue-50); border: 1px solid #CFDCF8; color: var(--navy); }
.fit-ask #pp-selector { margin-top: 8px; }
.pp-buy { background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 18px; display: flex; flex-direction: column; gap: 10px; box-shadow: var(--shadow-sm); }
.pp-price { font-family: 'Barlow Semi Condensed', sans-serif; font-weight: 800; font-size: 40px; line-height: 1; color: var(--navy); }
.pp-sub { margin: 0; font-size: 13.5px; color: var(--muted); }
.pp-stock { margin: 0; font-weight: 700; font-size: 13.5px; }
.pp-stock.ok { color: var(--green); }
.pp-stock.low { color: var(--red); }
.pp-stock.off { color: var(--muted); }
.pp-actions { display: flex; gap: 10px; }
.pp-actions .btn-buy { flex: 1; }
.pp-sections { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 18px; margin-top: 30px; }
.pp-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.pp-card h2 { font-size: 22px; color: var(--navy); margin-bottom: 12px; }
.pp-card h2 + p { margin-top: 0; }
.pp-universal { background: var(--blue-50); padding: 10px 12px; border-radius: var(--radius-sm); }
.pp-muted { color: var(--muted); }
.pp-desc { white-space: pre-line; line-height: 1.7; margin: 0; }
.fit-search { width: 100%; height: 40px; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0 12px; margin-bottom: 10px; }
.table-wrap { overflow-x: auto; }
.fit-table, .pp-fitments table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.fit-table th, .pp-fitments th { text-align: left; background: var(--navy); color: #fff; font-weight: 700; padding: 9px 12px; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.fit-table td, .pp-fitments td { padding: 9px 12px; border-bottom: 1px solid var(--border); }
.fit-table tbody tr:nth-child(even) { background: #F8FAFD; }
.specs { margin: 0 0 16px; }
.specs div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--border); font-size: 13.5px; }
.specs dt { color: var(--muted); font-weight: 600; }
.specs dd { margin: 0; font-weight: 700; text-align: right; }
.rail-section .rail { grid-auto-columns: 232px; }

/* versao que vem do servidor (so ate o JS montar a pagina completa) */
.pp-ssr { max-width: var(--wrap); margin: 0 auto; padding: 18px 20px; }
.pp-ssr .pp-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.pp-ssr .pp-stage { max-width: 520px; }
.pp-ssr .pp-title { font-size: 32px; }
.pp-ssr .pp-price { margin-top: 10px; }
.pp-ssr .flag { display: none; }
.pp-ssr section { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; margin-top: 18px; }
.pp-ssr .pp-related ul { list-style: disc; padding-left: 20px; }

/* ---------- paginas de ajuda (layout montado pelo servidor) ---------- */
.help-wrap { max-width: var(--wrap); margin: 0 auto; padding: 18px 20px 34px; }
.pp-enter { animation: cardIn .4s ease both; }
.help-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 24px; align-items: start; }
.help-nav { position: sticky; top: 150px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; }
.help-nav h2 { font-size: 18px; color: var(--navy); margin-bottom: 8px; }
.help-nav ul { display: grid; gap: 2px; }
.help-nav a { display: flex; gap: 10px; padding: 9px 10px; border-radius: 8px; color: var(--text); text-decoration: none; font-weight: 600; font-size: 14px; }
.help-nav a:hover { background: var(--bg); }
.help-nav a.active { background: var(--blue); color: #fff; }
.help-wa { display: block; margin-top: 12px; padding: 12px; border-radius: 10px; background: #25D366; color: #fff; text-decoration: none; font-size: 13px; }
.help-wa strong { display: block; font-size: 15px; }
.help-article { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 28px 32px; line-height: 1.7; }
.help-article h1 { font-size: 34px; color: var(--navy); margin-bottom: 4px; }
.help-article h2 { font-size: 21px; color: var(--navy); margin: 24px 0 6px; }
.help-article p { margin: 0 0 12px; }
.help-article ul { list-style: disc; padding-left: 22px; margin: 0 0 12px; }
.help-article a { color: var(--blue); font-weight: 600; }
.help-article .help-lead { font-size: 16px; color: var(--muted); }
.help-steps { list-style: none; counter-reset: step; padding: 0; margin: 16px 0; display: grid; gap: 10px; }
.help-steps li { counter-increment: step; position: relative; padding: 12px 14px 12px 58px; background: var(--bg); border-radius: 10px; }
.help-steps li::before { content: counter(step); position: absolute; left: 14px; top: 12px; width: 30px; height: 30px; border-radius: 50%; background: var(--blue); color: #fff; font-weight: 800; display: grid; place-items: center; }
.help-steps strong { display: block; color: var(--navy); }
.help-callout { padding: 12px 14px; border-radius: 10px; background: var(--blue-50); margin: 12px 0; }
.help-callout-gold { background: #FFF6DA; }
.help-article .help-wa-big { display: inline-flex; align-items: center; gap: 12px; padding: 14px 22px; border-radius: 12px; background: #25D366; color: #fff; text-decoration: none; margin: 6px 0 14px; }
.help-wa-big svg { width: 38px; height: 38px; color: #fff; }
.help-wa-big strong { display: block; font-size: 18px; }
.help-article .help-more { margin-top: 22px; color: var(--muted); font-size: 14px; }

/* ---------- newsletter e rodape ---------- */
.newsletter { background: var(--blue); color: #fff; margin-top: 44px; }
.newsletter-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: center; padding-top: 28px; padding-bottom: 28px; }
.newsletter h2 { font-size: 26px; }
.newsletter p { margin: 4px 0 0; color: #DCE7FF; font-size: 14px; }
.newsletter-form { display: flex; gap: 8px; }
.newsletter-form input { flex: 1; min-width: 0; height: 46px; border: none; border-radius: var(--radius-sm); padding: 0 14px; }
.newsletter .newsletter-consent { font-size: 11.5px; margin-top: 8px; }
.newsletter .link-btn { color: #fff; text-decoration: underline; }
.newsletter-done { background: rgba(255,255,255,.14); padding: 12px 14px; border-radius: var(--radius-sm); }

.site-footer { background: var(--navy); color: #AFC0E6; font-size: 13.5px; }
.footer-inner { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px; padding-top: 40px; padding-bottom: 30px; }
.footer-brand img { height: 58px; width: auto; }
.footer-brand p { max-width: 36ch; }
.site-footer h4 { color: #fff; font-size: 16px; margin: 0 0 10px; }
.site-footer h4:not(:first-child) { margin-top: 16px; }
.site-footer li { padding: 4px 0; }
.site-footer a { color: #AFC0E6; text-decoration: none; }
.site-footer a:hover { color: #fff; }
.footer-wa { display: inline-block; margin-top: 6px; color: #fff !important; background: #25D366; padding: 8px 12px; border-radius: 8px; font-weight: 700; }
.pay-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.pay-badges span { background: rgba(255,255,255,.1); color: #fff; font-size: 11px; font-weight: 700; padding: 5px 10px; border-radius: 6px; }
.footer-link { color: var(--accent); font-size: 13px; margin-top: 8px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); text-align: center; padding: 14px; font-size: 12.5px; }

.wa-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 115; width: 56px; height: 56px; border-radius: 50%;
  background: #25D366; color: #fff; display: grid; place-items: center; box-shadow: 0 10px 26px rgba(18,140,74,.45);
}
.wa-float svg { width: 30px; height: 30px; }
.wa-float:hover { transform: translateY(-2px); }

/* ---------- avisos ---------- */
#toast-container { position: fixed; bottom: 90px; right: 20px; z-index: 130; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.toast {
  display: flex; align-items: center; gap: 12px; background: var(--navy); color: #fff; padding: 12px 16px; border-radius: 10px;
  font-size: 13.5px; font-weight: 600; box-shadow: var(--shadow); border-left: 4px solid var(--blue); animation: cardIn .25s ease; transition: opacity .25s;
}
.toast.success { border-left-color: var(--green); }
.toast.error { border-left-color: var(--red); }
.toast.leaving { opacity: 0; }
.toast button { border: none; background: var(--accent); color: var(--navy); font-weight: 800; font-size: 12px; padding: 5px 10px; border-radius: 6px; }

/* ---------- janelas ---------- */
.overlay { position: fixed; inset: 0; z-index: 100; background: rgba(11,26,79,.45); display: flex; animation: fade .2s ease; }
.overlay-modal { align-items: center; justify-content: center; padding: 16px; }
.overlay-drawer { justify-content: flex-end; }
.privacy-layer { z-index: 110; }
@keyframes fade { from { opacity: 0; } }
.modal-box { background: #fff; border-radius: 16px; width: 460px; max-width: 100%; max-height: calc(100vh - 32px); overflow: auto; padding: 22px; animation: cardIn .25s ease; }
.modal-wide { width: 700px; }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.modal-head h3 { font-size: 24px; color: var(--navy); }
.modal-sub { color: var(--muted); font-size: 14px; margin: 4px 0 0; }
.modal-title { font-size: 18px; color: var(--navy); margin: 10px 0; }
.close-x { border: none; background: var(--bg); width: 34px; height: 34px; border-radius: 50%; font-size: 20px; line-height: 1; color: var(--muted); flex-shrink: 0; }
.close-x:hover { background: var(--border); color: var(--text); }
.drawer { width: 420px; max-width: 100%; background: #fff; height: 100%; display: flex; flex-direction: column; animation: slideIn .25s ease; }
@keyframes slideIn { from { transform: translateX(100%); } }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px; border-bottom: 1px solid var(--border); }
.drawer-head h3 { font-size: 22px; color: var(--navy); }
.drawer-head small { font-family: 'Inter', sans-serif; font-size: 12.5px; color: var(--muted); font-weight: 500; }
.drawer-body { flex: 1; overflow: auto; padding: 6px 18px; }
.drawer-foot { border-top: 1px solid var(--border); padding: 14px 18px; display: flex; flex-direction: column; gap: 8px; }
.cart-line { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.cart-thumb { width: 64px; height: 64px; border-radius: 10px; background: var(--blue-50); display: grid; place-items: center; font-size: 26px; flex-shrink: 0; overflow: hidden; }
.cart-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.cart-name { color: var(--text); text-decoration: none; font-weight: 600; font-size: 13.5px; }
.cart-name:hover { color: var(--blue); }
.cart-row { display: flex; justify-content: space-between; align-items: center; }
.cart-remove { font-size: 12.5px; color: var(--red); align-self: flex-start; }
.sum-line { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; padding: 3px 0; }
.sum-line.muted { color: var(--muted); }
.sum-line.sep { border-top: 1px solid var(--border); margin-top: 6px; padding-top: 8px; }
.sum-line.total { font-weight: 800; font-size: 18px; color: var(--navy); }
.free-ship { font-size: 13px; background: var(--blue-50); padding: 10px 12px; border-radius: var(--radius-sm); }
.free-ship.done { background: var(--green-50); color: #0E5D30; }
.free-ship-bar { height: 5px; background: #fff; border-radius: 999px; margin-top: 6px; overflow: hidden; }
.free-ship-bar span { display: block; height: 100%; background: var(--blue); }

.tabs { display: flex; background: var(--bg); border-radius: 10px; padding: 4px; margin-bottom: 16px; }
.tab { flex: 1; border: none; background: none; padding: 9px; border-radius: 8px; font-weight: 700; color: var(--muted); }
.tab.active { background: #fff; color: var(--blue); box-shadow: var(--shadow-sm); }
.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.field input, .field select, .field textarea {
  height: 44px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); padding: 0 12px;
  font-size: 15px; font-weight: 500; color: var(--text); background: #fff; outline: none;
}
.field input:focus, .field select:focus { border-color: var(--blue); }
.field small { font-weight: 500; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.auth-forgot { text-align: right; margin: -4px 0 12px; font-size: 13px; }
.legal { font-size: 12px; color: var(--muted); text-align: center; margin: 12px 0 0; }
/* login: botão "Continuar com o Google" + divisória "ou com e-mail" */
.google-slot { display: flex; justify-content: center; min-height: 44px; margin: 4px 0 12px; }
.auth-or { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; color: var(--muted); font-size: 12px; }
.auth-or::before, .auth-or::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.notice { text-align: center; display: flex; flex-direction: column; gap: 10px; align-items: stretch; }
.notice-ico { font-size: 48px; }
.notice h4 { font-size: 22px; color: var(--navy); }
.notice p { color: var(--muted); margin: 0; }
.pass-meter { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin: -6px 0 12px; }
.pass-meter span { height: 5px; border-radius: 999px; background: var(--border); }
.pass-meter[data-level="1"] span:nth-child(1) { background: var(--red); }
.pass-meter[data-level="2"] span:nth-child(-n+2) { background: var(--accent-600); }
.pass-meter[data-level="3"] span { background: var(--green); }
.garage-current { background: var(--green-50); color: #0E5D30; padding: 10px 12px; border-radius: var(--radius-sm); margin-bottom: 12px; font-size: 14px; display: flex; gap: 8px; flex-wrap: wrap; }
.order { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px; margin-bottom: 8px; }
.order-head { display: flex; justify-content: space-between; gap: 10px; }
.status { font-size: 12px; font-weight: 700; background: var(--blue-50); color: var(--blue); padding: 3px 9px; border-radius: 999px; }
.status-off { background: var(--bg); color: var(--muted); }
.order-meta, .order-track { font-size: 13px; color: var(--muted); margin-top: 4px; }
.account-actions { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.privacy-content h4 { font-size: 17px; color: var(--navy); margin: 14px 0 4px; }
.privacy-content ul { list-style: disc; padding-left: 20px; }
.privacy-content p, .privacy-content li { font-size: 14px; color: #33405E; }

.checkout .co-hint { background: var(--blue-50); padding: 10px 12px; border-radius: var(--radius-sm); font-size: 13.5px; margin-bottom: 8px; }
.co-step { display: flex; align-items: center; gap: 10px; font-size: 19px; color: var(--navy); margin: 18px 0 10px; }
.co-step span { width: 26px; height: 26px; border-radius: 50%; background: var(--blue); color: #fff; font-size: 14px; display: grid; place-items: center; }
.co-address { display: grid; grid-template-columns: repeat(6, 1fr); gap: 0 10px; }
.span-1 { grid-column: span 1; } .span-2 { grid-column: span 2; } .span-3 { grid-column: span 3; } .span-4 { grid-column: span 4; }
.ship-note { background: var(--bg); padding: 10px 12px; border-radius: var(--radius-sm); font-size: 13.5px; }
.ship-option { display: flex; align-items: center; gap: 10px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; margin-bottom: 6px; cursor: pointer; font-size: 14px; }
.ship-option span { flex: 1; }
.ship-option small { display: block; color: var(--muted); font-size: 12px; }
.ship-option.active { border-color: var(--blue); background: var(--blue-50); }
.co-summary { background: var(--bg); border-radius: var(--radius-sm); padding: 12px 14px; margin: 16px 0 10px; }
.co-note { font-size: 12.5px; color: var(--muted); margin: 6px 0; }

/* ---------- responsivo ---------- */
@media (max-width: 1100px) {
  .header-inner { grid-template-columns: auto 1fr; }
  .searchbar { grid-column: 1 / -1; order: 3; }
  .hd-btn strong { max-width: 110px; }
  .hero-inner { grid-template-columns: 1fr; }
  .benefits-inner { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .pp-sections { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .topbar-mid, .topbar-links { display: none; }
  .hd-btn span { display: none; }
  .garage-btn span { display: flex; }
  .catalog-body { grid-template-columns: 1fr; }
  .filters { position: static; max-height: none; display: none; }
  .filters.open { display: block; }
  .filters-toggle { display: inline-flex; }
  .pp-grid, .pp-ssr .pp-layout { grid-template-columns: 1fr; }
  .pp-gallery { position: static; }
  .help-layout { grid-template-columns: 1fr; }
  .help-nav { position: static; }
  .newsletter-inner { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 14px; }
  .brand img { height: 46px; }
  .benefits-inner { grid-template-columns: 1fr; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .rail { grid-auto-columns: 180px; }
  .card-buy { flex-direction: column; }
  .stepper { justify-content: space-between; }
  .stepper input { flex: 1; }
  .card-price { font-size: 21px; }
  .vs-row { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .co-address .span-1, .co-address .span-2, .co-address .span-3, .co-address .span-4 { grid-column: span 3; }
  .footer-inner { grid-template-columns: 1fr; }
  .help-article { padding: 20px 16px; }
  .wa-float { right: 14px; bottom: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
