/* Property search — compact sticky filters + list/map */
.pb-search-page { padding-bottom: 48px; }

.pb-search-sticky {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #ebebeb;
  padding: 10px 0 12px;
}
.pb-search-sticky-inner {
  max-width: 1520px;
  margin: 0 auto;
  padding: 0 24px;
}
.pb-search-bar {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 14px;
  padding: 10px;
}
@media (min-width: 960px) {
  .pb-search-bar {
    grid-template-columns: 1.3fr minmax(110px, 0.7fr) minmax(110px, 0.7fr) minmax(110px, 0.7fr) minmax(90px, 0.55fr) minmax(90px, 0.55fr) minmax(80px, 0.5fr) auto;
    align-items: end;
  }
}
.pb-search-bar label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6a6a6a;
  margin-bottom: 3px;
}
.pb-search-bar input,
.pb-search-bar select {
  width: 100%;
  height: 40px;
  border: 1px solid #e5e5e5;
  border-radius: 10px;
  padding: 0 10px;
  font-size: 14px;
  background: #fafafa;
}
.pb-search-bar .pb-search-go {
  height: 40px;
  padding: 0 18px;
  border: 0;
  border-radius: 9999px;
  background: #ff385c;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.pb-search-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  align-items: center;
}
.pb-search-chip {
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 9999px;
  border: 1px solid #ddd;
  background: #fff;
  cursor: pointer;
  font-weight: 600;
  color: #3f3f3f;
}
.pb-search-chip.is-on {
  background: #222;
  color: #fff;
  border-color: #222;
}
.pb-search-chip.pb-chip-save {
  border-color: #ff385c;
  color: #ff385c;
}
.pb-search-more { margin-top: 8px; }
.pb-search-more summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: #222;
  list-style: none;
}
.pb-search-more-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  margin-top: 10px;
}
.pb-tabs-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.pb-tabs-inline a {
  font-size: 12px;
  padding: 5px 10px;
  border-radius: 9999px;
  background: #f2f2f2;
  color: #3f3f3f;
  text-decoration: none;
  font-weight: 600;
}
.pb-tabs-inline a.is-active {
  background: #222;
  color: #fff;
}

.pb-search-toolbar {
  max-width: 1520px;
  margin: 14px auto 0;
  padding: 0 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}
.pb-view-toggle {
  display: inline-flex;
  background: #f2f2f2;
  border-radius: 9999px;
  padding: 4px;
}
.pb-view-toggle button {
  border: 0;
  background: transparent;
  padding: 8px 16px;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 600;
  color: #6a6a6a;
  cursor: pointer;
}
.pb-view-toggle button.is-active {
  background: #222;
  color: #fff;
}
.pb-search-meta { font-size: 14px; color: #6a6a6a; }
.pb-search-sorts select {
  height: 36px;
  border-radius: 8px;
  border: 1px solid #ddd;
  padding: 0 8px;
  margin-left: 6px;
}

.pb-search-body {
  max-width: 1520px;
  margin: 16px auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 1100px) {
  .pb-search-body.is-list { grid-template-columns: 280px 1fr; }
}
.pb-search-body.is-list #pbSearchMapPane { display: none !important; }
.pb-search-body.is-list #pbSearchListPane { display: block; }
.pb-search-body.is-list #pbSearchFiltersSide { display: block; }

.pb-search-filters-side {
  background: #fff;
  border: 1px solid #ebebeb;
  border-radius: 16px;
  padding: 16px;
  height: fit-content;
  position: sticky;
  top: 120px;
}
.pb-search-filters-side h3 { font-size: 15px; margin: 0 0 12px; }
.pb-search-filters-side .pb-field { margin-bottom: 12px; }
.pb-search-filters-side label {
  font-size: 12px; font-weight: 600; display: block; margin-bottom: 4px;
}
.pb-search-filters-side input,
.pb-search-filters-side select {
  width: 100%; height: 40px; border: 1px solid #e5e5e5; border-radius: 8px; padding: 0 10px;
}

/* Typeahead suggestions */
.pb-suggest-wrap { position: relative; }
.pb-suggest-box {
  position: absolute;
  left: 0; right: 0;
  top: calc(100% + 4px);
  z-index: 60;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.12);
  max-height: 320px;
  overflow-y: auto;
  padding: 6px;
}
.pb-suggest-item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  color: #222;
}
.pb-suggest-item:hover,
.pb-suggest-item.is-active {
  background: #fff5f7;
}
.pb-suggest-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #64748b;
  background: #f1f5f9;
  padding: 2px 6px;
  border-radius: 999px;
}
.pb-suggest-badge.is-prop {
  background: #fff1f3;
  color: #be123c;
}
.pb-suggest-label { font-weight: 600; }
.pb-suggest-sub {
  width: 100%;
  font-size: 12px;
  color: #6a6a6a;
  margin-left: 0;
}
.pb-suggest-count {
  margin-left: auto;
  font-size: 11px;
  color: #9ca3af;
}

