/* Base Imports */
@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

/* Global Reset (Assuming the main project has one, included here for completeness) */
.property-list-section * {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    font-family: "Poppins", sans-serif;
}

/* ======================================= */
/* ====== PROPERTY LIST SECTION (SECTION 2) ====== */
/* ======================================= */

.property-list-section {
    width: 100%;
    height: auto;
    background-color: #F2F9F4;
    display: flex;
    justify-content: center;
    align-items: center;
}

.property-list-container {
    width: 1200px;
    height: 100%;
    padding-top: 100px;
    padding-bottom: 50px;
    display: flex;
    gap: 30px;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
}

/* --- Header Section (Title, Description, and Icons) --- */
.property-list-header {
    width: 100%;
    height: auto;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.property-list-title-and-description {
    height: 102px;
    width: 100%;
    display: flex;
    justify-content: space-between;
    /*align-items: center;*/
    flex-direction: column;
}

.property-list-title-and-description h1 {
    font-size: 30px;
    font-weight: 600;
}

.property-list-title-and-description p {
    font-weight: 400;
    font-size: 14px;
    padding-inline-end: 37%;
    color: black;
}

.property-list-icons {
    display: flex;
    justify-content: space-between;
    width: auto;
    cursor: pointer;
    gap: 12px;
}

.property-list-icons button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 32px;
    color: black;
    transition: color 0.3s ease;
}

.property-list-icons button.active {
    color: #46AD67 !important;
}

/* --- Tabs (View and Sort Buttons) --- */
.property-list-tabs {
    width: 100%;
    height: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    gap: 5px;
}

.property-list-tab-btn {
    width: auto;
    padding: 0 4%;
    height: 39px;
    background: none;
    border: none;
    border-bottom: 1px solid black;
    color: black;
    font-size: 20px;
    cursor: pointer;
    transition: 0.3s ease;
}

.property-list-tab-btn.active {
    border-top: none;
    border-left: none;
    border-right: none;
    border-bottom: 1.5px solid #46AD67;
    color: #46AD67;
    font-weight: 500;
}

.property-list-sort-btn {
    cursor: pointer;
    color: #333;
    border-bottom: 1px solid black;
}

.property-list-sort-btn:hover {
    color: #46AD67;
    border-bottom: 2px solid #46AD67;
}

/* --- Tab Content Display Logic --- */
.tab-content {
    display: none;
    width: 100%;
}

.tab-content.active {
    display: block;
}

/* --- Property Cards Container --- */
.property-list-cards {
    width: 100%;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    justify-items: center;
    transition: all 0.3s ease;
}

.property-list-cards.active {
    display: grid; /* Default to Grid/Gallery View */
}

.property-list-cards.list-view.active {
    display: flex !important;
    flex-direction: column;
    gap: 30px;
}


/* --- INDIVIDUAL PROPERTY CARD (Common Styles) --- */
.property-list-card {
    width: 100%;
    height: 490px;
    border-radius: 20px;
    box-shadow: 0px 1px 10px 3px rgb(195, 195, 195);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.3s ease;
    background: #fff; /* Ensure card background is white */
}

/* Card Image Containers */
.property-list-card-image {
    position: relative;
    height: 339px;
    width: 100%;
    border-radius: 20px 20px 0px 0px;
    background-position: center;
    background-size: cover;
}

.property-list-card-image .like-btn {
    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;
}

.property-list-card-image .like-btn.active {
    color: red;
}

/* Card Description/Content Area */
.property-list-card-content {
    height: 151px;
    width: 100%;
    border-radius: 0 0 20px 20px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 10px;
    background: #fff;
}

.property-list-content-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.property-list-content-top h1 {
    font-weight: 600;
    font-size: 20px;
    display: flex;
    align-items: flex-end;
    gap: 10px;
    margin: 0;
}

/* More Button Dropdown */
.property-list-more-container {
    position: relative;
    display: inline-block;
}

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

.property-list-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;
}

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

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

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

/* Amenities (Beds/Baths/Size) */
.property-list-amenities {
    display: flex;
    justify-content: flex-start;
    gap: 20px;
    flex-wrap: nowrap;
    color: #333;
}

