/* ============================================
   TEMPLATE-1-DEFAULT — estilos do template
   Importa o framework base e adiciona layout
   ============================================ */
@import url('../../../framework/css/base.css');

:root {
    --header-height: 68px;
}

/* Header */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    display: flex;
    align-items: center;
    z-index: 100;
    background-color: var(--color-header-bg);
    color: var(--color-header-text);
    box-shadow: var(--shadow-md);
    transition: background-color .35s ease, box-shadow .35s ease;
}

.site-header--transparent {
    background-color: transparent;
    box-shadow: none;
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-md);
}

.site-nav ul {
    display: flex;
    gap: var(--spacing-lg);
    list-style: none;
}

.site-nav a {
    color: var(--color-header-text);
    font-weight: 500;
    opacity: .85;
}

.site-nav a:hover {
    opacity: 1;
    text-decoration: none;
}

.site-nav a[aria-current="page"] {
    opacity: 1;
    font-weight: 700;
}

/* Agrupa theme-toggle + nav-toggle */
.header-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    flex-shrink: 0;
}

/* Botão hamburguer — oculto no desktop */
.nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--color-header-text);
    font-size: 1.25rem;
    border-radius: var(--border-radius);
    transition: background .15s;
}

.nav-toggle:hover {
    background: rgba(255, 255, 255, .12);
}

/* ── Mobile / tablet portrait ── */
@media (max-width: 1024px) {
    .nav-toggle {
        display: flex;
    }

    /* Nav escondida por padrão no mobile */
    .site-nav {
        display: none;
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        background-color: var(--color-header-bg);
        box-shadow: var(--shadow-md);
        padding: var(--spacing-sm) 0 var(--spacing-md);
        z-index: 99;
        border-top: 1px solid rgba(255, 255, 255, .08);
    }

    /* Quando o menu está aberto */
    .site-header.nav-open .site-nav {
        display: block;
    }

    /* Header sempre opaco quando menu aberto (ignora --transparent) */
    .site-header.nav-open {
        background-color: var(--color-header-bg) !important;
    }

    .site-nav ul {
        flex-direction: column;
        gap: 0;
    }

    .site-nav a {
        display: block;
        padding: var(--spacing-sm) var(--spacing-lg);
        border-bottom: 1px solid rgba(255, 255, 255, .06);
        font-size: 1rem;
    }

    .site-nav li:last-child a {
        border-bottom: none;
    }

    /* Trava scroll do body quando menu aberto */
    body.nav-is-open {
        overflow: hidden;
    }
}

/* Hero — começa no y=0, atrás do header fixo */
.hero {
    min-height: 85dvh;
    display: flex;
    align-items: center;
    padding-top: calc(var(--header-height) + var(--spacing-2xl));
    padding-bottom: var(--spacing-2xl);
    text-align: center;
    position: relative;
    background-image: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    background-size: cover;
    background-position: center;
    color: #fff;
}

.hero > .container {
    width: 100%;
}

/* Quando há imagem de fundo configurada */
.hero.has-bg-image {
    background-image: var(--hero-bg-image);
}

/* Overlay sobre a foto: dark = cor primária, light = branco */
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background: var(--color-primary);
    opacity: 0;
    transition: opacity .35s ease;
}

[data-theme="light"] .hero::before {
    background: #ffffff;
}

.hero.has-bg-image::before {
    opacity: var(--hero-overlay-opacity, 0.65);
}

/* Garante que o conteúdo fique acima do overlay */
.hero>* {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 700;
    margin-bottom: var(--spacing-md);
}

.hero p {
    font-size: 1.1rem;
    opacity: .9;
    max-width: 540px;
    margin-inline: auto;
}

/* ============================================
   WIDGET DE BUSCA (hero)
   ============================================ */

.search-widget {
    margin: var(--spacing-2xl) auto 0;
    background: var(--color-surface);
    border-radius: 12px;
    padding: var(--spacing-lg) var(--spacing-xl);
    max-width: 780px;
    text-align: left;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .22);
}

.search-widget__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-md);
}

.search-widget__title {
    font-size: .82rem;
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: .06em;
}