/* Price distribution chart */
.pb-price-hist {
  margin: 4px 0 16px;
  padding: 12px;
  border: 1px solid #f0f0f0;
  border-radius: 12px;
  background: linear-gradient(180deg, #fff 0%, #fafafa 100%);
}
.pb-price-hist-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6a6a6a;
  margin: 0 0 4px;
}
.pb-price-hist-meta { font-size: 11px; color: #888; margin-bottom: 6px; }
.pb-price-stats { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.pb-price-stats span {
  font-size: 10px; font-weight: 600; padding: 3px 7px; border-radius: 999px;
  background: #f3f4f6; color: #4b5563;
}
.pb-price-stats span.is-med { background: #fff1f3; color: #be123c; }
.pb-price-chart { position: relative; margin-bottom: 4px; }
.pb-price-bars {
  display: flex; align-items: flex-end; gap: 1px; height: 64px;
  padding: 0 1px; border-bottom: 1px solid #e5e7eb;
}
.pb-price-bar {
  flex: 1; min-width: 2px; padding: 0; border: 0;
  background: linear-gradient(180deg, #ff7a90 0%, #ff385c 100%);
  border-radius: 2px 2px 0 0; opacity: 0.95; cursor: pointer;
  transition: opacity 0.12s, background 0.12s, transform 0.12s;
}
.pb-price-bar:hover { transform: scaleY(1.04); opacity: 1; }
.pb-price-bar.is-out { background: #d1d5db; opacity: 0.4; }
.pb-price-bar.is-zero { background: #e5e7eb; opacity: 0.35; min-height: 2px; cursor: default; }
.pb-price-median {
  position: absolute; top: 0; bottom: 0; width: 0;
  border-left: 2px dashed #be123c; transform: translateX(-1px);
  pointer-events: none; z-index: 2;
}
.pb-price-empty { font-size: 11px; color: #9ca3af; width: 100%; text-align: center; padding-top: 22px; }
.pb-price-slider-wrap { position: relative; height: 28px; margin: 6px 0 8px; }
.pb-price-track {
  position: absolute; left: 0; right: 0; top: 12px; height: 4px;
  background: #e5e7eb; border-radius: 999px;
}
.pb-price-fill {
  position: absolute; top: 12px; height: 4px; background: #ff385c;
  border-radius: 999px; pointer-events: none;
}
.pb-price-slider-wrap input[type=range] {
  position: absolute; left: 0; width: 100%; top: 0; height: 28px; margin: 0;
  background: transparent; pointer-events: none;
  -webkit-appearance: none; appearance: none;
}
.pb-price-slider-wrap input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 18px; height: 18px; border-radius: 50%; background: #fff;
  border: 2px solid #ff385c; box-shadow: 0 1px 4px rgba(0,0,0,0.15);
  cursor: pointer; pointer-events: auto; margin-top: -7px;
}
.pb-price-slider-wrap input[type=range]::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 50%; background: #fff;
  border: 2px solid #ff385c; cursor: pointer; pointer-events: auto;
}
.pb-price-slider-wrap input[type=range]::-webkit-slider-runnable-track { height: 4px; background: transparent; }
.pb-price-slider-wrap input[type=range]::-moz-range-track { height: 4px; background: transparent; }
.pb-price-labels {
  display: flex; justify-content: space-between; font-size: 12px; font-weight: 700; color: #222; margin-bottom: 8px;
}
.pb-price-precise { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pb-price-precise input { height: 36px !important; font-size: 13px; }
.pb-price-hint { margin: 8px 0 0; font-size: 10px; color: #9ca3af; line-height: 1.35; }

.pb-results-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 700px) { .pb-results-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .pb-results-grid { grid-template-columns: repeat(3, 1fr); } }
.pb-prop-card {
  background: #fff; border: 1px solid #ebebeb; border-radius: 14px; overflow: hidden;
  text-decoration: none; color: inherit; display: flex; flex-direction: column; transition: box-shadow 0.2s;
}
.pb-prop-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,0.08); color: inherit; text-decoration: none; }
.pb-prop-card img { width: 100%; height: 180px; object-fit: cover; display: block; background: #f3f4f6; }
.pb-prop-card-body { padding: 12px 14px 16px; }
.pb-prop-card-price { font-size: 16px; font-weight: 700; margin: 0 0 4px; }
.pb-prop-card-title { font-size: 14px; font-weight: 600; margin: 0 0 4px; color: #222; }
.pb-prop-card-meta { font-size: 12px; color: #6a6a6a; }

.pb-search-body.is-map {
  display: grid; grid-template-columns: 1fr; max-width: none; width: 100%;
  padding: 0; margin: 12px 0 0; gap: 0; min-height: calc(100vh - 180px);
}
@media (min-width: 900px) {
  .pb-search-body.is-map { grid-template-columns: minmax(300px, 32%) 1fr; }
}
.pb-search-body.is-map #pbSearchListPane,
.pb-search-body.is-map #pbSearchFiltersSide { display: none !important; }
.pb-search-body.is-map #pbSearchMapPane { display: contents; }
.pb-search-map-list {
  background: #fff; border-right: 1px solid #ebebeb; overflow-y: auto;
  max-height: calc(100vh - 180px); padding: 12px;
}
.pb-search-map-list .pb-map-list-item {
  display: flex; gap: 10px; padding: 10px; border-radius: 12px; cursor: pointer;
  border: 1px solid transparent; text-align: left; width: 100%; background: transparent;
}
.pb-search-map-list .pb-map-list-item:hover,
.pb-search-map-list .pb-map-list-item.is-active {
  background: #fff5f7; border-color: rgba(255,56,92,0.35);
}
.pb-search-map-list img { width: 72px; height: 56px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.pb-search-map-canvas {
  min-height: 420px; height: calc(100vh - 180px); width: 100%; background: #e8eef5; position: relative;
}
.pb-search-map-empty {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  padding: 24px; text-align: center; color: #64748b; font-size: 14px; background: #f1f5f9;
}
.pb-heat-toggle {
  position: absolute; top: 12px; left: 12px; z-index: 5; border: 0; background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12); border-radius: 999px; padding: 8px 14px;
  font-size: 12px; font-weight: 700; cursor: pointer; color: #3f3f3f;
}
.pb-heat-toggle.is-on { background: #222; color: #fff; }

.pb-ss-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 1100;
  display: none; align-items: center; justify-content: center; padding: 16px;
}
.pb-ss-backdrop.is-open { display: flex; }
.pb-ss-modal {
  background: #fff; border-radius: 16px; max-width: 420px; width: 100%;
  padding: 22px; box-shadow: 0 24px 64px rgba(0,0,0,0.2);
}
.pb-ss-modal h3 { margin: 0 0 6px; font-size: 18px; }
.pb-ss-modal p { margin: 0 0 14px; font-size: 13px; color: #6a6a6a; }
.pb-ss-modal label { font-size: 12px; font-weight: 600; display: block; margin-bottom: 4px; }
.pb-ss-modal input, .pb-ss-modal select {
  width: 100%; height: 42px; border: 1px solid #e5e5e5; border-radius: 10px;
  padding: 0 12px; margin-bottom: 12px; font-size: 14px;
}
.pb-ss-actions { display: flex; gap: 8px; margin-top: 4px; }
.pb-ss-actions button { flex: 1; height: 42px; border-radius: 10px; font-weight: 700; cursor: pointer; }
.pb-ss-actions .btn-cancel { border: 1px solid #ddd; background: #fff; }
.pb-ss-actions .btn-save { border: 0; background: #ff385c; color: #fff; }
