/* Redfin-style Search v2 — LuxuryDade */

:root {
  --sv2-gold: #c9a96e;
  --sv2-gold-dim: rgba(201, 169, 110, 0.12);
  --sv2-gold-bg: rgba(201, 169, 110, 0.04);
  --sv2-bg: #0a0a0f;
  --sv2-surface: #141418;
  --sv2-surface-2: #1e1e28;
  --sv2-text: #e0e0e0;
  --sv2-silver: #a0a0a0;
  --sv2-border: rgba(255, 255, 255, 0.06);
}

.sv2 { color: var(--sv2-text); font-family: 'Inter', -apple-system, sans-serif; }
.sv2 *, .sv2 *::before, .sv2 *::after { box-sizing: border-box; }

/* === Sticky control bar === */
.sv2-bar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(10, 10, 15, 0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--sv2-border);
  padding: 14px 24px 12px;
}
.sv2-bar__row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

/* Omnibox */
.sv2-omnibox {
  position: relative;
  flex: 1;
  min-width: 280px;
}
.sv2-omnibox__input {
  width: 100%;
  padding: 12px 14px 12px 42px;
  font-size: 15px;
  background: var(--sv2-surface);
  border: 1px solid var(--sv2-surface-2);
  border-radius: 8px;
  color: var(--sv2-text);
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
}
.sv2-omnibox__input:focus {
  border-color: var(--sv2-gold);
  box-shadow: 0 0 0 3px rgba(201, 169, 110, 0.08);
}
.sv2-omnibox__icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--sv2-gold);
  pointer-events: none;
}
.sv2-omnibox__suggest {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--sv2-surface);
  border: 1px solid var(--sv2-surface-2);
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  max-height: 360px;
  overflow-y: auto;
  z-index: 50;
  display: none;
}
.sv2-omnibox__suggest.is-open { display: block; }
.sv2-suggest__item {
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid var(--sv2-border);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  transition: background 0.1s;
}
.sv2-suggest__item:last-child { border-bottom: 0; }
.sv2-suggest__item:hover,
.sv2-suggest__item.is-active { background: var(--sv2-gold-bg); }
.sv2-suggest__type {
  font-size: 11px;
  color: var(--sv2-gold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  min-width: 60px;
}
.sv2-suggest__label { flex: 1; }
.sv2-suggest__sub { color: var(--sv2-silver); font-size: 12px; }

/* Filter pills */
.sv2-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.sv2-pill {
  background: var(--sv2-surface);
  border: 1px solid var(--sv2-surface-2);
  border-radius: 20px;
  padding: 8px 14px;
  font-size: 13px;
  color: var(--sv2-text);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
}
.sv2-pill:hover { border-color: var(--sv2-gold); }
.sv2-pill.is-active {
  border-color: var(--sv2-gold);
  background: var(--sv2-gold-bg);
  color: var(--sv2-gold);
}
.sv2-pill__caret {
  width: 10px;
  height: 10px;
  opacity: 0.6;
}

/* Dropdown panel */
.sv2-drop {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: var(--sv2-surface);
  border: 1px solid var(--sv2-surface-2);
  border-radius: 10px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6);
  padding: 18px;
  z-index: 45;
  min-width: 320px;
  display: none;
}
.sv2-drop.is-open { display: block; }
.sv2-drop__title {
  font-size: 11px;
  color: var(--sv2-silver);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 10px;
}
.sv2-drop__row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
}
.sv2-drop__row:last-child { margin-bottom: 0; }
.sv2-drop__sep { color: var(--sv2-silver); }
.sv2-drop select,
.sv2-drop input[type="number"] {
  flex: 1;
  padding: 10px 12px;
  background: var(--sv2-bg);
  border: 1px solid var(--sv2-surface-2);
  border-radius: 6px;
  color: var(--sv2-text);
  font-size: 14px;
  font-family: inherit;
  outline: none;
}
.sv2-drop select:focus,
.sv2-drop input:focus { border-color: var(--sv2-gold); }

