/* Search Page Layout */
.search-page {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 64px);
}

.search-filters {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 0;
    z-index: 10;
}

.search-input-wrapper {
    position: relative;
    max-width: 300px;
}
.search-input-wrapper i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
}
.search-input-wrapper input {
    padding-left: 36px;
}

/* Split View */
.search-split {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.search-listings {
    width: 58%;
    overflow-y: auto;
    background: var(--bg);
}

.search-map {
    width: 42%;
    position: relative;
}

/* Listing Cards in Search (smaller) */
.search-listings .listing-card {
    font-size: 0.9rem;
}
.search-listings .listing-card h3 {
    font-size: 0.95rem;
}
.search-listings .listing-card .card-img-wrapper {
    padding-top: 60%;
}

/* Map Popup */
.map-popup {
    min-width: 220px;
}
.map-popup img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    margin: -14px -20px 8px;
    width: calc(100% + 40px);
}
.map-popup h4 {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}
.map-popup .price {
    font-weight: 700;
    color: var(--primary);
}
.map-popup .location {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Custom map pin */
.leaflet-div-icon {
    background: none !important;
    border: none !important;
}

/* Mobile floating toggle */
.btn-floating {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    border-radius: 50px;
    padding: 0.65rem 1.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.25);
    font-weight: 600;
}

/* Highlighted card */
.listing-card.highlighted {
    outline: 3px solid var(--primary);
    outline-offset: -3px;
}

@media (max-width: 991px) {
    .search-split {
        position: relative;
    }
    .search-listings {
        width: 100%;
    }
    .search-map {
        display: none;
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 5;
    }
    .search-map.active {
        display: block;
    }
}
