/* =====================================================
   PROPERTY SEARCH PAGE STYLES
   ===================================================== */

/* =============================
   1. LAYOUT CONTAINERS
   ============================= */
.property-search-container {
    display: flex;
    flex-direction: column;
    gap: 0rem;
    padding: 0rem;
    max-width: 100%;
    margin: 0 auto;
}

.search-main {
    display: grid;
    grid-template-columns: 60% minmax(500px, 1fr);
    grid-template-rows: 1fr;
    gap: 0px;
    width: 100%;
}

/* =============================
   2. SIDEBAR & FILTERS
   ============================= */
.search-sidebar {
    width: 320px;
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    flex-shrink: 0;
    margin-right: 20px;
}

.filter-section {
    padding-bottom: 5px;
    margin-bottom: 20px;
    border-right: 1px solid #eee;
    padding-right: 20px;
}
.filter-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    border-right: none;
}
.filter-section h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: #333;
}
.filter-group {
    margin-bottom: 1rem;
}
.filter-group:last-child {
    margin-bottom: 0;
}
.filter-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #666;
    font-size: 1rem;
    white-space: nowrap;
}
.filter-select,
.filter-input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
}
.radio-group,
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.radio-group label,
.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0;
    cursor: pointer;
    font-size: 1.15rem;
    line-height: 45px;
}
.checkbox-group input[type="checkbox"],
.radio-group input[type="radio"] {
    width: 20px;
    height: 20px;
}
.price-range {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

/* =============================
   3. FILTER ACTIONS & BUTTONS
   ============================= */
.search-button {
    width: 100%;
    padding: 0.75rem;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.2s;
}
.search-button:hover {
    background: #0056b3;
}
.filter-actions .search-button {
    width: auto;
}
.filter-actions .advanced-search-button {
    background: #fff;
    border: 1px solid #eee;
    color: #000;
    cursor: pointer;
    transition: background-color 0.2s;
}

/* =============================
   4. ADVANCED SEARCH
   ============================= */
.advanced-search-form .filter-section {
    border-right: none;
    border-bottom: none;
    padding-right: 0;
    padding-bottom: 20px;
    margin-bottom: 20px;
}
.advanced-search-form .filter-section label {
    line-height: 1.35em;
    font-size: 1rem;
}
.elementor-kit-10 .advanced-search-form .filter-section select {
    height: auto;
    border: 1px solid #eee;
    border-radius: 4px;
    padding: 10px !important;
    font-size: 1rem;
}

/* =============================
   5. MAP STYLES
   ============================= */
.property-map {
    flex: 1;
    height: calc(100vh - 233px);
    border-radius: 0px;
    background-color: #f5f5f5;
    position: relative;
    min-height: 400px;
}
.property-map-toggle {
    display: none;
}
.map-info-content {
    padding: 10px 15px;
}
.map-info-window {
    padding: 0;
    max-width: 300px;
    border-radius: 0px;
}
.map-info-window h4 {
    margin: 0 0 0.5rem;
    font-size: 1.2rem;
}
.map-info-window h4 a {
    color: #000 !important;
}
.map-info-window p {
    margin: 0 0 0.5rem;
    color: #666;
    font-weight: 500;
    font-size: 14px;
}
.map-info-window .button {
    display: inline-block;
    padding: 14px 1rem;
    background: #FF6B00;
    color: #fff;
    text-decoration: none;
    border-radius: 0px 0px 4px 4px;
    font-size: 0.9rem;
    width: 100%;
    text-align: center;
}
.map-info-window .button:hover {
    color: #000;
}
.gm-ui-hover-effect {
    display: none !important;
}
.gm-style .gm-style-iw-c {
    padding: 0 !important;
    border-radius: 0 !important;
}
.gm-style .gm-style-iw-d {
    padding: 0 !important;
    overflow: hidden !important;
}
.gm-style .gm-style-iw-t::after {
    display: none !important;
}
.gm-style .gm-style-iw-chr {
    padding: 0 !important;
    margin: 0 !important;
    display: none !important;
}

/* =============================
   6. PROPERTY RESULTS & CARDS
   ============================= */
.property-results {
    height: 100%;
    min-height: 100%;
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    grid-template-rows: 1fr auto;
    gap: 16px;
    overflow-y: auto;
    padding: 20px;
    position: relative;
    background-color: #e3e3e3;
}
.results-footer {
    grid-column: 1 / -1;
    width: calc(100% + 40px);
    margin-left: -20px;
    margin-right: -20px;
    margin-bottom: -20px;
}
.property-card-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    height: min-content;
    gap: 16px;
    overflow-y: auto;
    padding: 0px;
    position: relative;
    background-color: #e3e3e3;
}