.sv2-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.sv2-chip {
  padding: 8px 14px;
  background: var(--sv2-bg);
  border: 1px solid var(--sv2-surface-2);
  border-radius: 6px;
  font-size: 13px;
  color: var(--sv2-text);
  cursor: pointer;
  font-family: inherit;
}
.sv2-chip:hover { border-color: var(--sv2-gold); }
.sv2-chip.is-active {
  border-color: var(--sv2-gold);
  background: var(--sv2-gold-bg);
  color: var(--sv2-gold);
}
.sv2-drop__actions {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--sv2-border);
}
.sv2-drop__btn {
  padding: 9px 16px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  border: 1px solid transparent;
}
.sv2-drop__btn--primary {
  background: var(--sv2-gold);
  color: var(--sv2-bg);
}
.sv2-drop__btn--ghost {
  background: transparent;
  border-color: var(--sv2-surface-2);
  color: var(--sv2-silver);
}

/* === Split view === */
.sv2-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0;
  height: calc(100vh - 200px);
  min-height: 600px;
}
@media (min-width: 1200px) {
  .sv2-stage { grid-template-columns: 1.2fr 1fr; }
}
@media (max-width: 899px) {
  .sv2-stage { grid-template-columns: 1fr; height: auto; min-height: 0; position: relative; }
  /* Mobile: toggle decides which one shows full-screen-tall; the other is hidden. */
  .sv2-stage[data-mobile-view="list"] .sv2-map { display: none; }
  .sv2-stage[data-mobile-view="map"] .sv2-results { display: none; }
  .sv2-stage[data-mobile-view="map"] .sv2-map { height: calc(100vh - 220px); min-height: 420px; }
  .sv2-stage[data-mobile-view="list"] .sv2-results { min-height: 400px; }
}
@media (min-width: 900px) {
  /* Toggle is mobile-only; hide on desktop. */
  .sv2-mobile-toggle { display: none !important; }
}

.sv2-mobile-toggle {
  display: flex;
  gap: 4px;
  padding: 8px 12px;
  background: var(--sv2-surface);
  border-bottom: 1px solid var(--sv2-border);
  position: sticky;
  top: 0;
  z-index: 20;
}
.sv2-mobile-toggle__btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 14px;
  background: transparent;
  border: 1px solid var(--sv2-surface-2);
  border-radius: 6px;
  color: var(--sv2-silver);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}
.sv2-mobile-toggle__btn:hover { color: var(--sv2-text); border-color: var(--sv2-gold-dim); }
.sv2-mobile-toggle__btn.is-active {
  background: var(--sv2-gold);
  border-color: var(--sv2-gold);
  color: var(--sv2-bg);
}
.sv2-mobile-toggle__btn svg { flex-shrink: 0; }

.sv2-map {
  position: relative;
  background: var(--sv2-surface);
  height: 100%;
  border-right: 1px solid var(--sv2-border);
}
.sv2-map__canvas { width: 100%; height: 100%; }
.sv2-map__move-search {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(10, 10, 15, 0.92);
  border: 1px solid var(--sv2-surface-2);
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 12px;
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--sv2-text);
  cursor: pointer;
  z-index: 10;
}
.sv2-map__move-search input { cursor: pointer; }

.sv2-results {
  background: var(--sv2-bg);
  overflow-y: auto;
  height: 100%;
}
.sv2-results__header {
  padding: 14px 20px;
  border-bottom: 1px solid var(--sv2-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  background: var(--sv2-bg);
  z-index: 5;
}
.sv2-results__count { font-size: 13px; color: var(--sv2-silver); }
.sv2-results__count strong { color: var(--sv2-text); font-weight: 600; }
.sv2-results__sort {
  background: var(--sv2-surface);
  border: 1px solid var(--sv2-surface-2);
  border-radius: 6px;
  padding: 6px 10px;
  color: var(--sv2-text);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
}

.sv2-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding: 14px;
}
@media (max-width: 1100px) { .sv2-grid { grid-template-columns: 1fr; } }

.sv2-card {
  background: var(--sv2-surface);
  border: 1px solid var(--sv2-border);
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}
.sv2-card:hover,
.sv2-card.is-highlighted {
  border-color: var(--sv2-gold);
  transform: translateY(-3px);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.5);
}
.sv2-card__media {
  position: relative;
  aspect-ratio: 16/10;
  background: var(--sv2-surface-2);
  overflow: hidden;
}
.sv2-card__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.sv2-card__badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(10, 10, 15, 0.9);
  color: var(--sv2-gold);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 4px;
  border: 1px solid var(--sv2-gold-dim);
}
.sv2-card__fav {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(10, 10, 15, 0.8);
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}
.sv2-card__fav:hover { background: rgba(201, 169, 110, 0.2); color: var(--sv2-gold); }
.sv2-card__fav.is-favorited { color: var(--sv2-gold); }
.sv2-card__body { padding: 14px 16px 16px; }
.sv2-card__price {
  font-size: 20px;
  font-weight: 700;
  color: var(--sv2-text);
  margin-bottom: 6px;
  font-family: 'DM Sans', 'Inter', sans-serif;
}
.sv2-card__specs {
  font-size: 13px;
  color: var(--sv2-silver);
  margin-bottom: 8px;
}
.sv2-card__specs strong { color: var(--sv2-text); font-weight: 600; }
.sv2-card__addr {
  font-size: 14px;
  color: var(--sv2-text);
  line-height: 1.4;
  margin-bottom: 4px;
}
.sv2-card__mls {
  font-size: 11px;
  color: var(--sv2-silver);
  margin-top: 6px;
}

