:root {
    --primary-color: #e07c37;
    --primary-hover: #e07c37;
    --bg-light: #f6f7f9;
    --border-color: #ddd;
    --text-dark: #0d1b2a;
}


/* -------------------- SEARCH BAR -------------------- */
.search-bar {   
    background: #fff;
    padding: 10px;
    border-radius: 10px;
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    align-items: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    overflow: visible;
    position: relative;
    z-index: 1000; /* stays above other elements in page */
}

.search-bar select,
.search-bar input {
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 13px;
    background: #fff;
    min-width: 120px;
}

.search-bar input {
    flex: 1;
}

.search-btn {
    background: var(--primary-color);
    color: #fff;
    border: none;
    padding: 10px 18px;
    border-radius: 6px;
    white-space: nowrap;
}

/* -------------------- FILTER ROW -------------------- */
.filter-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
}

.filter-title {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-dark);
}

.filter-desc {
    margin: 0;
    font-size: 12px;
    color: #778ca3;
}

/* -------------------- SWITCH -------------------- */
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 22px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: '';
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--primary-color);
}

input:checked + .slider:before {
    transform: translateX(22px);
}

/* -------------------- AMENITIES -------------------- */
.amenities-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px 10px;
}

.amenities-grid label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
}

/* -------------------- PROPERTY LIST -------------------- */
.property-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Override global .property-item (homepage slider) on listing cards */
.property-list .property-card-new.property-item {
    flex: none;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    min-height: 0;
}

.property-card-new {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 20px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    background: #fff;
    border-radius: 18px;
    padding: 18px;
    border: 1px solid #eee;
    position: relative;
    cursor: pointer;
}

/* Listing card link + share (same pattern as landing) */
.property-list .property-card-new .property-card-link {
    position: absolute;
    inset: 0;
    z-index: 1;
    cursor: pointer;
    border-radius: 18px;
    text-decoration: none;
}

.property-list .property-card-new .property-card-link:focus {
    outline: 2px solid #0d6efd;
    outline-offset: 2px;
}

.property-list .property-card-new .property-left,
.property-list .property-card-new .property-right {
    pointer-events: none;
}

.property-list .property-card-new .property-actions,
.property-list .property-card-new .property-actions *,
.property-list .property-card-new .property-top .icon-box,
.property-list .property-card-new .btn-share-property,
.property-list .property-card-new .btn-contact-property {
    pointer-events: auto;
}

.property-list .property-card-new .property-actions,
.property-list .property-card-new .property-top .icon-box,
.property-list .property-card-new .btn-share-property,
.property-list .property-card-new .btn-contact-property {
    position: relative;
    z-index: 2;
}

.property-list .property-card-new .btn-share-property {
    flex-shrink: 0;
}

/* LEFT IMAGE */
.property-left {
    flex: 0 0 260px;
    width: 260px;
    max-width: 260px;
    min-width: 260px;
    flex-shrink: 0;
    align-self: stretch;
    display: flex;
    align-items: center;
    justify-content: center;
}

.property-img-new {
    display: block;
    width: 100%;
    max-width: 100%;
    height: 170px;
    min-height: 170px;
    border-radius: 14px;
    object-fit: cover;
    flex-shrink: 0;
}

/* RIGHT SIDE */
.property-right {
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
    align-self: stretch;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

/* TOP */
.property-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.property-title {
    font-size: 22px;
    font-weight: 700;
    margin: 0;
    color: #1e293b;
}

.property-location {
    font-size: 14px;
    color: #64748b;
    margin-top: 4px;
}

/* HEART ICON */
.top-icon {
    width: 22px;
    height: 22px;
    cursor: pointer;
    opacity: 0.7;
}

/* GRID */
.property-details {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    margin-top: 18px;
    gap: 15px 40px;
}

.label {
    font-size: 13px;
    color: #94a3b8;
}

.value {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
}

/* BUTTONS */
.property-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 20px;
}

.btn-main {
    flex: 1;
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 7px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

/* ICON BUTTONS */
.icon-box {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.icon-box img {
    width: 20px;
    height: 20px;
}

.label {
    font-size: 12px;
    color: #888;
}

.value {
    font-size: 13px;
    font-weight: 600;
}

.btn-orange {
    background: var(--primary-color);
    color: #fff;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
}

.icon-btn {
    border: 1px solid var(--border-color);
    background: #fff;
    padding: 8px 14px;
    border-radius: 8px;
    white-space: nowrap;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-dark);
    cursor: pointer;
    appearance: auto;
    -webkit-appearance: auto;
    outline: none;
    transition: border-color 0.2s;
}

.icon-btn:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(224, 124, 55, 0.1);
}

