/* Map View Styles */

.section.product-list.map-view ul.products,
.section.product-list.map-view .section.section-boxes,
.section.product-list.map-view .woocommerce-result-count,
.section.product-list.map-view .woocommerce-ordering {
    display: none !important;
}

.section.product-list.map-view .map-view-container {
    margin-top: 0;
}

.section.product-list.map-view #filter-toggle {
    display: inline-block !important;
}

.section.product-list.map-view .col30 {
    width: 100% !important;
    position: initial !important;
    display: none;
}
.section.product-list.map-view .col30.active {
    display: block;
}

.section.product-list.map-view .col70 {
    width: 100% !important;
}

.section.product-list.map-view .col70 .woocommerce-pagination {
    display: none;
}

/* Map View Container */
.map-view-container {
    margin: 20px 0;
    text-align: center;
}

.map-view-container .map-view-btn {
    width: 100%;
    background: #fff;
    color: #253250;
    padding: 10px 25px;
    border-radius: 6px 0 6px 0;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.2s;
    border: 1px solid #253250;
}

.map-view-container .map-view-btn:before {
    content: "\f279";
    font-size: 1.6rem;
    font-weight: 700;
    font-family: "Font Awesome 6 Free";
    margin-right: 5px;
}

.map-view-container .map-view-btn:hover {
    background: #253250;
    color: #FFF;
}

/* Collapsible Map Section */
.map-section {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-in-out;
    background: white;
    box-shadow: 0.0145rem 0.029rem 0.174rem rgba(27, 40, 50, 0.01698), 0.0335rem 0.067rem 0.402rem rgba(27, 40, 50, 0.024), 0.0625rem 0.125rem 0.75rem rgba(27, 40, 50, 0.03), 0.1125rem 0.225rem 1.35rem rgba(27, 40, 50, 0.036), 0.2085rem 0.417rem 2.502rem rgba(27, 40, 50, 0.04302), 0.5rem 1rem 6rem rgba(27, 40, 50, 0.06), 0 0 0 0.0625rem rgba(27, 40, 50, 0.015);
    border-radius: 6px 0 6px 0;
}

.map-section.active {
    max-height: 600px;
}

.map-section .map-content {
    height: 600px;
}

.map-section .map-content .map-layout {
    display: flex;
    height: 100%;
}

.map-section .map-content .map-layout .map-area {
    flex: 1.7;
}

.map-section .map-content .map-layout .map-area #google-map {
    width: 100%;
    height: 100%;
}

.map-section .map-content .map-layout .map-sidebar {
    flex: 1;
    display: flex;
    flex-direction: column;
    max-width: 500px;
}

.map-section .map-content .map-layout .map-sidebar .sidebar-header {
    padding: 16px;
    background: #253250;
    color: #fff;
    border-bottom: 1px solid #ddd;
}

.map-section .map-content .map-layout .map-sidebar .sidebar-header h3 {
    margin: 0;
    font-size: 1.6rem;
    color: #FDDB00;
    text-transform: initial;
    font-weight: 400;
}