.sv2-empty,
.sv2-loading,
.sv2-error {
  padding: 60px 20px;
  text-align: center;
  color: var(--sv2-silver);
  font-size: 14px;
}
.sv2-loading::before {
  content: "";
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 2px solid var(--sv2-surface-2);
  border-top-color: var(--sv2-gold);
  border-radius: 50%;
  animation: sv2-spin 0.8s linear infinite;
  margin-bottom: 10px;
  vertical-align: middle;
}
@keyframes sv2-spin { to { transform: rotate(360deg); } }

/* Mapbox pin price bubble */
.sv2-pin {
  background: #0a0a0f;
  color: #fff;
  border: 1.5px solid #c9a96e;
  padding: 5px 10px;
  border-radius: 14px;
  font-size: 12px;
  font-weight: 700;
  font-family: 'DM Sans', sans-serif;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.28);
  transition: transform 0.12s, background 0.12s;
}
.sv2-pin:hover { transform: scale(1.06); }
.sv2-pin.is-active {
  background: var(--sv2-gold);
  color: #0a0a0f;
  transform: scale(1.12);
  z-index: 10;
}
.sv2-cluster {
  background: var(--sv2-gold);
  color: var(--sv2-bg);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  border: 3px solid var(--sv2-bg);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  cursor: pointer;
}

/* Pagination */
.sv2-paginate {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 20px;
  border-top: 1px solid var(--sv2-border);
}
.sv2-paginate button {
  padding: 8px 14px;
  background: var(--sv2-surface);
  border: 1px solid var(--sv2-surface-2);
  border-radius: 6px;
  color: var(--sv2-text);
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
}
.sv2-paginate button:hover:not(:disabled) { border-color: var(--sv2-gold); }
.sv2-paginate button:disabled { opacity: 0.4; cursor: not-allowed; }
.sv2-paginate button.is-current { background: var(--sv2-gold); color: var(--sv2-bg); border-color: var(--sv2-gold); }

/* === Phase 2 === */

/* Save Search button in results header */
.sv2-results__header-actions { display: flex; gap: 8px; align-items: center; }
.sv2-save-btn {
  background: var(--sv2-surface);
  border: 1px solid var(--sv2-gold);
  border-radius: 6px;
  padding: 6px 12px;
  color: var(--sv2-gold);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.15s;
}
.sv2-save-btn:hover { background: var(--sv2-gold-bg); }

/* Modal */
.sv2-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: sv2-fade 0.15s ease-out;
}
@keyframes sv2-fade { from { opacity: 0; } to { opacity: 1; } }
.sv2-modal__card {
  background: var(--sv2-surface);
  border: 1px solid var(--sv2-surface-2);
  border-radius: 12px;
  padding: 28px;
  width: 100%;
  max-width: 440px;
  position: relative;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.7);
}
.sv2-modal__close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: transparent;
  border: 0;
  color: var(--sv2-silver);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.sv2-modal__close:hover { color: var(--sv2-gold); }