.sidebar-card {
    background: #fff;
    border-radius: 12px;
    padding: 18px;
    border: 1px solid #eee;
    margin-bottom: 15px;
}

.loan-box {
    border: 1px dashed var(--primary-color);
    padding: 15px;
    border-radius: 10px;
    text-align: center;
}

.filter-btn {
    border: 1px solid var(--border-color);
    background: #fff;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.filter-btn.active {
    background: var(--primary-color) !important;
    color: #fff !important;
    border: none !important;
}

/* -------------------- FILTER PANEL -------------------- */
#filterPanel::-webkit-scrollbar {
    display: none;
}

/* Above .main-header (wishlist.css z-index: 9999) and Bootstrap sticky-top */
#filterOverlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 10050 !important;
    background: rgba(0, 0, 0, 0.5) !important;
}

#filterPanel {
    position: fixed !important;
    top: 0 !important;
    right: -400px;
    width: 380px !important;
    height: 100% !important;
    max-height: 100vh !important;
    z-index: 10051 !important;
    background: #fff !important;
    overflow-y: auto !important;
    padding: 20px !important;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.2);
    transition: right 0.3s ease;
}

body.filter-panel-open .main-header {
    z-index: 1 !important;
}

/* Header welcome + profile icon must stay visible on this page */
.main-header .pd-header-actions {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    flex-shrink: 0;
}

.main-header .pd-welcome,
.main-header .pd-profile-trigger,
.main-header .pd-profile-trigger i {
    visibility: visible !important;
    opacity: 1 !important;
}

.filter-content {
    padding: 20px;
}

.filter-footer {
    position: sticky;
    bottom: 0;
    width: 100%;
    background: #fff;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #eee;
    z-index: 10;
}

.clear-text-btn {
    background: none;
    border: none;
    color: #6c757d;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    padding: 0;
}

.view-results-btn {
    background: var(--primary-color);
    color: #fff;
    border: none;
    padding: 10px 25px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 15px;
    box-shadow: 0 4px 10px rgba(255, 122, 26, 0.3);
    cursor: pointer;
    transition: 0.3s;
}

.view-results-btn:hover {
    background: var(--primary-hover);
}

/* -------------------- FILTER HEADER -------------------- */
.filter-header {
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 20; /* above filter content */
    padding: 10px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* -------------------- CUSTOM SELECT & DROPDOWN -------------------- */
.custom-select-box {
    position: relative;
    width: 100%;
    z-index: 1001; /* above other dropdowns */
}

/* Scoped to search/filter UI only — do not affect .main-header profile/city dropdowns */
.search-bar .dropdown,
.custom-select-box .dropdown,
#filterPanel .dropdown {
    position: absolute;
    top: 105%;
    left: 0;
    right: auto;
    width: max-content;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1) !important;
    z-index: 999999 !important;
    display: none; 
}

.search-bar .dropdown[style*="display: block"],
.custom-select-box .dropdown[style*="display: block"],
#filterPanel .dropdown[style*="display: block"] {
    display: block !important; 
}

.search-bar .options-grid,
.custom-select-box .options-grid,
#filterPanel .options-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important; 
    gap: 10px;
    margin-bottom: 20px;
    background: transparent !important;
}

.search-bar .group,
.custom-select-box .group,
#filterPanel .group {
    grid-column: span 3; 
    font-size: 11px;
    font-weight: 800;
    color: #94a3b8 !important;
    text-transform: uppercase;
    margin: 10px 0 10px 5px;
    background: transparent !important;
}

.search-bar .option,
.custom-select-box .option,
#filterPanel .option {
    background: #f8fafc !important;
    border: 1px solid #edf2f7 !important;
    padding: 10px 5px;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    color: #334155 !important;
    text-align: center;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-bar .option:hover,
.custom-select-box .option:hover,
#filterPanel .option:hover {
    background: #fff3eb !important;
    border-color: #ff7a1a !important;
    color: #ff7a1a !important;
}

