*{
  box-sizing:border-box;
}

html, body{
  margin:0;
  width:100%;
  height:100%;
  font-family:Inter, Arial, sans-serif;
}

.container{
  display:flex;
  width:100vw;
  height:100vh;
}

.sidebar{
  width:360px;
  min-width:360px;
  background:#ffffff;
  border-right:1px solid #e5e7eb;
  overflow-y:auto;
}

.search-box{
  padding:20px;
  position:sticky;
  top:0;
  background:#ffffff;
  border-bottom:1px solid #e5e7eb;
  z-index:10;
}

.search-box{
    position:relative;
}

#searchResults{

    position:absolute;
    left:20px;
    right:20px;
    top:72px;
    background:white;
    border-radius:12px;
    box-shadow:0 8px 20px rgba(0,0,0,.08);
    display:none;
    overflow:hidden;
    z-index:20;

}

.search-item{

    padding:14px;
    cursor:pointer;
    border-bottom:1px solid #eee;

}

.search-item:hover{

    background:#f7f7f7;

}

.search-box input{
  width:100%;
  padding:14px 16px;
  border:1px solid #d1d5db;
  border-radius:14px;
  font-size:15px;
  outline:none;
}

.search-box input:focus{
  border-color:#2563eb;
  box-shadow:0 0 0 3px rgba(37,99,235,.12);
}

#map{
  flex:1;
  height:100vh;
}

.store-card{
  padding:18px 20px;
  border-bottom:1px solid #f1f5f9;
  cursor:pointer;
  transition:background .2s ease;
}

.store-card:hover{
  background:#f8fafc;
}

.store-card h3{
  margin:0 0 6px;
  font-size:16px;
  color:#111827;
}

.store-card p{
  margin:4px 0;
  font-size:14px;
  color:#6b7280;
}

@media (max-width: 768px){

  html,
  body{
    width:100%;
    height:100%;
    overflow:hidden;
  }

  .container{
    display:flex;
    flex-direction:column;
    width:100%;
    height:100dvh;
  }

  /* Make sidebar contents behave as direct children */
  .sidebar{
    display:contents;
  }

  /* SEARCH */
  .search-box{
    order:1;
    width:100%;
    flex:none;
    padding:12px;
    position:relative;
    background:#ffffff;
    border-bottom:1px solid #e5e7eb;
    z-index:20;
  }

  .search-box input{
    width:100%;
    padding:14px 15px;
    font-size:16px;
    border-radius:12px;
  }

  /* MAP */
  #map{
    order:2;
    width:100%;
    height:42dvh;
    min-height:260px;
    flex:none;
  }

  /* STORE LIST */
  #storeList{
    order:3;
    width:100%;
    flex:1;
    min-height:0;
    overflow-y:auto;
    -webkit-overflow-scrolling:touch;
    overscroll-behavior:contain;
    background:#ffffff;
  }

  /* STORE CARD */
  .store-card{
    padding:16px;
    border-bottom:1px solid #f1f5f9;
  }

  .store-card h3{
    font-size:15px;
    margin-bottom:6px;
  }

  .store-card p{
    font-size:13px;
    line-height:1.45;
  }

  /* Don't use desktop hover effects on phone */
  .store-card:hover{
    transform:none;
    box-shadow:none;
    background:#ffffff;
  }

  .store-card.active{
    border:2px solid #3eaff1;
    background:#f4fff7;
  }

  .no-result{
    padding:24px 16px;
  }

}

#geocoder {
    width: 100%;
}

.mapboxgl-ctrl-geocoder {
    width: 100% !important;
    max-width: none !important;
    box-shadow: none !important;
    border: 1px solid #ddd;
    border-radius: 10px;
}

.no-result{
    padding:20px;
    text-align:center;
    color:#666;
}

.no-result h3{
    margin-bottom:8px;
    font-size:18px;
}

.no-result p{
    font-size:14px;
    line-height:1.5;
}

.store-card{
    cursor:pointer;
    transition:0.2s ease;
}

.store-card:hover{
    transform:translateY(-2px);
    box-shadow:0 8px 20px rgba(0,0,0,.08);
}

.store-card.active{
    border:2px solid #3eaff1;   /* Tukar ikut warna brand Luma kalau nak */
    background:#f4fff7;
}
