/* ==================== CORES DO SITE ====================
   Para mudar as cores do site inteiro, edite SOMENTE os valores abaixo.
   --bg      : cor principal (fundo do site, topo, rodape)
   --silver  : cor secundaria clara (textos e detalhes)
   --red     : cor secundaria vermelha (botoes, destaques)
   As demais sao tons derivados dessas tres e se ajustam sozinhos. */
:root {
    --bg: #080808;
    --silver: #CDCBCA;
    --red: #D41514;

    --red-dark: color-mix(in srgb, var(--red) 78%, #000);
    --surface: color-mix(in srgb, var(--silver) 7%, var(--bg));
    --line: color-mix(in srgb, var(--silver) 18%, var(--bg));
    --muted: color-mix(in srgb, var(--silver) 62%, var(--bg));
}

/* ==================== RESET & BASE ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--silver);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

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

/* ==================== HEADER ==================== */
header {
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 15px rgba(0,0,0,0.5);
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
    transition: height 0.3s ease;
}

.logo {
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    font-size: 1.4rem;
    color: var(--silver);
    letter-spacing: 0;
}

.logo span {
    color: var(--red);
}

/* LOGO COM IMAGEM: tamanho da imagem do logo (topo e rodapé).
   Para a logo ficar maior/menor, mude o "height" abaixo. */
.logo-img {
    height: 66px;
    width: auto;
    display: block;
    transition: height 0.3s ease;
}

.footer-logo {
    height: 44px;
    width: auto;
    display: block;
    margin: 0 auto 12px;
}

nav {
    display: flex;
    gap: 30px;
    align-items: center;
}

nav a {
    color: var(--muted);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    transition: color 0.2s;
    padding: 20px 0;
}

nav a {
    position: relative;
}

nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 12px;
    width: 100%;
    height: 2px;
    background: var(--red);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

nav a:hover {
    color: var(--silver);
}

nav a:hover::after {
    transform: scaleX(1);
}

.header-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #1FA855; /* verde do WhatsApp. Para ficar vermelho como o resto do site, troque por var(--red) aqui e no :hover abaixo */
    color: #fff;
    padding: 10px 22px;
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    border-radius: 4px;
    transition: background 0.2s;
}

.header-cta:hover {
    background: #178a45;
}

.menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--silver);
    font-size: 1.6rem;
    cursor: pointer;
}

/* ==================== HERO ==================== */
/* Foto da fachada de fundo + degradê escuro/vermelho por cima + detalhes vermelhos.
   Para deixar a foto mais visivel, diminua os numeros 0.92 / 0.72 / 0.6 abaixo (ex.: 0.7 / 0.5 / 0.4). */
.hero {
    background-color: var(--bg);
    background-image:
        linear-gradient(100deg, rgba(8,8,8,0.92) 0%, rgba(8,8,8,0.72) 48%, rgba(212,21,20,0.60) 100%),
        url('images/fachada.jpg');
    background-size: cover;
    background-position: center 62%;
    position: relative;
    padding: 100px 40px 100px;
    overflow: hidden;
    border-top: 4px solid var(--red);
}

/* faixas vermelhas inclinadas (detalhe) */
.hero::before {
    content: "";
    position: absolute;
    top: 0;
    right: -60px;
    width: 340px;
    height: 100%;
    background: repeating-linear-gradient(
        115deg,
        rgba(212,21,20,0.85) 0 18px,
        transparent 18px 46px
    );
    opacity: 0.55;
    z-index: 1;
    animation: stripesIn 1.4s cubic-bezier(.22,.61,.36,1) both;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 60%);
    mask-image: linear-gradient(90deg, transparent, #000 60%);
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
    padding-left: 22px;
    border-left: 6px solid var(--red);
}

