.imovel-banner {
    position: relative;
    height: 550px;
    overflow: hidden;
    margin-top: 90px;
    margin-bottom: 0px;

    .imovel-banner-img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        position: absolute;
        top: 0;
        left: 0;
        z-index: 1;
    }

    &::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(
            to bottom,
            rgba(22, 33, 52, 0.0) 0%,
            rgba(22, 33, 52, 0.0) 30%,
            rgba(22, 33, 52, 0.6) 60%,
            rgba(22, 33, 52, 1) 100%
            /* rgba(22, 33, 52, 0.7) 100% */
        );
        z-index: 2;
        pointer-events: none;
    }

    .imovel-banner-content {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 3;
        display: flex;
        flex-direction: column;
        justify-content: flex-end;
        padding: 0 50px 50px 50px;
        max-width: 1440px;
        margin: 0 auto;


        .imovel-banner-text {
            display: grid;
            grid-template-columns: 2fr 1fr;
            gap: 60px;
            align-items: end;
            margin-top: auto;

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

            .imovel-banner-main {
                margin-bottom: 40px;

                /* @media (max-width: 1100px) {
                    margin-bottom: 0px;
                } */

                .blog-banner-line {
                    position: relative; 
                    img{
                     margin-left: -20px;
                    }
            
                    &::after {
                        content: '';
                        position: absolute;
                        top: 0;
                        right: 102%;
                        height: 2px;
                        width: calc(100vw - 100% - 100px);
                        background: white;
                        z-index: 4;
                        opacity: 0.7;
                    }
                }

                .imovel-banner-line {
                    position: relative;
                    margin-bottom: 30px;
                    width: 100%;
                    height: 59px;
                    z-index: 4;

                    &::after {
                        content: '';
                        position: absolute;
                        top: 0;
                        left: 100%;
                        height: 1px;
                        width: calc(100vw - 100% - 100px);
                        background: white;
                        z-index: 4;
                    }
                }

                h1 {
                    font-size: 40px;
                    font-weight: 600;
                    color: #fff;
                    line-height: 1.2;
                    margin: 0;
                    max-width: 90%;
                    margin-top: 20px;
                    font-family: 'Poppins', sans-serif;


                    @media (max-width: 1100px) {
                        font-size: 40px;
                        max-width: 100%; 
                    }

                }

                p{
                    color: #fff;
                    font-weight: 300;
                }
            }
 
        } 
    }

}