.search-ref-btn {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    border: none;
    background: none;
    cursor: pointer;
    font-size: .85rem;
    font-weight: 500;
    color: var(--color-primary);
    font-family: var(--font-sans);
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: opacity .15s;
}

.search-ref-btn:hover {
    opacity: .75;
}

/* Abas Comprar / Alugar */
.search-tabs {
    display: flex;
    border-bottom: 2px solid var(--color-border);
    margin-bottom: var(--spacing-lg);
}

.search-tab {
    padding: .45rem var(--spacing-lg) .55rem;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    background: none;
    cursor: pointer;
    font-size: .95rem;
    font-weight: 500;
    color: var(--color-text-muted);
    font-family: var(--font-sans);
    transition: color .15s, border-color .15s;
}

.search-tab.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
    font-weight: 700;
}

.search-tab:hover:not(.active) {
    color: var(--color-text);
}

/* Linha de campos */
.search-fields {
    display: flex;
    gap: var(--spacing-sm);
    align-items: flex-end;
}

.search-fields--ref {
    margin-top: var(--spacing-md);
}

.search-field {
    display: flex;
    flex-direction: column;
    gap: .3rem;
    min-width: 0;
}

.search-field--grow {
    flex: 1;
}

.search-field__label {
    font-size: .78rem;
    font-weight: 500;
    color: var(--color-text-muted);
}

/* Select com chevron customizado */
.search-select-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.search-select-wrap .search-input {
    appearance: none;
    padding-right: 2rem;
    cursor: pointer;
}

.search-select-chevron {
    position: absolute;
    right: .65rem;
    pointer-events: none;
    color: var(--color-text-muted);
    flex-shrink: 0;
}

/* Inputs e select */
.search-input {
    width: 100%;
    padding: .7rem var(--spacing-md);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    font-size: .9rem;
    font-family: var(--font-sans);
    color: var(--color-text);
    background: var(--color-surface);
    transition: border-color .15s, box-shadow .15s;
}

.search-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}

.search-input::placeholder {
    color: #9ca3af;
}

/* Botão pesquisar */
.search-btn {
    flex-shrink: 0;
    padding: .7rem var(--spacing-xl);
    background: var(--color-primary);
    color: #fff;
    border: none;
    border-radius: var(--border-radius);
    font-size: .95rem;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font-sans);
    transition: background .15s, transform .1s;
    white-space: nowrap;
    align-self: flex-end;
}

.search-btn:hover {
    background: var(--color-secondary);
}

.search-btn:active {
    transform: scale(.98);
}

/* Responsivo */
@media (max-width: 640px) {
    .search-widget {
        padding: var(--spacing-md);
        border-radius: 8px;
        margin-top: var(--spacing-xl);
    }

    .search-fields {
        flex-direction: column;
        align-items: stretch;
    }

    .search-btn {
        width: 100%;
        padding: .75rem;
    }

    .search-tab {
        padding-inline: var(--spacing-md);
        font-size: .88rem;
    }
}

/* Cards de imóveis */
.listings {
    padding-block: var(--spacing-2xl);
}

.listings h2 {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-lg);
}

.listings-footer {
    display: flex;
    justify-content: center;
    margin-top: var(--spacing-xl);
}

.listings-all-btn {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    padding: .8rem 2rem;
    border: 2px solid var(--color-primary);
    border-radius: 999px;
    color: var(--color-primary);
    font-weight: 600;
    font-size: .95rem;
    text-decoration: none;
    transition: background .15s, color .15s, transform .15s;
}

.listings-all-btn i {
    transition: transform .15s;
}

.listings-all-btn:hover {
    background: var(--color-primary);
    color: #fff;
    transform: translateY(-2px);
    text-decoration: none;
}

.listings-all-btn:hover i {
    transform: translateX(4px);
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--spacing-lg);
}

.card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: box-shadow .2s, transform .2s;
}

.card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.card__img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    background: var(--color-border);
}

.card__body {
    padding: var(--spacing-md);
}

.card__title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
}

.card__price {
    color: var(--color-primary);
    font-weight: 700;
    font-size: 1.1rem;
}

.card__meta {
    color: var(--color-text-muted);
    font-size: .85rem;
    margin-top: var(--spacing-xs);
}

