/* ── MAP SPLIT VIEW ─────────────────────────────────────── */
#map-split {
    display: none;
    gap: 12px;
    height: calc(100vh - 180px);
    min-height: 480px;
}
#map-split.active {
    display: flex;
}
#map-list-panel {
    width: 340px;
    flex-shrink: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-right: 4px;
}
#map-view {
    flex: 1;
    height: 100%;
    border-radius: var(--card-radius);
    overflow: hidden;
    border: 1px solid var(--border);
    min-width: 0;
}
.map-list-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--card-radius);
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}
.map-list-card:hover, .map-list-card.highlighted {
    border-color: var(--accent);
    box-shadow: 0 4px 16px rgba(0,0,0,0.35);
}
.map-list-card-media {
    width: 100%;
    height: 140px;
    object-fit: cover;
    display: block;
}
.map-list-card-body {
    padding: 10px 12px;
}
.map-list-card-price {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--price-color);
    margin-bottom: 2px;
}
.map-list-card-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.map-list-card-loc {
    font-size: 0.75rem;
    color: var(--text-secondary);
}
#map-list-empty {
    color: var(--text-muted);
    font-size: 0.85rem;
    text-align: center;
    padding: 20px 0;
}
@media (max-width: 800px) {
    #map-list-panel { display: none; }
    #map-view {
        height: 75vh;
        border-radius: var(--card-radius);
    }
}

/* Leaflet popup theming */
.leaflet-popup-content-wrapper {
    background: var(--surface);
    color: var(--text-primary);
    border: 1px solid var(--border-light);
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
    border-radius: 8px;
}
.leaflet-popup-tip { background: var(--surface); }
.map-popup { font-family: 'Inter', 'Segoe UI', sans-serif; min-width: 210px; }
.map-popup-img {
    width: 100%;
    height: 130px;
    object-fit: cover;
    border-radius: 5px;
    margin-bottom: 8px;
    cursor: pointer;
}
.map-popup-price {
    font-size: 1rem;
    font-weight: 700;
    color: var(--price-color);
    margin-bottom: 2px;
}
.map-popup-title {
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-primary);
}
.map-popup-loc {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}
.map-popup-btn {
    display: block;
    width: 100%;
    text-align: center;
    background: var(--accent);
    color: var(--on-accent);
    border: none;
    padding: 7px 0;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.78rem;
    font-family: inherit;
}