.property-list-amenities span {
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.property-list-amenities span img {
    height: 16px;
    width: 16px;
}

/* Name and Location */
.property-list-name-location {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.property-list-name-location .property-list-name {
    font-size: 16px;
    font-weight: 500;
    color: #000;
    margin: 0;
}

.property-list-name-location .property-list-location {
    font-size: 14px;
    color: #717171;
    font-weight: 400;
    margin: 0;
}

/* Property Tags/Type (Hidden in Grid View) */
.property-list-name-location span {
    display: none;
}

/* Description Block (Hidden in Grid View) */
.property-list-description-block {
    display: none;
    margin-top: 10px;
    position: relative;
    font-size: 14px;
    color: #444;
}

.property-list-description-text {
    max-height: 60px;
    overflow: hidden;
    transition: max-height 0.4s ease;
    line-height: 1.5;
    padding-right: 10px;
}

.property-list-description-block.expanded .property-list-description-text {
    max-height: 500px;
}

.property-list-readmore-btn {
    width: 100px;
    height: 30px;
    border-radius: 5px;
    background: #46AD67;
    border: none;
    color: white;
    cursor: pointer;
    margin-top: 15px;
    font-size: 15px;
    padding: 0;
    transition: background 0.3s ease;
}

.property-list-readmore-btn:hover {
    background: #218838;
}

/* --- LIST VIEW SPECIFIC STYLES --- */
.property-list-cards.list-view .property-list-card {
    height: 350px !important;
    flex-direction: row;
    border: 1px solid #46AD67;
    box-shadow: none;
}

.property-list-cards.list-view .property-list-card .property-list-card-image {
    border-radius: 20px 0 0 20px;
    width: 30%; /* Image takes 30% width */
    height: 100%;
}

.property-list-cards.list-view .property-list-card .property-list-card-content {
    height: 100%;
    width: 70%; /* Content takes 70% width */
    border-radius: 0;
    justify-content: flex-start !important;
    padding: 15px;
    padding-left: 20px;
    gap: 15px;
}

.property-list-cards.list-view .property-list-card .property-list-content-top h1 {
    font-size: 18px;
}

.property-list-cards.list-view .property-list-card .property-list-content-top h1 img {
    width: 20px;
    height: 20px;
}

.property-list-cards.list-view .property-list-card .property-list-amenities {
    margin-top: 5px;
    gap: 15px;
}

.property-list-cards.list-view .property-list-card .property-list-name-location .property-list-name {
    font-size: 16px;
    margin-top: 5px;
}

.property-list-cards.list-view .property-list-card .property-list-description-block {
    display: block; /* Show description block in List View */
}


/* --- MAP SECTION --- */
.property-list-map {
    width: 100%;
    height: 859px;
    border-radius: 20px;
}

/* --- COMBINED SECTION (List + Map) --- */
.property-list-combined {
    width: 100%;
    height: 930px;
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    border-radius: 20px;
    overflow: hidden;
    gap: 15px;
}

/* LEFT SIDE – Property Cards (Combined View) */
.property-list-combined-left {
    width: 63%;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 15px;
    overflow-y: auto;
    scrollbar-width: none;
}

.property-list-combined-left::-webkit-scrollbar {
    display: none;
}

/* Card in Combined View (Overrides for Combined Left) */
.property-list-combined-left .property-list-card {
    flex-direction: row;
    align-items: stretch;
    width: 100%;
    height: 300px; /* Adjusted height for combined view */
    border-radius: 16px;
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.1);
}

.property-list-combined-left .property-list-card .property-list-card-image {
    width: 50%;
    height: 100%;
    border-radius: 16px 0 0 16px;
}

.property-list-combined-left .property-list-card .property-list-card-content {
    width: 50%;
    height: 100%;
    padding: 18px 20px;
    border-radius: 0 16px 16px 0;
    gap: 15px;
}

/* RIGHT SIDE – Map (Combined View) */
.property-list-combined-right {
    width: 37%;
    height: 100%;
    border-radius: 16px;
    overflow: hidden;
    background: #e6f1eb;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
}

#property-list-combinedMap {
    width: 100%;
    height: 100%;
    border: none;
}


/* ======================================= */
/* ====== RESPONSIVE DESIGN (Media Queries) ====== */
/* ======================================= */

@media (max-width: 992px) {
    .property-list-container {
        width: 90%;
        padding-top: 80px;
        padding-bottom: 40px;
    }

    .property-list-title-and-description {
        flex-direction: column;
        height: auto;
        gap: 20px;
        align-items: flex-start;
    }

    .property-list-title-and-description p {
        padding-inline-end: 0;
    }

    .property-list-icons {
        align-self: flex-end;
    }

    /* Tabs */
    .property-list-tabs {
        flex-wrap: wrap;
        gap: 10px;
    }

    .property-list-tab-btn {
        font-size: 16px;
        padding: 0 3%;
    }

    /* Grid View - 2 columns */
    .property-list-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    /* List View (stacked) */
    .property-list-cards.list-view .property-list-card {
        height: auto !important;
        flex-direction: column;
    }

    .property-list-cards.list-view .property-list-card .property-list-card-image {
        border-radius: 20px 20px 0 0;
        width: 100%;
        height: 250px;
    }

    .property-list-cards.list-view .property-list-card .property-list-card-content {
        width: 100%;
        height: auto;
        padding: 20px;
    }

    /* Combined Section (stacked) */
    .property-list-combined {
        flex-direction: column;
        height: auto;
        gap: 15px;
    }

    .property-list-combined-left,
    .property-list-combined-right {
        width: 100%;
        height: 500px;
    }

    .property-list-combined-left .property-list-card {
        flex-direction: column;
        height: auto !important;
    }

    .property-list-combined-left .property-list-card .property-list-card-image {
        width: 100%;
        height: 200px;
    }

    .property-list-combined-left .property-list-card .property-list-card-content {
        width: 100%;
    }

    /* Map */
    .property-list-map {
        height: 600px;
    }
}

