/* ============================================
   STORE LOCATOR — WordPress
   ============================================ */

#store-locator {
  display: flex !important;
  height: 620px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  border: 1px solid #e5e5e5;
  border-radius: 4px;
  overflow: hidden;
  position: relative;
  width: 100%;
  box-sizing: border-box;
}

#sl-panel {
  width: 380px;
  min-width: 320px;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-right: 1px solid #e5e5e5;
  z-index: 1;
  flex-shrink: 0;
}

#sl-search-wrap {
  padding: 16px;
  border-bottom: 1px solid #e5e5e5;
  background: #fff;
}

#sl-search-row {
  display: flex;
  gap: 8px;
  position: relative;
}

#sl-search-input {
  flex: 1;
  padding: 10px 14px !important;
  border: 1px solid #d1d1d1 !important;
  border-radius: 25px !important;
  font-size: 14px !important;
  outline: none !important;
  color: #333 !important;
  background: #fff !important;
  box-shadow: none !important;
}

#sl-search-input:focus {
  border-color: #2d5a3d !important;
  box-shadow: none !important;
}

#store-locator #sl-search-btn {
  padding: 10px 20px !important;
  background: #2d5a3d !important;
  background-color: #2d5a3d !important;
  color: #fff !important;
  border: none !important;
  border-radius: 25px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  white-space: nowrap !important;
  transition: all 0.2s !important;
  letter-spacing: 0.03em !important;
  text-transform: none !important;
  box-shadow: none !important;
  line-height: normal !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}

#store-locator #sl-search-btn:hover {
  background: #1e3d29 !important;
  background-color: #1e3d29 !important;
  color: #fff !important;
}

#sl-geo-row {
  margin-top: 10px;
  display: flex;
}

#store-locator #sl-geolocate-btn {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 10px 20px !important;
  background: #2d5a3d !important;
  background-color: #2d5a3d !important;
  color: #fff !important;
  border: none !important;
  border-radius: 25px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  letter-spacing: 0.04em !important;
  transition: all 0.2s !important;
  white-space: nowrap !important;
  text-transform: none !important;
  box-shadow: none !important;
  width: auto !important;
  line-height: normal !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}

#store-locator #sl-geolocate-btn:hover {
  background: #1e3d29 !important;
  background-color: #1e3d29 !important;
  color: #fff !important;
}

#store-locator #sl-geolocate-btn:active {
  transform: scale(0.97);
}

.sl-geo-spinner {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: sl-spin 0.7s linear infinite;
}

#sl-results-header {
  padding: 10px 16px;
  font-size: 13px;
  color: #555;
  border-bottom: 1px solid #f0f0f0;
  background: #fafafa;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#sl-results-count strong { color: #222; }

#sl-reset-btn {
  background: none !important;
  border: none !important;
  color: #888 !important;
  font-size: 12px !important;
  cursor: pointer !important;
  text-decoration: underline !important;
  padding: 0 !important;
  box-shadow: none !important;
}

#sl-reset-btn:hover { color: #333 !important; }

#sl-list {
  flex: 1;
  overflow-y: auto;
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

#sl-list::-webkit-scrollbar { width: 4px; }
#sl-list::-webkit-scrollbar-track { background: #f5f5f5; }
#sl-list::-webkit-scrollbar-thumb { background: #ccc; border-radius: 2px; }

.sl-store-item {
  padding: 14px 16px;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
  transition: background 0.15s;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.sl-store-item:hover,
.sl-store-item.active { background: #f7f7f7; }

.sl-store-item.active {
  border-left: 3px solid #2d5a3d;
  padding-left: 13px;
}

.sl-store-info { flex: 1; min-width: 0; }

.sl-store-name {
  font-size: 13px !important;
  font-weight: 700 !important;
  color: #1a1a1a !important;
  margin: 0 0 3px !important;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sl-store-address {
  font-size: 12px !important;
  color: #666 !important;
  margin: 0 !important;
  line-height: 1.4;
}

.sl-store-distance {
  font-size: 12px;
  color: #888;
  white-space: nowrap;
  margin-top: 2px;
  flex-shrink: 0;
}

#sl-loading,
#sl-empty,
#sl-error {
  padding: 40px 20px;
  text-align: center;
  color: #888;
  font-size: 13px;
}

#sl-error { color: #c0392b; }

#sl-loading-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid #eee;
  border-top-color: #2d5a3d;
  border-radius: 50%;
  animation: sl-spin 0.7s linear infinite;
  margin: 0 auto 12px;
}

@keyframes sl-spin { to { transform: rotate(360deg); } }

#sl-map {
  flex: 1 !important;
  height: 100% !important;
  z-index: 1;
  min-height: 620px;
}

#sl-autocomplete {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #d1d1d1;
  border-top: none;
  border-radius: 0 0 12px 12px;
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  z-index: 10000;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  max-height: 220px;
  overflow-y: auto;
}

.sl-autocomplete-item {
  padding: 10px 14px;
  font-size: 13px;
  color: #333;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
  line-height: 1.4;
  transition: background 0.1s;
}

.sl-autocomplete-item:last-child { border-bottom: none; }
.sl-autocomplete-item:hover { background: #f0f5f2; }

.sl-popup .leaflet-popup-content-wrapper {
  border-radius: 4px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  padding: 0;
  overflow: hidden;
}

.sl-popup .leaflet-popup-content {
  margin: 0;
  min-width: 220px;
}

.sl-popup-inner { padding: 14px 16px; }

.sl-popup-name {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #1a1a1a;
  margin: 0 0 6px;
}

.sl-popup-address {
  font-size: 12px;
  color: #555;
  margin: 0 0 6px;
  line-height: 1.5;
}

.sl-popup-links {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.sl-popup-link.secondary {
  font-size: 11px;
  background: #f0f0f0;
  color: #333;
  padding: 5px 10px;
  border-radius: 3px;
  text-decoration: none;
  transition: background 0.2s;
}

.sl-popup-link.secondary:hover { background: #e0e0e0; }

.marker-cluster-small,
.marker-cluster-medium,
.marker-cluster-large {
  background-color: rgba(45, 90, 61, 0.2) !important;
}

.marker-cluster-small div,
.marker-cluster-medium div,
.marker-cluster-large div {
  background-color: rgba(45, 90, 61, 0.85) !important;
  color: #fff !important;
  font-weight: 700 !important;
  font-size: 13px !important;
}

.sl-user-pin {
  width: 16px;
  height: 16px;
  background: #2d5a3d;
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(45, 90, 61, 0.3);
}

@media (max-width: 768px) {
  #store-locator {
    flex-direction: column !important;
    height: auto !important;
  }

  #sl-panel {
    width: 100% !important;
    min-width: unset !important;
    border-right: none;
    border-bottom: 1px solid #e5e5e5;
    max-height: 400px;
  }

  #sl-map {
    height: 350px !important;
    min-height: 350px !important;
    flex: none !important;
  }
}