/* Custom Property Listing Stylesheet */

:root {
    --primary-color: #144168;
    --primary-hover: #0c2b47;
    --accent-color: #65BFE2;
    --text-dark: #0C1C36;
    --text-muted: #5A759D;
    --bg-light: #FBFBFB;
    --bg-card: #FFFFFF;
    --border-color: #E4E8EC;
    --border-accent: #E4DCCF;
    --border-radius-card: 20px;
    --border-radius-pill: 25px;
    --shadow-soft: 6px 6px 36px rgba(0, 0, 0, 0.05);
    --shadow-hover: 12px 12px 54px rgba(0, 0, 0, 0.1);
    --transition-base: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Base Wrapper styling */
.property-archive-wrapper {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 40px;
    align-items: start;
    margin: 40px auto;
    font-family: 'Montserrat', sans-serif;
}

/* --- FILTER SIDEBAR --- */
.property-filters-sidebar {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-card);
    padding: 30px;
    box-shadow: var(--shadow-soft);
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
}

.filter-header h3 {
    font-size: 22px;
    font-weight: 500;
    color: var(--text-dark);
    margin: 0;
}

#clear-all-filters {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    padding: 0;
    transition: var(--transition-base);
}

#clear-all-filters:hover {
    color: var(--primary-color);
}

.filter-group {
    margin-bottom: 30px;
}

.filter-group h4 {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 1.5px;
    margin: 0 0 15px 0;
}

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

/* Custom Checkbox Skinning */
.custom-checkbox {
    display: flex;
    align-items: center;
    position: relative;
    padding-left: 30px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-dark);
    user-select: none;
    line-height: 20px;
}

.custom-checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 20px;
    width: 20px;
    background-color: #fff;
    border: 1.5px solid var(--border-color);
    border-radius: 4px;
    transition: var(--transition-base);
}

.custom-checkbox:hover input ~ .checkmark {
    border-color: var(--accent-color);
}

.custom-checkbox input:checked ~ .checkmark {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.custom-checkbox input:checked ~ .checkmark:after {
    display: block;
}

.custom-checkbox .checkmark:after {
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.custom-checkbox .count {
    margin-left: auto;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
}

/* Location Selector styling */
.select-wrapper {
    position: relative;
    width: 100%;
}

.select-wrapper::after {
    content: "▼";
    font-size: 8px;
    color: var(--text-muted);
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

.location-select {
    width: 100%;
    padding: 12px 20px;
    background: #FAF8F5;
    border: 1px solid var(--border-accent);
    border-radius: 12px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-dark);
    appearance: none;
    cursor: pointer;
    transition: var(--transition-base);
}

.location-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(20, 65, 104, 0.05);
}

.budget-preset-wrapper {
    margin-top: 15px;
}

/* Range Slider styling */
.price-range-labels {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 12px;
}

.range-slider-widget {
    position: relative;
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    margin: 20px 0 25px 0;
}

.slider-track {
    position: absolute;
    height: 100%;
    background: var(--accent-color);
    border-radius: 4px;
    left: 4%;
    right: 0%;
}

.range-slider-widget input[type="range"] {
    position: absolute;
    width: 100%;
    height: 8px;
    background: none;
    pointer-events: none;
    appearance: none;
    margin: 0;
    top: 0;
    left: 0;
    outline: none;
}

.range-slider-widget input[type="range"]::-webkit-slider-thumb {
    height: 18px;
    width: 18px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid var(--accent-color);
    cursor: pointer;
    pointer-events: auto;
    appearance: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.1s;
}

.range-slider-widget input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

/* --- RESULTS AREA --- */
.property-results-area {
    display: flex;
    flex-direction: column;
}

/* Active Tags */
.active-tags-container {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.active-tags-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 1.5px;
}

.active-tags-list {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.tag-chip {
    background: #FAF8F5;
    border: 1px solid var(--border-accent);
    color: var(--text-dark);
    font-size: 13px;
    font-weight: 500;
    padding: 6px 14px;
    border-radius: 30px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition-base);
}

.tag-chip .remove-tag {
    cursor: pointer;
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 600;
    line-height: 1;
}

.tag-chip:hover {
    background: #F0EDE8;
    border-color: #D3C9BC;
}

/* Results Header */
.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 35px;
}

