/* section-2 */
.section_2 {
    width: 100%;
    height: auto;
    padding: 100px 0 50px 0;
    background-color: #F2F9F4;
    display: flex;
    justify-content: center;
    align-items: center;
}

.section_2_container {
    width: 85%;
    height: 100%;
    padding-bottom: 50px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
}

.prefilterkorey-heading {
    width: 100%;
    margin-bottom: 16px;
}

.prefilterkorey-heading .sec_2_1_heading {
    justify-content: center;
}

.prefilterkorey-layout {
    width: 100%;
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 24px;
    align-items: start;
    margin-top: 0;
}

.prefilterkorey-tabs-wrapper {
    position: sticky;
    top: 60px;
    z-index: 1100;
    width: 100%;
    padding: 6px 12px;
    box-sizing: border-box;
    background: #F2F9F4;
}

.prefilterkorey-tabs {
    position: static;
    width: 100%;
    margin-bottom: 4px;
    display: flex;
    gap: 8px;
    flex-wrap: nowrap;
}

.prefilterkorey-sidebar {
    align-self: start;
    position: sticky;
    top: 140px;
    z-index: 1000;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
    max-height: calc(100vh - 90px);
    overflow: auto;
}

.prefilterkorey-content {
    width: 100%;
}

.prefilterkorey-sidebar .modern-options {
    z-index: 1001;
}

