/* ===========================================================================
   LISTAGEM DE IMÓVEIS: RESULTADOS (DOIS CARTÕES POR LINHA) E A LATERAL DE
   FILTROS À DIREITA. ABAIXO DE 992px A LATERAL VIRA GAVETA, ABERTA PELA BARRA
   FIXA DO PÉ DA TELA (VER "FILTROS NO CELULAR", NO FIM).
   O CARTÃO (.cartao-imovel) FICA AQUI PORQUE SÓ A LISTAGEM O USA POR ENQUANTO.
   =========================================================================== */

.listagem {
    margin-bottom: 120px;
}

.listagem__principal,
.listagem__lado {
    flex: 0 0 auto;
    width: 100%;
    padding: 0 15px;
}

@media (min-width: 992px) {
    .listagem__principal { width: 66.66666667%; }
    .listagem__lado { width: 33.33333333%; }
}

/* ENQUANTO OS NOVOS RESULTADOS CHEGAM (listagem.js). */
.listagem--carregando .listagem__resultados {
    opacity: .5;
    pointer-events: none;
    transition: opacity .2s;
}

/* ---- TOTAL E ORDENAÇÃO ------------------------------------------------------ */

.listagem__opcoes {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0 30px;
    margin-bottom: 50px;
    line-height: 50px;
}

.listagem__total {
    margin: 0;
}

.listagem__total strong {
    font-weight: 400;
}

.listagem__total span {
    font-family: var(--fonte-titulo);
    font-weight: 500;
}

.listagem__ordem .seletor,
.listagem__ordem select {
    min-width: 190px;
    height: 50px;
    padding: 0 30px 0 18px;
    border: 2px solid #ededed;
    background-color: #fff;
    font-size: 14px;
    line-height: 46px;
}

.listagem__ordem select {
    appearance: none;
}

.listagem__ordem .seletor__atual {
    font-weight: 700;
}

.listagem__ordem .seletor__opcao {
    padding-right: 5px;
    padding-left: 10px;
}

@media (max-width: 767px) {
    .listagem__opcoes { flex-direction: column; align-items: flex-start; }
    .listagem__opcoes > * { margin: 5px 0; }
}

/* ---- BUSCA POR PALAVRA-CHAVE ---------------------------------------------- */

.listagem__palavra {
    position: relative;
    margin-bottom: 30px;
}

.listagem__palavra input {
    width: 100%;
    height: 60px;
    padding: 0 65px 0 20px;
    border: 2px solid #e4ecf2;
    border-radius: 0;
    background-color: var(--fundo-claro);
    color: var(--texto);
    font-size: 14px;
    font-weight: 600;
    outline: 0;
}

.listagem__palavra input:focus {
    border-color: var(--verde);
}

.listagem__palavra input::placeholder {
    color: #000;
    font-size: 12px;
}

.listagem__palavra button {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    padding: 0 20px;
    border: 1px solid var(--verde);
    background-color: var(--verde);
    color: #fff;
    transition: all .3s ease 0s;
}

.listagem__palavra button:hover {
    border-color: #000;
    background-color: #000;
}

/* ---- CARTÕES: DOIS POR LINHA A PARTIR DE 576px ------------------------------ */

/* CADA CARTÃO COM A PRÓPRIA ALTURA (NÃO ESTICA PARA IGUALAR O VIZINHO). */
.listagem__cartoes {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    align-items: start;
    gap: 0 30px;
}

@media (max-width: 767px) {
    .listagem__cartoes { gap: 0 16px; }
}

@media (max-width: 575px) {
    .listagem__cartoes { grid-template-columns: 1fr; }
}

.cartao-imovel {
    position: relative;
    display: flex;
    flex-direction: column;
    margin-bottom: 50px;
    border: 1px solid #f1f8ff;
    background-color: #fff;
    box-shadow: 0 5px 20px 0 rgba(23, 44, 82, .1);
}

/* FOTO: NO MÁXIMO 175px DE ALTURA, CENTRADA E CORTADA; CRESCE 10% NO HOVER. */
.cartao-imovel__foto {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    max-height: 175px;
    overflow: hidden;
}

.cartao-imovel__foto img {
    display: block;
    transition: all .5s ease 0s;
}

.cartao-imovel:hover .cartao-imovel__foto img {
    transform: scale(1.1);
}

.cartao-imovel__info {
    flex: 1;
    padding: 30px 30px 1px;
}