.sv2-modal__title {
  font-size: 20px;
  font-weight: 600;
  font-family: 'Cormorant Garamond', 'DM Sans', sans-serif;
  margin: 0 0 4px;
  color: var(--sv2-text);
}
.sv2-modal__sub {
  font-size: 13px;
  color: var(--sv2-silver);
  margin: 0 0 18px;
}
.sv2-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
}
.sv2-field span {
  font-size: 11px;
  color: var(--sv2-silver);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.sv2-field input,
.sv2-field select,
.sv2-field textarea {
  padding: 10px 12px;
  background: var(--sv2-bg);
  border: 1px solid var(--sv2-surface-2);
  border-radius: 6px;
  color: var(--sv2-text);
  font-size: 14px;
  font-family: inherit;
  outline: none;
}
.sv2-field input:focus,
.sv2-field select:focus,
.sv2-field textarea:focus { border-color: var(--sv2-gold); }
.sv2-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 6px;
}
.sv2-modal__msg {
  font-size: 13px;
  margin: 4px 0 8px;
  min-height: 18px;
  color: var(--sv2-silver);
}
.sv2-modal__msg.is-success { color: #7fd497; }
.sv2-modal__msg.is-error { color: #e37a7a; }

/* Draw buttons on map */
.sv2-map__tools {
  position: absolute;
  top: 14px;
  left: 60px;
  display: flex;
  gap: 8px;
  z-index: 10;
}
.sv2-map__tool {
  background: rgba(10, 10, 15, 0.92);
  border: 1px solid var(--sv2-surface-2);
  border-radius: 6px;
  padding: 7px 11px;
  font-size: 12px;
  color: var(--sv2-text);
  cursor: pointer;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.sv2-map__tool:hover { border-color: var(--sv2-gold); color: var(--sv2-gold); }
.sv2-map__tool.is-active { background: var(--sv2-gold); color: var(--sv2-bg); border-color: var(--sv2-gold); }

/* School markers */
.sv2-school {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.25);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}
.sv2-school--elementary { background: #4a90e2; }
.sv2-school--middle { background: #7b61ff; }
.sv2-school--high { background: #c9a96e; color: #0a0a0f; }

/* Extra toggles inside More Filters */
.sv2-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0;
  font-size: 13px;
  color: var(--sv2-text);
  cursor: pointer;
}
.sv2-range {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 6px 0 10px;
}
.sv2-range input[type="range"] {
  flex: 1;
  accent-color: var(--sv2-gold);
}
.sv2-range output {
  min-width: 36px;
  font-size: 12px;
  color: var(--sv2-gold);
  font-weight: 600;
}
.sv2-drop__title--mt { margin-top: 14px; }

/* Card 3D badge */
.sv2-card__badge--tour {
  background: rgba(201, 169, 110, 0.9);
  color: var(--sv2-bg);
  border-color: var(--sv2-gold);
}

/* === Detail view === */
.sv2-detail {
  padding: 80px 24px 40px;
  max-width: 1200px;
  margin: 0 auto;
  color: var(--sv2-text);
}
.sv2-det__back {
  background: transparent;
  border: 0;
  color: var(--sv2-gold);
  font-size: 14px;
  cursor: pointer;
  padding: 0 0 14px;
  font-family: inherit;
}
.sv2-det__back:hover { text-decoration: underline; }

.sv2-det__gallery {
  background: var(--sv2-surface);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 24px;
}
.sv2-det__hero {
  aspect-ratio: 16/9;
  background: var(--sv2-surface-2);
}
.sv2-det__hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.sv2-det__thumbs {
  display: flex;
  gap: 6px;
  padding: 8px;
  overflow-x: auto;
}
.sv2-det__thumb {
  width: 88px;
  height: 60px;
  object-fit: cover;
  border-radius: 4px;
  cursor: pointer;
  opacity: 0.75;
  border: 2px solid transparent;
  flex-shrink: 0;
  transition: opacity 0.15s, border-color 0.15s;
}
.sv2-det__thumb:hover { opacity: 1; border-color: var(--sv2-gold); }

.sv2-det__grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 28px;
}
@media (max-width: 899px) { .sv2-det__grid { grid-template-columns: 1fr; } }

.sv2-det__price {
  font-size: 36px;
  font-weight: 700;
  font-family: 'DM Sans', sans-serif;
  color: var(--sv2-text);
  margin-bottom: 4px;
}
.sv2-det__addr {
  font-size: 22px;
  font-weight: 400;
  font-family: 'Cormorant Garamond', serif;
  color: var(--sv2-text);
  margin: 0 0 4px;
}
.sv2-det__sub { color: var(--sv2-silver); font-size: 14px; margin-bottom: 18px; }
.sv2-det__specs {
  display: flex;
  gap: 22px;
  padding: 14px 0;
  border-top: 1px solid var(--sv2-border);
  border-bottom: 1px solid var(--sv2-border);
  font-size: 14px;
  color: var(--sv2-silver);
}
.sv2-det__specs strong { color: var(--sv2-text); font-size: 18px; font-weight: 700; }
.sv2-det__tour {
  display: inline-block;
  margin: 16px 0 0;
  padding: 8px 14px;
  background: var(--sv2-gold-bg);
  color: var(--sv2-gold);
  border: 1px solid var(--sv2-gold);
  border-radius: 6px;
  font-size: 13px;
  text-decoration: none;
}
.sv2-det__tour:hover { background: var(--sv2-gold); color: var(--sv2-bg); }
.sv2-det__h2 {
  margin: 28px 0 10px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--sv2-silver);
  font-weight: 600;
}
.sv2-det__remarks {
  font-size: 15px;
  line-height: 1.7;
  color: var(--sv2-text);
  white-space: pre-wrap;
}
.sv2-det__facts {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 24px;
}
.sv2-det__facts li {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--sv2-border);
  font-size: 14px;
}
.sv2-det__facts span { color: var(--sv2-silver); }
.sv2-det__facts strong { color: var(--sv2-text); font-weight: 600; }
.sv2-det__map {
  height: 320px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--sv2-surface);
}