.results-header h2 {
    font-size: 26px;
    font-weight: 300;
    color: var(--text-dark);
    margin: 0;
}

.results-header h2 .count-num {
    font-weight: 600;
}

.results-header h2 .loc-text {
    color: var(--text-muted);
}

.layout-toggles {
    display: flex;
    gap: 10px;
}

.layout-toggle-btn {
    height: 40px;
    width: 40px;
    border: 1px solid var(--border-color);
    background: #fff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-muted);
    transition: var(--transition-base);
    padding: 0;
}

.layout-toggle-btn svg {
    width: 18px;
    height: 18px;
}

.layout-toggle-btn:hover,
.layout-toggle-btn.active {
    border-color: var(--accent-color);
    background: var(--accent-color);
    color: #fff;
}

/* Loading Spinner */
.listing-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 0;
    color: var(--text-muted);
    font-weight: 500;
}

.spinner {
    border: 3px solid rgba(101, 191, 226, 0.1);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border-left-color: var(--accent-color);
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.no-results-found {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border-radius: var(--border-radius-card);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 16px;
    font-weight: 500;
    box-shadow: var(--shadow-soft);
}

/* --- PROPERTY LISTINGS GRID --- */
.property-grid-layout {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

/* PROPERTY CARD STYLING */
.property-card {
    background: var(--bg-card);
    border: 1px solid var(--border-accent);
    border-radius: var(--border-radius-card);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: var(--transition-base);
    height: 100%;
}

.property-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
    border-color: #d3c9bc;
}

.card-image-wrapper {
    position: relative;
    height: 260px;
    overflow: hidden;
}

.card-image-bg {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.property-card:hover .card-image-bg {
    transform: scale(1.08);
}

.status-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(101, 191, 226, 0.9);
    backdrop-filter: blur(4px);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 6px 16px;
    border-radius: 30px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.status-badge.new-launch {
    background: rgba(101, 191, 226, 0.95);
}

.status-badge.under-construction {
    background: rgba(20, 65, 104, 0.95);
}

.status-badge.ready-to-move {
    background: rgba(85, 169, 201, 0.95);
}

.wishlist-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    height: 38px;
    width: 38px;
    border-radius: 50%;
    background: #fff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    color: var(--text-dark);
    transition: var(--transition-base);
    padding: 0;
}

.wishlist-btn svg {
    width: 18px;
    height: 18px;
    transition: var(--transition-base);
}

.wishlist-btn:hover {
    transform: scale(1.1);
}

.wishlist-btn.favorited {
    background: #e84855;
    color: #fff;
}

.wishlist-btn.favorited svg {
    fill: #fff;
    stroke: #e84855;
}

.card-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.developer-name {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 1.5px;
    margin-bottom: 8px;
}

.property-title {
    font-size: 28px;
    font-weight: 300;
    margin: 0 0 12px 0;
    line-height: 1.25;
}

.property-title a {
    color: var(--text-dark);
    text-decoration: none;
    transition: var(--transition-base);
}

.property-title a:hover {
    color: var(--accent-color);
}

.location-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.location-wrapper svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}

.location-text {
    font-size: 14px;
    font-weight: 500;
}

.specs-badges {
    display: flex;
    gap: 10px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.spec-badge {
    background: #FAF8F5;
    border: 1px solid var(--border-accent);
    color: var(--text-dark);
    font-size: 13px;
    font-weight: 500;
    padding: 6px 16px;
    border-radius: var(--border-radius-pill);
    display: inline-flex;
    align-items: center;
    line-height: 1;
}

.spec-badge.rera-badge {
    border-color: #bce4be;
    background: #f4faf4;
    color: #30a420;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    border-top: 1px solid var(--border-accent);
    padding-top: 20px;
    margin-top: auto;
}

.price-wrapper {
    display: flex;
    flex-direction: column;
}

.price-value {
    font-size: 32px;
    font-weight: 400;
    color: var(--text-dark);
    line-height: 1.1;
}

.price-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 2px;
}