.hero-eyebrow {
    display: inline-block;
    color: #ff4d4a;
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.hero h1 span {
    color: #ff3b38;
}

.hero h1 {
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    font-size: 2.73rem;
    color: #fff;
    letter-spacing: 0;
    line-height: 1.1;
    margin-bottom: 16px;
}

.hero p {
    font-size: 1rem;
    color: rgba(255,255,255,0.88);
    font-weight: 500;
    margin-bottom: 28px;
}

.hero-btn {
    display: inline-block;
    background: var(--red);
    color: #fff;
    box-shadow: 0 4px 18px rgba(212,21,20,0.45);
    padding: 14px 36px;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    border-radius: 4px;
    transition: background 0.2s;
}

.hero-btn:hover {
    background: var(--red-dark);
}

/* base do banner: degrade que se funde com o preto da proxima secao (sem linha) */
.hero-angle {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 180px;
    background: linear-gradient(to bottom, rgba(8,8,8,0) 0%, rgba(8,8,8,0.6) 55%, var(--bg) 100%);
    z-index: 1;
}

/* ==================== INVENTORY LAYOUT ==================== */
/* Foto do escritorio de fundo, bem escurecida; o topo e a base se fundem no preto.
   Para a foto aparecer mais, diminua o 0.88 (ex.: 0.75). Para sumir mais, aumente (ex.: 0.94). */
.inventory-section {
    padding: 70px 0 110px;
    background-color: var(--bg);
    background-image:
        linear-gradient(to bottom, var(--bg) 0, rgba(8,8,8,0) 240px, rgba(8,8,8,0) calc(100% - 280px), var(--bg) 100%),
        linear-gradient(rgba(8,8,8,0.88), rgba(8,8,8,0.88)),
        url('images/escritorio.jpg');
    background-size: cover;
    background-position: center 30%;
}

.inventory-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 30px;
    align-items: start;
}

/* SIDEBAR */
.filters-sidebar {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 24px 20px;
    position: sticky;
    top: 80px;
}

.filters-sidebar h3 {
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    font-size: 1.17rem;
    color: var(--silver);
    letter-spacing: 0;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--red);
}

.filter-group {
    margin-bottom: 20px;
}

.filter-label {
    display: block;
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 8px;
}

.filters-sidebar select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 4px;
    font-size: 0.85rem;
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--silver);
    cursor: pointer;
    transition: border-color 0.2s;
}

.filters-sidebar select:focus {
    outline: none;
    border-color: var(--red);
}

.filters-sidebar select option {
    background: var(--bg);
}

.filter-clear {
    width: 100%;
    padding: 12px;
    background: var(--red);
    color: #fff;
    border: none;
    border-radius: 4px;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    cursor: pointer;
    margin-top: 8px;
    transition: background 0.2s;
}

.filter-clear:hover {
    background: var(--red-dark);
}

/* MAIN CARS */
.cars-main {
    min-width: 0;
}

.cars-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 20px;
}

.cars-header h2 {
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    font-size: 1.4rem;
    letter-spacing: 0;
    color: var(--silver);
}

.results-count {
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.car-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

/* CAR CARD */
.car-card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--line);
    transition: border-color 0.3s, box-shadow 0.3s, translate 0.3s ease;
}

.car-card:hover {
    border-color: var(--red);
    box-shadow: 0 8px 26px rgba(212,21,20,0.14);
    translate: 0 -4px;
}

.car-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    background: var(--line);
    transition: transform 0.5s ease;
}

.car-card:hover .car-img {
    transform: scale(1.04);
}