.card__cta {
    display: inline-block;
    margin-top: var(--spacing-md);
    padding: var(--spacing-xs) var(--spacing-md);
    background: var(--color-primary);
    color: #fff;
    border-radius: var(--border-radius);
    font-size: .9rem;
    font-weight: 500;
}

.card__cta:hover {
    background: var(--color-secondary);
    text-decoration: none;
}

/* ============================================
   BANNER DO RODAPÉ
   ============================================ */
.footer-banner {
    width: 100%;
    height: 260px;
    overflow: hidden;
    position: relative;
}

.footer-banner__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.footer-banner__placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 60%, #0f3460 100%);
}

/* ============================================
   RODAPÉ PRINCIPAL
   ============================================ */
.site-footer {
    background: var(--color-footer-bg);
    color: var(--color-footer-text);
}

.footer-main {
    padding-block: var(--spacing-2xl);
}

.footer-grid {
    display: grid;
    grid-template-columns: 0.9fr 1.4fr 1fr 1fr;
    gap: var(--spacing-2xl);
    align-items: start;
}

/* --- Coluna empresa --- */
.footer-logo-wrap {
    display: inline-block;
    margin-bottom: var(--spacing-md);
}

.footer-logo-wrap img {
    max-height: 100px;
    width: auto;
}

.footer-company-name {
    font-weight: 700;
    font-size: .95rem;
    margin-bottom: var(--spacing-sm);
    color: var(--color-footer-text);
}

.footer-info {
    display: block;
    font-size: .83rem;
    line-height: 1.75;
    color: rgba(255, 255, 255, .6);
}

.footer-info--link {
    text-decoration: none;
    transition: color .15s;
}

.footer-info--link:hover {
    color: rgba(255, 255, 255, .9);
    text-decoration: none;
}

.footer-branch {
    margin-top: var(--spacing-sm);
    padding-top: var(--spacing-sm);
    border-top: 1px solid rgba(255, 255, 255, .1);
}

.footer-branch-name {
    font-weight: 600;
    color: rgba(255, 255, 255, .75);
}

.footer-creci {
    display: block;
    margin-top: var(--spacing-sm);
    font-size: .78rem;
    color: rgba(255, 255, 255, .4);
}

/* --- Coluna menu --- */
.footer-heading {
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .4);
    margin-bottom: var(--spacing-md);
}

.footer-nav {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: .55rem;
}

.footer-nav a {
    color: rgba(255, 255, 255, .65);
    font-size: .88rem;
    text-decoration: none;
    transition: color .15s;
}

.footer-nav a:hover {
    color: var(--color-footer-text);
    text-decoration: none;
}

.footer-nav--legal {
    margin-top: var(--spacing-md);
    padding-top: var(--spacing-md);
    border-top: 1px solid rgba(255, 255, 255, .1);
}

.footer-nav--legal a {
    font-size: .78rem;
    opacity: .5;
}

.footer-nav--legal a:hover {
    opacity: 1;
}

/* --- Coluna social --- */
.footer-social-icons {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.footer-social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 50%;
    color: rgba(255, 255, 255, .6);
    text-decoration: none;
    transition: border-color .15s, color .15s;
    flex-shrink: 0;
}

.footer-social-icon:hover {
    border-color: rgba(255, 255, 255, .7);
    color: var(--color-footer-text);
    text-decoration: none;
}

.footer-social-icon svg {
    width: 15px;
    height: 15px;
    fill: currentColor;
}

.footer-social-icon i {
    font-size: .9rem;
    line-height: 1;
}

/* --- Barra inferior --- */
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, .08);
    padding-block: var(--spacing-md);
}

.footer-bottom__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: .78rem;
    color: rgba(255, 255, 255, .35);
}

.footer-credit {
    font-size: .72rem;
    color: rgba(255, 255, 255, .22);
}

.footer-credit strong {
    color: rgba(255, 255, 255, .4);
    font-weight: 600;
}

/* --- Responsivo --- */
@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1.4fr;
        gap: var(--spacing-xl);
    }
}

@media (max-width: 640px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }

    .footer-banner {
        height: 180px;
    }
}

@media (max-width: 768px) {
    .footer-banner {
        height: 180px;
    }
}

@media (max-width: 480px) {
    .footer-banner {
        height: 140px;
    }
}