.sv2-det__side { position: sticky; top: 100px; align-self: start; }
.sv2-det__cta {
  background: var(--sv2-surface);
  border: 1px solid var(--sv2-border);
  border-radius: 12px;
  padding: 20px;
}
.sv2-det__cta h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 20px;
  margin: 0 0 14px;
  color: var(--sv2-text);
}

/* === Redfin-style detail v2 === */
.sv2-det__gallery {
  position: relative;
  display: grid;
  grid-template-columns: 2fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 6px;
  height: 520px;
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 28px;
  background: var(--sv2-surface);
}
.sv2-det__gallery-hero {
  grid-row: span 2;
  overflow: hidden;
  cursor: zoom-in;
}
.sv2-det__gallery-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s;
}
.sv2-det__gallery-hero:hover img { transform: scale(1.02); }
.sv2-det__gallery-side {
  display: grid;
  grid-template-rows: 1fr 1fr;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  grid-row: span 2;
}
.sv2-det__gallery-tile {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
  display: block;
  background: var(--sv2-surface-2);
  transition: opacity 0.2s;
}
.sv2-det__gallery-tile:hover { opacity: 0.88; }
.sv2-det__gallery-tile--empty { background: var(--sv2-surface-2); }
.sv2-det__gallery-all {
  position: absolute;
  right: 18px;
  bottom: 18px;
  background: rgba(10, 10, 15, 0.92);
  color: #fff;
  border: 1px solid var(--sv2-border);
  padding: 9px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  z-index: 2;
}
.sv2-det__gallery-all:hover { border-color: var(--sv2-gold); color: var(--sv2-gold); }
@media (max-width: 899px) {
  .sv2-det__gallery {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
    height: 320px;
  }
  .sv2-det__gallery-side { display: none; }
}