.car-info {
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.car-info .btn-view {
    margin-top: auto;
}

.car-info h3 {
    font-family: 'Sora', sans-serif;
    font-size: 0.99rem;
    font-weight: 700;
    color: var(--silver);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.car-details {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.car-details span {
    font-size: 0.7rem;
    color: var(--muted);
    font-weight: 600;
}

.car-details span::after {
    content: " •";
    color: var(--line);
    margin-left: 6px;
}

.car-details span:last-child::after {
    content: "";
}

.car-separator {
    height: 2px;
    background: linear-gradient(90deg, var(--red), transparent);
    margin-bottom: 12px;
    border-radius: 1px;
}

.btn-view {
    display: block;
    width: 100%;
    padding: 10px;
    border: 2px solid var(--silver);
    background: transparent;
    color: var(--silver);
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.8rem;
    cursor: pointer;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
}

.btn-view:hover {
    background: var(--silver);
    color: var(--bg);
}

.load-more-wrap {
    text-align: center;
    margin-top: 24px;
}

.btn-load-more {
    background: var(--red);
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 14px 40px;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-load-more:hover {
    background: var(--red-dark);
}

.no-results {
    text-align: center;
    color: var(--muted);
    font-size: 1rem;
    padding: 50px 0;
}

/* ==================== MODAL ==================== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(8,8,8,0.88);
    z-index: 200;
    justify-content: center;
    align-items: center;
    padding: 20px;
    backdrop-filter: blur(4px);
}

.modal-overlay.active {
    display: flex;
    animation: fadeIn 0.25s ease both;
}

.modal-overlay.active .modal {
    animation: modalIn 0.35s cubic-bezier(.22,.61,.36,1) both;
}

.modal {
    background: var(--surface);
    border-radius: 10px;
    max-width: 580px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    border-top: 4px solid var(--red);
}

/* Carousel */
.carousel {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: var(--line);
    touch-action: pan-y;
    -webkit-user-select: none;
    user-select: none;
}

.modal-img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
    transition: opacity 0.2s ease;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.7);
    color: #fff;
    border: none;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    font-size: 1.4rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    z-index: 2;
    line-height: 1;
}

.carousel-btn:hover {
    background: var(--red);
}

.carousel-prev { left: 10px; }
.carousel-next { right: 10px; }

.carousel-counter {
    position: absolute;
    bottom: 10px;
    right: 12px;
    background: rgba(0,0,0,0.7);
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1px;
    z-index: 2;
}

.modal-body {
    padding: 24px;
}

.modal-body h2 {
    font-family: 'Sora', sans-serif;
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--silver);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.modal-specs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 24px;
}

.modal-specs div {
    background: var(--bg);
    padding: 12px;
    border-radius: 6px;
    border-left: 3px solid var(--red);
}

.modal-specs div small {
    display: block;
    color: var(--muted);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 2px;
    font-weight: 700;
}

.modal-specs div strong {
    font-size: 0.95rem;
    color: var(--silver);
}

.modal-actions {
    display: flex;
    gap: 12px;
}

.modal-actions a, .modal-actions button {
    flex: 1;
    padding: 14px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.8rem;
    text-align: center;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    border: none;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.modal-close {
    background: var(--line);
    color: var(--silver);
}

.modal-close:hover {
    background: var(--silver);
    color: var(--bg);
}

.modal-whatsapp {
    background: var(--red);
    color: #fff;
    display: inline-block;
}

.modal-whatsapp:hover {
    background: var(--red-dark);
}

/* ==================== LOCATION ==================== */
/* Foto da placa de fundo, bem escurecida e com as bordas se fundindo no preto.
   Para a foto aparecer mais, diminua o 0.86 (ex.: 0.7). Para sumir mais, aumente (ex.: 0.93). */
.location-section {
    background-color: var(--bg);
    background-image:
        linear-gradient(to bottom, var(--bg) 0, rgba(8,8,8,0) 240px, rgba(8,8,8,0) calc(100% - 280px), var(--bg) 100%),
        linear-gradient(rgba(8,8,8,0.86), rgba(8,8,8,0.86)),
        url('images/placa.jpg');
    background-size: cover;
    background-position: center 30%;
    padding: 90px 0;
}

.location-section h2 {
    text-align: center;
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    font-size: 1.72rem;
    letter-spacing: 0;
    color: var(--silver);
    margin-bottom: 8px;
}

.location-text {
    text-align: center;
    color: var(--muted);
    font-size: 0.9rem;
    margin-bottom: 35px;
}

.location-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: start;
}

.location-map iframe {
    display: block;
}

.info-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 28px 24px;
}

.info-item {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    margin-bottom: 20px;
}

.info-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.info-item strong {
    display: block;
    color: var(--silver);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 2px;
}