.cartao-imovel__selo {
    margin-bottom: 15px;
    color: var(--verde);
    font-weight: 600;
    line-height: 25px;
    text-transform: uppercase;
}

.cartao-imovel__titulo {
    margin-bottom: 15px;
    font-size: 22px;
    font-weight: 600;
}

.cartao-imovel__local {
    margin: 1rem 0 0;
    font-size: 14px;
}

.cartao-imovel__local .icone {
    color: var(--verde);
}

.cartao-imovel__dados {
    margin-bottom: 20px;
}

.cartao-imovel__dados li {
    display: inline-block;
    margin: 1rem 10px 0 0;
    font-size: 14px;
}

.cartao-imovel__dados li:last-child {
    margin-right: 0;
}

.cartao-imovel__dados span {
    font-weight: 700;
}

.cartao-imovel__rodape {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 30px 15px;
    border-top: 1px solid #e5eaee;
}

.cartao-imovel__preco {
    margin-bottom: 5px;
    color: var(--verde);
    font-family: var(--fonte-titulo);
    font-size: 18px;
    font-weight: 600;
}

@media (max-width: 991px) {
    .cartao-imovel__info { padding: 30px 20px 1px; }
    .cartao-imovel__titulo { font-size: 20px; }
    .cartao-imovel__rodape { padding: 20px; }
}

@media (max-width: 767px) {
    .cartao-imovel__titulo { font-size: 18px; }
}

@media (max-width: 576px) {
    .cartao-imovel__selo { line-height: 20px; }
}

.listagem__vazio {
    margin: 0 0 50px;
    color: var(--titulo);
    font-family: var(--fonte-titulo);
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
    text-align: center;
}

/* ---- PAGINAÇÃO: CÍRCULOS; A ATIVA E A DO HOVER EM VERDE ----------------------- */

.paginacao {
    text-align: center;
}

.paginacao li {
    display: inline-block;
    margin-right: 10px;
}

.paginacao li:last-child {
    margin-right: 0;
}

.paginacao a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border: 2px solid #ededed;
    border-radius: 100%;
    font-weight: 700;
}

.paginacao li:hover a,
.paginacao .ativa a {
    border-color: var(--verde);
    background-color: var(--verde);
    color: #fff;
}

@media (max-width: 767px) {
    .paginacao li { margin-right: 5px; font-size: 14px; }
    .paginacao a { width: 40px; height: 40px; }
}

/* ---- LATERAL DE FILTROS ------------------------------------------------------- */

.filtros {
    padding: 35px 30px 40px 35px;
    border: 2px solid #ededed;
}

@media (max-width: 1199px) {
    .filtros { padding: 35px 20px 40px; }
}

.filtros__titulo {
    margin-bottom: 25px;
    font-size: 18px;
    font-weight: 600;
}

.filtros__titulo--junto {
    margin-top: 1rem;
}

/* LINHA ENTRE OS GRUPOS: O FIO CLARO DO TEMA MAIS 1px DA COR DO TEXTO, A 25%. */
.filtros hr {
    height: 1px;
    margin: 35px 0;
    border: 0;
    border-top: 1px solid #e1e6ff;
    background-color: currentColor;
    opacity: .25;
}

/* CÓDIGO: CAMPO (80%) E O BOTÃO DA LUPA (18%) NA MESMA LINHA. */
.filtros__codigo {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
}

.filtros__codigo input {
    width: 80%;
    height: 65px;
    padding: 0 20px;
    border: 2px solid #e4ecf2;
    border-radius: 0;
    color: var(--texto);
    font-size: 16px;
    outline: 0;
}

.filtros__codigo input:focus {
    border-color: var(--verde);
}

.filtros__codigo button {
    width: 18%;
    padding: 13px;
    border: 1px solid var(--verde);
    background-color: var(--verde);
    color: #fff;
    font-size: 16px;
    transition: all .3s ease 0s;
}

/* CIDADE E BAIRRO: A CAIXA PADRÃO DO SELETOR (42px, BORDA FINA, CANTO ARREDONDADO). */
.filtros .seletor,
.filtros select {
    width: 100%;
    height: 42px;
    padding: 0 30px 0 18px;
    border: 1px solid #e8e8e8;
    border-radius: 5px;
    background-color: #fff;
    font-size: 14px;
    line-height: 40px;
    transition: all .2s ease-in-out;
}

.filtros select {
    appearance: none;
}

.filtros .seletor:hover {
    border-color: #dbdbdb;
}

.filtros .seletor.aberto,
.filtros .seletor:focus {
    border-color: #999;
}

