:root {
    --bg: #eef2f6;
    --surface: #ffffff;
    --surface-2: #f7f9fc;
    --text: #18212d;
    --muted: #6f7b89;
    --muted-2: #97a2af;
    --dark: #252c34;
    --dark-2: #1b222a;
    --red: #ed1c24;
    --red-2: #c80f18;
    --green: #20c765;
    --yellow: #ffe100;
    --blue: #185da8;
    --line: #dfe5ec;
    --shadow: 0 12px 30px rgba(20, 32, 46, .10);
    --shadow-soft: 0 7px 18px rgba(20, 32, 46, .08);
    --radius: 12px;
    --max: 1240px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
    background: var(--bg);
    font-size: 15px;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.site-topbar {
    background: var(--red);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
}
.site-topbar-inner {
    max-width: var(--max);
    margin: 0 auto;
    padding: 7px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}
.site-topbar strong { color: var(--yellow); }
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 4px 18px rgba(24, 33, 45, .06);
}
.header-inner {
    max-width: var(--max);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 150px 1fr auto;
    align-items: center;
    gap: 18px;
    min-height: 82px;
    padding: 8px 16px;
}
.brand { display: inline-flex; align-items: center; }
.brand img { width: 128px; height: auto; }
.main-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
}
.main-nav a {
    color: #202936;
    font-weight: 900;
    font-size: 13px;
    padding: 12px 11px;
    border-radius: 8px;
    white-space: nowrap;
    transition: .18s ease;
}
.main-nav a:hover { background: #fff0f1; color: var(--red); }
.header-actions { display: flex; align-items: center; gap: 8px; }
.menu-toggle {
    display: none;
    border: 0;
    background: var(--red);
    color: #fff;
    border-radius: 9px;
    width: 44px;
    height: 42px;
    font-size: 22px;
    font-weight: 900;
}
.btn {
    border: 0;
    border-radius: 8px;
    padding: 12px 16px;
    font-weight: 1000;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    line-height: 1.1;
}
.btn-primary { background: var(--red); color: #fff; box-shadow: 0 8px 18px rgba(237, 28, 36, .22); }
.btn-primary:hover { background: var(--red-2); }
.btn-green { background: var(--green); color: #fff; box-shadow: 0 8px 18px rgba(32, 199, 101, .18); }
.btn-light { background: #fff; color: var(--red); border: 1px solid #ffd0d4; }
.btn-dark { background: var(--dark); color: #fff; }
.btn-outline { background: #fff; border: 1px solid var(--line); color: var(--text); }
.btn-yellow { background: var(--yellow); color: #111; }
.header-whatsapp { background: var(--green); color: #fff; padding: 11px 15px; border-radius: 999px; font-size: 13px; font-weight: 1000; }
.hero-portal {
    max-width: var(--max);
    margin: 18px auto 0;
    padding: 0 16px 24px;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(320px, .92fr);
    gap: 18px;
    align-items: stretch;
}
.hero-copy {
    background: linear-gradient(135deg, #111820, #2a080b 58%, #111820);
    border-radius: 18px;
    min-height: 360px;
    color: #fff;
    padding: clamp(24px, 5vw, 54px);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow);
}
.hero-copy::after {
    content: "";
    position: absolute;
    right: -70px;
    bottom: -90px;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(237,28,36,.35), transparent 62%);
    pointer-events: none;
}
.hero-logo { width: min(260px, 52vw); margin-bottom: 18px; filter: drop-shadow(0 14px 26px rgba(0,0,0,.34)); }
.kicker {
    color: var(--red);
    text-transform: uppercase;
    letter-spacing: .08em;
    font-weight: 1000;
    font-size: 12px;
    margin: 0 0 8px;
}
.hero-copy .kicker { color: var(--yellow); }
h1, h2, h3 { color: inherit; }
h1 {
    font-size: clamp(34px, 5.6vw, 66px);
    line-height: .96;
    margin: 8px 0 14px;
    letter-spacing: -.055em;
}
.lead { color: rgba(255,255,255,.82); font-size: clamp(17px, 2vw, 20px); line-height: 1.55; max-width: 720px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.hero-search, .search-panel, .finance-box, .content-box, .filters-wrap, .admin-card, .login-box {
    background: #fff;
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow-soft);
}
.hero-search { padding: 20px; display: flex; flex-direction: column; justify-content: center; }
.hero-search h2, .search-panel h2, .finance-box h2 { margin: 0 0 14px; font-size: 25px; color: #18212d; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.form-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12px; color: #344050; font-weight: 1000; }
input, select, textarea {
    width: 100%;
    border: 1px solid #d8e0e8;
    border-radius: 9px;
    padding: 12px 12px;
    background: #fff;
    color: #15202b;
    outline: none;
}
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--red); box-shadow: 0 0 0 4px rgba(237,28,36,.08); }
.quick-services {
    max-width: var(--max);
    margin: 0 auto 18px;
    padding: 0 16px;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
}
.quick-service {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 13px;
    padding: 14px;
    box-shadow: var(--shadow-soft);
    min-height: 104px;
    display: flex;
    flex-direction: column;
    gap: 7px;
}
.quick-service strong { font-size: 15px; color: #18212d; }
.quick-service span { color: var(--muted); font-size: 12.5px; line-height: 1.35; }
.quick-service .icon { width: 34px; height: 34px; border-radius: 9px; background: #fff0f1; color: var(--red); display: grid; place-items: center; }
.section { max-width: var(--max); margin: 0 auto; padding: 26px 16px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.section h2 { font-size: clamp(25px, 3vw, 38px); margin: 0; letter-spacing: -.035em; }
.section p { color: var(--muted); line-height: 1.6; }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.service-card, .info-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow-soft);
    padding: 20px;
}
.service-card .icon { width: 46px; height: 46px; border-radius: 12px; background: #fff0f1; display: grid; place-items: center; color: var(--red); font-size: 22px; margin-bottom: 12px; }
.service-card h3 { margin: 0 0 8px; color: #17202b; }
.vehicle-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.vehicle-card {
    background: #fff;
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: .18s ease;
}
.vehicle-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.vehicle-media { position: relative; height: 188px; background: #d6dde5; overflow: hidden; }
.vehicle-media img { width: 100%; height: 100%; object-fit: cover; }
.vehicle-card-badges {
    position: absolute;
    left: 8px;
    top: 8px;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.badge {
    border-radius: 4px;
    padding: 5px 8px;
    font-size: 10px;
    font-weight: 1000;
    text-transform: uppercase;
    letter-spacing: .02em;
    background: var(--red);
    color: #fff;
    display: inline-flex;
}
.badge-yellow { background: var(--yellow); color: #111; }
.badge-green { background: var(--green); color: #fff; }
.vehicle-info { padding: 13px 13px 0; }
.vehicle-info h3 { margin: 0 0 8px; color: #17202b; font-size: 16px; line-height: 1.25; min-height: 40px; }
.specs { display: flex; flex-wrap: wrap; gap: 8px 10px; color: var(--muted); font-size: 12px; margin: 8px 0 9px; }
.specs span { display: inline-flex; align-items: center; gap: 4px; }
.price { color: #101820; font-size: 24px; font-weight: 1000; letter-spacing: -.03em; margin: 6px 0; }
.fipe-ref { color: #6f7b89; font-size: 12px; display: block; margin-top: -3px; }
.card-actions { display: grid; grid-template-columns: 1fr; gap: 0; margin-top: 10px; }
.card-actions .btn { border-radius: 0; min-height: 39px; font-size: 13px; }
.card-actions .btn:first-child { border-top: 1px solid #eef2f6; }
.card-actions .btn + .btn { border-top: 1px solid rgba(255,255,255,.28); }
.page-titlebar {
    background: #fff;
    border-bottom: 1px solid var(--line);
}
.page-titlebar-inner {
    max-width: var(--max);
    margin: 0 auto;
    padding: 18px 16px;
}
.page-titlebar h1 { color: #17202b; font-size: clamp(27px, 4vw, 44px); margin: 4px 0 6px; }
.page-titlebar p { color: var(--muted); margin: 0; }
.page-hero { max-width: var(--max); margin: 0 auto; padding: 30px 16px 18px; }
.page-hero h1 { color: #17202b; font-size: clamp(32px, 5vw, 54px); max-width: 870px; }
.page-hero p { color: var(--muted); max-width: 760px; line-height: 1.7; }

.home-store-titlebar .page-titlebar-inner { padding-top: 22px; padding-bottom: 16px; }
.home-store-titlebar h1 { max-width: 880px; }
.home-service-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}
.home-service-pills a {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 9px 13px;
    color: #202936;
    font-size: 13px;
    font-weight: 900;
    box-shadow: var(--shadow-soft);
}
.home-service-pills a:hover { color: var(--red); border-color: #ffcfd4; }
.home-inventory-page { padding-top: 14px; }
.home-inventory-page .inventory-toolbar h2 {
    color: #17202b;
    font-size: clamp(28px, 4vw, 42px);
    margin: 0;
    letter-spacing: -.035em;
}
.compact-services-section { padding-top: 12px; }

.inventory-page { max-width: var(--max); margin: 0 auto; padding: 18px 16px 34px; }
.inventory-layout { display: grid; grid-template-columns: 255px minmax(0, 1fr); gap: 18px; align-items: start; }
.filter-sidebar {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: var(--shadow-soft);
    position: sticky;
    top: 106px;
    overflow: hidden;
}
.filter-header { background: #f9fbfd; padding: 14px 15px; border-bottom: 1px solid var(--line); }
.filter-header h3 { margin: 0; color: #17202b; font-size: 16px; }
.filter-sidebar form { padding: 14px; display: grid; gap: 12px; }
.filter-shortcuts { border-top: 1px solid var(--line); padding: 12px 14px 14px; display: grid; gap: 8px; }
.filter-shortcuts a { display: flex; justify-content: space-between; align-items: center; padding: 9px 10px; background: #f6f8fb; border-radius: 8px; color: #344050; font-size: 13px; font-weight: 800; }
.filter-shortcuts small { color: var(--muted-2); }
.inventory-main { min-width: 0; }
.inventory-alert {
    background: var(--yellow);
    color: #252c34;
    padding: 12px 14px;
    border-radius: 3px;
    font-weight: 900;
    font-size: 13px;
    margin-bottom: 12px;
}
.inventory-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 13px;
}
.inventory-toolbar h1 { color: #17202b; font-size: clamp(28px, 4vw, 42px); margin: 0; letter-spacing: -.035em; }
.inventory-toolbar p { margin: 4px 0 0; color: var(--muted); }
.sort-box { width: 180px; }
.customers-section { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-top: 16px; }
.customer-grid, .testimonial-grid { max-width: var(--max); margin: 0 auto; padding: 26px 16px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.customer-card, .testimonial-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-soft); overflow: hidden; }
.customer-card img { height: 130px; width: 100%; object-fit: cover; background: #d8dee6; }
.customer-card div, .testimonial-card { padding: 14px; }
.customer-card strong, .testimonial-card strong { display: block; color: #17202b; margin-bottom: 4px; }
.customer-card span, .testimonial-card p { color: var(--muted); font-size: 13px; line-height: 1.45; }
.newsletter-bar { background: var(--dark); color: #fff; }
.newsletter-inner { max-width: var(--max); margin: 0 auto; padding: 18px 16px; display: grid; grid-template-columns: 1fr 1.6fr; gap: 14px; align-items: center; }
.newsletter-inner h3 { margin: 0; color: var(--yellow); font-size: 22px; }
.newsletter-inner form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; }
.site-footer { background: #4f5964; color: #eef2f6; }
.footer-inner { max-width: var(--max); margin: 0 auto; padding: 28px 16px 34px; display: grid; grid-template-columns: 1.1fr repeat(3, .75fr) 1fr; gap: 24px; }
.footer-logo { width: 118px; margin-bottom: 10px; }
.site-footer h3 { margin: 0 0 10px; font-size: 14px; color: #fff; }
.site-footer p, .site-footer a { color: #dbe2ea; font-size: 13px; line-height: 1.55; }
.footer-list { display: grid; gap: 7px; }
.legal-bar { background: #fff; color: #6f7b89; font-size: 12px; padding: 10px 16px; text-align: center; }
.float-whatsapp {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 70;
    background: var(--green);
    color: #fff;
    border-radius: 999px;
    padding: 14px 18px;
    font-weight: 1000;
    box-shadow: 0 12px 30px rgba(0,0,0,.24);
}
.content-grid { max-width: var(--max); margin: 0 auto; padding: 18px 16px 42px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, .86fr); gap: 18px; align-items: start; }
.content-box { padding: clamp(20px, 4vw, 30px); }
.content-box h2 { margin-top: 0; color: #17202b; }
.content-box p { color: var(--muted); line-height: 1.7; }
.notice { border-left: 5px solid var(--yellow); background: #fffbea; padding: 14px; border-radius: 10px; color: #424b55; }
.vehicle-detail { max-width: var(--max); margin: 0 auto; padding: 22px 16px 42px; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(330px, .85fr); gap: 18px; align-items: start; }
.gallery { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px; box-shadow: var(--shadow-soft); }
.main-photo { width: 100%; height: 520px; object-fit: cover; border-radius: 10px; background: #d8dee6; }
.thumbs { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-top: 8px; }
.thumbs img { height: 74px; object-fit: cover; border-radius: 8px; cursor: pointer; border: 2px solid transparent; }
.thumbs img:hover { border-color: var(--red); }
.detail-panel { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px; box-shadow: var(--shadow-soft); position: sticky; top: 106px; }
.detail-panel h1 { color: #17202b; font-size: clamp(26px, 4vw, 42px); margin: 10px 0; }
.features { columns: 2; color: #344050; line-height: 1.95; }
.table-wrap { overflow-x: auto; background: #fff; border-radius: 14px; color: #111; border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; min-width: 780px; }
th, td { padding: 13px; border-bottom: 1px solid #edf1f5; text-align: left; vertical-align: top; }
th { background: #f7f9fc; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: #344050; }
.admin-body { display: grid; grid-template-columns: 270px 1fr; background: #f4f6f9; color: #181820; min-height: 100vh; }
.admin-sidebar { background: #07090d; color: #fff; padding: 18px; position: sticky; top: 0; height: 100vh; overflow: auto; }
.admin-logo img { width: 150px; margin: 0 auto 18px; }
.admin-sidebar nav { display: grid; gap: 8px; }
.admin-sidebar a { padding: 12px 14px; border-radius: 10px; font-weight: 900; color: #fff; }
.admin-sidebar a:hover { background: rgba(237,28,36,.22); }
.admin-main { padding: 18px; }
.admin-topbar { display: flex; align-items: center; justify-content: space-between; background: #fff; border-radius: 14px; padding: 16px; margin-bottom: 18px; box-shadow: var(--shadow-soft); }
.admin-topbar span { display: block; color: #777; font-size: 13px; }
.admin-menu-toggle { display: none; }
.admin-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.admin-stat strong { display: block; font-size: 34px; color: var(--red); }
.admin-form { display: grid; gap: 14px; }
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 18px; background: linear-gradient(135deg, #eef2f6, #ffffff); }
.login-box { width: min(430px, 100%); padding: 28px; }
.login-box img { width: 170px; margin: 0 auto 12px; }
.alert { padding: 12px 14px; border-radius: 10px; margin: 12px 0; font-weight: 800; }
.alert-error { background: #ffe6e8; color: #9d1018; }
.alert-ok { background: #e9ffef; color: #147433; }
@media (min-width: 1180px) {
    .inventory-main .vehicle-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1080px) {
    .header-inner { grid-template-columns: 132px 1fr auto; }
    .header-whatsapp { display: none; }
    .main-nav a { font-size: 12px; padding: 10px 8px; }
    .vehicle-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .quick-services { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
    .site-topbar-inner { display: block; text-align: center; }
    .header-inner { grid-template-columns: 112px 1fr 46px; min-height: 72px; }
    .brand img { width: 104px; }
    .menu-toggle { display: inline-flex; align-items: center; justify-content: center; justify-self: end; }
    .main-nav { position: fixed; top: 104px; left: 12px; right: 12px; display: none; flex-direction: column; align-items: stretch; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 10px; box-shadow: var(--shadow); }
    .main-nav.is-open { display: flex; }
    .main-nav a { padding: 13px; background: #f8fafc; font-size: 14px; }
    .header-actions { justify-content: end; }
    .hero-portal, .content-grid, .vehicle-detail, .inventory-layout, .newsletter-inner { grid-template-columns: 1fr; }
    .filter-sidebar { position: static; }
    .hero-copy { min-height: auto; }
    .customer-grid, .testimonial-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .footer-inner { grid-template-columns: 1fr 1fr; }
    .detail-panel { position: static; }
    .admin-body { grid-template-columns: 1fr; }
    .admin-sidebar { position: fixed; left: -290px; width: 270px; z-index: 80; transition: .2s; }
    .admin-sidebar.is-open { left: 0; }
    .admin-menu-toggle { display: inline-flex; border: 0; border-radius: 9px; background: var(--red); color: #fff; padding: 10px 14px; }
    .admin-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
    body { font-size: 14px; }
    .site-topbar { display: none; }
    .main-nav { top: 78px; }
    .hero-portal { margin-top: 12px; padding-bottom: 12px; }
    .hero-copy, .hero-search, .service-card, .content-box, .finance-box { border-radius: 13px; }
    .actions, .section-head, .inventory-toolbar { display: block; }
    .actions .btn, .section-head .btn { width: 100%; margin-top: 8px; }
    .form-grid, .form-grid-3, .cards, .vehicle-grid, .quick-services, .customer-grid, .testimonial-grid, .newsletter-inner form, .admin-grid { grid-template-columns: 1fr; }
    .vehicle-media { height: 220px; }
    .main-photo { height: 330px; }
    .thumbs { grid-template-columns: repeat(4, 1fr); }
    .thumbs img { height: 64px; }
    .footer-inner { grid-template-columns: 1fr; }
    .float-whatsapp { left: 12px; right: 12px; bottom: 12px; text-align: center; display: flex; justify-content: center; }
}