.imovel-filter{
    margin-top: -50px;
    margin-bottom: 70px;
    position: relative;
    z-index: 20;
    
    .imovel-filter-container{
        max-width: 1440px;
        margin: 0 auto;
        padding: 0 50px;

        @media (max-width: 1000px) {
            padding: 0 20px;
        }
         
        .imovel-filter-card{
            background: #fff;
            border-radius: 24px;
            box-shadow: 0 18px 45px rgba(16, 21, 33, 0.12);
            padding: 32px 36px 25px 36px;
        }
         
        .imovel-filter-form{
            display: grid;
            grid-template-columns: auto 250px 2fr auto;
            gap: 16px;
            /* align-items: end; */

            @media (max-width: 1200px) {
                grid-template-columns: auto auto minmax(0, 1fr);
                grid-auto-flow: row;
            }


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

        .filter-option{
            display: flex;
            flex-direction: column;
            gap: 12px;
        }

        .filter-label{
            font-size: 14px;
            font-weight: 600;
            color: #162134;  
        }

        .filter-toggle-group{
            display: flex;
            gap: 0px;
        }

        .toggle{
            position: relative;
            display: inline-flex;
            /* border-radius: 14px; */
            /* overflow: hidden; */
            &.compra {
                position: relative;
                z-index: 2;
            }
        }

        .toggle input{
            position: absolute;
            inset: 0;
            opacity: 0;
            cursor: pointer;
        }

        .toggle span{
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-width: 90px;
            padding: 12px 5px;
            border-radius: 14px;
            border: 1px solid #E0E3EB;
            background: #fff;
            font-weight: 600;
            font-size: 13px;
            color: #202536;
            /* transition: all 0.25s ease; */
            height: 20px;

            &.compra {
                /* margin-left: -20px; */
                /* border-radius: 14px 0 0 14px; */
            }
            &.locacao {
                /* margin-left: 0px; */
                /* border-radius: 0 14px 14px 0; */
                margin-left: -16px
            }
        }

        .toggle input:checked + span{
            /* background: #D4272B;
            border-color: #D4272B; */
            border-color: #162134;
            color: #162134;
            font-weight: 700;
            /* background:  #e7f0ff; */
            /* box-shadow: 0 12px 24px rgba(212, 39, 43, 0.25); */
            z-index: 2;
        }

        .filter-select select{
            width: 100%;
            padding: 14px 48px 14px 18px;
            border: 1px solid #E0E3EB;
            border-radius: 16px;
            background: #fff;
            font-size: 13px;
            font-weight: 300;
            color: #929292;
            appearance: none;
            -webkit-appearance: none;
            -moz-appearance: none;
            background-image: url("data:image/svg+xml,%3Csvg width='14' height='9' viewBox='0 0 14 9' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1.634 0.55a1 1 0 011.414 0L7 4.502 10.952.55a1 1 0 011.414 1.414L7.707 6.623a1 1 0 01-1.414 0L1.634 1.964a1 1 0 010-1.414z' fill='%23202536'/%3E%3C/svg%3E");
            background-repeat: no-repeat;
            background-position: right 18px center;
            transition: border-color 0.2s ease, box-shadow 0.2s ease;
            cursor: pointer;
            height: 45px;
            border-radius: 16px;

            &.estado {
               border-radius:  16px;
               @media (max-width: 1000px) {
                    /* border-radius: 16px; */
                    border: 1px solid #E0E3EB;
                }
            }
            &.cidade {
                /* border-radius: 0px;
                border-left: 0;
                border-right: 0;  */
            }
            &.bairro { 
                /* border-radius: 0 16px 16px 0;  */
            }
        }

        .filter-select select.has-value{
            color: #162134;
            font-weight: 500;
        }

        .filter-select select.tipo.has-value{
            color: #202536;
            border-color: #162134;
        }

        .filter-select select:disabled{
            background-color: #F4F6FB;
            color: #B9C1D4;
            cursor: not-allowed;
        }

        .filter-select .ts-wrapper{
            width: 100%;
        }

        .filter-select .ts-control{
            position: relative;
            padding: 14px 52px 14px 18px;
            border-radius: 16px;
            border: 1px solid #E0E3EB;
            background-color: #fff;
            height: 45px;
            font-size: 15px;
            font-weight: 300;
            color: #929292;
            box-shadow: none;
            transition: border-color 0.2s ease, box-shadow 0.2s ease;
        }

        .filter-select .ts-wrapper.no-value .ts-control{
            color: #929292;
            font-weight: 300;
        }

        .filter-select .ts-wrapper.has-value .ts-control{
            color: #162134;
            font-weight: 500;
            border-color: #162134;
            border: 1px solid #162134 !important;
        }

        .filter-select .ts-wrapper.ts-disabled .ts-control{
            background-color: #F4F6FB;
            color: #B9C1D4;
        }

        .filter-select .ts-wrapper.ts-disabled .ts-control::after{
            opacity: 0.4;
        }
        .filter-select .ts-control .item{
            color: #162134;
            font-weight: 500;
            max-width: 87px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            position: absolute;
            top: 13px;
            font-size: 13px;
        }

        .filter-select .ts-wrapper.no-value .ts-control .item{
            display: none;
        }

        .filter-select .ts-control .ts-placeholder{
            color: #929292;
            font-weight: 300;
        }

        .filter-select .ts-wrapper.has-value .ts-control{
            padding-right: 70px;
        }

        .filter-select .ts-wrapper.has-value .ts-control{
            padding-right: 72px;
        }

        .filter-select .ts-control .ts-custom-clear{
            position: absolute;
            right: 16px;
            top: 50%;
            transform: translateY(-50%);
            width: 28px;
            height: 28px;
            border: none;
            border-radius: 50%;
            background: rgba(22, 33, 52, 0.12);
            color: #162134;
            font-size: 18px;
            line-height: 1;
            display: none;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: background 0.2s ease, color 0.2s ease, opacity 0.2s ease;
        }

        .filter-select .ts-control .ts-custom-clear:hover{
            background: rgba(22, 33, 52, 0.2);
        }

        .filter-select .ts-wrapper.has-value .ts-control .ts-custom-clear{
            display: flex;
        }

        .filter-select .ts-wrapper.no-value .ts-control .ts-custom-clear{
            display: none;
        }


        .filter-select .ts-wrapper.focus .ts-control{
            border-color: #162134;
            border:1px solid #162134 !important;
            /* box-shadow: 0 0 0 4px rgba(212, 39, 43, 0.12); */
        }

        .filter-select .ts-control::after{
            content: '';
            position: absolute;
            right: 18px;
            top: 50%;
            width: 12px;
            height: 7px;
            transform: translateY(-50%);
            background: url("data:image/svg+xml,%3Csvg width='14' height='9' viewBox='0 0 14 9' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1.634 0.55a1 1 0 011.414 0L7 4.502 10.952.55a1 1 0 011.414 1.414L7.707 6.623a1 1 0 01-1.414 0L1.634 1.964a1 1 0 010-1.414z' fill='%23202536'/%3E%3C/svg%3E") no-repeat center / cover;
            pointer-events: none;
        }

        .filter-select .ts-wrapper.dropdown-active .ts-control::after{
            transform: translateY(-50%);
        }

        .filter-select .ts-wrapper.has-value .ts-control::after{
            opacity: 0;
        }

        .filter-select .ts-control input{
            font-weight: 300;
            color: inherit;
            font-size: 13px;
        }

        .filter-select .ts-dropdown{
            border: 1px solid #E0E3EB;
            border-radius: 16px;
            box-shadow: 0 14px 32px rgba(16, 21, 33, 0.12);
            font-size: 15px;
        }

        .filter-select .ts-dropdown .option{
            padding: 10px 16px;
        }

        .filter-select .ts-control--disabled{
            background-color: #F4F6FB;
            color: #B9C1D4;
        }

        .filter-select .ts-dropdown .no-results{
            padding: 12px 16px;
            font-size: 14px;
            color: #929292;
        }

        .filter-select select.tipo{
            padding-left: 52px;
            background-image:
                url('../images/tipo_imovel_icon.svg'),
                url("data:image/svg+xml,%3Csvg width='14' height='9' viewBox='0 0 14 9' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1.634 0.55a1 1 0 011.414 0L7 4.502 10.952.55a1 1 0 011.414 1.414L7.707 6.623a1 1 0 01-1.414 0L1.634 1.964a1 1 0 010-1.414z' fill='%23202536'/%3E%3C/svg%3E");
            background-repeat: no-repeat, no-repeat;
            background-position: 18px center, right 18px center;
            background-size: 22px 22px, auto;
        }

        .filter-select select.estado{
            padding-left: 50px;
            background-image:
                url('../images/localizacao_icon.svg'),
                url("data:image/svg+xml,%3Csvg width='14' height='9' viewBox='0 0 14 9' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1.634 0.55a1 1 0 011.414 0L7 4.502 10.952.55a1 1 0 011.414 1.414L7.707 6.623a1 1 0 01-1.414 0L1.634 1.964a1 1 0 010-1.414z' fill='%23202536'/%3E%3C/svg%3E");
            background-repeat: no-repeat, no-repeat;
            background-position: 18px center, right 18px center;
            background-size: 20px 20px, auto;
        }

        .estado-select .ts-control{
            padding-left: 50px;
            border-radius: 16px;
            @media (max-width: 1000px) {
                border-radius: 16px;
                border: 1px solid #E0E3EB;
                margin-bottom: 10px;
            }
        }

        .estado-select .ts-control::before{
            content: '';
            position: absolute;
            left: 18px;
            top: 50%;
            transform: translateY(-50%);
            width: 20px;
            height: 20px;
            background: url('../images/localizacao_icon.svg') no-repeat center / contain;
            pointer-events: none;
            transition: opacity 0.2s ease;
        }

        .estado-select .ts-wrapper.ts-disabled .ts-control::before{
            opacity: 0.5;
        }

        .estado-select .ts-wrapper.ts-disabled .ts-control::before{
            opacity: 0.5;
        }

        .cidade-select .ts-control{
            border-radius: 16px;
            /* border-radius: 0;
            border-left: 0;
            border-right: 0;
            margin-bottom: 10px; */
            @media (max-width: 1000px) {
                /* border-radius: 16px; */
                border: 1px solid #E0E3EB;
            }
        }

        .bairro-select .ts-control{
            border-radius: 16px;
            @media (max-width: 1000px) {
                border-radius: 16px;
                border: 1px solid #E0E3EB;
            }
        }

        .cidade-select .ts-wrapper.focus .ts-control{
            border-left: 0;
            border-right: 0;
        }

        .bairro-select .ts-wrapper.focus .ts-control{
            border-left: 0;
        }

        .cidade-select .ts-wrapper.ts-disabled .ts-control{
            border-left: 0;
            border-right: 0;
        }

        .bairro-select .ts-wrapper.ts-disabled .ts-control{
            border-left: 0;
        }

        .filter-select select:focus{
            outline: none;
            border-color: #162134;
            /* box-shadow: 0 0 0 4px rgba(212, 39, 43, 0.12); */
        }

        .filter-select-group{
            display: grid;
            grid-template-columns: 1.4fr 1fr 1fr;
            gap: 3px;

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

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

        .filter-submit{
            display: flex;
            flex-direction: row;
            align-items: center;
            gap: 10px;
            margin-top: 27px;

            @media (max-width: 1200px) {
                grid-column: 1 / -1;
                justify-content: flex-start;
                margin: 0 auto;
            }

            @media (max-width: 720px) {
                grid-column: 1 / -1;
                flex-direction: column;
            }
        }

        .btn-search{
            display: inline-flex;
            align-items: center;
            justify-content: center;
            padding: 16px 36px;
            border: none;
            border-radius: 14px;
            background: #D4272B;
            color: #fff;
            font-weight: 700;
            font-size: 13px;
            cursor: pointer;
            /* transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease; */
            height: 45px;
        }

        .btn-search:hover{
            background: #B81F24;
            /* box-shadow: 0 18px 36px rgba(212, 39, 43, 0.3); */
            /* transform: translateY(-1px); */
        }

        .btn-search:active{
            transform: translateY(0);
            box-shadow: none;
        }

        .btn-filter-advanced{
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            padding: 12px;
            /* border: 2px solid #D4272B; */
            border-radius: 14px;
            background: #d6d6d6;
            color: #162134;
            cursor: pointer;
            transition: all 0.3s ease;
            height: 45px;
            width: auto;
            min-width: 45px;
            flex-shrink: 0;
            position: relative;
        }

        .btn-filter-advanced:has(.btn-filter-advanced-text) {
            padding: 12px 16px;
        }

        .btn-filter-advanced .btn-filter-advanced-text {
            padding-right: 0;
        }

        .btn-filter-advanced:hover{
            background: #162134;
            color: #fff;
        }

        .btn-filter-advanced svg{
            width: 20px;
            height: 20px;
            flex-shrink: 0;
        }

        .btn-filter-advanced-text {
            font-size: 13px;
            font-weight: 500;
            white-space: nowrap;
        }

        .filter-advanced-badge {
            position: absolute;
            top: -10px;
            right: -8px;
            display: flex;
            align-items: center;
            justify-content: center;
            width: 20px;
            height: 20px;
            padding: 1px;
            background: #162134;
            color: #fff;
            border-radius: 50%;
            font-size: 11px;
            font-weight: 700;
            line-height: 1;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
        }

        .btn-limpar-filtros-mobile {
            display: none; /* Ocultar no desktop */
            text-decoration: none;
            
            @media (max-width: 1000px) {
                display: inline-flex;
                align-items: center;
                justify-content: center;
                padding: 12px 24px; 
                border-radius: 14px;
                background: #FFE2E3;
                color: #D4272B;
                font-weight: 600;
                font-size: 13px;
                cursor: pointer;
                transition: all 0.3s ease;
                
                &:hover {
                    background: #FFD5D7;
                    border-color: #B81F24;
                    color: #D4272B;
                }
                
                &:active {
                    transform: translateY(0);
                    box-shadow: none;
                }
            }
        }
    }
}

.ts-dropdown .active { 
    border-radius: 21px;
}

.ts-dropdown-content { 
    max-height: 260px; 
}

/* Header fixo para página de busca */
.page-imoveis-busca header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.page-imoveis-busca{
    main {
        padding-top: 90px; /* Altura do header */
        position: relative;
    }

    /* Filtro desktop - esconder no mobile */
    .imovel-filter-desktop {
        @media (max-width: 1000px) {
            display: none;
        }
    }

    .imovel-filter{
        margin-top: 0; 
        margin-bottom: 0;
        background: #F7F7F7;
        border-bottom: 1px solid #D7D7D7;
        border-top: 1px solid #D7D7D7;
        box-shadow: 0 2px 8px rgba(0,0,0,0.05);

        .imovel-filter-container{
            .imovel-filter-card{
                box-shadow: none;
                background: none;
                border-radius: 0px;
                padding: 20px 0 10px 0;
            }
        }
    }

    /* Botão de filtro mobile */
    .btn-filter-mobile {
        display: none;
        
        @media (max-width: 1000px) {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 10px 16px;
            background: #162134;
            color: white;
            border: none;
            border-radius: 20px;
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            transition: background-color 0.3s ease;
            
            &:hover {
                background: #0f1825;
            }
            
            svg {
                stroke: white;
            }
        }
    }

    /* Drawer do filtro mobile */
    .filter-drawer {
        @media (min-width: 1001px) {
            display: none !important;
        }
        
        @media (max-width: 1000px) {
            display: block;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: 10000;
            visibility: hidden;
            opacity: 0;
            transition: visibility 0.3s ease, opacity 0.3s ease;
            pointer-events: none;
            
            &.active {
                visibility: visible;
                opacity: 1;
                pointer-events: auto;
            }
            
            .filter-drawer-overlay {
                position: absolute;
                top: 0;
                left: 0;
                width: 100%;
                height: 100%;
                background: rgba(0, 0, 0, 0.5);
                opacity: 0;
                transition: opacity 0.3s ease;
            }
            
            &.active .filter-drawer-overlay {
                opacity: 1;
            }
            
            .filter-drawer-content {
                position: absolute;
                top: 0;
                right: 0;
                width: 90%;
                max-width: 400px;
                height: 100%;
                background: #fff;
                box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
                transform: translateX(100%);
                transition: transform 0.3s ease;
                display: flex;
                flex-direction: column;
                overflow: hidden;
            }
            
            &.active .filter-drawer-content {
                transform: translateX(0);
            }
            
            .filter-drawer-header {
                display: flex;
                justify-content: space-between;
                align-items: center;
                padding: 20px;
                border-bottom: 1px solid #E7E7E7;
                flex-shrink: 0;
                
                h3 {
                    margin: 0;
                    font-size: 20px;
                    font-weight: 700;
                    color: #162134;
                }
                
                .filter-drawer-close {
                    background: transparent;
                    border: none;
                    cursor: pointer;
                    padding: 5px;
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    transition: opacity 0.3s ease;
                    
                    &:hover {
                        opacity: 0.7;
                    }
                }
            }
            
            .filter-drawer-body {
                flex: 1;
                overflow-y: auto;
                overflow-x: hidden;
                padding: 20px;

                /* Corrigir campos de área no mobile */
                .filter-area-inputs {
                    flex-wrap: wrap;
                }

                .filter-area-input-wrapper {
                    min-width: 0;
                    flex: 1 1 45%;
                }

                .filter-area-input input {
                    width: 100%;
                    min-width: 0;
                    box-sizing: border-box;
                    height: 45px !important;
                }

                .imovel-filter {
                    background: transparent;
                    border: none;
                    box-shadow: none;
                    margin: 0;
                    
                    .imovel-filter-container {
                        padding: 0;
                        max-width: 100%;
                        
                        .imovel-filter-card {
                            padding: 0;
                            background: transparent;
                            box-shadow: none;
                        }
                        
                        .imovel-filter-form {
                            display: flex;
                            flex-direction: column;
                            gap: 20px;
                            
                            .filter-option {
                                width: 100%;
                            }
                            
                            .filter-submit {
                                width: 100%;
                                margin-top: 10px;
                                
                                button {
                                    width: 100%;
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}

.imoveis-busca-content{
    min-height: calc(100vh - var(--header-height, 90px) - var(--filter-height, 70px) - 15px);
    padding-top: 0;
    
    @media (max-width: 1000px) {
        min-height: auto;
    }
    
    .imoveis-busca-content-container{
        max-width: 1440px;
        margin: 0 auto 100px auto;
        padding: 0 50px;
        height: calc(100vh - var(--header-height, 90px) - var(--filter-height, 70px) - 15px);
        display: flex;
        flex-direction: column;
        
        @media (max-width: 1000px) {
            height: auto;
            min-height: auto;
            padding: 0 15px;
        }
        
        .header{
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 5px;
            padding: 20px 0 10px 0;
            flex-shrink: 0;

            @media (max-width: 1000px) {
                flex-direction: column;
                align-items: flex-start;
                gap: 15px;
            }

            .header-left{
                h2{
                    font-size: 30px;
                    color: #162134;
                    font-weight: 700;
                    font-family: 'Poppins', sans-serif;
                    margin:0;
                    margin-bottom: 5px;
                }
                p{
                    margin:0;
                    color: #494B50;
                    font-size: 13px;
                    font-weight: 300;
                    span{
                        font-weight: 700;
                    }
                }
            }
            .header-right{
                display: flex;
                align-items: center;
                gap: 10px;
                
                @media (max-width: 1000px) {
                    justify-content: space-between;
                    width: 100%;
                }
                
                .buttons{
                    display: flex;
                    gap: 10px;
                    
                    .limpar{
                        background: #FFE2E3;
                        color: #D4272B; 
                        font-weight: 400;
                        font-size: 12px !important;
                        border-radius: 50px;
                        
                        @media (max-width: 1000px) {
                            display: none; /* Esconder no mobile */
                        }
                    }
                    .ordenar-dropdown {
                        position: relative;
                        
                        .ordenar{ 
                            font-weight: 300;
                            font-size: 12px !important;
                            border-radius: 50px;
                            position: relative;
                            padding-right: 40px;
                            cursor: pointer;
                            b{
                                font-weight: 700;
                            }

                            &::after{
                                content: '';
                                position: absolute;
                                right: 18px;
                                top: 50%;
                                width: 12px;
                                height: 7px;
                                transform: translateY(-50%);
                                background: url("data:image/svg+xml,%3Csvg width='14' height='9' viewBox='0 0 14 9' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1.634 0.55a1 1 0 011.414 0L7 4.502 10.952.55a1 1 0 011.414 1.414L7.707 6.623a1 1 0 01-1.414 0L1.634 1.964a1 1 0 010-1.414z' fill='%23202536'/%3E%3C/svg%3E") no-repeat center / cover;
                                pointer-events: none;
                                transition: transform 0.3s ease;
                            }
                        }

                        &.active {
                            .ordenar::after {
                                transform: translateY(-50%) rotate(180deg);
                            }

                            .ordenar-menu {
                                display: block;
                            }
                        }

                        .ordenar-menu {
                            display: none;
                            position: absolute;
                            top: calc(100% + 8px);
                            right: 0;
                            background: white;
                            border-radius: 12px;
                            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
                            min-width: 180px;
                            z-index: 1000;
                            overflow: hidden;
                            padding: 8px 0;

                            .ordenar-option {
                                display: block;
                                padding: 12px 20px;
                                color: #202536;
                                text-decoration: none;
                                font-size: 13px;
                                font-weight: 400;
                                transition: background-color 0.2s ease;
                                cursor: pointer;

                                &:hover {
                                    background-color: #f5f5f5;
                                }

                                &.active {
                                    background-color: #efefef;
                                    color: #162134;
                                    font-weight: 600;
                                }
                            }
                        }
                    }
                }
            }
        }

        .grid{
            display: grid;
            grid-template-columns: 1fr 40%;
            gap: 30px;
            align-items: stretch;
            flex: 1;
            min-height: 0;
            overflow: hidden;

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

            @media (max-width: 1000px) {
                flex: none;
                min-height: auto;
                overflow: visible;
            }

            .list{
                display: grid;
                grid-template-columns: repeat(3, 1fr);
                gap: 5px;
                max-height: 100%;
                overflow-y: auto;
                padding-top: 10px;
                padding-bottom: 20px;
                align-content: start;

                /* Custom scrollbar */
                &::-webkit-scrollbar {
                    width: 6px;
                }
                &::-webkit-scrollbar-track {
                    background: #f1f1f1;
                    border-radius: 10px;
                }
                &::-webkit-scrollbar-thumb {
                    background: #cfcfcf;
                    border-radius: 10px;
                }
                &::-webkit-scrollbar-thumb:hover {
                    background: #b0b0b0;
                }

                @media (max-width: 1200px) {
                    grid-template-columns: repeat(2, 1fr);
                }

                @media (max-width: 1000px) {
                    max-height: none;
                    overflow-y: visible;
                    padding-right: 0;
                    padding-bottom: 0;
                }

                /* @media (max-width: 720px) {
                    grid-template-columns: 1fr;
                } */

                .card-imovel{
                    position: relative;
                    border-radius: 10px;
                    padding: 8px;
                    border: 1px solid transparent;
                    transition: all 0.3s ease;

                    &:hover{
                        background: #F7F7F7;
                        /* border-color: #D7D7D7; */
                        /* transform: translateY(-2px); */
                        /* box-shadow: 0 4px 12px rgba(0,0,0,0.1); */
                    }

                    .card-imovel-label{
                        background: #162134;
                        color: #fff;
                        font-size: 12px;
                        font-weight: 400;
                        padding: 5px 10px;
                        border-radius: 50px;
                        position: absolute;
                        top: 20px;
                        left: 20px;
                        z-index: 2;
                        font-weight: 600;
                    }
                    .card-imovel-image{
                        height: 200px;
                        border-radius: 5px;
                        overflow: hidden;
                        position: relative;

                        img{
                            width: 100%;
                            height: 100%;
                            object-fit: cover;
                        }

                        .image-placeholder {
                            width: 100%;
                            height: 100%;
                            background-color: #e0e0e0;
                            display: flex;
                            align-items: center;
                            justify-content: center;

                            svg {
                                width: 48px;
                                height: 48px;
                                color: #9e9e9e;
                            }
                        }

                        @media (max-width: 720px) {
                           height: 150px;
                        }
                    }
                    .card-imovel-content{
                        .card-imovel-tipo{
                            color: #FF0C11;
                            font-size: 14px;
                            font-weight: 800;
                            margin-bottom: 10px;
                        }
                        .card-imovel-endereco{
                            color: #162134;
                            font-size: 14px;
                            font-weight: 300;
                            margin: 0;
                            margin-top: 5px;
                        }
                        h3{
                            font-size: 14px;
                            font-weight: 800;
                            color: #162134;
                            margin: 0;
                            /* Limitar a 2 linhas */
                            display: -webkit-box;
                            -webkit-line-clamp: 2;
                            -webkit-box-orient: vertical;
                            overflow: hidden;
                            text-overflow: ellipsis;
                            line-height: 1.4;
                            max-height: calc(14px * 1.4 * 2); /* font-size * line-height * 2 linhas */
                        } 
                        .area{
                            border-radius: 10px;
                            border: 1px solid #F1F1F1;
                            color: #525252;
                            display: inline-flex;
                            padding: 10px;
                            margin-top: 15px;
                            align-items: center;
                            background: #fff;
                            
                            img{
                                width: 16px;
                            }

                            span{
                                font-size: 12px;
                                margin-left: 5px;
                            }
                        }
                    }
                }
            }

            .map-container {
                position: relative;
                height: 100%;
                width: 100%;

                .map {
                    height: 100%;
                    border-radius: 16px;
                    overflow: hidden;
                    z-index: 10;
                    border: 1px solid #D7D7D7;

                    @media (max-width: 1200px) {
                        height: 500px;
                        margin-top: 30px;
                    }
                }

                .btn-recenter-map {
                    position: absolute;
                    top: 15px;
                    right: 15px;
                    z-index: 1000;
                    width: 40px;
                    height: 40px;
                    padding: 8px;
                    background-color: #fff;
                    border: 2px solid rgba(0, 0, 0, 0.2);
                    border-radius: 8px;
                    cursor: pointer;
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    transition: all 0.2s ease;
                    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);

                    svg {
                        width: 20px;
                        height: 20px;
                        color: #333;
                        transition: color 0.2s ease;
                    }

                    &:hover {
                        background-color: #f5f5f5;
                        border-color: rgba(0, 0, 0, 0.3);

                        svg {
                            color: #D4272B;
                        }
                    }

                    &:active {
                        transform: scale(0.95);
                    }

                    @media (max-width: 1200px) {
                        top: 45px;
                    }
                }
            }
        }

        /* Container do botão "Carregar mais" - alinhado com a listagem */
        .load-more-container {
            /* Alinhar com a coluna da lista (60% - gap) */
            display: flex;
            flex-direction: column;
            align-items: center;
            width: calc(60% - 15px);
            margin: 0;
            padding: 20px 0;

            @media (max-width: 1000px) {
                width: 100%;
                text-align: center;
            }

            #load-more-btn {
                background-color: #D4272B;
                color: white;
                padding: 12px 30px;
                border: none;
                border-radius: 25px;
                font-weight: 600;
                cursor: pointer;
                transition: background-color 0.3s ease;

                &:hover {
                    background-color: #b82125;
                }

                &:disabled {
                    background-color: #ccc;
                    cursor: not-allowed;
                }
            }

            #load-more-info {
                margin-top: 10px;
                color: #666;
                font-size: 14px;
            }
        }
    }
}

/* Drawer de Filtros Avançados */
.filter-advanced-drawer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;

    &.active {
        visibility: visible;
        opacity: 1;
        pointer-events: all;
    }
}

.filter-advanced-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.filter-advanced-drawer.active .filter-advanced-overlay {
    opacity: 1;
}

.filter-advanced-content {
    position: absolute;
    top: 0;
    right: 0;
    width: 90%;
    max-width: 500px;
    height: 100%;
    background: #fff;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    z-index: 10001;
}

.filter-advanced-drawer.active .filter-advanced-content {
    transform: translateX(0);
}

.filter-advanced-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #E7E7E7;
    flex-shrink: 0;

    h3 {
        margin: 0;
        font-size: 20px;
        font-weight: 700;
        color: #162134;
        font-family: 'Poppins', sans-serif;
    }
}

.filter-advanced-close {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;

    &:hover {
        opacity: 0.7;
    }

    svg {
        width: 24px;
        height: 24px;
    }
}

.filter-advanced-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    padding-bottom: 0;
    display: flex;
    flex-direction: column;

    .drawer-filter-form {
        display: flex;
        flex-direction: column;
        gap: 20px;
        flex: 1;

        .filter-option {
            display: flex;
            flex-direction: column;
            gap: 12px;
        }

        .filter-label {
            font-size: 14px;
            font-weight: 600;
            color: #162134;
        }

        /* Toggles de disponibilidade */
        .filter-toggle-group {
            display: flex;
            gap: 0px;
        }

        .toggle {
            position: relative;
            display: inline-flex;
            
            &.compra {
                position: relative;
                z-index: 2;
            }
        }

        .toggle input {
            position: absolute;
            inset: 0;
            opacity: 0;
            cursor: pointer;
        }

        .toggle span {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-width: 90px;
            padding: 12px 5px;
            border-radius: 14px;
            border: 1px solid #E0E3EB;
            background: #fff;
            font-weight: 600;
            font-size: 13px;
            color: #202536;
            height: 20px;

            &.compra {
                /* margin-left: -20px; */
            }
            
            &.locacao {
                margin-left: -16px;
            }
        }

        .toggle input:checked + span {
            border-color: #162134;
            color: #162134;
            font-weight: 700;
            z-index: 2;
        }

        /* Selects (TomSelect) */
        .filter-select {
            .ts-wrapper {
                width: 100%;
            }

            .ts-control {
                position: relative;
                padding: 14px 52px 14px 18px;
                border-radius: 16px;
                border: 1px solid #E0E3EB;
                background-color: #fff;
                height: 45px;
                font-size: 15px;
                font-weight: 300;
                color: #929292;
                box-shadow: none;
                transition: border-color 0.2s ease, box-shadow 0.2s ease;
            }

            .ts-wrapper.no-value .ts-control {
                color: #929292;
                font-weight: 300;
            }

            .ts-wrapper.has-value .ts-control {
                color: #162134;
                font-weight: 500;
                border-color: #162134;
                border: 1px solid #162134 !important;
                padding-right: 72px;
            }

            .ts-wrapper.ts-disabled .ts-control {
                background-color: #F4F6FB;
                color: #B9C1D4;
            }

            .ts-control .item {
                color: #162134;
                font-weight: 500;
                max-width: 87px;
                white-space: nowrap;
                overflow: hidden;
                text-overflow: ellipsis;
                position: absolute;
                top: 13px;
                font-size: 13px;
            }

            .ts-wrapper.no-value .ts-control .item {
                display: none;
            }

            .ts-control .ts-placeholder {
                color: #929292;
                font-weight: 300;
            }

            .ts-control .ts-custom-clear {
                position: absolute;
                right: 16px;
                top: 50%;
                transform: translateY(-50%);
                width: 28px;
                height: 28px;
                border: none;
                border-radius: 50%;
                background: rgba(22, 33, 52, 0.12);
                color: #162134;
                font-size: 18px;
                line-height: 1;
                display: none;
                align-items: center;
                justify-content: center;
                cursor: pointer;
                transition: background 0.2s ease, color 0.2s ease, opacity 0.2s ease;
            }

            .ts-control .ts-custom-clear:hover {
                background: rgba(22, 33, 52, 0.2);
            }

            .ts-wrapper.has-value .ts-control .ts-custom-clear {
                display: flex;
            }

            .ts-wrapper.focus .ts-control {
                border-color: #162134;
                border: 1px solid #162134 !important;
            }

            .ts-control::after {
                content: '';
                position: absolute;
                right: 18px;
                top: 50%;
                width: 12px;
                height: 7px;
                transform: translateY(-50%);
                background: url("data:image/svg+xml,%3Csvg width='14' height='9' viewBox='0 0 14 9' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1.634 0.55a1 1 0 011.414 0L7 4.502 10.952.55a1 1 0 011.414 1.414L7.707 6.623a1 1 0 01-1.414 0L1.634 1.964a1 1 0 010-1.414z' fill='%23202536'/%3E%3C/svg%3E") no-repeat center / cover;
                pointer-events: none;
            }

            .ts-wrapper.has-value .ts-control::after {
                opacity: 0;
            }

            .ts-control input {
                font-weight: 300;
                color: inherit;
                font-size: 13px;
            }

            .ts-dropdown {
                border: 1px solid #E0E3EB;
                border-radius: 16px;
                box-shadow: 0 14px 32px rgba(16, 21, 33, 0.12);
                font-size: 15px;
            }

            .ts-dropdown .option {
                padding: 10px 16px;
            }

            .ts-dropdown .no-results {
                padding: 12px 16px;
                font-size: 14px;
                color: #929292;
            }
        }

        /* Select de tipo - select nativo (igual no filtro padrão e drawer) */
        .filter-select select.tipo {
            width: 100%;
            padding: 14px 48px 14px 52px;
            border: 1px solid #E0E3EB;
            border-radius: 16px;
            background: #fff;
            font-size: 13px;
            font-weight: 300;
            color: #929292;
            appearance: none;
            -webkit-appearance: none;
            -moz-appearance: none;
            background-image:
                url('../images/tipo_imovel_icon.svg'),
                url("data:image/svg+xml,%3Csvg width='14' height='9' viewBox='0 0 14 9' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1.634 0.55a1 1 0 011.414 0L7 4.502 10.952.55a1 1 0 011.414 1.414L7.707 6.623a1 1 0 01-1.414 0L1.634 1.964a1 1 0 010-1.414z' fill='%23202536'/%3E%3C/svg%3E");
            background-repeat: no-repeat, no-repeat;
            background-position: 18px center, right 18px center;
            background-size: 22px 22px, auto;
            transition: border-color 0.2s ease, box-shadow 0.2s ease;
            cursor: pointer;
            height: 45px;
        }

        .filter-select select.tipo.has-value {
            color: #202536 !important;
            border-color: #162134 !important;
        }

        .filter-select select.tipo:focus {
            outline: none;
            border-color: #162134;
        }

        /* Selects de localização - em coluna no drawer */
        .filter-select-group {
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        .estado-select,
        .cidade-select,
        .bairro-select {
            width: 100%;
        }

        .estado-select .ts-control {
            padding-left: 50px;
            border-radius: 16px;
            width: 100%;
        }

        .estado-select .ts-control::before {
            content: '';
            position: absolute;
            left: 18px;
            top: 50%;
            transform: translateY(-50%);
            width: 20px;
            height: 20px;
            background: url('../images/localizacao_icon.svg') no-repeat center / contain;
            pointer-events: none;
            transition: opacity 0.2s ease;
        }

        .estado-select .ts-wrapper.ts-disabled .ts-control::before {
            opacity: 0.5;
        }

        .cidade-select .ts-control {
            border-radius: 16px;
            width: 100%;
        }

        .bairro-select .ts-control {
            border-radius: 16px;
            width: 100%;
        }

        /* Campos avançados */
        .filter-advanced-fields {
            .filter-advanced-fields-wrapper {
                display: flex;
                flex-direction: column;
                gap: 16px;
            }

            .filter-advanced-field {
                display: flex;
                flex-direction: column;
                gap: 8px;

                label {
                    font-size: 14px;
                    font-weight: 600;
                    color: #162134;
                    font-family: 'Poppins', sans-serif;
                }

                input {
                    padding: 8px 16px;
                    border: 1px solid #E0E3EB;
                    border-radius: 16px;
                    font-size: 13px;
                    color: #162134;
                    transition: border-color 0.2s ease, box-shadow 0.2s ease;
                    font-family: 'Poppins', sans-serif;
                    height: 30px;

                    &:focus {
                        outline: none;
                        border-color: #162134;
                    }

                    &::placeholder {
                        color: #929292;
                        font-weight: 300;
                    }

                    &.has-value {
                        border-color: #162134;
                        border: 1px solid #162134;
                        color: #162134;
                        font-weight: 500;
                    }
                }

                /* Campo de área */
                &.filter-area {
                    label {
                        margin-bottom: 8px;
                    }

                    .filter-area-inputs {
                        display: flex;
                        gap: 12px;
                    }

                    .filter-area-input-wrapper {
                        flex: 1;
                        display: flex;
                        flex-direction: column;
                        gap: 8px;

                        label {
                            font-size: 13px;
                            font-weight: 500;
                            color: #162134;
                            margin-bottom: 0;
                        }

                        .filter-area-input {
                            position: relative;
                            display: flex;
                            align-items: center;

                            input {
                                flex: 1;
                                padding-right: 45px;
                                height: 30px;
                            }

                            .filter-area-unit {
                                position: absolute;
                                right: 16px;
                                font-size: 13px;
                                color: #929292;
                                font-weight: 400;
                                pointer-events: none;
                            }
                        }
                    }
                }
            }
        }

        /* Botão de busca - Footer fixo */
        .filter-submit {
            position: sticky;
            bottom: 0;
            margin-top: auto;
            margin-bottom: 0;
            padding: 20px;
            padding-top: 20px;
            background: #fff;
            border-top: 1px solid #E7E7E7;
            box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
            display: flex;
            flex-direction: column;
            gap: 10px;
            z-index: 10;
            margin-left: -20px;
            margin-right: -20px;
            padding-left: 20px;
            padding-right: 20px;
        }

        .btn-search {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            padding: 16px 36px;
            border: none;
            border-radius: 14px;
            background: #D4272B;
            color: #fff;
            font-weight: 700;
            font-size: 13px;
            cursor: pointer;
            height: 45px;
            width: 100%;
            box-sizing: border-box;

            &:hover {
                background: #B81F24;
            }

            &:active {
                transform: translateY(0);
                box-shadow: none;
            }
        }

        .btn-limpar-filtros-mobile {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            padding: 16px 36px;
            border-radius: 14px;
            background: #FFE2E3;
            color: #D4272B;
            font-weight: 600;
            font-size: 13px;
            text-decoration: none;
            cursor: pointer;
            transition: all 0.3s ease;
            width: 100%;
            height: 45px;
            box-sizing: border-box;

            &:hover {
                background: #FFD5D7;
                color: #D4272B;
            }

            &:active {
                transform: translateY(0);
                box-shadow: none;
            }
        }
    }
}

@media (max-width: 480px) {
    .filter-advanced-content {
        width: 100%;
    }
}

/* Espaçamento da newsletter na página de imóvel */
.page-imovel .newsletter {
    margin-top: 80px;
}

@media (max-width: 768px) {
    .page-imovel .imoveis {
        margin-bottom: 60px;
    }

    .page-imovel .newsletter {
        margin-top: 40px;
    }
}