:root {
    --brand-primary: #262626;
    --brand-primary-dark: #171717;
    --brand-violet: #682CC7;
    --brand-violet-soft: rgba(104, 44, 199, 0.1);
    --navy: var(--brand-primary);
    --gold: var(--brand-violet);
}

.listing-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    height: calc(100vh - 64px - 60px);
    overflow: hidden;
}

.listing-mobile-view-toggle {
    display: none;
}

.property-list-pane {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    padding: 16px 24px;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

.property-cards-scroll {
    overflow-y: auto;
    min-height: 0;
    flex: 1;
    padding-top: 4px;
    padding-right: 12px;
    margin-right: -12px;
    position: relative;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

.listing-results-loading {
    position: absolute;
    inset: 0 12px 0 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(2px);
}

.listing-results-loading-card {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.12);
    color: var(--ink);
    font-family: 'DM Sans', sans-serif;
}

.listing-results-loading-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid #d6deeb;
    border-top-color: var(--brand-violet);
    border-radius: 999px;
    animation: sort-spin 0.7s linear infinite;
    flex-shrink: 0;
}

.listing-results-loading-text {
    font-size: 13px;
    font-weight: 600;
}

.listing-load-more-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 8px 0 24px;
}

.listing-load-more-sentinel {
    width: 100%;
    height: 1px;
}

.listing-load-more-btn {
    border: 1px solid rgba(104, 44, 199, 0.18);
    background: rgba(104, 44, 199, 0.08);
    color: var(--brand-violet);
    border-radius: 999px;
    padding: 10px 18px;
    font-size: 13px;
    font-weight: 600;
    font-family: 'DM Sans', sans-serif;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}

.listing-load-more-btn:hover {
    background: rgba(104, 44, 199, 0.12);
    transform: translateY(-1px);
}

.listing-load-more-btn:disabled {
    opacity: 0.7;
    cursor: wait;
    transform: none;
}

.list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.list-count {
    font-size: 14px;
    color: var(--muted);
}

.list-count strong {
    color: var(--ink);
}

.sort-select {
    appearance: none;
    border: 1.5px solid var(--border);
    background: var(--white);
    padding: 6px 28px 6px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-family: 'DM Sans', sans-serif;
    color: var(--ink);
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%234a5568' stroke-width='2.5' stroke-linecap='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
}

.sort-select-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.sort-select-wrap.is-loading .sort-select {
    padding-right: 46px;
    color: #64748b;
}

.sort-select:disabled {
    cursor: wait;
    opacity: 0.78;
}

.sort-select-spinner {
    position: absolute;
    right: 28px;
    width: 14px;
    height: 14px;
    border: 2px solid #d6deeb;
    border-top-color: var(--brand-violet);
    border-radius: 999px;
    animation: sort-spin 0.7s linear infinite;
    pointer-events: none;
}

@keyframes sort-spin {
    to {
        transform: rotate(360deg);
    }
}

.property-card {
    display: grid;
    grid-template-columns: 33.33% 1fr;
    background:#fff;
   /* border: 1px solid #eee;*/
    border-radius: 24px;
    overflow: hidden;
    margin-bottom: 24px;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
    text-decoration: none;
    color: inherit;
    align-items: stretch;
}


.property-card:hover {
    border-color: #eee;
    box-shadow: 0 8px 24px rgba(15, 27, 45, 0.1);
    transform: translateY(-2px);
}



.card-image {
    position: relative;
    overflow: hidden;
    height: 100%;
    background: #eef2f7;
}

.card-compare-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    padding: 4px;
    width: 32px;
    height: 32px;
    border-radius: 9999px;
    border: 1px solid rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.92);
    color: #333;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(15, 27, 45, 0.16);
}

.card-compare-btn.is-active {
    background: var(--brand-primary);
    color: #ffffff;
    border-color: transparent;
}

.card-compare-btn-icon {
    width: 16px;
    height: 16px;
    display: block;
    object-fit: contain;
}

.card-compare-btn-icon-light {
    display: none;
}

.card-compare-btn.is-active .card-compare-btn-icon-dark {
    display: none;
}

.card-compare-btn.is-active .card-compare-btn-icon-light {
    display: block;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 5 / 3;    
    transition: transform 0.4s ease;
}

.property-card:hover .card-image img {
    transform: scale(1.05);
}

.card-image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
}

.img-dots {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 4px;
}

.img-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
}