/* ---- Property Card ---- */
.chl-property-card.refined-card {
    background: #fff;
    border-radius: 0px;
    box-shadow: none;
    overflow: hidden;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    height: fit-content;
}
.chl-property-card-image-wrapper {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: #f3f3f3;
}
.chl-property-card-image-wrapper button.chl-favorite-btn {
    padding: 0;
    border: none;
    border-radius: 100%;
    width: 30px;
    height: 30px;
    line-height: 33px;
    padding: 0 !important;
    top: 16px;
    right: 15px;
    background-color: #fff !important;
}
.chl-property-card-image-wrapper button.chl-favorite-btn.on {
    background-color: #ff6a1a !important;
}
.chl-property-card-image-wrapper button.chl-favorite-btn span {
    display: none;
}
.chl-property-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.chl-property-card-badge {
    position: absolute;
    top: 18px;
    left: 15px;
    line-height: 1em;
    background: rgba(0,0,0,.5);
    color: #fff;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: .85rem;
    font-weight: 400;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}
.chl-property-card-content {
    padding: 20px 24px 20px 24px;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
}
.chl-property-card-title.refined-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0 0 16px 0;
    color: #222;
    line-height: 1.45em;
}
.elementor-kit-10 .chl-property-card-title.refined-title a {
    color: #000;
}
.chl-property-card-meta.refined-meta {
    margin-bottom: 0;
}
.chl-property-card-location,
.chl-property-card-price {
    display: flex;
    align-items: center;
    font-size: 1.0rem;
    font-weight: 500;
    color: #666;
    margin-bottom: 6px;
    line-height: 1.2em;
}
.chl-property-card-location i,
.chl-property-card-price i {
    margin-right: 7px;
    color: #aaa;
}
.chl-property-card-actions.refined-actions {
    display: flex;
    gap: 16px;
    margin-top: 24px;
}
.button.refined-view-details {
    background: #ff6a1a;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 10px 0;
    font-size: 1.0rem;
    font-weight: 400;
    flex: 1 1 0;
    text-align: center;
    transition: background 0.2s;
}
.button.refined-view-details:hover {
    background: #e65a00;
    color: #fff !important;
}
.button.refined-call-now {
    background: #fff;
    color: #222;
    border: 2px solid #222;
    border-radius: 4px;
    padding: 10px 0;
    font-size: 1.0rem;
    font-weight: 400;
    flex: 1 1 0;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.2s, color 0.2s;
}
.button.refined-call-now i {
    font-size: 1.1em;
}
.button.refined-call-now:hover {
    background: #f3f3f3;
    color: #ff6a1a;
    border-color: #ff6a1a;
}

/* =============================
   7. ESSENTIAL FILTERS
   ============================= */
.essential-filters {
    width: 100%;
    background: #fff;
    padding: 25px;
    border-radius: 0px;
    border-bottom: 1px solid #eee;
    margin-bottom: 00px;
    box-shadow: none;
}
.essential-filters .filter-actions {
    flex: 1.25;
    padding-left: 0;
}
.essential-filters .filter-actions button {
    width: auto;
    padding: 12px 35px;
}

/* =============================
   8. PAGINATION
   ============================= */
.property-search-container .pagination {
    grid-column: 1 / -1;
    width: 100%;
    justify-content: center;
}
.property-search-container .pagination .page-numbers {
    font-size: 1.1rem;
    font-weight: 500;
    color: #222;
    display: inline-block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    background: none;
    border: 0px solid var(--e-global-color-primary);
    border-radius: 100%;
}
.property-search-container .pagination .page-numbers.current {
    border-width: 1px;
    font-weight: 600;
}
.property-search-container .pagination .page-numbers.next,
.property-search-container .pagination .page-numbers.prev {
    width: auto;
}

/* =============================
   9. PRICE RANGE SLIDER
   ============================= */
.price-range-slider {
    margin: 0px 0px 10px;
    padding-top: 0px;
}
.price-range-slider .noUi-connect {
    background: var(--e-global-color-primary);
}
.price-range-slider .noUi-handle {
    border-radius: 100%;
    height: 25px;
    width: 25px;
    background: #000;
    border: 4px solid #fff;
    top: -8px;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.1);
    cursor: pointer;
}
.price-range-slider .noUi-handle:before,
.price-range-slider .noUi-handle:after {
    display: none;
}
.price-range-slider .noUi-handle:hover {
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.3);
    background: #333;
}
.price-range-values {
    display: flex;
    justify-content: space-between;
    margin-top: 0px;
    font-size: .8em;
    color: #333;
    margin-bottom: 15px;
    line-height: 1em;
    font-weight: 400;
}
.noUi-horizontal {
    box-shadow: none;
    height: 10px;
    border-color: #fff;
}