/* Status pill above price */
.sv2-det__header { margin-bottom: 20px; }
.sv2-det__status {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}
.sv2-det__status--active { background: rgba(127, 212, 151, 0.12); color: #7fd497; border: 1px solid rgba(127, 212, 151, 0.3); }
.sv2-det__status--pending { background: rgba(227, 182, 122, 0.14); color: #e3b67a; border: 1px solid rgba(227, 182, 122, 0.3); }
.sv2-det__status--closed { background: rgba(227, 122, 122, 0.12); color: #e37a7a; border: 1px solid rgba(227, 122, 122, 0.3); }

/* Full price (no abbreviation) */
.sv2-det__price {
  font-size: 40px;
  font-weight: 700;
  font-family: 'DM Sans', sans-serif;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

/* Icon spec row */
.sv2-det__specs {
  display: flex;
  gap: 22px;
  padding: 18px 0;
  border-top: 1px solid var(--sv2-border);
  border-bottom: 1px solid var(--sv2-border);
  flex-wrap: wrap;
}
.sv2-det__spec {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 130px;
}
.sv2-det__spec-icon {
  color: var(--sv2-gold);
  display: inline-flex;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  background: var(--sv2-gold-bg);
  border: 1px solid var(--sv2-gold-dim);
  border-radius: 8px;
}
.sv2-det__spec-val { display: flex; flex-direction: column; }
.sv2-det__spec-val strong {
  color: var(--sv2-text);
  font-size: 18px;
  font-weight: 700;
  font-family: 'DM Sans', sans-serif;
  line-height: 1.1;
}
.sv2-det__spec-val span {
  color: var(--sv2-silver);
  font-size: 12px;
  margin-top: 2px;
}

/* Agent card */
.sv2-det__agent {
  background: linear-gradient(180deg, rgba(201, 169, 110, 0.08), rgba(201, 169, 110, 0.02));
  border: 1px solid rgba(201, 169, 110, 0.24);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
}
.sv2-det__agent-head {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 12px;
}
.sv2-det__agent-photo {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 8%;
  border: 2px solid var(--sv2-gold);
  flex-shrink: 0;
  background: var(--sv2-surface-2);
}
.sv2-det__agent-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--sv2-gold);
  margin-bottom: 2px;
}
.sv2-det__agent-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  color: var(--sv2-text);
  line-height: 1.1;
}
.sv2-det__agent-title {
  font-size: 12px;
  color: var(--sv2-silver);
  margin-top: 2px;
}
.sv2-det__agent-bio {
  font-size: 13px;
  color: var(--sv2-silver);
  line-height: 1.55;
  margin: 0 0 14px;
}
.sv2-det__agent-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}
.sv2-det__agent-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.sv2-det__agent-btn--primary {
  background: var(--sv2-gold);
  color: var(--sv2-bg);
  border: 1px solid var(--sv2-gold);
}
.sv2-det__agent-btn--primary:hover { background: #b8986a; }
.sv2-det__agent-btn--ghost {
  background: transparent;
  color: var(--sv2-text);
  border: 1px solid var(--sv2-border);
}
.sv2-det__agent-btn--ghost:hover { border-color: var(--sv2-gold); color: var(--sv2-gold); }
.sv2-det__compass {
  padding-top: 12px;
  border-top: 1px solid var(--sv2-border);
  opacity: 0.8;
}
.sv2-det__compass img { height: 18px; width: auto; }

/* Neighborhood section */
.sv2-det__nbhd {
  background: var(--sv2-surface);
  border: 1px solid var(--sv2-border);
  border-radius: 10px;
  padding: 18px 20px;
}
.sv2-det__nbhd-about {
  font-size: 14px;
  line-height: 1.6;
  color: var(--sv2-silver);
  margin: 0;
}

/* Similar listings */
.sv2-det__similar {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}
.sv2-det__sim {
  background: var(--sv2-surface);
  border: 1px solid var(--sv2-border);
  border-radius: 10px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, transform 0.15s;
  cursor: pointer;
}
.sv2-det__sim:hover {
  border-color: var(--sv2-gold);
  transform: translateY(-2px);
}
.sv2-det__sim-photo {
  height: 140px;
  background-size: cover;
  background-position: center;
  background-color: var(--sv2-surface-2);
}
.sv2-det__sim-body { padding: 12px 14px 14px; }
.sv2-det__sim-price {
  font-size: 17px;
  font-weight: 700;
  font-family: 'DM Sans', sans-serif;
  color: var(--sv2-text);
  margin-bottom: 4px;
}
.sv2-det__sim-specs {
  font-size: 12px;
  color: var(--sv2-silver);
  margin-bottom: 4px;
}
.sv2-det__sim-addr {
  font-size: 13px;
  color: var(--sv2-text);
  line-height: 1.4;
}

/* Lightbox */
.sv2-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.94);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}
.sv2-lightbox__img {
  max-width: 100%;
  max-height: calc(100vh - 80px);
  object-fit: contain;
  border-radius: 4px;
}
.sv2-lightbox__close,
.sv2-lightbox__nav {
  position: absolute;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  transition: background 0.15s;
}
.sv2-lightbox__close:hover,
.sv2-lightbox__nav:hover { background: rgba(255, 255, 255, 0.18); }
.sv2-lightbox__close { top: 20px; right: 24px; font-size: 24px; }
.sv2-lightbox__nav { top: 50%; transform: translateY(-50%); font-size: 32px; line-height: 1; }
.sv2-lightbox__nav--prev { left: 24px; }
.sv2-lightbox__nav--next { right: 24px; }
.sv2-lightbox__count {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  letter-spacing: 0.06em;
}

/* Mobile agent card moves above form */
@media (max-width: 899px) {
  .sv2-det__side { position: static; }
  .sv2-det__price { font-size: 30px; }
  .sv2-det__specs { gap: 14px; }
  .sv2-det__spec { min-width: 110px; }
}