.search-bar .option.active,
.custom-select-box .option.active,
#filterPanel .option.active {
    background-color: #ff7a1a !important;
    color: #fff !important;
    border-color: #ff7a1a !important;
}

/* -------------------- BHK -------------------- */
.bhk-container {
    margin: 15px 0;
}

.bhk-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 8px;
}

.bhk-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap; 
}

.bhk-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e2e8f0;
    background-color: #ffffff;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    color: #475569;
}

.bhk-btn:hover {
    border-color: #ff7a1a;
    color: #ff7a1a;
}

.bhk-btn.active {
    background-color: #ff7a1a !important;
    color: #ffffff !important;
    border-color: #ff7a1a !important;
}

.bhk-bar-container {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    padding: 5px 15px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.bhk-label-text {
    font-size: 13px;
    font-weight: 700;
    color: #64748b;
}

.bhk-bar-group {
    display: flex;
    gap: 5px;
}

.bhk-bar-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    transition: all 0.2s ease;
}

.bhk-bar-btn:hover {
    border-color: #ff7a1a;
    color: #ff7a1a;
}

.bhk-bar-btn.active {
    background-color: #ff7a1a !important;
    color: white !important;
    border-color: #ff7a1a !important;
}

/* -------------------- LOAN CARD -------------------- */
.loan-card {
    background: #f6f7f9;
    border-radius: 16px;
    padding: 20px;
    border: none;
}

.loan-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.loan-header h6 {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    color: #1e293b;
}

.loan-icon {
    width: 48px;
    height: 48px;
    background: #fdeee4;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 22px;
}

.loan-desc {
    font-size: 15px;
    color: #64748b;
    margin-bottom: 20px;
}

.btn-loan-outline {
    width: 100%;
    padding: 14px;
    border-radius: 10px;
    border: 2px solid var(--primary-color);
    background: transparent;
    color: var(--primary-color);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-loan-outline:hover {
    background: var(--primary-color);
    color: #fff;
}

/* -------------------- DROPDOWN BUDGET -------------------- */
.dropdown-budget {
    width: auto;
    min-width: 220px;
}

.dropdown-budget .options-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.dropdown-budget .option {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 13px;
    white-space: nowrap;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    width: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
}

.dropdown-budget .option:hover {
    background: #fff3eb;
    border-color: #ff7a1a;
    color: #ff7a1a;
}

/* -------------------- DROPDOWN PURPOSE -------------------- */
.dropdown-purpose {
    width: 300px;
}

.dropdown-purpose .options-grid {
    grid-template-columns: repeat(3, minmax(80px, 1fr));
}

.dropdown-bhk .options-grid {
    grid-template-columns: repeat(3, minmax(70px, 1fr));
}

.dropdown-budget .options-grid {
    grid-template-columns: repeat(2, 1fr);
}

.filter-header {
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 20;
    padding: 10px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* -------------------- PROPERTY CARD RESPONSIVE (stay side-by-side) -------------------- */
@media (max-width: 991px) {
    .property-card-new {
        gap: 16px;
        padding: 14px;
    }

    .property-left {
        flex: 0 0 200px;
        width: 200px;
        max-width: 200px;
        min-width: 200px;
    }

    .property-img-new {
        height: 140px;
        min-height: 140px;
    }

    .property-details {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px 24px;
    }
}

@media (max-width: 576px) {
    .property-card-new {
        gap: 12px;
        padding: 12px;
    }

    .property-left {
        flex: 0 0 120px;
        width: 120px;
        max-width: 120px;
        min-width: 120px;
    }

    .property-img-new {
        height: 100px;
        min-height: 100px;
        border-radius: 10px;
    }

    .property-title {
        font-size: 16px;
    }

    .property-location {
        font-size: 12px;
    }

    .property-details {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px 12px;
        margin-top: 12px;
    }

    .property-details .value {
        font-size: 14px;
    }

    .property-actions {
        flex-wrap: wrap;
        gap: 8px;
        margin-top: 14px;
    }

    .property-actions .btn-main {
        flex: 1 1 calc(50% - 4px);
        min-width: 0;
        font-size: 13px;
        padding: 8px 6px;
    }

    .property-actions .icon-box {
        width: 40px;
        height: 40px;
        flex-shrink: 0;
    }
}