/* Identidade visual — Magistral (ParaType) */
@font-face {
    font-display: swap;
    font-family: "Magistral";
    font-style: normal;
    font-weight: 300;
    src: url("../fonts/magistral/magistral-light.otf") format("opentype");
}

@font-face {
    font-display: swap;
    font-family: "Magistral";
    font-style: italic;
    font-weight: 300;
    src: url("../fonts/magistral/magistral-light-italic.otf") format("opentype");
}

@font-face {
    font-display: swap;
    font-family: "Magistral";
    font-style: normal;
    font-weight: 400;
    src: url("../fonts/magistral/magistral-book.otf") format("opentype");
}

@font-face {
    font-display: swap;
    font-family: "Magistral";
    font-style: italic;
    font-weight: 400;
    src: url("../fonts/magistral/magistral-book-italic.otf") format("opentype");
}

@font-face {
    font-display: swap;
    font-family: "Magistral";
    font-style: normal;
    font-weight: 700;
    src: url("../fonts/magistral/magistral-bold.otf") format("opentype");
}

@font-face {
    font-display: swap;
    font-family: "Magistral";
    font-style: italic;
    font-weight: 700;
    src: url("../fonts/magistral/magistral-bold-italic.otf") format("opentype");
}

@font-face {
    font-display: swap;
    font-family: "Magistral";
    font-style: normal;
    font-weight: 800;
    src: url("../fonts/magistral/magistral-extrabold.otf") format("opentype");
}

/* Medium ausente no pacote — mapeia para Book (evita síntese do navegador) */
@font-face {
    font-display: swap;
    font-family: "Magistral";
    font-style: normal;
    font-weight: 500;
    src: url("../fonts/magistral/magistral-book.otf") format("opentype");
}

:root {
    --portal-font-family: "Magistral", "Segoe UI", sans-serif;
    --font-family-sans-serif: var(--portal-font-family);
}