/* Schools */
.sv2-det__schools {
  background: var(--sv2-surface);
  border: 1px solid var(--sv2-border);
  border-radius: 10px;
  padding: 18px 20px;
}
.sv2-det__schools-group { margin-bottom: 16px; }
.sv2-det__schools-group:last-child { margin-bottom: 0; }
.sv2-det__schools-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--sv2-silver);
  margin-bottom: 8px;
  font-weight: 600;
}
.sv2-det__school {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid var(--sv2-border);
}
.sv2-det__school:last-child { border-bottom: 0; }
.sv2-det__school-rating {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'DM Sans', sans-serif;
  flex-shrink: 0;
  flex-direction: column;
  line-height: 1;
}
.sv2-det__school-rating span {
  font-size: 9px;
  font-weight: 500;
  opacity: 0.85;
  margin-top: 1px;
}
.sv2-det__school-info { flex: 1; }
.sv2-det__school-name {
  font-size: 14px;
  color: var(--sv2-text);
  font-weight: 600;
}
.sv2-det__school-meta {
  font-size: 12px;
  color: var(--sv2-silver);
  margin-top: 2px;
}
.sv2-det__schools-note {
  font-size: 11px;
  color: var(--sv2-silver);
  margin-top: 14px;
  font-style: italic;
  opacity: 0.8;
}