.enquire-btn {
    background: transparent;
    border: none;
    color: var(--primary-color);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    padding: 5px 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: var(--transition-base);
}

.enquire-btn:hover {
    color: var(--accent-color);
    transform: translateX(4px);
}

/* --- LIST VIEW OVERRIDES --- */
.property-list-layout {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.property-list-layout .property-card {
    flex-direction: row;
    height: 280px;
}

.property-list-layout .card-image-wrapper {
    width: 40%;
    height: 100%;
    flex-shrink: 0;
}

.property-list-layout .card-content {
    width: 60%;
    height: 100%;
    box-sizing: border-box;
}

/* --- ENQUIRE MODAL OVERLAY --- */
.enquire-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(12, 28, 54, 0.4);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.enquire-modal-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.enquire-modal-content {
    background: #fff;
    border: 1px solid var(--border-accent);
    border-radius: var(--border-radius-card);
    width: 90%;
    max-width: 500px;
    padding: 40px;
    box-shadow: var(--shadow-hover);
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.enquire-modal-overlay.open .enquire-modal-content {
    transform: translateY(0);
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 32px;
    border: none;
    background: none;
    cursor: pointer;
    color: var(--text-muted);
    transition: var(--transition-base);
}

.close-modal:hover {
    color: var(--text-dark);
}

.enquire-modal-content h3 {
    margin: 0 0 5px 0;
    font-size: 26px;
    font-weight: 500;
    color: var(--text-dark);
}

.modal-property-title {
    color: var(--accent-color);
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 30px 0;
}

.enquire-modal-content .form-group {
    margin-bottom: 20px;
}

.enquire-modal-content label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 1px;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.enquire-modal-content input[type="text"],
.enquire-modal-content input[type="tel"],
.enquire-modal-content input[type="email"],
.enquire-modal-content textarea {
    width: 100%;
    padding: 12px 16px;
    background: #FAF8F5;
    border: 1px solid var(--border-accent);
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-dark);
    box-sizing: border-box;
    transition: var(--transition-base);
}

.enquire-modal-content textarea {
    resize: none;
}

.enquire-modal-content input:focus,
.enquire-modal-content textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background: #fff;
}

.submit-enquiry-btn {
    width: 100%;
    padding: 16px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-base);
    box-shadow: 0 4px 15px rgba(20, 65, 104, 0.2);
}

.submit-enquiry-btn:hover {
    background: var(--primary-hover);
}

/* Success State inside Modal */
.enquiry-success-message {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px 0;
    text-align: center;
}

.success-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #f4faf4;
    border: 2px solid #30a420;
    color: #30a420;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 20px;
}

.enquiry-success-message p {
    font-size: 16px;
    color: var(--text-dark);
    font-weight: 500;
    margin: 0;
}

/* Pagination container styling */
.property-pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 40px;
    margin-bottom: 20px;
    width: 100%;
}

.property-pagination-list {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.property-pagination-list .pagination-btn {
    height: 44px;
    width: 44px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: #fff;
    color: var(--text-dark);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-base);
    padding: 0;
}

.property-pagination-list .pagination-btn:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
    transform: translateY(-2px);
}

.property-pagination-list .pagination-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

.property-pagination-list .pagination-btn.disabled {
    opacity: 0.4;
    pointer-events: none;
    cursor: not-allowed;
}

.property-pagination-list .pagination-arrow {
    font-size: 16px;
    font-weight: 500;
}

/* --- RESPONSIVE CSS --- */
@media (max-width: 1024px) {
    .property-archive-wrapper {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .property-filters-sidebar {
        display: block;
    }
}

@media (max-width: 768px) {
    .property-grid-layout {
        grid-template-columns: 1fr;
    }
    
    .property-list-layout .property-card {
        flex-direction: column;
        height: auto;
    }
    
    .property-list-layout .card-image-wrapper {
        width: 100%;
        height: 220px;
    }
    
    .property-list-layout .card-content {
        width: 100%;
    }
    
    .results-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
}
