/* Property map */
.map-section {
  background: var(--bg-subtle);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.map-layout {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.map-toolbar {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.map-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.map-filter-btn {
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--white);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.map-filter-btn:hover { border-color: var(--text); }

.map-filter-btn.active {
  background: var(--black);
  color: var(--white);
  border-color: var(--black);
}

.map-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  padding: 12px 16px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.map-count {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}

.map-count strong { color: var(--text); }

.map-legend-divider {
  width: 1px;
  height: 16px;
  background: var(--border);
  flex-shrink: 0;
}

.map-key {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.map-key-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.map-key-dot.buy { background: var(--black); }
.map-key-dot.rent { background: var(--white); border: 2px solid var(--black); }

.map-canvas {
  min-width: 0;
}

.map-layers {
  border-top: 1px solid var(--border);
  padding-top: 16px;
  margin-bottom: 16px;
}

.map-layers h4 {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 8px;
}

.map-layer-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-secondary);
  padding: 6px 0;
  cursor: pointer;
  user-select: none;
}

.map-layer-toggle input {
  width: 16px;
  height: 16px;
  accent-color: var(--black);
  flex-shrink: 0;
}

.poi-status {
  margin-left: auto;
  font-size: 11px;
  color: var(--muted);
}

#property-map {
  height: clamp(360px, 50vh, 520px);
  min-height: 360px;
  width: 100%;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  z-index: 1;
  background: #e8e4e0;
}

.map-disclaimer {
  font-size: 12px;
  color: var(--muted);
  margin-top: 12px;
  line-height: 1.5;
}

/* Leaflet markers */
.map-marker-wrap {
  background: transparent !important;
  border: none !important;
}

.map-marker {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: transform 0.2s;
}

.map-marker:hover { transform: scale(1.1); }

.map-marker-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--black);
  border: 3px solid var(--white);
  box-shadow: 0 2px 8px rgba(0,0,0,0.35);
}

.map-marker.rent .map-marker-dot {
  background: var(--white);
  border-color: var(--black);
}

.map-marker-label {
  margin-top: 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--white);
  padding: 2px 6px;
  border-radius: 4px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
  white-space: nowrap;
}

/* Popup */
.leaflet-popup-content-wrapper {
  border-radius: var(--radius-md) !important;
  padding: 0 !important;
  overflow: hidden;
}

.leaflet-popup-content {
  margin: 0 !important;
  width: 260px !important;
}

.map-popup img {
  width: 100%;
  height: 120px;
  object-fit: cover;
}

.map-popup-body {
  padding: 14px 16px 16px;
}

.map-popup-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--bg-subtle);
  padding: 3px 8px;
  border-radius: 4px;
  margin-bottom: 8px;
}

.map-popup h4 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
}

.map-popup-area {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}

.map-popup-price {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 6px;
}

.map-popup-note {
  font-size: 11px;
  color: var(--muted);
  font-style: italic;
  margin-bottom: 12px;
}

.map-popup-btn {
  width: 100%;
  padding: 10px;
  background: var(--black);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.map-popup-btn:hover { background: var(--text-secondary); }

/* POI markers */
.poi-marker-wrap {
  background: transparent !important;
  border: none !important;
}

.poi-marker {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  border: 2px solid #fff;
  box-shadow: 0 1px 6px rgba(0,0,0,0.35);
}