/* ============================================
   HOME — SEÇÃO NEGOCIE SEU IMÓVEL
   ============================================ */

.home-negocie {
    background: var(--color-bg);
    padding: var(--spacing-2xl) 0;
}

.home-negocie__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
    align-items: stretch;
}

/* Card esquerdo — gradiente primário */
.home-negocie__card {
    background: linear-gradient(145deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    border-radius: calc(var(--border-radius) * 1.5);
    padding: var(--spacing-2xl);
    color: #fff;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.home-negocie__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: rgba(255, 255, 255, .75);
    margin: 0;
}

.home-negocie__title {
    font-size: clamp(1.5rem, 2.8vw, 2.1rem);
    font-weight: 700;
    line-height: 1.2;
    margin: 0;
    color: #fff;
}

.home-negocie__desc {
    font-size: .95rem;
    line-height: 1.65;
    color: rgba(255, 255, 255, .85);
    margin: 0;
    flex: 1;
}

.home-negocie__btn {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    margin-top: var(--spacing-sm);
    padding: .85rem 1.6rem;
    background: #fff;
    color: var(--color-primary);
    font-weight: 700;
    font-size: .95rem;
    font-family: var(--font-sans);
    border-radius: 999px;
    text-decoration: none;
    transition: transform .15s, box-shadow .15s;
    box-shadow: 0 4px 20px rgba(0, 0, 0, .18);
}

.home-negocie__btn i {
    transition: transform .15s;
}

.home-negocie__btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(0, 0, 0, .25);
    text-decoration: none;
}

.home-negocie__btn:hover i {
    transform: translateX(4px);
}

/* Lista de vantagens — card direito */
.home-negocie__features {
    list-style: none;
    margin: 0;
    padding: var(--spacing-xl);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: calc(var(--border-radius) * 1.5);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: var(--spacing-lg);
}

.home-negocie__feature {
    display: flex;
    gap: var(--spacing-md);
    align-items: flex-start;
}

.home-negocie__feature-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 50%;
    background: color-mix(in srgb, var(--color-primary) 12%, transparent);
    color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .9rem;
}

.home-negocie__feature strong {
    display: block;
    font-size: .9rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: .2rem;
}

.home-negocie__feature p {
    font-size: .82rem;
    color: var(--color-text-muted);
    line-height: 1.5;
    margin: 0;
}

@media (max-width: 768px) {
    .home-negocie__grid {
        grid-template-columns: 1fr;
    }

    .home-negocie__btn {
        align-self: stretch;
        justify-content: center;
    }
}

/* ============================================
   HOME — SEÇÃO FINANCIAMENTO CTA
   ============================================ */

.home-finance {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    padding: var(--spacing-2xl) 0;
}

.home-finance__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-xl);
}

.home-finance__content {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.home-finance__eyebrow {
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: rgba(255, 255, 255, .7);
    margin: 0;
}

.home-finance__title {
    font-size: clamp(1.25rem, 2.8vw, 1.75rem);
    font-weight: 700;
    color: #fff;
    margin: 0;
    line-height: 1.2;
}

.home-finance__chips {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    margin-top: var(--spacing-xs);
}

.home-finance__chip {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .3rem .7rem;
    background: rgba(255, 255, 255, .15);
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: .03em;
}

.home-finance__chip::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--c, #fff);
    flex-shrink: 0;
}

.home-finance__btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    padding: .9rem 1.75rem;
    background: #fff;
    color: var(--color-primary);
    font-weight: 700;
    font-size: .95rem;
    font-family: var(--font-sans);
    border-radius: 999px;
    text-decoration: none;
    transition: transform .15s, box-shadow .15s;
    box-shadow: 0 4px 20px rgba(0, 0, 0, .18);
    white-space: nowrap;
}

.home-finance__btn i {
    transition: transform .15s;
}

.home-finance__btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(0, 0, 0, .25);
    text-decoration: none;
}

.home-finance__btn:hover i {
    transform: translateX(4px);
}

@media (max-width: 640px) {
    .home-finance__inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .home-finance__btn {
        width: 100%;
        justify-content: center;
    }
}

/* ============================================
   PAGE HERO — faixa de título para páginas internas
   ============================================ */

