.marketplace-map-layout{
    display:flex;
    height:100vh;
    overflow:hidden;
    background:#fff;
}

/* =========================
   LEFT RESULTS PANEL
========================= */

.results-panel{
    width:420px;
    min-width:420px;
    overflow-y:auto;
    border-right:1px solid #e5e7eb;
    background:#fff;
    transition:.25s ease;
    z-index:20;
}

.results-panel.collapsed{
    margin-left:-500px;
}

/* =========================
   MAP
========================= */

.map-container{
    flex:1;
    position:relative;
    min-width:0;
}

.map-area{
    width:100%;
    height:100%;
}

.marketplace-map{
    width:100%;
    height:100%;
}

#map{
    width:100%;
    height:100% !important;
    z-index:0;
}

/* =========================
   HEADER
========================= */

.results-header{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    padding:24px;
    border-bottom:1px solid #eee;
}

/* =========================
   SEARCH
========================= */

.search-section{
    padding:16px 24px;
}

.search-input-wrapper{
    position:relative;
}

.search-icon{
    position:absolute;
    left:16px;
    top:50%;
    transform:translateY(-50%);
}

.category-search-input{
    width:100%;
    height:52px;
    border:1px solid #ddd;
    border-radius:26px;
    padding-left:45px;
    padding-right:16px;
}

/* =========================
   FILTERS
========================= */

.filter-chips,
.category-shortcuts{
    display:flex;
    gap:8px;
    flex-wrap:wrap;
    padding:0 24px 20px;
}

.filter-chips button,
.category-shortcuts button{
    border:none;
    border-radius:999px;
    padding:10px 14px;
    background:#f3f4f6;
    cursor:pointer;
}

/* =========================
   CONTENT SECTIONS
========================= */

.featured-section,
.popular-section,
.results-list-section{
    padding:24px;
}

.featured-section h3,
.popular-section h3,
.results-list-section h3{
    margin-bottom:16px;
}

/* =========================
   FEATURED CARD
========================= */

.featured-card{
    overflow:hidden;
    border-radius:16px;
    border:1px solid #eee;
    background:#fff;
}

.featured-card img{
    width:100%;
    height:220px;
    object-fit:cover;
    display:block;
}

.featured-content{
    padding:16px;
}

.featured-content h4{
    margin-bottom:6px;
}

.featured-content p{
    margin-top:10px;
    margin-bottom:12px;
    color:#555;
}

.rating{
    color:#8b1538;
    font-weight:600;
}

.rating span{
    color:#6b7280;
}

/* =========================
   BUTTONS
========================= */

.featured-btn{
    display:inline-block;
    margin-top:12px;
    padding:10px 16px;
    border-radius:8px;
    background:#8b1538;
    color:#fff;
    text-decoration:none;
    font-weight:600;
}

/* =========================
   POPULAR SECTION
========================= */

.popular-grid{
    display:flex;
    flex-direction:column;
    gap:20px;
}

.mini-card{
    border:1px solid #eee;
    border-radius:12px;
    overflow:hidden;
    background:#fff;
}

.mini-card img{
    width:100%;
    height:180px;
    object-fit:cover;
    display:block;
}

.mini-card-content{
    padding:16px;
}

.mini-card-content h4{
    margin-bottom:6px;
}

.mini-card-content p{
    margin-bottom:10px;
    color:#555;
}

/* =========================
   SEARCH RESULTS
========================= */

.result-card{
    border:1px solid #eee;
    border-radius:14px;
    padding:16px;
    margin-bottom:12px;
    background:#fff;
}

/* =========================
   COLLAPSED SEARCH
========================= */

.collapsed-search{
    position:absolute;
    top:20px;
    left:20px;
    display:none;
    z-index:999;
}

.collapsed-search.active{
    display:block;
}

.collapsed-search button{
    height:50px;
    padding:0 20px;
    border:none;
    border-radius:25px;
    background:#fff;
    box-shadow:0 4px 12px rgba(0,0,0,.15);
}

.collapse-btn{
    border:none;
    background:none;
    font-size:22px;
    cursor:pointer;
}

/* =========================
   MOBILE
========================= */

@media (max-width:991px){

    .marketplace-map-layout{
        flex-direction:column;
        height:auto;
        overflow:visible;
    }



    /*  CONTROL STACK ORDER (MAP FIRST) */
    .map-container{
        order: 1;
        width:100%;
        height:50vh;
        min-height:400px;
        flex:none;
    }

    .results-panel{
        order: 2;
        width:100%;
        min-width:100%;
        overflow:visible;
        border-right:none;
    }


    /*
    MAP APPEARS IMMEDIATELY
    AFTER THE RESULTS PANEL
    */

    .map-container{
        width:100%;
        height:50vh;
        min-height:400px;
        flex:none;
    }

    .map-area,
    .marketplace-map,
    #map{
        height:100%;
    }

    .featured-section,
    .popular-section,
    .results-list-section{
        padding:20px;
    }

    .featured-card img{
        height:200px;
    }

    .mini-card img{
        height:180px;
    }

    .filter-chips,
    .category-shortcuts{
        overflow-x:auto;
        flex-wrap:nowrap;
        padding-bottom:12px;
    }

    .filter-chips button,
    .category-shortcuts button{
        white-space:nowrap;
    }
}