@media (max-width: 768px) {
    .property-list-container {
        width: 95%;
        padding-top: 60px;
        padding-bottom: 30px;
    }

    /* Tabs - 2x2 Grid Layout */
    .property-list-tabs {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    /* Ocultar List View y Combined en móvil */
    .property-list-tab-btn[data-tab="list"],
    .property-list-tab-btn[data-tab="combined"] {
        display: none !important;
    }

    .property-list-tab-btn {
        width: 100%;
        font-size: 14px;
    }

    .property-list-sort-btn {
        grid-column: 1 / -1;
        font-size: 13px;
    }

    /* Grid View - 1 column */
    .property-list-cards {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .property-list-container {
        width: 100%;
        padding: 50px 15px 30px;
    }

    .property-list-title-and-description h1 {
        font-size: 22px;
    }

    .property-list-title-and-description p {
        font-size: 12px;
    }

    .property-list-icons {
        width: 100%;
        justify-content: flex-end;
    }

    /* Combined & Map */
    .property-list-combined-left,
    .property-list-combined-right {
        height: 350px;
    }

    .property-list-map {
        height: 400px;
    }
}

/* ======================================= */
/* ====== GALLERY VIEW STYLES (Grid Cards) ====== */
/* ======================================= */

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

/* Individual Property Card in Gallery View */
.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;
    background: #fff;
}

/* Card Image Section */
.sec_2_2 > div .sec_2_2_img1 {
    position: relative;
    width: 100%;
    height: 220px;
    border-radius: 20px 20px 0px 0px;
    overflow: hidden;
}

/* Like Button in Gallery View */
.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;
    z-index: 10;
}

/* Gallery View Image */
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;
}

/* Card Description Section */
.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;
}

/* Ocultar descripción solo en Gallery View (no en List View) */
.sec_2_2 > div:not(.list-view) .property-description {
    display: none !important;
}

/* Mostrar los botones en Gallery View */
.sec_2_2 > div:not(.list-view) .property-description-section {
    margin-top: auto;
    display: flex !important;
    flex-direction: column;
    padding-top: 5px;
    gap: 8px;
}

.sec_2_2 > div:not(.list-view) .property-buttons {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: 0;
    align-items: center;
}

/* Estilo de enlaces en lugar de botones para Gallery View */
.sec_2_2 > div:not(.list-view) .read-more-btn,
.sec_2_2 > div:not(.list-view) .view-property-btn {
    background: none;
    color: #46AD67;
    border: none;
    padding: 0;
    border-radius: 0;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s ease;
    width: auto;
    text-align: left;
    text-decoration: none;
}

.sec_2_2 > div:not(.list-view) .read-more-btn:hover,
.sec_2_2 > div:not(.list-view) .view-property-btn:hover {
    color: #2d8048;
    text-decoration: underline;
}

.sec_2_2 > div .read-more-btn:hover,
.sec_2_2 > div .view-property-btn:hover {
    background: #3d9558;
}

/* Ocultar precio en el header de Gallery View */
.sec_2_2 > div .property-header {
    display: none !important;
}

/* Card Header (Name/Location) */
.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 .property-name,
.property-location {
    margin: 0;
}

/* Card Amenities (Beds/Baths/Size) */
.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;
}

/* Property Type Section - Always at bottom */
.sec_2_2 > div .sec_2_2_des3 {
    display: flex;
    flex-direction: row;
    gap: 4px;
    border-top: #ccc solid 1px;
    padding-top: 10px;
    margin-top: auto;
}

.sec_2_2 > div .sec_2_2_des3 span {
    font-size: 14px;
    font-weight: 500;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Ocultar sec_2_2_des3 en List View */
.property-card.list-view .sec_2_2_des3 {
    display: none !important;
}

/* Price Tag Overlay */
.price-tag {
    position: absolute;
    bottom: 15px;
    left: 15px;
    background: rgba(255, 255, 255, 0.95);
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
    color: #000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 5;
}

/* Slider Wrapper for Card Images */
.slider-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

.property-slider {
    width: 100%;
    height: 100%;
}

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

/* Slick Slider Arrows */
.slick-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 11;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.slick-arrow:hover {
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.slick-prev {
    left: 10px;
}

.slick-next {
    right: 10px;
}

.slick-prev:before,
.slick-next:before {
    font-size: 20px;
    color: #333;
}

/* Responsive Adjustments for Gallery View */
@media (max-width: 768px) {
    .sec_2_2 {
        grid-template-columns: 1fr;
    }
    
    .sec_2_2 > div {
        min-height: 350px;
    }
    
    .sec_2_2 > div .sec_2_2_img1 {
        height: 200px;
    }
    
    div.sec_2_2_img1 > img {
        height: 200px;
    }
}