.info-item p {
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

.info-item a {
    color: var(--red);
    transition: color 0.2s;
}

.info-item a:hover {
    color: var(--silver);
}

.contact-btn {
    display: block;
    text-align: center;
    margin-top: 8px;
    padding: 14px;
    background: var(--red);
    color: #fff;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: background 0.2s;
}

.contact-btn:hover {
    background: var(--red-dark);
}

/* ==================== FOOTER ==================== */
footer {
    background: var(--bg);
    padding: 20px 0;
}

footer p {
    color: var(--muted);
    font-size: 0.75rem;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ==================== ANIMACOES (minimalistas) ====================
   Para DESLIGAR tudo: apague este bloco ate o final da secao e a parte "ANIMACOES" do script.js.
   Para deixar mais lento/rapido: mude os tempos (0.7s, 0.8s...) abaixo.
   Quem ativa "reduzir movimento" no celular/computador NAO ve animacao (acessibilidade). */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 90px;
}

@keyframes heroIn {
    from { opacity: 0; transform: translateY(22px); }
    to   { opacity: 1; transform: none; }
}

@keyframes stripesIn {
    from { transform: translateX(90px); }
    to   { transform: none; }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes modalIn {
    from { opacity: 0; transform: translateY(18px) scale(0.97); }
    to   { opacity: 1; transform: none; }
}

/* banner: textos entram um depois do outro */
.hero-eyebrow { animation: heroIn 0.8s cubic-bezier(.22,.61,.36,1) 0.1s both; }
.hero h1      { animation: heroIn 0.8s cubic-bezier(.22,.61,.36,1) 0.25s both; }
.hero p       { animation: heroIn 0.8s cubic-bezier(.22,.61,.36,1) 0.4s both; }
.hero-btn     { animation: heroIn 0.8s cubic-bezier(.22,.61,.36,1) 0.55s both; }

/* aparecer ao rolar, tanto descendo quanto subindo (as classes sao colocadas pelo script.js).
   Ao sair da tela o elemento volta ao estado inicial (rapido); ao voltar, anima de novo. */
.reveal {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 0.35s ease, transform 0.35s ease, translate 0.3s ease, border-color 0.3s, box-shadow 0.3s;
}

.reveal.reveal-left  { transform: translateX(-28px); }
.reveal.reveal-right { transform: translateX(28px); }

.reveal.in {
    opacity: 1;
    transform: none;
    transition:
        opacity 0.7s ease var(--d, 0ms),
        transform 0.7s cubic-bezier(.22,.61,.36,1) var(--d, 0ms),
        translate 0.3s ease,
        border-color 0.3s,
        box-shadow 0.3s;
}

/* header fica mais compacto ao rolar a pagina */
header.scrolled .header-inner { height: 66px; }
header.scrolled .logo-img     { height: 52px; }
header.scrolled               { box-shadow: 0 6px 24px rgba(0,0,0,0.7); border-bottom-color: var(--red); }

@media (max-width: 768px) {
    nav a::after { display: none; }
    html { scroll-padding-top: 76px; }
}

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

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1024px) {
    .car-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .location-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .menu-btn {
        display: block;
    }

    nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg);
        flex-direction: column;
        padding: 16px 20px;
        gap: 0;
        border-top: 1px solid var(--line);
    }

    nav.active {
        display: flex;
    }

    nav a {
        padding: 12px 0;
        border-bottom: 1px solid var(--line);
    }

    .header-cta {
        display: none;
    }

    .hero {
        padding: 60px 20px 60px;
        background-position: 62% center;
    }

    .hero::before {
        width: 160px;
        opacity: 0.4;
    }

    .hero-content {
        padding-left: 16px;
        border-left-width: 5px;
    }

    .hero h1 {
        font-size: 1.7rem;
    }

    .inventory-layout {
        grid-template-columns: 1fr;
    }

    .filters-sidebar {
        position: static;
        border-radius: 8px;
    }


    /* CELULAR: carros em 2 colunas, cards menores */
    .car-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .car-img {
        height: 105px;
    }

    .car-info {
        padding: 10px;
    }

    .car-info h3 {
        font-size: 0.72rem;
        letter-spacing: 0;
        line-height: 1.3;
    }

    .car-details {
        gap: 2px 5px;
        margin-bottom: 8px;
    }

    .car-details span {
        font-size: 0.62rem;
    }

    .car-details span::after {
        margin-left: 5px;
    }

        .car-separator {
        margin-bottom: 8px;
    }

    .btn-view {
        padding: 8px;
        font-size: 0.7rem;
        letter-spacing: 1px;
    }

    .cars-header h2 {
        font-size: 1.2rem;
    }


    .modal-specs {
        grid-template-columns: 1fr;
    }

    .modal-img {
        height: 220px;
    }

    .carousel-btn {
        width: 36px;
        height: 36px;
        font-size: 1.2rem;
    }
}

@media (max-width: 400px) {
    .hero h1 {
        font-size: 1.45rem;
    }

    .modal-actions {
        flex-direction: column;
    }
}
