/* Directory list / map + Mapbox markers — v3 */
.pb-dir-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 20px;
}
.pb-view-toggle {
  display: inline-flex;
  background: #f2f2f2;
  border-radius: 9999px;
  padding: 4px;
  gap: 2px;
}
.pb-view-btn {
  border: 0;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 9999px;
  color: #6a6a6a;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.pb-view-btn.is-active {
  background: #222;
  color: #fff;
}

/* CRITICAL: display:grid must not override [hidden] */
.pb-dir-map-shell[hidden],
#dirMapView[hidden],
#dirListView[hidden] {
  display: none !important;
}

.pb-dir-map-shell {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  min-height: 520px;
  border: 1px solid #ebebeb;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
}
@media (min-width: 900px) {
  .pb-dir-map-shell {
    grid-template-columns: 300px 1fr;
  }
}
.pb-dir-map-side {
  padding: 16px;
  border-right: 1px solid #ebebeb;
  overflow-y: auto;
  max-height: 620px;
  background: #fafafa;
}
.pb-dir-map-filters {
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid #ebebeb;
}
.pb-dir-map-filters h3 {
  font-size: 14px;
  margin: 0 0 10px;
  color: #222;
}
.pb-dir-map-filters .pb-field {
  margin-bottom: 10px;
}
.pb-dir-map-filters label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #6a6a6a;
  margin-bottom: 4px;
}
.pb-dir-map-filters input,
.pb-dir-map-filters select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 10px;
  font-size: 14px;
  background: #fff;
}
.pb-dir-map-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.pb-dir-map-list li {
  padding: 10px 0;
  border-bottom: 1px solid #f0f0f0;
}
.pb-dir-map-item {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0;
}
.pb-dir-map-item strong {
  display: block;
  font-size: 14px;
  color: #222;
  margin-bottom: 2px;
}
.pb-dir-map-item span {
  font-size: 12px;
  color: #6a6a6a;
  line-height: 1.35;
}
.pb-dir-map-item.is-active strong {
  color: #ff385c;
}
.pb-dir-map-list a {
  font-size: 12px;
  color: #222;
  font-weight: 500;
}
.pb-dir-map-note {
  font-size: 11px;
  color: #929292;
  margin-top: 16px;
  line-height: 1.4;
}
.pb-dir-map-canvas {
  position: relative;
  min-height: 480px;
  width: 100%;
  height: 100%;
}

/* Related content band under directories */
.pb-dir-related {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid #ebebeb;
}
.pb-dir-related h2 {
  font-size: 22px;
  font-weight: 700;
  color: #222;
  margin: 0 0 8px;
}
.pb-dir-related > p {
  color: #6a6a6a;
  margin: 0 0 20px;
  font-size: 15px;
}
.pb-dir-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
.pb-dir-related-card {
  background: #fff;
  border: 1px solid #ebebeb;
  border-radius: 14px;
  padding: 18px;
  text-decoration: none;
  color: inherit;
  transition: box-shadow .15s ease, border-color .15s ease;
}
.pb-dir-related-card:hover {
  border-color: #ccc;
  box-shadow: 0 6px 20px rgba(0,0,0,.06);
}
.pb-dir-related-card .kicker {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #ff385c;
  margin-bottom: 6px;
}
.pb-dir-related-card h3 {
  font-size: 16px;
  margin: 0 0 6px;
  color: #222;
}
.pb-dir-related-card p {
  font-size: 13px;
  color: #6a6a6a;
  margin: 0;
  line-height: 1.4;
}

/* Mapbox custom markers */
.pb-mbx-marker {
  width: 32px;
  height: 32px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  background: #ff385c;
  border: 2px solid #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pb-mbx-marker span {
  transform: rotate(45deg);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}
.pb-mbx-marker.is-active {
  background: #222;
  z-index: 2;
}
.pb-mbx-popup {
  font-family: inherit;
  font-size: 13px;
  line-height: 1.35;
}
.pb-mbx-popup strong {
  display: block;
  margin-bottom: 4px;
  color: #222;
}
.pb-mbx-sub {
  color: #6a6a6a;
  font-size: 12px;
  margin-bottom: 6px;
}
.pb-mbx-price {
  font-weight: 700;
  color: #222;
  margin-bottom: 6px;
}
.pb-mbx-link {
  color: #ff385c;
  font-weight: 600;
  text-decoration: none;
}
.mapboxgl-popup-content {
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.pb-map-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e8eef5;
  min-height: 420px;
}
.pb-map-fallback-msg {
  text-align: center;
  padding: 24px;
  max-width: 360px;
  color: #6a6a6a;
  font-size: 14px;
}
.pb-map-fallback-msg code {
  font-size: 12px;
  background: #fff;
  padding: 2px 6px;
  border-radius: 4px;
}

.pb-map-shell {
  display: grid;
  grid-template-columns: 1fr;
  min-height: 560px;
  border: 1px solid #ebebeb;
  border-radius: 16px;
  overflow: hidden;
}
@media (min-width: 900px) {
  .pb-map-shell {
    grid-template-columns: 280px 1fr;
  }
}
.pb-map-filters {
  padding: 16px;
  border-right: 1px solid #ebebeb;
  background: #fff;
}
.pb-map-canvas {
  min-height: 520px;
  width: 100%;
  height: 100%;
}