.filtros .seletor__lista {
    max-height: 250px;
}

/* CAIXAS DE MARCAR: QUADRADO DE 16px QUE FICA VERDE COM O "✓" BRANCO. */
.filtros__lista {
    margin-bottom: 1rem;
    padding-left: 2rem;
}

.filtros__lista li {
    margin-top: 1rem;
}

.marcar {
    position: relative;
    display: inline-block;
    padding-left: 30px;
    cursor: pointer;
    user-select: none;
}

.marcar input {
    position: absolute;
    width: 0;
    height: 0;
    opacity: 0;
}

.marcar__caixa {
    position: absolute;
    top: 3px;
    left: 0;
    width: 16px;
    height: 16px;
    border: 1px solid #93959E;
    background-color: #fff;
}

.marcar:hover .marcar__caixa,
.marcar input:checked ~ .marcar__caixa {
    border-color: var(--verde);
    background-color: var(--verde);
}

.marcar input:focus-visible ~ .marcar__caixa {
    outline: 2px solid var(--verde);
    outline-offset: 2px;
}

.marcar__caixa::after {
    content: '';
    position: absolute;
    top: 0;
    left: 4px;
    display: none;
    width: 5px;
    height: 10px;
    border: solid #fff;
    border-width: 0 1px 1px 0;
    transform: rotate(45deg);
}

.marcar input:checked ~ .marcar__caixa::after {
    display: block;
}

/* FAIXA DE VALOR: DUAS ALÇAS VERDES NUM TRILHO PRETO DE 3px; O TRECHO ESCOLHIDO
   EM VERDE (--de / --ate, POSTOS POR listagem.js). */
.faixa-valor {
    padding-bottom: 13px;
}

.faixa-valor__texto {
    margin-bottom: 20px;
    line-height: 25px;
}

.faixa-valor__texto output {
    margin-left: 5px;
    font-weight: 700;
}

.faixa-valor__trilho {
    --de: 0%;
    --ate: 100%;
    position: relative;
    width: 98%;
    height: 3px;
    background: linear-gradient(to right, #000 var(--de), var(--verde) var(--de), var(--verde) var(--ate), #000 var(--ate));
}

.faixa-valor__trilho input {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 12px;
    margin: 0;
    background: none;
    transform: translateY(-50%);
    pointer-events: none;
    appearance: none;
}

.faixa-valor__trilho input::-webkit-slider-thumb {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 100%;
    background-color: var(--verde);
    cursor: pointer;
    pointer-events: auto;
    appearance: none;
}

.faixa-valor__trilho input::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 100%;
    background-color: var(--verde);
    cursor: pointer;
    pointer-events: auto;
}

.faixa-valor__trilho input::-moz-range-track {
    background: none;
}

/* NA TELA DE TOQUE AS ALÇAS CRESCEM, PARA O DEDO ACERTAR. */
@media (pointer: coarse) {
    .faixa-valor__trilho input { height: 24px; }
    .faixa-valor__trilho input::-webkit-slider-thumb { width: 22px; height: 22px; }
    .faixa-valor__trilho input::-moz-range-thumb { width: 22px; height: 22px; }
}

.faixa-valor__trilho input:focus-visible::-webkit-slider-thumb {
    outline: 2px solid var(--verde);
    outline-offset: 2px;
}

/* COMPARTILHAR: QUADRADOS CLAROS DE 40px QUE FICAM VERDES NO HOVER. */
.compartilhar li {
    display: inline-block;
    margin: 1rem 10px 0 0;
}

.compartilhar li:last-child {
    margin-right: 0;
}

.compartilhar a,
.compartilhar button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: var(--fundo-claro);
    color: var(--texto);
    transition: all .3s ease 0s;
}

.compartilhar li:hover a,
.compartilhar li:hover button,
.compartilhar .copiado {
    background-color: var(--verde);
    color: #fff;
}

.filtros__reiniciar,
.filtros__enviar {
    margin: 0;
    text-align: center;
}

.filtros__reiniciar {
    margin-top: 30px;
}

.filtros__enviar {
    margin-top: 30px;
}

/* NA LISTAGEM O BOTÃO NÃO TEM A FAIXA BRANCA: NO HOVER FICA PRETO. */
.filtros .botao {
    text-transform: uppercase;
}

.filtros .botao::after {
    display: none;
}

.filtros .botao:hover {
    background-color: #000;
    color: #fff;
}