.img-dot.active {
    background: white;
}

.card-body {
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.card-badges {
    display: flex;
    gap: 8px;
    align-content: stretch;
    flex-shrink: 0;
    margin-left: 8px;
}

.score-badge {
    background: var(--brand-violet-soft);
    color: var(--brand-violet);
    border-radius: 8px;
    padding: 8px;
    align-content: stretch;
    text-align: center;
    flex-shrink: 0;
}

.score-badge .score-num {
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
    display: block;
}

.score-badge .score-lbl {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
    margin-top: 4px;
}

.score-badge.score-badge-unavailable {
    background: #f3f4f6;
    color: #5f6775;
}

.growth-box {
    border-radius: 8px;
    padding: 8px;
    display: flex;
    align-items: center;
    flex-direction: column;
    white-space: nowrap;
}

.growth-box.positive {
    background: var(--green-lt);
    color: var(--green);
}

.growth-box.negative {
    background: var(--red-lt);
    color: var(--red);
}

.sold-out-mini-badge {
    font-size: inherit;
}

.sold-out-mini-badge-text {
    line-height: 1;
}

.growth-num {
    font-size: 14px;
    line-height: 1;
    font-weight: 500;
}

.growth-lbl {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
    margin-top: 4px;
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.card-location {
    font-size: 14px;
    color: var(--slate);
    display: flex;
    align-items: center;
    gap: 3px;
}

.status-pill {
    font-weight: 400;
}

.card-image .status-pill {
    position: absolute;
    right: 8px;
    bottom: 8px;
    z-index: 3;
}

.card-price {
    margin-top: 18px;
    display: flex;
    justify-content: space-between;
}
.price-sqft {
    font-size: 14px;
    color: var(--muted);
}

.card-price-meta {
    display: flex;
    align-items: center;
    gap: 4px;
}

.card-configs {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.bhk-pills {
    gap: 4px;
}

.bhk-pill {
    padding-inline: 4px;
}

.bhk-label {
    font-size: 14px;
    color: var(--muted);
    font-weight: 600;
    margin-left: 2px;
}

.possession {
    font-size: 14px;
    color: var(--muted);
    text-align: right;
    display: flex;
    gap: 4px;
}

.possession strong {
    color: var(--ink);
}

.map-pane {
    position: relative;
    min-height: 380px;
    margin: 8px 16px 16px 0;
    border-radius: 16px;
}

#listingMap {
    width: 100%;
    height: 100%;
    min-height: 380px;
    border-radius: 16px;
}

.map-error {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    text-align: center;
    color: var(--muted);
    font-size: 13px;
    background: var(--surface);
}

.map-error.visible {
    display: flex;
}

.filter-fab {
    position: absolute;
    right: 24px;
    bottom: 20px;
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--brand-primary);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    font-family: 'DM Sans', sans-serif;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(15, 27, 45, 0.25);
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.filter-fab:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(15, 27, 45, 0.3);
    background: var(--brand-violet);
}

.filter-fab .filter-count {
    background: var(--brand-violet);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 11px;
    font-weight: 700;
    display: none;
    align-items: center;
    justify-content: center;
}

.filter-fab .filter-count.visible {
    display: flex;
}

.filter-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 27, 45, 0.5);
    z-index: 1001;
    backdrop-filter: blur(2px);
}

.filter-overlay.open {
    display: block;
}

.mobileviewSort{display: flex; gap: 16px; align-items: center; justify-content: space-between;}

.filter-panel {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) translateY(100%);
    width: min(640px, 95vw);
    background: var(--white);
    border-radius: 20px 20px 0 0;
    z-index: 10002;
    padding: 0;
    box-shadow: 0 -8px 40px rgba(15, 27, 45, 0.15);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 85vh;
    overflow-y: auto;
}

.filter-panel.open {
    transform: translateX(-50%) translateY(0);
}

.filter-panel-header {
    position: sticky;
    top: 0;
    background: var(--white);
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 20px 20px 0 0;
}

.filter-panel-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--navy);
}

.filter-close {
    background: var(--surface);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.filter-close:hover,
.filter-close:focus-visible {
    background: #eceff4;
    color: var(--brand-primary);
    transform: scale(1.04);
    outline: none;
}

.filter-body {
    padding: 20px 24px;
}

.filter-section {
    margin-bottom: 24px;
}

.filter-accordion {
    margin-bottom: 20px;
}

.filter-accordion-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding:0 4px;
    border: none;
    background: var(--white);
    color: var(--ink);
    font-size: 14px;
    font-weight: 600;
    font-family: 'DM Sans', sans-serif;
    cursor: pointer;
}