/* Lifestyle */
.sv2-det__lifestyle {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}
.sv2-det__life-card {
  background: var(--sv2-surface);
  border: 1px solid var(--sv2-border);
  border-radius: 10px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.sv2-det__life-score {
  font-size: 26px;
  font-weight: 800;
  font-family: 'DM Sans', sans-serif;
  color: var(--sv2-gold);
  line-height: 1;
  flex-shrink: 0;
  min-width: 58px;
}
.sv2-det__life-score span {
  font-size: 12px;
  color: var(--sv2-silver);
  font-weight: 500;
}
.sv2-det__life-title {
  font-size: 12px;
  color: var(--sv2-silver);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}
.sv2-det__life-label {
  font-size: 14px;
  color: var(--sv2-text);
  font-weight: 600;
}
.sv2-det__lifestyle + .sv2-det__schools-note,
.sv2-det__lifestyle .sv2-det__schools-note {
  grid-column: 1 / -1;
}

/* Payment calculator */
.sv2-det__payment {
  background: var(--sv2-surface);
  border: 1px solid var(--sv2-border);
  border-radius: 12px;
  padding: 22px;
}
.sv2-pay__grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 24px;
  align-items: start;
}
@media (max-width: 699px) { .sv2-pay__grid { grid-template-columns: 1fr; } }
.sv2-pay__inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 14px;
}
.sv2-pay__inputs .sv2-pay__field:first-child { grid-column: 1 / -1; }
.sv2-pay__field { display: flex; flex-direction: column; gap: 6px; }
.sv2-pay__field label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}
.sv2-pay__field label > span:first-child {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--sv2-silver);
}
.sv2-pay__val {
  font-size: 13px;
  font-weight: 700;
  color: var(--sv2-text);
  font-family: 'DM Sans', sans-serif;
}
.sv2-pay__money-row {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--sv2-bg);
  border: 1px solid var(--sv2-surface-2);
  border-radius: 6px;
  transition: border-color 0.15s;
}
.sv2-pay__money-row:focus-within { border-color: var(--sv2-gold); }
.sv2-pay__prefix {
  padding: 0 10px 0 12px;
  color: var(--sv2-silver);
  font-size: 14px;
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  pointer-events: none;
}
.sv2-pay__money-input {
  flex: 1;
  padding: 10px 12px 10px 0;
  background: transparent;
  border: 0;
  color: var(--sv2-text);
  font-size: 15px;
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  font-variant-numeric: tabular-nums;
  outline: none;
  width: 100%;
  min-width: 0;
}
.sv2-pay__money-input--solo {
  padding: 10px 12px;
  background: var(--sv2-bg);
  border: 1px solid var(--sv2-surface-2);
  border-radius: 6px;
}
.sv2-pay__money-input--solo:focus { border-color: var(--sv2-gold); }
.sv2-pay__slider {
  width: 100%;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--sv2-surface-2);
  border-radius: 999px;
  outline: none;
  cursor: pointer;
  margin: 4px 0 2px;
}
.sv2-pay__slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--sv2-gold);
  border: 2px solid var(--sv2-bg);
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
  cursor: pointer;
}
.sv2-pay__slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--sv2-gold);
  border: 2px solid var(--sv2-bg);
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
  cursor: pointer;
}
.sv2-pay__bar {
  display: flex;
  width: 100%;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--sv2-surface-2);
  margin: 0 0 14px;
}
.sv2-pay__bar-seg { display: block; height: 100%; transition: flex 0.25s; }
.sv2-pay__bar-seg--pi { background: #C9A96E; }
.sv2-pay__bar-seg--tax { background: #7fa9d4; }
.sv2-pay__bar-seg--ins { background: #d49a7f; }
.sv2-pay__bar-seg--hoa { background: #9a7fd4; }
.sv2-pay__breakdown li em {
  font-style: normal;
  font-size: 11px;
  color: var(--sv2-silver);
  margin-left: 4px;
  font-variant-numeric: tabular-nums;
}
.sv2-pay__dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 8px;
  vertical-align: middle;
}
.sv2-pay__dot--pi { background: #C9A96E; }
.sv2-pay__dot--tax { background: #7fa9d4; }
.sv2-pay__dot--ins { background: #d49a7f; }
.sv2-pay__dot--hoa { background: #9a7fd4; }
.sv2-pay__result {
  background: linear-gradient(180deg, rgba(201, 169, 110, 0.1), rgba(201, 169, 110, 0.02));
  border: 1px solid rgba(201, 169, 110, 0.2);
  border-radius: 10px;
  padding: 20px;
}
.sv2-pay__total-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--sv2-silver);
}
.sv2-pay__total {
  font-size: 34px;
  font-weight: 800;
  font-family: 'DM Sans', sans-serif;
  color: var(--sv2-gold);
  margin: 6px 0 14px;
  letter-spacing: -0.02em;
}
.sv2-pay__breakdown {
  list-style: none;
  padding: 0;
  margin: 0 0 10px;
}
.sv2-pay__breakdown li {
  display: flex;
  justify-content: space-between;
  padding: 7px 0;
  border-bottom: 1px solid var(--sv2-border);
  font-size: 13px;
  color: var(--sv2-silver);
}
.sv2-pay__breakdown li:last-child { border-bottom: 0; }
.sv2-pay__breakdown strong {
  color: var(--sv2-text);
  font-weight: 700;
  font-family: 'DM Sans', sans-serif;
}

/* Collapsible sections */
.sv2-det__section { margin-bottom: 8px; }
.sv2-det__collapsible-body {
  position: relative;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.sv2-det__collapsible-body.is-clamped::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 80px;
  background: linear-gradient(180deg, rgba(10, 10, 15, 0) 0%, rgba(10, 10, 15, 0.92) 100%);
  pointer-events: none;
}
.sv2-det__toggle {
  background: transparent;
  border: 1px solid var(--sv2-border);
  color: var(--sv2-gold);
  font-size: 13px;
  font-weight: 600;
  padding: 9px 18px;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  margin-top: 14px;
  transition: background 0.15s, border-color 0.15s;
}
.sv2-det__toggle:hover {
  background: var(--sv2-gold-bg);
  border-color: var(--sv2-gold);
}

/* MLS attribution / IDX disclaimer */
.sv2-det__mls {
  margin-top: 36px;
  padding: 18px 20px;
  background: var(--sv2-surface);
  border: 1px solid var(--sv2-border);
  border-radius: 8px;
  font-size: 11px;
  line-height: 1.55;
  color: var(--sv2-silver);
  opacity: 0.85;
}
.sv2-det__mls-courtesy {
  color: var(--sv2-silver);
  font-size: 12px;
  margin-bottom: 6px;
  font-weight: 400;
}
.sv2-det__mls-courtesy strong { font-weight: 400; }
.sv2-det__mls-co { font-size: 12px; color: var(--sv2-silver); margin-bottom: 8px; }
.sv2-det__mls-provided {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0;
  font-size: 12px;
  color: var(--sv2-silver);
}
.sv2-det__mls-provided img { width: 32px; height: auto; opacity: 0.85; }
.sv2-det__mls-disclaimer {
  font-size: 11px;
  line-height: 1.55;
  margin: 12px 0;
  color: var(--sv2-silver);
  opacity: 0.9;
}
.sv2-det__mls-updated {
  font-size: 11px;
  color: var(--sv2-silver);
  margin: 6px 0;
  font-style: italic;
}
.sv2-det__mls-compliance {
  font-size: 11px;
  line-height: 1.55;
  padding-top: 12px;
  border-top: 1px solid var(--sv2-border);
  color: var(--sv2-silver);
  opacity: 0.8;
}