.page-hero {
    background: var(--color-header-bg);
    color: var(--color-header-text);
    padding: calc(var(--header-height) + var(--spacing-xl)) 0 var(--spacing-xl);
}

.page-hero__title {
    font-size: clamp(1.5rem, 4vw, 2.25rem);
    font-weight: 700;
    margin: 0 0 var(--spacing-xs);
    line-height: 1.2;
}

.page-hero__subtitle {
    margin: var(--spacing-sm) 0 0;
    font-size: 1rem;
    opacity: .8;
    max-width: 580px;
}

/* ============================================
   PÁGINA DE IMÓVEIS — layout, sidebar, cards
   ============================================ */

.imoveis-page {
    padding-top: calc(var(--header-height) + var(--spacing-lg));
    padding-bottom: var(--spacing-2xl);
    background: var(--color-bg);
    min-height: 60vh;
}

/* Container mais largo que o padrão para aproveitar telas largas */
.imoveis-page .container {
    max-width: 1520px;
    padding-inline: var(--spacing-xl);
}

.imoveis-layout {
    display: flex;
    gap: var(--spacing-lg);
    align-items: flex-start;
}

/* --- Sidebar --- */
.filter-sidebar {
    width: 272px;
    flex-shrink: 0;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    overflow: hidden;
    position: sticky;
    top: calc(var(--header-height) + var(--spacing-md));
    max-height: calc(100vh - var(--header-height) - var(--spacing-md));
    overflow-y: auto;
}

.filter-header {
    padding: var(--spacing-sm) var(--spacing-md);
    font-weight: 700;
    font-size: .75rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    border-bottom: 1px solid var(--color-border);
}

/* Comprar / Alugar tabs */
.filter-tabs {
    display: flex;
    border-bottom: 1px solid var(--color-border);
}

.filter-tab {
    flex: 1;
    padding: .65rem var(--spacing-md);
    border: none;
    border-bottom: 2px solid transparent;
    background: none;
    cursor: pointer;
    font-size: .9rem;
    font-weight: 500;
    color: var(--color-text-muted);
    transition: color .15s, border-color .15s, background .15s;
}

.filter-tab.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
    background: rgba(0, 0, 0, .02);
}

.filter-tab:hover:not(.active) {
    color: var(--color-text);
    background: rgba(0, 0, 0, .02);
}

/* Seções */
.filter-section {
    border-bottom: 1px solid var(--color-border);
}

.filter-section-title {
    padding: var(--spacing-sm) var(--spacing-md) var(--spacing-xs);
    font-weight: 600;
    font-size: .82rem;
    color: var(--color-text);
}

.filter-section-body {
    padding: 0 var(--spacing-md) var(--spacing-md);
}

.filter-label {
    display: block;
    font-size: .78rem;
    color: var(--color-text-muted);
    margin-bottom: .2rem;
}

/* Botões de opção (dormitórios, suítes, vagas) */
.filter-btn-group {
    display: flex;
    gap: .3rem;
    flex-wrap: wrap;
}

.filter-opt-btn {
    padding: .28rem .65rem;
    border: 1px solid var(--color-border);
    border-radius: 20px;
    background: var(--color-surface);
    cursor: pointer;
    font-size: .78rem;
    color: var(--color-text-muted);
    font-family: var(--font-sans);
    transition: border-color .15s, color .15s, background .15s;
}

.filter-opt-btn:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.filter-opt-btn.active {
    border-color: var(--color-primary);
    color: #fff;
    background: var(--color-primary);
    font-weight: 600;
}

/* Inputs de texto e número */
.filter-input {
    width: 100%;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    padding: .4rem .6rem;
    font-size: .82rem;
    color: var(--color-text);
    font-family: var(--font-sans);
    background: var(--color-surface);
    transition: border-color .15s;
}

.filter-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, .12);
}

/* Par min/max lado a lado */
.filter-range-row {
    display: flex;
    gap: var(--spacing-xs);
}

.filter-range-row .filter-input {
    flex: 1;
    min-width: 0;
}

/* Lista de checkboxes */
.filter-checkbox-item {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .22rem 0;
    cursor: pointer;
    font-size: .83rem;
    color: var(--color-text);
    user-select: none;
}