.map-section .map-content .map-layout .map-sidebar .properties-list {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.map-section .map-content .map-layout .map-sidebar .properties-list .property-item {
    display: flex;
    margin-bottom: 12px;
    cursor: pointer;
    background: white;
    transition: all 0.2s;
    border: 1px solid #a2afb9;
    border-radius: 6px 0 6px 0;
    overflow: hidden;
}

.map-section .map-content .map-layout .map-sidebar .properties-list .property-item.active {
    border: 1px solid #253250;
}

.map-section .map-content .map-layout .map-sidebar .properties-list .property-item .property-image {
    width: 33%;
    object-fit: cover;
    flex-shrink: 0;
}

.map-section .map-content .map-layout .map-sidebar .properties-list .property-item .property-info {
    flex: 1;
    padding: 16px;
}

.map-section .map-content .map-layout .map-sidebar .properties-list .property-item .property-info h4 {
    margin: 0 0 8px 0;
    font-size: 14px;
    font-weight: 700;
    color: #253250;
}

.map-section .map-content .map-layout .map-sidebar .properties-list .property-item .property-info .property-price {
    font-weight: bold;
    margin-bottom: 8px;
    padding: 5px 10px;
    background: #CC2500;
    color: #fff;
    font-size: 13px;
    display: inline-block;
    float: left;
}

.map-section .map-content .map-layout .map-sidebar .properties-list .property-item .property-info .property-price .pppw b {
    font-weight: bold;
}

.map-section .map-content .map-layout .map-sidebar .properties-list .property-item .property-info .property-price .pppw span {
    font-weight: normal;
}

.map-section .map-content .map-layout .map-sidebar .properties-list .property-item .property-info .term {
    width: 100%;
    float: left;
    clear: both;
    font-size: 12px;
    margin-bottom: 8px;
}

.map-section .map-content .map-layout .map-sidebar .properties-list .property-item .property-info .property-bullets {
    display: flex;
    flex-direction: row;
    gap: 10px;
    flex-wrap: wrap;
    width: 100%;
    margin: 0 0 8px 0;
}

.map-section .map-content .map-layout .map-sidebar .properties-list .property-item .property-info .property-bullets > span {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
}

.map-section .map-content .map-layout .map-sidebar .properties-list .property-item .property-info .property-bullets > span.rooms img,
.map-section .map-content .map-layout .map-sidebar .properties-list .property-item .property-info .property-bullets > span.bathshower_rooms img,
.map-section .map-content .map-layout .map-sidebar .properties-list .property-item .property-info .property-bullets > span.property_type img {
    width: 24px;
    height: 24px;
}

.map-section .map-content .map-layout .map-sidebar .properties-list .property-item .property-info .property-link {
    float: left;
    clear: both;
    color: #253250;
    font-size: 14px;
    text-decoration: underline;
    display: inline-block !important;
    background: #FDDB00 !important;
    color: #253250 !important;
    padding: 7px 18px !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    text-transform: uppercase !important;
    outline: 0 !important;
    border-radius: 6px 0 6px 0 !important;
    text-align: center !important;
    border: 1px solid #fddc18 !important;
    cursor: pointer !important;
    margin-bottom: 0 !important;
    line-height: 1.5 !important;
    text-decoration: none !important;
    transition: 0.5s;
}

.map-section .map-content .map-layout .map-sidebar .properties-list .property-item .property-info .property-link:hover {
    background: #253250 !important;
    color: #FFF !important;
    border: 1px solid #253250 !important;
}

/* Info Window Styles - Updated to match sidebar styling */
.map-info-window {
    min-width: 280px;
    max-width: 320px;
}

.map-info-window .info-image {
    width: 100%;
    height: 120px;
    object-fit: cover;
}

.map-info-window .info-details {
    padding: 8px;
}

.map-info-window .info-details h4 {
    margin: 0 0 8px 0;
    font-size: 14px;
    font-weight: 700;
    color: #253250;
}

.map-info-window .info-details .info-price {
    font-weight: bold;
    margin-bottom: 8px;
    padding: 5px 10px;
    background: #CC2500;
    color: #fff;
    font-size: 13px;
    display: inline-block;
}

.map-info-window .info-details .info-price .pppw b {
    font-weight: bold;
}

.map-info-window .info-details .info-price .pppw span {
    font-weight: normal;
}

.map-info-window .info-details .info-term {
    width: 100%;
    font-size: 12px;
    margin-bottom: 8px;
    clear: both;
}

.map-info-window .info-details .info-bullets {
    display: flex;
    flex-direction: row;
    gap: 8px;
    flex-wrap: wrap;
    width: 100%;
    margin: 0 0 12px 0;
}

.map-info-window .info-details .info-bullets > span {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
}

.map-info-window .info-details .info-bullets > span.info-rooms img,
.map-info-window .info-details .info-bullets > span.info-bathrooms img,
.map-info-window .info-details .info-bullets > span.info-property-type img {
    width: 20px;
    height: 20px;
}

.map-info-window .info-details .info-link {
    display: inline-block !important;
    background: #FDDB00 !important;
    color: #253250 !important;
    padding: 6px 14px !important;
    font-size: 12px !important;
    font-weight: 400 !important;
    text-transform: uppercase !important;
    outline: 0 !important;
    border-radius: 6px 0 6px 0 !important;
    text-align: center !important;
    border: 1px solid #fddc18 !important;
    cursor: pointer !important;
    margin-bottom: 0 !important;
    line-height: 1.5 !important;
    text-decoration: none !important;
    transition: 0.3s;
}

.map-info-window .info-details .info-link:hover {
    background: #253250 !important;
    color: #FFF !important;
    border: 1px solid #253250 !important;
}

/* Responsive */
@media (max-width: 768px) {
    .map-section {
        width: 100%;
        float: left;
    }

    .map-section.active {
        max-height: 1300px;
    }
    
    .map-section .map-content {
        height: 1300px;
    }
    
    .map-section .map-content .map-layout {
        flex-direction: column;
    }
    
    .map-section .map-content .map-layout .map-area {
        flex: 1;
        border-right: none;
        border-bottom: 1px solid #ddd;
        height: 500px;
    }
    
    .map-section .map-content .map-layout .map-sidebar {
        max-width: none;
        flex: 1;
        height: 800px;
    }

    .map-info-window {
        min-width: 240px;
        max-width: 280px;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .map-section .map-content .map-layout .map-sidebar .properties-list .property-item {
        flex-direction: column;
    }

    .map-section .map-content .map-layout .map-sidebar .properties-list .property-item .property-image {
        width: 100%;
        aspect-ratio: 2 / 1;
    }
}

@media (min-width: 1024px) {
    body.archive.woocommerce #page .product-list.map-view .col30 {
        max-height: 300px;
    }
    body.archive.woocommerce #page .product-list.map-view .col30 h3 {
        margin-top: 0;
    }
}