html {
    font-family: var(--portal-font-family);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body,
button,
input,
select,
textarea {
    font-family: var(--portal-font-family);
}

h1,
h2,
h3,
h4,
h5,
h6,
.h1,
.h2,
.h3,
.h4,
.h5,
.h6 {
    font-family: var(--portal-font-family);
    font-weight: 700;
}

/* Títulos de hero — Extra Bold, ritmo editorial */
.portal-hero-title,
main.page-conta .conta-page-title {
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.12;
}

.portal-hero-eyebrow,
main.page-conta .conta-page-eyebrow {
    font-weight: 700;
    letter-spacing: 0.12em;
}

.home-page .home-section-heading,
.home-page .home-section-title,
.home-page .home-hero-title {
    font-weight: 700;
}

.home-page .home-about-eyebrow,
.home-page .home-section-sub {
    font-weight: 400;
}

.home-page .home-section-text,
.home-page .home-about-feature-text {
    font-weight: 400;
}

.home-page .portal-landing-hero {
    background: linear-gradient(135deg, #0a2e4a 0%, #1565a8 50%, #0d2137 100%);
    min-height: 380px;
}

.home-page .portal-landing-hero .portal-card h2,
.home-page .portal-landing-hero .portal-card h3 {
    font-weight: 700;
}

/* —— Selo loja verificada —— */
.portal-selo-verificada {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    line-height: 1.2;
}

.portal-selo-verificada--chip {
    color: #0d6b4f;
    background: rgba(13, 107, 79, 0.1);
    border: 1px solid rgba(13, 107, 79, 0.25);
    border-radius: 999px;
    padding: 0.2rem 0.55rem;
}

.portal-selo-verificada--hero {
    background: rgba(13, 107, 79, 0.2);
    border-color: rgba(120, 255, 200, 0.35);
    color: #b8f5dc;
}

.portal-selo-verificada--foto {
    position: absolute;
    bottom: 8px;
    left: 8px;
    z-index: 3;
    width: 1.65rem;
    height: 1.65rem;
    border-radius: 50%;
    background: #0d6b4f;
    color: #fff;
    justify-content: center;
    font-size: 0.75rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Badges do card — Combina com você + Loja verificada lado a lado, acima do título */
.portal-card-badges-row {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.5rem;
    pointer-events: none;
}

.portal-card-badges-row .portal-pref-badge {
    bottom: auto !important;
    left: auto !important;
    max-width: none;
    position: static !important;
}

.box-card-product .portal-card-badges-row .portal-selo-verificada--chip {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

/* —— CTA fixo mobile (anúncio) —— */
@media (max-width: 991.98px) {
    .page-anuncio.page-portal {
        padding-bottom: calc(4.5rem + env(safe-area-inset-bottom, 0px));
    }

    .anuncio-mobile-cta {
        display: flex;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1040;
        gap: 0;
        background: #fff;
        border-top: 1px solid rgba(0, 0, 0, 0.08);
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }

    .anuncio-mobile-cta__btn {
        flex: 1 1 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0.15rem;
        min-height: 3.5rem;
        padding: 0.4rem 0.25rem;
        border: none;
        background: transparent;
        color: #1a4a7a;
        font-size: 0.65rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.03em;
        text-decoration: none;
        cursor: pointer;
        border-right: 1px solid rgba(0, 0, 0, 0.06);
    }

    .anuncio-mobile-cta__btn:last-child {
        border-right: none;
    }

    .anuncio-mobile-cta__btn i {
        font-size: 1.15rem;
    }

    .anuncio-mobile-cta__btn--whatsapp {
        color: #128c7e;
    }

    .anuncio-mobile-cta__btn--whatsapp i {
        color: #25d366;
    }

    .anuncio-mobile-cta__btn--favorito.is-active {
        color: #c0392b;
    }

    .anuncio-mobile-cta__btn--favorito.is-active i {
        color: #e74c3c;
    }

    .anuncio-mobile-cta__btn--contato {
        color: #0050e9;
    }
}

@media (min-width: 992px) {
    .anuncio-mobile-cta {
        display: none !important;
    }
}

/* —— Imagens otimizadas (WebP + lazy) —— */
.portal-veiculo-picture {
    display: block;
    width: 100%;
    height: 100%;
}

.portal-veiculo-picture img,
.galeria-item__img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.galeria-item__link {
    display: block;
    width: 100%;
    height: 100%;
}

.galeria-item .portal-veiculo-picture,
.galeria-item.preview .portal-veiculo-picture {
    height: auto;
}

.galeria-item.preview .portal-veiculo-picture img,
.galeria-item__thumb {
    width: 72px;
    height: 72px;
    object-fit: cover;
}

/* Cards de listagem — foto preenche o slot 4:3 sem faixa cinza abaixo */
.box-card-product .veiculo-card-foto .portal-veiculo-picture {
    aspect-ratio: 4 / 3;
    background: #f0f4f8;
    display: block;
    height: auto;
    overflow: hidden;
    position: relative;
    width: 100%;
}

.box-card-product .veiculo-card-foto .portal-veiculo-picture img.veiculo-card-foto__img {
    aspect-ratio: unset;
    display: block;
    height: 100%;
    left: 0;
    object-fit: cover;
    position: absolute;
    top: 0;
    width: 100%;
}

/* Perfil de busca — badge na listagem (fluxo normal dentro de .portal-card-badges-row) */
.portal-pref-badge {
    background: linear-gradient(135deg, #f59e0b, #f97316);
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
    color: #fff;
    display: inline-flex;
    align-items: center;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.2;
    padding: 0.35rem 0.5rem;
    white-space: nowrap;
}

.portal-pref-badge i {
    margin-right: 0.2rem;
    font-size: 9px;
}

.portal-pref-toggle {
    margin-left: 0.35rem;
    text-decoration: none;
}

.portal-pref-toggle.is-active {
    background: linear-gradient(135deg, #f59e0b, #f97316);
    border-color: #ea580c;
    color: #fff;
}

.portal-pref-toggle--hint {
    opacity: 0.95;
}

.home-carros-para-voce {
    background: linear-gradient(180deg, #fffbeb 0%, #ffffff 100%);
}

.portal-pref-match-banner {
    align-items: center;
    background: linear-gradient(135deg, #fff7ed, #ffedd5);
    border: 1px solid #fdba74;
    border-radius: 10px;
    color: #9a3412;
    display: flex;
    font-size: 0.9rem;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding: 0.65rem 0.85rem;
}

.portal-pref-match-banner i {
    color: #ea580c;
    flex-shrink: 0;
}

.page-anuncio .portal-pref-match-banner {
    max-width: 100%;
}

#perfil-busca {
    scroll-margin-top: 6.5rem;
}

.conta-card--alert {
    border-color: #fde68a;
    background: linear-gradient(180deg, #fffbeb 0%, #ffffff 100%);
}

.conta-card--alert .conta-card-title {
    color: #92400e;
}
