* {
  box-sizing: border-box;
}

body, html {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: "DM Sans", sans-serif;
}

.map-wrapper {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

#leaflet-map {
  flex: 1;
  height: 100%;
  width: 100%;
}

.sidebar {
  width: 350px;
  max-width: 100%;
  background-color: #f8f9fa;
  padding: 1rem;
  overflow-y: auto;
  height: 100vh;
}

#searchInput {
  width: 100%;
  padding: 0.5rem;
  margin-bottom: 1rem;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.store-card {
  background: white;
  padding: 0.75rem;
  margin-bottom: 0.75rem;
  border-radius: 8px;
  box-shadow: 0 0 6px rgba(0,0,0,0.1);
  cursor: pointer;
}

.leaflet-popup-content {
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 400;
  color: #212529;
}

.leaflet-popup-content b {
  font-weight: 600;
  font-size: 16px;
}

.map-toggle-btn {
  display: none;
  width: 100%;
  padding: 0.75rem;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 0;
  font-weight: 600;
  cursor: pointer;
  z-index: 1000;
}

@media (max-width: 768px) {
  .map-wrapper {
    flex-direction: column;
    padding-top: 2.3rem; /* espacio para que no lo tape el botón */
  }

  .sidebar {
    width: 100%;
    height: auto;
  }

  .sidebar.hide {
    display: none;
  }

  .map-toggle-btn {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
  }

  #leaflet-map {
    display: none;
    height: 100vh;
    width: 100%;
  }

  #leaflet-map.active {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 999;
  }
}