.filter-checkbox-item input[type="checkbox"] {
    accent-color: var(--color-primary);
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    cursor: pointer;
}

/* Botão fechar dentro do header da sidebar (mobile) */
.filter-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.filter-header__close {
    display: none;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 1.1rem;
    color: var(--color-text-muted);
    line-height: 1;
    padding: .2rem;
}

/* Rodapé da sidebar */
.filter-footer {
    padding: var(--spacing-sm) var(--spacing-md) var(--spacing-md);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.filter-clear-btn {
    width: 100%;
    padding: .5rem var(--spacing-md);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    background: none;
    cursor: pointer;
    font-size: .85rem;
    color: var(--color-text-muted);
    font-family: var(--font-sans);
    transition: border-color .15s, color .15s;
}

.filter-clear-btn:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

/* Botão "Ver resultados" — só visível no mobile */
.filter-apply-btn {
    display: none;
    width: 100%;
    padding: .6rem var(--spacing-md);
    border: none;
    border-radius: var(--border-radius);
    background: var(--color-primary);
    color: #fff;
    cursor: pointer;
    font-size: .9rem;
    font-weight: 600;
    font-family: var(--font-sans);
    transition: background .15s;
}

.filter-apply-btn:hover {
    background: var(--color-secondary);
}

/* Overlay escuro atrás do drawer mobile */
.filter-overlay {
    display: none;
}

/* --- Área de resultados --- */
.imoveis-main {
    flex: 1;
    min-width: 0;
}

/* Grid fixo de 3 colunas — responsivo via media queries abaixo */
.imoveis-main .card-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-md);
}

.results-header {
    margin-bottom: var(--spacing-md);
}

.results-count {
    font-size: .9rem;
    color: var(--color-text-muted);
}

.results-count strong {
    color: var(--color-text);
}

/* Barra mobile: contagem + botão filtros (oculta no desktop) */
.mobile-results-bar {
    display: none;
}

.mobile-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .5rem .9rem;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    background: var(--color-surface);
    cursor: pointer;
    font-size: .85rem;
    font-weight: 500;
    font-family: var(--font-sans);
    color: var(--color-text);
    transition: border-color .15s, color .15s;
}

.mobile-filter-btn:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.mobile-filter-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 .3rem;
    background: var(--color-primary);
    color: #fff;
    border-radius: 9px;
    font-size: .7rem;
    font-weight: 700;
}

/* Oculta contagem desktop no mobile */
.desktop-only {
    display: block;
}

/* --- Card enhancements para imoveis --- */
.card__img-wrap {
    position: relative;
}

.card__img--placeholder {
    width: 100%;
    height: 180px;
    background: linear-gradient(135deg, var(--color-border) 0%, #d1d5db 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.card__badge {
    position: absolute;
    top: var(--spacing-sm);
    left: var(--spacing-sm);
    background: var(--color-primary);
    color: #fff;
    font-size: .68rem;
    font-weight: 700;
    padding: .18rem .5rem;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.card__location {
    font-size: .78rem;
    color: var(--color-text-muted);
    margin-bottom: .3rem;
}

.card__features {
    display: flex;
    gap: .75rem;
    flex-wrap: wrap;
    margin-top: var(--spacing-sm);
    font-size: .78rem;
    color: var(--color-text-muted);
}

.card__launch-badge {
    position: absolute;
    bottom: var(--spacing-sm);
    right: var(--spacing-sm);
    background: rgba(0, 0, 0, .62);
    color: #fff;
    font-size: .62rem;
    font-weight: 600;
    padding: .15rem .45rem;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.card__price-from {
    font-size: .78rem;
    font-weight: 400;
    opacity: .75;
}

/* --- Tipologia tabs nos cards --- */
.card-tipologias {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    margin-top: var(--spacing-sm);
    margin-bottom: 2px;
}

.card-tipologia-tab {
    font-size: .7rem;
    padding: .22rem .55rem;
    border: 1px solid var(--color-border);
    border-radius: 100px;
    background: transparent;
    cursor: pointer;
    color: var(--color-text-muted);
    transition: border-color .15s, color .15s, background .15s;
    line-height: 1.4;
    white-space: nowrap;
    text-decoration: none;
    display: inline-block;
}

.card-tipologia-tab:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.card-tipologia-tab.is-active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
}

.card-tipologia-tab--more {
    border-style: dashed;
    color: var(--color-primary);
    border-color: var(--color-primary);
    font-style: italic;
}

.card-tipologia-tab--more:hover {
    background: color-mix(in srgb, var(--color-primary) 10%, transparent);
}

/* --- Tipologia tabs na página de detalhe --- */
.imovel-tipologias {
    margin-bottom: var(--spacing-lg);
}

.imovel-tipologia-tabs {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
    margin-top: var(--spacing-sm);
}

.imovel-tipologia-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--spacing-sm) var(--spacing-md);
    border: 2px solid var(--color-border);
    border-radius: var(--border-radius);
    background: transparent;
    cursor: pointer;
    transition: border-color .15s, background .15s;
    min-width: 80px;
    text-align: center;
}