/* ---- FILTROS NO CELULAR (ATÉ 991px) ------------------------------------------
   A LATERAL VIRA GAVETA PELA DIREITA, SOBRE UM VÉU; A BARRA DO PÉ DA TELA FICA
   ACIMA DOS DOIS (É ELA QUE ABRE, E COM A GAVETA ABERTA ELA "BUSCA" E FECHA).
   ABRIR/FECHAR, inert E Esc: listagem.js. NO DESKTOP NADA DISSO APARECE. */

:root {
    --altura-barra-filtros: 70px;
}

.listagem__lado-topo,
.listagem-filtros-fundo,
.busca-mobile {
    display: none;
}

@media (max-width: 991px) {
    .listagem__lado {
        position: fixed;
        top: 0;
        right: 0;
        z-index: 1000001;
        width: min(400px, 88vw);
        height: 100%;
        padding: 0 20px calc(var(--altura-barra-filtros) + 30px);
        overflow-y: auto;
        overscroll-behavior: contain;
        background-color: #fff;
        box-shadow: 0 0 60px rgba(0, 0, 0, .3);
        transform: translateX(100%);
        visibility: hidden;
        transition: transform .4s ease, visibility .4s ease;
    }

    .listagem__lado.aberta {
        transform: none;
        visibility: visible;
    }

    .listagem__lado-topo {
        position: sticky;
        top: 0;
        z-index: 2;
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin: 0 -20px 25px;
        padding: 15px 20px;
        border-bottom: 1px solid #ededed;
        background-color: #fff;
    }

    .listagem__lado-titulo {
        margin: 0;
        color: var(--titulo);
        font-family: var(--fonte-titulo);
        font-size: 18px;
        font-weight: 600;
    }

    .listagem__lado-fechar {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        color: var(--titulo);
        font-size: 16px;
    }

    /* A BARRA JÁ TEM O "LIMPAR FILTROS". */
    .filtros__reiniciar {
        display: none;
    }

    .listagem-filtros-fundo {
        position: fixed;
        inset: 0;
        z-index: 1000000;
        display: block;
        background-color: rgba(0, 0, 0, .5);
        opacity: 0;
        visibility: hidden;
        transition: opacity .4s, visibility .4s;
    }

    .listagem-filtros-fundo.aberto {
        opacity: 1;
        visibility: visible;
    }

    body.filtros-abertos {
        overflow: hidden;
    }

    .busca-mobile {
        position: fixed;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 1000002;
        display: flex;
        gap: 10px;
        height: var(--altura-barra-filtros);
        padding: 10px 12px;
        border-top: 3px solid var(--verde);
        background-color: #fff;
        box-shadow: 0 -5px 25px rgba(0, 0, 0, .1);
    }

    .busca-mobile__botao {
        flex: 1;
        min-width: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        border-radius: 6px;
        background-color: var(--verde);
        color: #fff;
        font-size: 14px;
        font-weight: 700;
        white-space: nowrap;
    }

    .busca-mobile__botao--limpar {
        border: 1px solid var(--verde);
        background-color: var(--fundo-claro);
        color: var(--titulo);
    }

    /* ÍCONE DE FILTROS COM A GAVETA FECHADA; LUPA COM ELA ABERTA ("BUSCAR IMÓVEIS"). */
    .busca-mobile__icone--buscar,
    .busca-mobile__botao[aria-expanded="true"] .busca-mobile__icone--filtrar {
        display: none;
    }

    .busca-mobile__botao[aria-expanded="true"] .busca-mobile__icone--buscar {
        display: inline;
    }

    /* O FIM DA PÁGINA, O WHATSAPP E O AVISO DE COOKIES FICAM ACIMA DA BARRA. */
    body[data-pagina="listagem"] {
        padding-bottom: var(--altura-barra-filtros);
    }

    .zap-flutuante {
        bottom: calc(55px + var(--altura-barra-filtros));
    }

    /* A BOLHA DO CHAT ACOMPANHA O WHATSAPP (style.css): LOGO ACIMA DELE. */
    body.tem-chat #sami-chat-raiz {
        bottom: calc(150px + var(--altura-barra-filtros));
    }

    .cookies-aviso {
        bottom: var(--altura-barra-filtros);
    }
}

@media (max-width: 768px) {
    .zap-flutuante {
        bottom: calc(100px + var(--altura-barra-filtros));
    }

    body.tem-chat #sami-chat-raiz {
        bottom: calc(162px + var(--altura-barra-filtros));
    }
}
