:root {
    --brand-red: #d30000;
    --brand-dark-red: #a50000;
    --ink: #0b0b0f;
    --ink-2: #16161d;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    --bg-page: #f4f6f8;
    --bg-white: #ffffff;
    --border-color: #e2e8f0;
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);
    --whatsapp-green: #25d366;
    --whatsapp-dark: #1da851;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
html, body { overflow-x: hidden; width: 100%; }
body { font-family: 'Inter', sans-serif; background: var(--bg-page); color: var(--text-main); -webkit-font-smoothing: antialiased; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button, select, input { font-family: inherit; }
:focus-visible { outline: 2px solid var(--brand-red); outline-offset: 2px; }

.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 20px; }
.container.narrow { max-width: 800px; }

.reveal { opacity: 0; transform: translateY(20px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* HEADER */
.main-header { background: rgba(255,255,255,.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border-color); position: sticky; top: 0; z-index: 100; transition: box-shadow .3s; }
.main-header.scrolled { box-shadow: var(--shadow-md); }
.header-container { display: flex; align-items: center; justify-content: space-between; height: 80px; }
.logo-area { display: flex; align-items: center; max-width: 200px; z-index: 102; }
.brand-logo { height: 54px; width: auto; max-width: 185px; object-fit: contain; background: transparent; padding: 0; border-radius: 0; display: block; }
.logo-text { font-weight: 800; letter-spacing: -.5px; } .logo-text span { color: var(--brand-red); }
.nav-wrapper { display: flex; align-items: center; gap: 32px; justify-content: flex-end; flex: 1; }
.nav-links { display: flex; gap: 28px; }
.nav-links a { font-size: 15px; font-weight: 500; color: var(--text-muted); transition: color .2s; position: relative; }
.nav-links a::after { content: ''; position: absolute; left: 0; bottom: -6px; height: 2px; width: 0; background: var(--brand-red); transition: width .25s; }
.nav-links a:hover, .nav-links a.active { color: var(--brand-red); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.btn-login { color: var(--text-main); font-weight: 600; font-size: 15px; display: flex; align-items: center; gap: 8px; padding: 10px 18px; border: 1px solid var(--border-color); border-radius: 8px; transition: .2s; }
.btn-login:hover { color: #fff; background: var(--brand-red); border-color: var(--brand-red); }
.mobile-menu-btn { display: none; background: none; border: none; font-size: 26px; color: var(--text-main); cursor: pointer; z-index: 102; }
.menu-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 99; }

/* HERO */
.hero { min-height: 440px; background: url('https://images.unsplash.com/photo-1560958089-b8a1929cea89?auto=format&fit=crop&w=1920&q=80') center/cover; position: relative; display: flex; align-items: center; padding: 60px 0 90px; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(100deg, rgba(11,11,15,.96) 0%, rgba(11,11,15,.6) 55%, rgba(165,0,0,.35) 100%); }
.hero-content { position: relative; z-index: 10; color: #fff; }
.hero-badge { display: inline-flex; gap: 8px; align-items: center; background: rgba(211,0,0,.18); border: 1px solid rgba(211,0,0,.6); color: #ffd6d6; padding: 6px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; margin-bottom: 18px; }
.hero-content h1 { font-size: 48px; font-weight: 800; letter-spacing: -1.5px; line-height: 1.1; max-width: 640px; margin-bottom: 16px; }
.hero-content h1 span { color: var(--brand-red); }
.hero-content p { font-size: 18px; color: #e2e8f0; max-width: 520px; line-height: 1.5; }
.hero-stats { display: flex; gap: 36px; margin-top: 32px; flex-wrap: wrap; }
.hero-stats strong { font-size: 30px; font-weight: 800; }
.hero-stats strong::after { content: ''; }
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats span { font-size: 13px; color: #cbd5e1; }

/* BUSCA */
.search-wrapper { margin-top: -35px; position: relative; z-index: 20; margin-bottom: 60px; }
.search-box { background: #fff; padding: 12px; border-radius: 14px; box-shadow: var(--shadow-lg); display: flex; gap: 12px; border: 1px solid var(--border-color); }
.input-group { flex: 1; min-width: 0; display: flex; align-items: center; background: var(--bg-page); border-radius: 8px; padding: 0 15px; border: 1px solid transparent; transition: .2s; }
.input-group:focus-within { border-color: var(--brand-red); background: #fff; }
.search-icon { color: var(--text-light); font-size: 18px; }
.input-group input { width: 100%; min-width: 0; padding: 16px 12px; border: none; background: transparent; font-size: 16px; outline: none; color: var(--text-main); }
.btn-search { background: var(--brand-red); color: #fff; border: none; padding: 0 40px; border-radius: 8px; font-weight: 600; font-size: 16px; cursor: pointer; transition: background .2s; }
.btn-search:hover { background: var(--brand-dark-red); }

/* ESTOQUE */
.main-content { margin-bottom: 80px; }
.section-header { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 28px; flex-wrap: wrap; gap: 16px; }
.section-titles h2 { font-size: 28px; font-weight: 700; letter-spacing: -.5px; }
.section-titles .subtitle { color: var(--text-muted); font-size: 15px; margin-top: 4px; }
.section-titles.center { text-align: center; margin-bottom: 36px; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; }
.filters select, .chip-fav { padding: 10px 14px; border: 1px solid var(--border-color); border-radius: 8px; background: #fff; font-size: 14px; color: var(--text-main); cursor: pointer; }
.chip-fav { display: inline-flex; gap: 6px; align-items: center; font-weight: 600; }
.chip-fav.on { background: var(--brand-red); color: #fff; border-color: var(--brand-red); }

.grid-cars { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.car-card { background: #fff; border-radius: 14px; border: 1px solid var(--border-color); overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .3s, transform .3s, opacity .6s; }
.car-card.in:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.car-image-wrapper { position: relative; height: 200px; overflow: hidden; }
.car-image { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; background: var(--border-color); }
.car-card:hover .car-image { transform: scale(1.05); }
.tag-highlight { position: absolute; bottom: 12px; left: 12px; background: rgba(0,0,0,.8); color: #fff; padding: 4px 10px; border-radius: 4px; font-size: 11px; font-weight: 600; backdrop-filter: blur(4px); }
.fav-btn { position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border-radius: 50%; border: none; background: rgba(255,255,255,.92); color: var(--text-main); cursor: pointer; display: grid; place-items: center; font-size: 15px; transition: .2s; }
.fav-btn:hover { transform: scale(1.1); }
.fav-btn.on { color: var(--brand-red); }
.car-details { padding: 20px; display: flex; flex-direction: column; flex: 1; }
.car-title-area h3 { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.car-version { font-size: 13px; color: var(--text-muted); line-height: 1.4; height: 36px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.car-specs { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; padding-bottom: 16px; border-bottom: 1px solid var(--border-color); }
.car-specs span { font-size: 12px; color: var(--text-muted); display: flex; align-items: center; gap: 6px; background: var(--bg-page); padding: 6px 8px; border-radius: 6px; white-space: nowrap; }
.car-price { margin-bottom: 16px; }
.car-price h2 { font-size: 24px; font-weight: 800; }
.car-price small { color: var(--text-muted); font-size: 12px; }
.car-actions { display: flex; gap: 10px; margin-top: auto; }
.btn-outline, .btn-whatsapp { flex: 1; min-width: 0; padding: 12px 5px; border-radius: 8px; font-weight: 600; font-size: 14px; cursor: pointer; text-align: center; border: none; transition: .2s; display: flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; }
.btn-outline { background: transparent; border: 1px solid var(--border-color); color: var(--text-main); }
.btn-outline:hover { background: var(--bg-page); border-color: var(--text-light); }
.btn-whatsapp { background: var(--whatsapp-green); color: #fff; }
.btn-whatsapp:hover { background: var(--whatsapp-dark); }
.car-footer { margin-top: 16px; font-size: 12px; color: var(--text-light); }

.empty-state { text-align: center; padding: 60px 20px; background: #fff; border-radius: 14px; border: 1px dashed var(--border-color); }
.empty-state[hidden] { display: none; }
.empty-state i { font-size: 40px; color: var(--text-light); margin-bottom: 14px; }
.empty-state p { color: var(--text-muted); margin: 8px auto 18px; max-width: 420px; }
.empty-state .btn-outline { display: inline-flex; flex: none; padding: 12px 24px; }

/* BENEFÍCIOS */
.benefits { background: #fff; padding: 80px 0; }
.benefits-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 24px; }
.benefit { padding: 28px; border-radius: 14px; background: var(--bg-page); border: 1px solid var(--border-color); transition: .3s; }
.benefit:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.benefit i { font-size: 26px; color: var(--brand-red); margin-bottom: 16px; }
.benefit h3 { margin-bottom: 8px; font-size: 18px; }
.benefit p { color: var(--text-muted); font-size: 14px; line-height: 1.6; }

/* SIMULADOR */
.simulator { background: linear-gradient(135deg, var(--ink) 0%, var(--ink-2) 100%); color: #fff; padding: 80px 0; }
.sim-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; }
.sim-text h2 { font-size: 34px; letter-spacing: -1px; margin-bottom: 14px; }
.sim-text p { color: #cbd5e1; line-height: 1.6; margin-bottom: 20px; }
.sim-text li { margin-bottom: 10px; display: flex; gap: 10px; align-items: center; }
.sim-text li i { color: var(--brand-red); }
.sim-card { background: #fff; color: var(--text-main); padding: 28px; border-radius: 16px; display: flex; flex-direction: column; gap: 16px; box-shadow: 0 20px 40px rgba(0,0,0,.35); }
.sim-card label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--text-muted); }
.sim-card input[type=number] { padding: 14px; border: 1px solid var(--border-color); border-radius: 8px; font-size: 16px; color: var(--text-main); }
.sim-card input[type=range] { accent-color: var(--brand-red); }
.sim-result { background: var(--bg-page); border-radius: 12px; padding: 16px; text-align: center; }
.sim-result span { display: block; font-size: 13px; color: var(--text-muted); }
.sim-result strong { display: block; font-size: 30px; font-weight: 800; color: var(--brand-red); margin: 4px 0; }
.sim-result small { color: var(--text-light); font-size: 12px; }
.sim-card .btn-whatsapp { padding: 15px; flex: none; width: 100%; font-size: 15px; }

/* VENDER */
.sell-cta { background: var(--brand-red); color: #fff; padding: 50px 0; }
.sell-inner { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.sell-inner h2 { font-size: 28px; margin-bottom: 6px; }
.btn-light { background: #fff; color: var(--brand-red); font-weight: 700; padding: 16px 28px; border-radius: 10px; display: inline-flex; gap: 10px; align-items: center; transition: .2s; }
.btn-light:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,.25); }

/* DEPOIMENTOS */
.testimonials { padding: 80px 0; }
.testi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.testi { background: #fff; padding: 28px; border-radius: 14px; border: 1px solid var(--border-color); }
.stars { color: #f5a623; letter-spacing: 3px; margin-bottom: 12px; }
.testi blockquote { line-height: 1.6; margin-bottom: 14px; }
.testi figcaption { color: var(--text-muted); font-size: 13px; font-weight: 600; }

/* FAQ */
.faq { padding: 0 0 80px; }
.faq details { background: #fff; border: 1px solid var(--border-color); border-radius: 12px; padding: 18px 22px; margin-bottom: 12px; }
.faq summary { font-weight: 600; cursor: pointer; list-style: none; display: flex; justify-content: space-between; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--brand-red); font-size: 22px; line-height: 1; }
.faq details[open] summary::after { content: '–'; }
.faq details p { margin-top: 12px; color: var(--text-muted); line-height: 1.6; }

/* FOOTER */
.main-footer { background: var(--ink); color: #fff; padding-top: 60px; }
.footer-content { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-logo { height: 48px; max-width: 220px; background: transparent; padding: 0; border-radius: 0; margin-bottom: 16px; object-fit: contain; display: block; }
.footer-brand p { color: var(--text-light); font-size: 14px; line-height: 1.6; max-width: 320px; }
.socials { display: flex; gap: 10px; margin-top: 18px; }
.socials a { width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.08); display: grid; place-items: center; transition: .2s; }
.socials a:hover { background: var(--brand-red); }
.footer-links h4, .footer-contact h4 { font-size: 16px; margin-bottom: 20px; font-weight: 600; }
.footer-links li { margin-bottom: 12px; }
.footer-links a { color: var(--text-light); font-size: 14px; transition: color .2s; }
.footer-links a:hover { color: #fff; }
.footer-contact p { color: var(--text-light); font-size: 14px; margin-bottom: 12px; display: flex; gap: 10px; word-break: break-word; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 24px 0; text-align: center; color: var(--text-light); font-size: 13px; }

/* FLUTUANTES */
.whats-float { position: fixed; right: 20px; bottom: 20px; width: 58px; height: 58px; border-radius: 50%; background: var(--whatsapp-green); color: #fff; display: grid; place-items: center; font-size: 30px; box-shadow: 0 6px 20px rgba(37,211,102,.5); z-index: 90; animation: pulse 2.4s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(37,211,102,.55); } 70% { box-shadow: 0 0 0 16px rgba(37,211,102,0); } 100% { box-shadow: 0 0 0 0 rgba(37,211,102,0); } }
.to-top { position: fixed; right: 28px; bottom: 90px; width: 42px; height: 42px; border-radius: 50%; border: none; background: var(--ink); color: #fff; cursor: pointer; opacity: 0; pointer-events: none; transition: .3s; z-index: 90; }
.to-top.show { opacity: 1; pointer-events: auto; }

@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
    .reveal { opacity: 1; transform: none; }
}

/* RESPONSIVO */
@media (max-width: 900px) {
    .footer-content { grid-template-columns: 1fr; gap: 30px; }
    .sim-grid { grid-template-columns: 1fr; gap: 30px; }
}
@media (max-width: 768px) {
    .container { padding: 0 16px; }
    .mobile-menu-btn { display: block; }
    .nav-wrapper { position: fixed; top: 0; right: -100%; width: 80%; max-width: 300px; height: 100vh; background: #fff; flex-direction: column; justify-content: flex-start; align-items: flex-start; padding: 80px 20px 20px; box-shadow: -5px 0 15px rgba(0,0,0,.1); transition: right .3s ease-in-out; z-index: 101; }
    .nav-wrapper.active { right: 0; }
    .nav-links { flex-direction: column; width: 100%; gap: 10px; }
    .nav-links a { display: block; padding: 16px; border-radius: 8px; font-size: 16px; background: var(--bg-page); }
    .nav-links a::after { display: none; }
    .nav-actions { width: 100%; margin-top: 20px; }
    .btn-login { width: 100%; justify-content: center; padding: 16px; background: var(--ink); color: #fff; }
    .menu-overlay.active { display: block; }
    .hero { padding: 50px 0 90px; min-height: 0; }
    .hero-content h1 { font-size: 34px; }
    .hero-content p { font-size: 16px; }
    .hero-stats { gap: 22px; }
    .hero-stats strong { font-size: 24px; }
    .search-wrapper { margin-top: -50px; margin-bottom: 40px; }
    .search-box { flex-direction: column; padding: 16px; gap: 10px; }
    .btn-search { width: 100%; padding: 16px; }
    .section-header { flex-direction: column; align-items: flex-start; }
    .filters { width: 100%; }
    .filters select { flex: 1 1 45%; }
    .grid-cars { grid-template-columns: 1fr; gap: 20px; }
    .car-image-wrapper { height: 220px; }
    .car-details { padding: 16px; }
    .benefits, .simulator, .testimonials { padding: 56px 0; }
    .sim-text h2 { font-size: 28px; }
    .sell-inner { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 380px) {
    .car-actions { flex-direction: column; }
    .btn-outline, .btn-whatsapp { width: 100%; padding: 14px; font-size: 15px; }
}