.imovel-tipologia-tab:hover {
    border-color: var(--color-primary);
}

.imovel-tipologia-tab.is-active {
    border-color: var(--color-primary);
    background: color-mix(in srgb, var(--color-primary) 8%, transparent);
}

.imovel-tipologia-tab__label {
    font-size: .85rem;
    font-weight: 600;
    color: var(--color-text);
    display: block;
}

.imovel-tipologia-tab__area {
    font-size: .72rem;
    color: var(--color-text-muted);
    display: block;
    margin-top: 2px;
}

.imovel-tipologia-tab.is-active .imovel-tipologia-tab__label,
.imovel-tipologia-tab.is-active .imovel-tipologia-tab__area {
    color: var(--color-primary);
}

.imovel-badge--launch {
    background: #d97706;
    color: #fff;
    border-color: #d97706;
}

/* Estado vazio */
.empty-state {
    text-align: center;
    padding: var(--spacing-2xl) var(--spacing-lg);
    color: var(--color-text-muted);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
}

.empty-state__icon {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-sm);
}

.empty-state p+p {
    margin-top: var(--spacing-xs);
    font-size: .9rem;
}

/* --- Responsivo --- */

/* Telas médias (≤1200px): sidebar menor, 2 colunas de cards */
@media (max-width: 1200px) {
    .filter-sidebar {
        width: 232px;
    }

    .imoveis-main .card-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Tablet largo (≤900px): sidebar ainda menor */
@media (max-width: 900px) {
    .filter-sidebar {
        width: 200px;
    }
}

/* Mobile (≤720px): sidebar vira drawer lateral, barra de filtros aparece */
@media (max-width: 720px) {
    .imoveis-page .container {
        padding-inline: var(--spacing-md);
    }

    /* Barra mobile visível */
    .mobile-results-bar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: var(--spacing-md);
        padding: var(--spacing-sm) var(--spacing-md);
        background: var(--color-surface);
        border: 1px solid var(--color-border);
        border-radius: var(--border-radius);
    }

    /* Esconde contagem desktop */
    .desktop-only {
        display: none;
    }

    /* Drawer lateral: sidebar some por padrão */
    .filter-sidebar {
        position: fixed;
        top: 0;
        left: -320px;
        width: 300px;
        height: 100dvh;
        max-height: 100dvh;
        border-radius: 0;
        border: none;
        box-shadow: var(--shadow-md);
        z-index: 200;
        transition: left .25s ease;
        overflow-y: auto;
    }

    /* Drawer aberto */
    .filter-sidebar.is-open {
        left: 0;
    }

    /* Overlay */
    .filter-overlay {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, .45);
        z-index: 199;
    }

    /* Botão fechar visível no drawer */
    .filter-header__close {
        display: block;
    }

    /* Botão "Ver resultados" visível no footer do drawer */
    .filter-apply-btn {
        display: block;
    }

    /* Cards: 2 colunas no mobile (landscape/tablet) */
    .imoveis-main .card-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-sm);
    }

    /* Layout não empilha mais — sidebar é drawer */
    .imoveis-layout {
        display: block;
    }
}

/* Mobile pequeno (≤420px): 1 coluna */
@media (max-width: 420px) {
    .imoveis-main .card-grid {
        grid-template-columns: 1fr;
    }
}