/* sec-2-1 */
.sec_2_1 {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.sec_2_1_heading {
    text-align: center !important;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.sec_2_1 .sec_2_1_heading>button:last-child {
    display: none;
}

.sec_2_1_heading h1 {
    font-weight: 600;
    font-size: 30px;
    line-height: 36px;
}

.sec_2_1 .sec_2_1_heading p {
    font-size: 14px;
    font-weight: 400;
    line-height: 24px;
    padding-inline: 28%;
    margin-top: 15px;
    color: #000;
}

.sec_2_1_heading button {
    width: 128px;
    height: 33px;
    border-radius: 8px;
    background-color: #e6f3ea;
    border: 1px solid #46AD67;
    font-weight: 600;
    font-size: 15px;
    margin-top: 15px;
    cursor: pointer;
    display: block;
}

.sec_2_1_heading button:hover {
    background-color: #46AD67;
    color: white;
    transition: 0.3s;
}

.custom-tabs {
    width: 100%;
    height: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    gap: 5px;
}

.custom-tabs .custom-tab-btn {
    width: 236px;
    height: 39px;
    background: none;
    border: none;
    border-bottom: 1px solid black;
    color: black;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    transition: 0.3s ease;
}

.custom-tabs .custom-tab-btn .custom-icon {
    height: 15px;
    width: 15px;
    font-size: 15px;
    background-color: #e3e9e5;
    color: black;
    border-radius: 50%;
    transition: 0.3s;
}

.custom-tabs .custom-tab-btn.active {
    background-color: #46AD67;
    color: white;
    border: none;
    border-radius: 5px;
    font-weight: 500;
}

.custom-tabs .custom-tab-btn.active .custom-icon {
    background-color: white;
    color: #46AD67;
    border-radius: 50%;
}

.sec_2_1_option {
    width: 100%;
    height: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dropdown-box {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.dropdown-box label {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.label-icon {
    height: 16px;
    width: 16px;
    background-color: #f3f3f3;
    border-radius: 50%;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    font-size: 11px;
    color: #555;
}

.modern-select {
    position: relative;
    width: 296px;
    height: 38px;
    cursor: pointer;
}

.modern-selected {
    height: 100%;
    padding: 8px 14px;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: #fff;
    font-size: 14px;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s ease;
}

.modern-selected::after {
    content: none;
}

.dropdown-arrow {
    font-size: 18px;
    color: #666;
    transition: transform 0.3s ease;
}

.modern-options {
    position: absolute;
    top: 42px;
    left: 0;
    width: 100%;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    list-style: none;
    padding: 0;
    margin: 0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 20;
}

.modern-options li {
    padding: 8px 14px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    transition: background 0.2s ease;
}

.modern-options li:hover {
    background: #f5f5f5;
}

.modern-select.active .modern-options {
    max-height: 200px;
    opacity: 1;
}

.modern-select.active .modern-selected {
    border-color: #46AD67;
    box-shadow: 0 0 0 3px rgba(70, 173, 103, 0.15);
    color: #46AD67;
    font-weight: 500;
}

.modern-select.active .dropdown-arrow {
    transform: rotate(180deg);
}

.modern-selected.highlighted {
    border-color: #46AD67;
    box-shadow: 0 0 0 3px rgba(70, 173, 103, 0.15);
    color: #46AD67;
    font-weight: 500;
}

.sec_2_1_heading_2 {
    height: 102px;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
}

.sec_2_1_heading_2 h1 {
    font-size: 30px;
    font-weight: 600;
}

.sec_2_1 .sec_2_1_heading_2 p {
    font-weight: 400;
    font-size: 14px;
    padding-inline-end: 37%;
    color: black;
}

.sec_2_1_heading_2 .icons {
    display: flex;
    justify-content: space-between;
    width: 150px;
    cursor: pointer;
}

.sec_2_1_heading_2 .icons img {
    width: 33px;
    height: 33px;
}

/* sec-2-2 */

.sec_2_2 {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
    justify-items: stretch;
    padding-bottom: 20px;
}

.sec_2_2>div {
    width: 100%;
    min-height: 400px;
    border-radius: 20px;
    box-shadow: 0px 1px 10px 3px rgb(195, 195, 195);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sec_2_2>div .sec_2_2_img1 {
    position: relative;
    width: 100%;
    height: 220px;
    border-radius: 20px 20px 0px 0px;
}

.sec_2_2_img1 .like {
    position: absolute;
    right: 20px;
    top: 20px;
    height: 35px;
    width: 35px;
    background-color: #F5F5F5;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-size: 22px;
    color: #555;
    cursor: pointer;
    transition: color 0.3s ease;
}

div.sec_2_2_img1>img {
    height: 220px;
    width: 100%;
    object-fit: cover;
}

.sec_2_2_img1 .like:hover {
    color: red;
}

.sec_2_2_img1 .like:active {
    transform: scale(0.9);
    transition: transform 0.1s ease;
}

.sec_2_2_img1 .like.active {
    color: red;
}

.property-buttons {
    display: flex;
    gap: 10px;
    margin-left: auto;
}

.sec_2_2>div .sec_2_2_des {
    min-height: 180px;
    width: 100%;
    border-radius: 0 0 20px 20px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 10px;
    background: #fff;
}

.sec_2_2>div .sec_2_2_des1 {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
}

.sec_2_2>div .sec_2_2_des1 h1 {
    font-weight: 600;
    font-size: 20px;
    display: flex;
    align-items: flex-end;
    gap: 10px;
    margin: 0;
}

.sec_2_2>div .sec_2_2_des1 .more {
    font-size: 18px;
    cursor: pointer;
    height: 35px;
    width: 35px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 6px;
    background-color: #46ad6712;
}

.more-container {
    position: relative;
    display: inline-block;
}

.sec_2_2>div .sec_2_2_des1 .property-name,
.property-location {
    margin: 0;
}

.p1,
.p2 {
    margin: 0;
}

.more-dropdown {
    position: absolute;
    top: 40px;
    right: 0;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    display: none;
    flex-direction: column;
    min-width: 30px;
    overflow: hidden;
    z-index: 10;
}

.more-dropdown a {
    padding: 8px 7px;
    display: flex;
    align-items: center;
    gap: 2px;
    font-size: 13px;
    color: #333;
    text-decoration: none;
    transition: 0.3s;
}

.more-dropdown a:hover {
    background: #f5f5f5;
}

.more-container.active .more-dropdown {
    display: flex;
}

.sec_2_2>div .sec_2_2_des2 {
    display: flex;
    justify-content: flex-start;
    gap: 20px;
}

.sec_2_2_des2 {
    display: flex;
    flex-wrap: nowrap;
    gap: 15px;
    color: #333;
}

.sec_2_2>div .sec_2_2_des2 span {
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.sec_2_2>div .sec_2_2_des2 span img {
    height: 16px;
    width: 16px;
}

.sec_2_2>div .sec_2_2_des3 {
    display: flex;
    flex-direction: row;
    gap: 4px;
    border-top: #ccc solid 1px;
}

.sec_2_2>div .sec_2_2_des3 .p1 {
    font-size: 16px;
    font-weight: 500;
    color: #000;
    margin: 0;
}

.sec_2_2>div .sec_2_2_des3 .p2 {
    font-size: 14px;
    color: #717171;
    font-weight: 400;
    margin: 0;
}

/* sec-2-3 */
.sec_2_3 {
    width: 100%;
    height: 54.5px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.sec_2_3 button {
    width: 261.53px;
    height: 54.5px;
    border-radius: 8px;
    background-color: #46AD67;
    font-weight: 600;
    font-size: 15px;
    line-height: 28.5px;
    color: white;
    border: none;
    cursor: pointer;
}

.sec_2_3 button:hover {
    background-color: rgb(72, 188, 119);
}

.sec_2_3 button .arrow {
    font-size: 20px;
    font-weight: normal;
}


/* ------------------------------------------------------------------
   MEDIA QUERIES - MOBILE TRANSFORMATION TO HORIZONTAL SLIDER
   ------------------------------------------------------------------ */
@media(max-width: 1024px) {

    /* 1. Ajustes del Contenedor Principal */
    .section_2 {
        height: auto;
        padding: 40px 0;
        box-sizing: border-box;
        overflow: hidden;
    }

    .section_2_container {
        width: 100%;
        height: auto;
        padding: 0;
        overflow: visible;
    }

    /* 2. Ocultar Sidebar y Tabs */
    .prefilterkorey-layout {
        display: block;
        grid-template-columns: 1fr;
    }
    
    .prefilterkorey-sidebar,
    .prefilterkorey-tabs, 
    .prefilterkorey-tabs-wrapper,
    .sec_2_1 .custom-tabs,
    .sec_2_1 .sec_2_1_option,
    .sec_2_1 .sec_2_1_heading_2 {
        display: none;
    }

    /* 3. Encabezados */
    .prefilterkorey-heading {
        padding: 0 20px;
        margin-bottom: 20px;
    }
    
    .sec_2_1 {
        height: auto;
        margin-top: 0;
    }

    .sec_2_1 .sec_2_1_heading {
        text-align: center !important;
        display: block;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .sec_2_1 .sec_2_1_heading h1 {
        text-align: center;
        font-size: 24px;
        line-height: 30px;
        margin-bottom: 10px;
    }

    .sec_2_1 .sec_2_1_heading p {
        font-size: 14px;
        font-weight: 400;
        line-height: 24px;
        padding-inline: 0;
        margin-top: 15px;
        color: #000;
    }
    
    .sec_2_1_heading button {
        display: none;
    }

    /* Botón de filtros móvil */
    .sec_2_1 .sec_2_1_heading > button:last-child {
        display: inline-block;
        margin-top: 20px;
        width: auto;
        height: 50px;
        padding: 0 30px;
        background-color: #46AD67;
        color: white;
        cursor: pointer;
        border-radius: 8px;
        font-weight: 600;
        border: none;
    }

    .sec_2_1 .sec_2_1_heading > button:last-child:hover {
        background-color: #3e9b5b;
    }

    /* 4. EL SLIDER (Contenedor de tarjetas) */
    .sec_2_2 {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 20px;
        padding: 10px 20px 30px 20px;
        margin-top: 20px;
        height: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        justify-items: start;
    }
    
    .sec_2_2::-webkit-scrollbar {
        display: none;
    }

    /* 5. LAS TARJETAS */
    .sec_2_2 > div {
        flex: 0 0 280px;
        width: 280px;
        min-width: 280px;
        height: 420px;
        margin: 0;
        scroll-snap-align: center;
        border-radius: 20px;
        background: #fff;
        box-shadow: 0px 1px 10px 3px rgba(195, 195, 195, 0.5);
        position: relative;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    /* 6. IMAGEN */
    .sec_2_2 > div .sec_2_2_img1 {
        height: 200px;
        flex-shrink: 0;
        width: 100%;
        border-radius: 20px 20px 0 0;
        background: #eee;
        position: relative;
    }
    
    div.sec_2_2_img1 > img,
    .slider-placeholder-img {
        height: 100% !important;
        width: 100% !important;
        object-fit: cover;
    }

    .sec_2_2 > div .like {
        display: flex !important;
        position: absolute;
        right: 15px;
        top: 15px;
        z-index: 10;
        background: rgba(255,255,255,0.9);
        border-radius: 6px;
        width: 35px;
        height: 35px;
        align-items: center;
        justify-content: center;
        color: #555;
        font-size: 20px;
    }

    .price-tag {
        position: absolute;
        bottom: 15px;
        left: 15px;
        background: rgba(255, 255, 255, 0.85);
        padding: 5px 10px;
        border-radius: 6px;
        font-weight: 600;
        font-size: 14px;
        color: #000;
    }

    /* 7. CONTENIDO DE LA TARJETA */
    .sec_2_2 > div .sec_2_2_des {
        height: auto;
        flex: 1;
        padding: 15px;
        border-radius: 0 0 20px 20px;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        background: #fff;
        gap: 8px;
    }

    .sec_2_2 > div .sec_2_2_des1 {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        height: auto;
        width: 100%;
    }

    .sec_2_2 > div .sec_2_2_des .sec_2_2_des1 h1,
    .property-name {
        position: static !important;
        background: transparent !important;
        height: auto !important;
        width: auto !important;
        margin: 0 0 5px 0 !important;
        font-size: 16px !important;
        font-weight: 600;
        display: block !important;
        line-height: 1.3;
        color: #000;
        text-align: left;
    }

    .sec_2_2 > div .p1,
    .property-location {
        display: block !important;
        font-size: 13px;
        color: #717171;
        margin: 0;
        line-height: 1.4;
        font-weight: 400;
    }

    .sec_2_2_des2 {
        display: flex !important;
        flex-wrap: nowrap;
        gap: 12px;
        margin-bottom: 5px;
    }
    
    .sec_2_2 > div .sec_2_2_des2 span {
        font-size: 12px;
        flex: 0 0 auto;
        display: flex;
        align-items: center;
        gap: 4px;
    }
    
    .sec_2_2 > div .sec_2_2_des2 span img {
        height: 14px;
        width: 14px;
    }

    .sec_2_2_des3 {
        display: flex !important;
        border-top: 1px solid #eee;
        padding-top: 10px;
        margin-top: auto;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    
    .sec_2_2_des3 span {
        font-size: 11px;
        font-weight: 600;
        color: #333;
        text-transform: uppercase;
    }
    
    .sec_2_2_des3 .p1,
    .sec_2_2_des3 .p2 {
        display: none !important;
    }

    .more-container, 
    .sec_2_2 > div .sec_2_2_des1 .more {
        display: none !important;
    }
    
    .sec_2_3 {
        margin-top: 20px;
    }
}


/* ------------------------------------------------------------------
   GLOBAL STYLES (MODALS, SLIDERS, TOOLTIPS)
   ------------------------------------------------------------------ */

.price-tag {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: rgba(255, 255, 255, 0.8);
    padding: 5px 10px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 16px;
    color: #000;
}

.slider-wrapper {
    position: relative;
    width: 100%;
    height: 220px;
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
}

.slider-wrapper .slider-placeholder-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.placeholder-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    font-weight: bold;
    z-index: 10;
    transition: background-color 0.2s;
    pointer-events: none;
}

.slick-next:before,
.slick-prev:before {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    font-weight: bold;
    z-index: 10;
    transition: background-color 0.2s;
}

.slick-next,
.slick-prev,
.slick-next:focus,
.slick-prev:focus {
    background-color: rgba(0, 0, 0, 0);
}

.slick-arrow:hover {
    background-color: rgba(0, 0, 0, 0);
}

.placeholder-arrow.left {
    left: 10px;
}

.placeholder-arrow.right {
    right: 10px;
}

.slider-wrapper:hover .placeholder-arrow {
    background-color: rgba(0, 0, 0, 0.7);
}

.img-slider {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

body {
    overflow-x: visible !important;
}

#filter-sticky-wrapper {
    position: -webkit-sticky;
    position: sticky;
    top: 120px;
    z-index: 999;
    background-color: #F2F9F4;
    padding-top: 10px;
    padding-bottom: 10px;
}

/* Modal de Filtros para Móvil */
.filters-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* * NOTA: Los estilos específicos del contenido del modal (.filters-modal-content, body, etc.)
 * para móvil están definidos en el bloque final "ESTILOS DEFINITIVOS"
 * para asegurar que sobrescriban todo.
 */

.filters-modal-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.filters-modal-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #1c1e21;
}

.close-modal-btn {
    background: none;
    border: none;
    font-size: 32px;
    line-height: 1;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-modal-btn:hover {
    color: #000;
}

.filters-modal-body .sec_2_1_option {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.filters-modal-body .dropdown-box {
    position: relative;
}

.filters-modal-body .modern-select {
    z-index: 10;
}

.filters-modal-body .modern-select.active {
    z-index: 100;
}

.filters-modal-body .modern-selected {
    background-color: white !important;
}

.filters-modal-body .modern-options {
    z-index: 10001;
    background: white !important;
    background-color: white !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    border: 1px solid #ddd !important;
    opacity: 1 !important;
}

.filters-modal-body .modern-options li {
    background: white !important;
    background-color: white !important;
}

.filters-modal-body .modern-options li:hover {
    background: #f5f5f5 !important;
    background-color: #f5f5f5 !important;
}

.filters-modal-footer {
    padding: 20px;
    border-top: 1px solid #eee;
}

.apply-filters-btn {
    width: 100%;
    height: 50px;
    background-color: #46AD67;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.apply-filters-btn:hover {
    background-color: #3e9b5b;
}

/* Estilos para tooltips */
.info-tooltip-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: help;
}

.info-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    background-color: #1c1e21;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 400;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
    z-index: 1000;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.info-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #1c1e21;
}

.info-tooltip-wrapper:hover .info-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-12px);
}

.custom-tab-btn .info-tooltip {
    bottom: auto;
    top: 100%;
    transform: translateX(-50%) translateY(8px);
}

.custom-tab-btn .info-tooltip::after {
    top: auto;
    bottom: 100%;
    border-top-color: transparent;
    border-bottom-color: #1c1e21;
}

.custom-tab-btn .info-tooltip-wrapper:hover .info-tooltip {
    transform: translateX(-50%) translateY(12px);
}

@media (max-width: 768px) {
    .info-tooltip {
        max-width: 200px;
        white-space: normal;
        text-align: center;
    }
}

@media(min-width: 1025px) {
    .filters-modal {
        display: none !important;
    }
}

/* Accordion Filters Styles (Desktop Default) */
.filter-accordion {
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 10px;
}

.filter-accordion:last-of-type {
    border-bottom: none;
}

.filter-accordion[open] summary {
    margin-bottom: 15px;
}

.filter-accordion summary {
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    color: #333;
}

.filter-accordion summary::-webkit-details-marker {
    display: none;
}

.filter-accordion summary::marker {
    display: none;
}

.filter-accordion summary::after {
    content: '›';
    font-size: 2rem;
    color: #888;
    font-weight: 400;
    transform: rotate(90deg);
    transition: transform 0.2s ease;
}

.filter-accordion[open] > summary::after {
    transform: rotate(-90deg);
}

.accordion-content {
    padding-bottom: 15px;
}

.view-subtitle {
    font-size: 0.9rem;
    color: #555;
    margin-top: 15px;
    margin-bottom: 10px;
}

.filter-count {
    background-color: #28a745;
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 12px;
    margin-left: 8px;
    display: none;
}

.filter-count[data-count="0"],
.filter-count:empty {
    display: none;
}

.filter-search-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    margin-bottom: 15px;
    box-sizing: border-box;
}

.filter-search-input:focus {
    outline: none;
    border-color: #28a745;
}

.filter-checkbox,
.filter-radio {
    display: none;
}

.options-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-option-wrapper {
    display: inline-block;
    margin: 0;
}

.filter-label-styled {
    display: inline-flex;
    padding: 8px 14px;
    border: 1px solid #ccc;
    border-radius: 20px;
    background-color: #f9f9f9;
    color: #555;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    user-select: none;
    font-size: 0.9rem;
}

.filter-label-styled:hover {
    border-color: #999;
}

.filter-checkbox:checked ~ .filter-label-styled,
.filter-radio:checked ~ .filter-label-styled {
    background-color: #28a745 !important;
    color: #fff !important;
    border-color: #218838 !important;

}
/* Filter summaries as badges with tooltip */
span.filter-summary{
    margin-left: 8px;
    font-size: 0.7rem !important;
    font-weight: 500;
    color: #444;
    display: inline-flex;
    align-items: center;
    line-height: 1.2;
    position: relative;
}

.filter-summary.is-hidden {
    display: none;
}

.filter-count {
    display: none; /* avoid double numbers; badge handles the count */
}

.filter-summary[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    top: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: #222;
    color: #fff;
    padding: 8px 10px;
    border-radius: 6px;
    white-space: pre-line;
    font-size: 0.8rem;
    min-width: 140px;
    max-width: 280px;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0,0,0,0.18);
}

.filter-summary[data-tooltip]:hover::before {
    content: '';
    position: absolute;
    top: 118%;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid #222;
    z-index: 11;
}
/* Price Range Inputs */
.price-range-inputs {
    display: flex;
    flex-direction: row;
    gap: 12px;
    padding: 4px 0;
    align-items: flex-end;
}

.price-input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1 1 0;
}

.price-input-group label {
    font-size: 0.85rem;
    color: #555;
    font-weight: 500;
}

.price-range-input {
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 0.95rem;
    transition: border-color 0.2s ease;
    width: 100%;
    box-sizing: border-box;
}

.price-range-input:focus {
    outline: none;
    border-color: #28a745;
}

.price-range-input::placeholder {
    color: #999;
}

@media (max-width: 640px) {
    .price-range-inputs {
        flex-direction: column;
    }
}


/* Responsive adjustments for accordions */
@media (max-width: 1024px) {
    .filter-accordion {
        display: none;
    }
}
/* Properties loader */
.properties-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 999;
}

.loader-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.loader-spinner > div {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #46AD67;
    animation: bounce 1.4s infinite ease-in-out both;
}

.loader-spinner .bounce1 {
    animation-delay: -0.32s;
}

.loader-spinner .bounce2 {
    animation-delay: -0.16s;
}

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* No results message */
.no-results,
.error-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 16px;
}

.error-message {
    color: #d32f2f;
}

/* ==========================================================================
   ESTILOS DEFINITIVOS PARA MODAL MÓVIL Y ACORDEONES
   ========================================================================== */

/* ==========================================================================
   ESTILOS FINALES: MODAL CENTRADO, BOTÓN FIJO Y ACORDEONES UNIFORMES
   ========================================================================== */

@media (max-width: 1024px) {

    /* 1. CONTENEDOR PRINCIPAL (Overlay oscuro) */
    .filters-modal {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 10000;
        
        /* Centrado Flexible - solo cuando está visible */
        align-items: center;     /* Centrar verticalmente */
        justify-content: center; /* Centrar horizontalmente */
        padding: 20px;           /* Margen de seguridad */
        box-sizing: border-box;
    }

    /* 2. TARJETA DEL MODAL (La caja blanca) */
    .filters-modal-content {
        width: 90%;             /* Ancho cómodo */
        max-width: 450px;       /* No más ancho que esto */
        height: 80vh;           /* Ocupa el 80% de la altura de la pantalla */
        margin-bottom: 10vh;    /* TRUCO: Margen abajo extra para "subirlo un poco" visualmente */
        
        background-color: #fff;
        border-radius: 16px;
        box-shadow: 0 10px 25px rgba(0,0,0,0.2);
        overflow: hidden;       /* Para que nada se salga de los bordes redondos */

        /* ESTRUCTURA INTERNA FLEX (Esto arregla el botón perdido) */
        display: flex;
        flex-direction: column; 
    }

    /* 3. ENCABEZADO (Fijo arriba) */
    .filters-modal-header {
        flex-shrink: 0;         /* No se encoge */
        padding: 15px 20px;
        border-bottom: 1px solid #eee;
        background: #fff;
    }

    /* 4. CUERPO (Área con Scroll) */
    .filters-modal-body {
        flex-grow: 1;           /* Ocupa todo el espacio sobrante */
        overflow-y: auto;       /* Scroll interno solo aquí */
        padding: 0;             /* Sin padding para que los bordes toquen los lados */
        background-color: #fff;
        -webkit-overflow-scrolling: touch; /* Scroll suave en iOS */
    }

    /* 5. PIE DE PÁGINA (Botón fijo abajo) */
    .filters-modal-footer {
        flex-shrink: 0;         /* No se encoge */
        padding: 15px 20px;
        border-top: 1px solid #eee;
        background-color: #fff;
    }

    /* 6. ESTILO DE ACORDEONES (Uniformidad) */
    .filters-modal-body .filter-accordion {
        display: block !important;
        border-bottom: 1px solid #f0f0f0;
        margin: 0;
    }

    /* Fila del Título (Summary) */
    .filters-modal-body .filter-accordion summary {
        height: 60px;           /* Altura fija para que todos se vean iguales */
        padding: 0 20px;
        font-size: 16px;
        font-weight: 500;
        color: #333;
        display: flex;
        align-items: center;
        justify-content: space-between;
        cursor: pointer;
        list-style: none;
        transition: background-color 0.2s;
    }
    
    .filters-modal-body .filter-accordion summary::-webkit-details-marker {
        display: none;
    }
    
    .filters-modal-body .filter-accordion summary:active {
        background-color: #fafafa;
    }

    /* Alineación Icono + Texto */
    .filters-modal-body .filter-accordion summary > span:first-child {
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .filters-modal-body .filter-accordion summary i {
        font-size: 20px;
        color: #888;
        width: 24px;
        text-align: center;
        display: flex;             /* Asegurar centrado del icono */
        align-items: center;
        justify-content: center;
    }

    /* Flecha Derecha */
    .filters-modal-body .filter-accordion summary::after {
        content: '›';
        font-size: 26px;
        color: #ccc;
        font-weight: 300;
        line-height: 1;
        transform: rotate(90deg);
        transition: transform 0.2s ease;
    }

    .filters-modal-body .filter-accordion[open] > summary::after {
        transform: rotate(-90deg);
        color: #46AD67;
    }

    /* Contenido Desplegable */
    .filters-modal-body .accordion-content {
        padding: 20px;
        background-color: #fcfcfc;
        border-top: 1px solid #f9f9f9;
    }

    /* 7. PRECIOS (Lado a Lado - Fix Definitivo) */
    .filters-modal-body .price-range-inputs {
        display: flex !important;
        flex-direction: row !important;
        gap: 12px;
        width: 100%;
        padding-top: 5px;
    }

    .filters-modal-body .price-input-group {
        flex: 1;                /* 50% cada uno */
        width: 50%;
        display: flex;
        flex-direction: column;
        gap: 6px;
    }

    .filters-modal-body .price-input-group label {
        font-size: 11px;
        text-transform: uppercase;
        color: #999;
        font-weight: 700;
        letter-spacing: 0.5px;
    }

    .filters-modal-body .price-range-input {
        width: 100%;
        height: 44px;
        border: 1px solid #ddd;
        border-radius: 8px;
        padding: 0 12px;
        font-size: 15px;
        background: #fff;
        color: #333;
        box-sizing: border-box; /* Evita que el padding rompa el ancho */
    }
}