/* =============================
   10. PAGE-SPECIFIC OVERRIDES
   ============================= */
.page-template-page-property-search .site-footer {
    display: none;
}
.map-info-window,
.gm-style .gm-style-iw-c {
    border-radius: 0 !important;
}

/* =====================================================
   RESPONSIVE DESIGN (MEDIA QUERIES)
   ===================================================== */

/* Desktop: 1025px and higher */
@media (min-width: 1025px) {
    .property-results {
        grid-template-columns: repeat(1, 1fr);
        height: calc(100vh - 233px);
        overflow-y: scroll;
    }
}

/* Large Tablet: 1121px to 1650px */
@media (max-width: 1650px) and (min-width: 1121px) {
    .search-main {
        flex-direction: column;
        grid-template-columns: 42% minmax(651px, 1fr);
    }
}


/* Tablet: 768px to 1120px */
@media (max-width: 1120px) and (min-width: 768px) {
    .search-main {
        flex-direction: column;
        grid-template-columns: 52% minmax(320px, 1fr);
    }
    .property-map,
    .property-results {
        width: 100%;
        min-height: 400px;
    }
    .property-card-list {
        grid-template-columns: 1fr;
    }
}

/* Tablet & Mobile: 1024px and lower */
@media (max-width: 1024px) {
    #property-search-form {
        flex-direction: column;
        gap: 1rem;
    }
    .essential-filters {
        padding: 1rem;
    }
    .essential-filters .filter-section {
        padding-left: 0;
        border: none;
        margin-bottom: 0px;
        padding-right: 0;
    }
    .essential-filters .filter-actions {
        gap: 10px;
        margin-bottom: 20px;
        flex-direction: column;
    }
    .essential-filters .filter-actions button {
        width: 100%;
    }
    .essential-filters .filter-actions button.advanced-search-button {
        padding: 0;
        font-size: .85em;
    }

    .search-main {
        grid-template-columns: 1fr;
    }
    .property-search-container {
        padding: 0rem;
    }
    .property-search-container .pagination {
        width: 75%;
    }
    .property-search-container .property-card-list {
        grid-template-columns: 1fr;
    }
    .property-results {
        grid-template-columns: 1fr;
    }
    .map-placeholder {
        display: none;
    }
    .chl-property-card-title.refined-title {
        font-size: 1.15rem;
        margin-bottom: 8px;
    }
    .chl-property-card-location, .chl-property-card-price {
        font-size: .85rem;
        margin-bottom: 0;
        line-height: 1.25rem;
    }
    .chl-property-card-meta.refined-meta {
        margin-bottom: 8px;
    }
    .chl-property-card-actions.refined-actions {
        margin-top: 8px;
    }
    .chl-property-card-actions.refined-actions .button {
        padding: 8px 0;
        line-height: 2em;
        border-width: 2px;
        font-size: .85rem;
    }
    .chl-property-card-content {
        padding: 16px;
    }
    .chl-property-card-badge {
        font-size: .75rem;
        padding-top: 0px;
        padding-bottom: 0px;
    }
    .property-map {
        position: absolute !important;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        z-index: 5;
    }
    .property-map.hidden {
        display: none;
    }
    .property-map.visible {
        display: block;
    }
    .property-results.hidden {
        display: none;
    }

    .property-map-toggle {
        display: block;
        position: absolute;
        bottom: 0px;
        left: 0px;
        width: 100vw;
        z-index: 8;
        text-align: center;
        position: fixed;
    }

    .property-map-toggle .mini-wrap {
        background: #fff;
        padding: 10px 25px;
        box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
        border-radius: 0;
        width: auto;
        display: inline-block
    }
    .property-map-toggle .mini-wrap a {
        font-weight: 500;
        display: inline-block;
        padding: 0 8px;
        font-size: 1rem;
    }
    .property-map-toggle .mini-wrap a:first-child {
        border-right: 1px solid #ddd;
        padding-right: 15px;
    }
}


/* Tablet: 768px to 1120px */
@media (max-width: 1120px) and (min-width: 768px) {
    .property-search-container .property-card-list {
        grid-template-columns: 1fr 1fr;
    }
}