/* ====== Base (mobile-first) ====== */
:root{
  --bg:#f7f7f8; --card:#fff; --muted:#6b7280; --border:#e5e7eb;
  --text:#111827; --accent:#1d4ed8; --accent-2:#0ea5e9;
  --radius:12px; --cta:#d90429; /* cor do botão dos banners */
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}

/* Largura total / evitar scroll lateral no mobile */
html, body{width:100%; max-width:100%; overflow-x:hidden}

body{
  margin:0; font-family:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu;
  color:var(--text); background:var(--bg); line-height:1.45;
}
.container{max-width:1100px; margin:0 auto; padding:0 16px; width:100%}

/* ===== Acessibilidade / Foco ===== */
a, button{outline:none}
a:focus-visible, button:focus-visible{
  outline:2px solid var(--accent); outline-offset:2px; border-radius:8px;
}

/* ====== HEADER ====== */
.topbar{background:#fff; border-bottom:1px solid var(--border); position:sticky; top:0; z-index:10}
.header-wrap{display:flex; align-items:center; justify-content:space-between; gap:12px; padding:10px 0}

.menu-icon{
  width:42px; height:42px; border:1px solid var(--border); border-radius:10px; background:#fff; cursor:pointer;
  display:inline-flex; align-items:center; justify-content:center;
}
.menu-icon span, .menu-icon span::before, .menu-icon span::after{
  display:block; width:18px; height:2px; background:#111; position:relative; content:"";
}
.menu-icon span::before{position:absolute; top:-6px; content:""; width:18px; height:2px; background:#111}
.menu-icon span::after{position:absolute; top:6px; content:""; width:18px; height:2px; background:#111}

.head-left{display:flex; align-items:center; gap:10px}

.brand-switch{position:relative}
.brand-btn{
  display:inline-flex; align-items:center; gap:8px; padding:10px 12px;
  border:1px solid var(--border); border-radius:10px; background:#fff; cursor:pointer; font-weight:600;
}
.brand-menu{
  position:absolute; top:46px; left:0; background:#fff; border:1px solid var(--border); border-radius:10px;
  box-shadow:0 10px 30px rgba(0,0,0,.08); padding:6px 0; display:none; min-width:180px; z-index:5;
}
.brand-menu.open{display:block}
.brand-menu li{list-style:none; padding:10px 12px; cursor:pointer}
.brand-menu li:hover{background:#f3f4f6}

.head-logo{display:flex; flex-direction:column; align-items:center; gap:4px; text-decoration:none; color:inherit}
.head-logo img{height:22px}
.head-logo small{color:#6b7280; font-weight:700; letter-spacing:.02em}

.head-right{display:flex; align-items:center; gap:14px}
.btn-outline{
  display:inline-flex; align-items:center; gap:8px; padding:10px 12px; border:1px solid var(--border);
  border-radius:10px; background:#fff; color:inherit; text-decoration:none; font-weight:700; white-space:nowrap;
}
.head-locator{display:inline-flex; align-items:center; gap:8px; color:#d90429; text-decoration:none; font-weight:800}

/* Menu móvel colapsável */
.mobile-menu{display:none; flex-direction:column; gap:10px; padding:8px 0; border-top:1px solid var(--border); background:#fff}
.mobile-menu a{padding:10px 0; text-decoration:none; color:inherit; font-weight:600}
.mobile-menu.open{display:flex}

/* ====== Navegação desktop simples (se usar) ====== */
.brand{display:inline-block; padding:12px 0; font-weight:800; color:var(--text); text-decoration:none; font-size:20px}
.brand span{color:var(--accent)}
.header-row{display:flex; align-items:center; justify-content:space-between; gap:12px}
.menu-toggle{display:inline-flex; align-items:center; justify-content:center; width:44px; height:44px; border:1px solid var(--border); border-radius:10px; background:#fff; cursor:pointer}
.menu-toggle span{width:20px; height:2px; background:#111; position:relative}
.menu-toggle span::before,.menu-toggle span::after{content:""; position:absolute; left:0; width:20px; height:2px; background:#111}
.menu-toggle span::before{top:-6px} .menu-toggle span::after{top:6px}
.menu{display:none; flex-direction:column; gap:8px; padding:8px 0}
.menu a{color:var(--text); text-decoration:none; font-weight:600; padding:8px 0}
.menu a:active{opacity:.8}
.header-open .menu{display:flex}
.nav-desktop{display:none}

/* ====== BOTÕES (globais) ====== */
.btn{
  display:inline-block; padding:12px 16px; border-radius:10px; text-decoration:none;
  font-weight:700; border:1px solid transparent; min-height:44px;
}
.btn-primary{background:var(--accent); color:#fff}
.btn-primary:hover{filter:brightness(.95)}
.btn-primary:active{transform:translateY(1px)}
.btn-ghost{background:#fff; color:var(--text); border-color:var(--border)}
.btn-small{padding:10px 12px; font-size:14px}

/* ====== HERO (antigo – mantido se for usar em outras páginas) ====== */
.hero{padding:24px 0; background:linear-gradient(180deg,#fff,#f0f7ff)}
.hero h1{font-size:28px; margin:0 0 8px}
.lead{color:var(--muted); margin:0 0 12px}
.actions{display:flex; gap:12px; margin:16px 0; flex-wrap:wrap}
.hero-card{
  margin-top:16px; background:#fff; border:1px solid var(--border); border-radius:14px;
  padding:16px; box-shadow:0 6px 30px rgba(0,0,0,.06)
}
.hero-line{display:flex; align-items:center; justify-content:space-between; padding:10px 0; border-bottom:1px dashed #e5e7eb}
.hero-line:last-child{border:0}
.hero-line.total strong{font-size:18px}
.muted{color:var(--muted)} .mini{font-size:12px}

/* ====== Cards / Seções ====== */
.cards-2, .cards-3{display:grid; gap:16px; margin:24px auto}
.cards-2{grid-template-columns:1fr}            /* mobile: 1 coluna */
.cards-3{grid-template-columns:1fr}            /* mobile: 1 coluna */
.card{background:var(--card); border:1px solid var(--border); border-radius:var(--radius); padding:16px; box-shadow:0 1px 8px rgba(0,0,0,.03)}
.link-card{text-decoration:none; color:inherit}
.link-card:hover{border-color:#cbd5e1}
.thumb{width:100%; height:auto; border-radius:10px; margin-bottom:10px}
.info{background:#fff; border-top:1px solid var(--border); border-bottom:1px solid var(--border); margin:32px 0}
.info-grid{display:grid; grid-template-columns:1fr; gap:16px; padding:24px 16px}
.faq{border:1px solid var(--border); background:#fff; border-radius:10px; padding:12px 16px; margin:12px 0}
.faq summary{cursor:pointer; font-weight:700}
.faq div{margin-top:8px; color:var(--muted)}

/* ====== FOOTER ====== */
.site-footer{background:#f3f4f6; margin-top:32px; padding-top:28px}
.footer-grid{display:grid; gap:24px; grid-template-columns:1fr; padding-bottom:12px}
.footer-title{display:flex; align-items:center; gap:8px; font-weight:800; letter-spacing:.02em; text-transform:uppercase; font-size:13px}
.footer-list{margin:10px 0 0; padding:0; list-style:none}
.footer-list li{margin:6px 0}
.footer-list a{color:#111827; text-decoration:none}
.footer-list a:hover{text-decoration:underline}
.footer-right{display:flex; flex-direction:column; gap:12px}
.footer-social-title{font-weight:700}
.socials{display:flex; align-items:center; gap:14px}
.store-badges img{height:40px; margin-right:10px}
.footer-bottom{border-top:1px solid #e5e7eb; padding:14px 0}
.small{font-size:12px}

/* ===== HERO-BANNER (Home) ===== */
.hero-banner{
  position:relative;
  height:260px;                       /* altura mobile – ajuste se quiser */
  border-bottom:1px solid var(--border);
  /* encosta nas laterais no mobile */
  margin:0; border-radius:0;
  /* permite ajustar enquadramento com variável --hero-pos */
  background: var(--hero-url) var(--hero-pos, center 30%) / cover no-repeat, #eef3ff;
}
.hero-banner::after{
  content:""; position:absolute; inset:0;
  background: linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(255,255,255,.08) 60%, rgba(255,255,255,.16) 100%);
  pointer-events:none;
}
.hero-banner__content{
  position:absolute; inset:0; display:flex; align-items:center;
  padding:0 16px;
}
.hero-banner__content h1{color:#0b1020; margin:0 0 10px; font-size:28px}

/* Texto promocional entre banner e categorias */
.promo-text{
  text-align:center;
  font-size:clamp(1rem, 2.2vw, 1.5rem);
  font-weight:600;
  line-height:1.6;
  margin:28px auto 10px;
  max-width:900px;
}
.promo-text strong{color:var(--cta)}

/* ===== CTA TILES (banners com botão sobre a imagem) ===== */
.cta-tiles{
  display:grid; gap:20px; margin:8px 0 24px;
  grid-template-columns:1fr;            /* mobile 1 coluna */
}
.cta-tile{
  position:relative; display:block; border-radius:20px; overflow:hidden;
  height:220px; background:#0b0b0b;
  background-image: var(--bg-url);      /* definido inline no HTML */
  background-size:cover; background-position:center center;
  box-shadow: 0 6px 28px rgba(0,0,0,.12);
  transition: transform .15s ease, box-shadow .15s ease;
}
.cta-tile:hover{transform:translateY(-2px); box-shadow:0 10px 34px rgba(0,0,0,.16)}
.cta-tile::after{
  content:""; position:absolute; inset:0;
  background: linear-gradient(90deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,.25) 45%, rgba(0,0,0,.55) 100%);
  pointer-events:none;
}

/* conteúdo (título + botão) */
.cta-content{
  position:absolute; inset:0; padding:22px;
  display:flex; flex-direction:column; justify-content:center; gap:14px; color:#fff;
  z-index:1; max-width:55%;
}
.cta-content h3{margin:0; font-size:28px; line-height:1.1}
.cta-content.left{align-items:flex-start; text-align:left}
.cta-content.right{align-items:flex-end; text-align:right; margin-left:auto}

.btn-cta{
  background:var(--cta); color:#fff; border:0; border-radius:10px;
  padding:12px 18px; font-weight:800; text-decoration:none; display:inline-block;
}
.btn-cta:hover{filter:brightness(.95)}
.btn-cta:active{transform:translateY(1px)}

/* ===== SIM-HERO (banner da página /simular) ===== */
.sim-hero{
  position:relative;
  height:240px;                                  /* mobile */
  background: var(--hero-url) center/cover no-repeat;
  /* encosta nas laterais no mobile */
  margin:0; border-radius:0;
  overflow:hidden;
}
.sim-hero__overlay{
  position:absolute; inset:0;
  background: linear-gradient(180deg, rgba(0,0,0,.45), rgba(0,0,0,.35));
}
.sim-hero__content{
  position:absolute; inset:0; display:flex; flex-direction:column;
  justify-content:center; gap:14px; color:#fff;
}
.sim-hero__content h2{margin:0 0 4px; font-size:22px; text-shadow:0 2px 8px rgba(0,0,0,.35)}
.switch-group{display:flex; gap:10px; flex-wrap:wrap}

/* botões Carros / Motos */
.btn-switch{
  background:#fff; color:#111; border:0; border-radius:12px;
  padding:10px 16px; font-weight:800; text-decoration:none;
  box-shadow:0 6px 20px rgba(0,0,0,.18);
}
.btn-switch.active{background:var(--cta); color:#fff}
.btn-switch:hover{filter:brightness(.96)}

/* ====== Breakpoints ====== */
@media (min-width:640px){
  .hero h1{font-size:32px}
  .cards-2{grid-template-columns:repeat(2, minmax(0,1fr))}
  .cta-tile{height:260px}

  /* Reaplicar margem/raio nos banners a partir de tablet */
  .hero-banner{height:340px; margin:12px auto 0; border-radius:20px; max-width:1100px}
  .hero-banner__content h1{font-size:36px}

  .sim-hero{height:300px; margin:12px auto 0; border-radius:20px; max-width:1100px}
  .sim-hero__content h2{font-size:26px}
}

@media (min-width:900px){
  .hero-grid{display:grid; grid-template-columns:1.1fr .9fr; gap:24px; align-items:center}
  .cards-3{grid-template-columns:repeat(3, minmax(0,1fr))}
  .info-grid{grid-template-columns:repeat(3, minmax(0,1fr))}
  .menu-toggle{display:none}
  .nav-desktop{display:flex; gap:16px}
  .nav-desktop a{color:var(--text); text-decoration:none; font-weight:600; padding:12px 0}
  .footer-grid{grid-template-columns:1fr 1fr 1fr}
  .cta-tiles{grid-template-columns:1fr 1fr}
  .cta-tile{height:270px}
  .cta-content h3{font-size:30px}

  .hero-banner{height:420px}
  .hero-banner__content{padding:0}
  .hero-banner__content h1{font-size:42px}

  .sim-hero{height:340px}
  .sim-hero__content h2{font-size:30px}
}

/* ====== Preferências / iOS safe areas ====== */
@media (prefers-reduced-motion: reduce){
  *{animation:none !important; transition:none !important}
}
@supports(padding:max(0px)){
  .topbar{padding-left:max(16px, env(safe-area-inset-left)); padding-right:max(16px, env(safe-area-inset-right))}
}