.filter-accordion-icon {
    width: 8px;
    height: 8px;
    border-right: 2px solid #64748b;
    border-bottom: 2px solid #64748b;
    transform: rotate(45deg);
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.filter-accordion-icon.is-open {
    transform: rotate(-135deg);
}

.filter-accordion-panel {
    padding-top: 4px;
}

.filter-section-title {
    color: var(--muted);
    margin-bottom: 12px;
}

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-helper {
    font-size: 12px;
    color: var(--muted);
    background: var(--surface);
    border: 1px dashed var(--border);
    border-radius: 8px;
    padding: 10px 12px;
}

.filter-chip {
    padding: 4px 12px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    background: var(--white);
    color: var(--slate);
    font-family: 'DM Sans', sans-serif;
    font-weight: 500;
    transition: all 0.15s;
}

.filter-chip:hover,
.filter-chip.active {
    border-color: var(--brand-primary);
    background: var(--brand-primary);
    color: white;
}

.filter-radio-group .filter-chip {
    min-width: 96px;
    text-align: center;
}

.filter-price-buckets .filter-chip {
    min-width: 124px;
    text-align: center;
}

.searchable-native-select {
    display: none;
}

.filter-native-select {
    width: 100%;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    background: var(--white);
    padding: 10px 36px 10px 12px;
    font-size: 13px;
    color: var(--ink);
    font-family: 'DM Sans', sans-serif;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5' stroke-linecap='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.filter-native-select:focus {
    outline: none;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(38, 38, 38, 0.08);
}

.searchable-select {
    position: relative;
}

.searchable-select-toggle {
    width: 100%;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    background: var(--white);
    padding: 10px 36px 10px 12px;
    font-size: 13px;
    color: var(--ink);
    text-align: left;
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
    position: relative;
}

.searchable-select-toggle::after {
    content: '';
    position: absolute;
    right: 12px;
    top: 50%;
    width: 8px;
    height: 8px;
    border-right: 2px solid #64748b;
    border-bottom: 2px solid #64748b;
    transform: translateY(-60%) rotate(45deg);
    transition: transform 0.2s ease;
}

.searchable-select.open .searchable-select-toggle::after {
    transform: translateY(-20%) rotate(-135deg);
}

.searchable-select-toggle.placeholder {
    color: #94a3b8;
}

.searchable-select-panel {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    border: 1px solid #dbe5f2;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.14);
    z-index: 20;
    display: none;
}

.searchable-select.open .searchable-select-panel {
    display: block;
}

.searchable-select-input {
    width: calc(100% - 16px);
    margin: 8px;
    border: 1px solid #dbe5f2;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 13px;
}

.searchable-select-options {
    max-height: 220px;
    overflow-y: auto;
    padding: 0 8px 8px;
}

.searchable-select-option {
    width: 100%;
    border: none;
    background: transparent;
    text-align: left;
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    color: #1e293b;
}

.searchable-select-option:hover,
.searchable-select-option.active {
    background: #eef4ff;
    color: #1a4fbf;
}

.searchable-select-empty {
    padding: 10px;
    font-size: 12px;
    color: #94a3b8;
}

.property-breadcrumbs{padding:8px 24px 0; font-size: 12px; color: #666;}
.property-breadcrumbs a{color: #682CC7; text-decoration: none;}
.property-breadcrumbs a:hover{color: #171717;}
.filter-actions {
    display: flex;
    gap: 12px;
    padding: 16px 24px;
    position: sticky;
    bottom: 0;
    justify-content: right;
    background: white;
    border-top: 1px solid var(--border);
}

.filter-action-btn {
    width: 100%;
}

.btn-clear-filters {
    flex: 1;
    padding: 12px;
    border: 1.5px solid var(--border);
    background: var(--white);
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    font-family: 'DM Sans', sans-serif;
    cursor: pointer;
    color: var(--slate);
    transition: border-color 0.2s;
}

.btn-apply-filters {
    flex: 2;
    padding: 12px;
    border: none;
    background: var(--navy);
    color: white;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    font-family: 'DM Sans', sans-serif;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-apply-filters:hover {
    background: var(--brand-violet);
}

.leaflet-popup-content-wrapper {
    border-radius: 12px !important;
    box-shadow: 0 8px 24px rgba(15, 27, 45, 0.15) !important;
    border: 1.5px solid var(--border) !important;
    padding: 0 !important;
}

.leaflet-popup-content {
    margin: 0 !important;
    width: 200px !important;
}

.map-popup img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 10px 10px 0 0;
}

.map-popup-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.map-popup-placeholder {
    height: 100px;
    background: #e2e8f0;
    border-radius: 10px 10px 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.map-popup-body {
    padding: 10px 12px;
}

.map-popup-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 3px;
}

.map-popup-location {
    font-size: 11px;
    color: #718096;
    margin-bottom: 4px;
}

.map-popup-price {
    font-size: 12px;
    color: var(--red);
    font-weight: 600;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--muted);
}

.empty-state .empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: 18px;
    color: var(--ink);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 14px;
}

.map-price-marker {
    background: var(--white);
    border-radius: 20px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 700;
    color: var(--navy);
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    font-family: 'DM Sans', sans-serif;
    cursor: pointer;
    transition: all 0.15s;
}

.map-price-marker:hover,
.map-price-marker.active {
    background: var(--brand-primary);
    color: white;
    transform: scale(1.1);
}

.listing-cluster-icon-wrap {
    background: transparent;
    border: 0;
}

.listing-cluster-marker {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, var(--brand-primary) 0%, var(--brand-primary-dark) 100%);
    color: var(--white);
    box-shadow:
        0 10px 24px rgba(15, 27, 45, 0.16),
        0 0 0 4px rgba(104, 44, 199, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.94);
    font-family: 'DM Sans', sans-serif;
    font-weight: 800;
    font-size: 13px;
}

.listing-cluster-marker.small {
    width: 42px;
    height: 42px;
}

.listing-cluster-marker.medium {
    width: 48px;
    height: 48px;
    font-size: 14px;
}

.listing-cluster-marker.large {
    width: 54px;
    height: 54px;
    font-size: 15px;
}

.listing-cluster-marker span {
    line-height: 1;
}

.listing-cluster-marker::after {
    content: '';
    position: absolute;
    inset: 4px;
    border-radius: inherit;
    border: 1px solid rgba(255, 255, 255, 0.12);
    pointer-events: none;
}

@media (max-width: 1100px) {
    .listing-mobile-view-toggle {
        position: fixed;
        bottom: 0;
        width: 100%;
        z-index: 9999;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        padding: 8px 24px;
        background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(255, 255, 255, 0.88) 100%);
        backdrop-filter: blur(10px);
    }
    .filter-fab{position: fixed; bottom: 72px; min-height: 50px;}
    .listing-mobile-view-btn {
        min-height: 44px;
        border: 1.5px solid var(--border);
        border-radius: 999px;
        background: #ffffff;
        color: var(--slate);
        font-family: 'DM Sans', sans-serif;
        font-size: 14px;
        font-weight: 700;
        cursor: pointer;
        transition: all 0.18s ease;
    }

    .listing-mobile-view-btn.is-active {
        background: var(--brand-violet);
        border-color: var(--brand-primary);
        color: #ffffff;
        box-shadow: 0 10px 24px rgba(15, 27, 45, 0.14);
    }

    .listing-layout {
        grid-template-columns: 1fr;
        height: auto;
        min-height: calc(100vh - 64px);
    }

    .map-pane {
        min-height: calc(100vh - 64px - 74px);
        margin: 16px 24px 24px;
        order: initial;
    }

    .property-list-pane {
        min-height: auto;
        padding-top: 20px;
    }

    .property-cards-scroll {
        padding-bottom: 88px;
    }
}

@media (max-width: 768px) {
    .listing-mobile-view-toggle {
        padding: 8px 16px;
        gap: 8px;
    }

    .property-list-pane {
        padding: 16px;
    }

    .map-pane {
        min-height: calc(100vh - 64px - 68px);
        margin: 16px;
    }

    .property-card {
        grid-template-columns: 1fr;
    }

    .card-image {
        aspect-ratio: 16 / 10;
        min-height: 200px;
    }
.property-breadcrumbs{padding: 8px 16px 0;}
    .card-top,
    .card-price,
    .card-configs,
    .list-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .card-badges,
    .score-badge {
        margin-left: 0;
    }
    .mobileviewSort{width: 100%;}
}
