/* =========================================================
   OWEN GROUP — HOMES FOR SALE PAGE
   ========================================================= */

:root {
  --homes-header-height: 102px;
}

html,
body {
  width: 100%;
  min-height: 100%;
  overflow-x: hidden;
}

body.homes-page {
  margin: 0;
  background: #f5f5f3;
}

.homes-site-header {
  position: fixed;
  min-height: var(--homes-header-height);
}

.homes-nav-link {
  position: relative;
  min-height: 42px;

  display: inline-flex;
  align-items: center;

  padding: 10px 11px;

  color: rgba(255, 255, 255, 0.96);

  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.07em;
  line-height: 1;
  text-transform: uppercase;
}

.homes-nav-link::after {
  position: absolute;
  right: 11px;
  bottom: 2px;
  left: 11px;

  height: 2px;

  content: "";

  background: var(--gold);
  transform: scaleX(0);
  transition: transform 0.2s ease;
}

.homes-nav-link:hover,
.homes-nav-link.is-current {
  color: var(--gold-light);
}

.homes-nav-link:hover::after,
.homes-nav-link.is-current::after {
  transform: scaleX(1);
}

.property-search-app {
  min-height: 100vh;

  display: grid;
  grid-template-columns: minmax(560px, 48%) minmax(500px, 52%);

  padding-top: var(--homes-header-height);
}

.listing-panel {
  min-width: 0;
  height: calc(100vh - var(--homes-header-height));

  overflow-y: auto;

  background: #f7f7f5;
  border-right: 1px solid rgba(8, 8, 8, 0.14);
}

.listing-toolbar {
  position: sticky;
  top: 0;
  z-index: 15;

  padding: 24px 24px 18px;

  background: rgba(247, 247, 245, 0.98);
  border-bottom: 1px solid rgba(8, 8, 8, 0.12);
  box-shadow: 0 9px 25px rgba(0, 0, 0, 0.06);
}

.listing-heading-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;

  margin-bottom: 18px;
}

.listing-eyebrow {
  margin: 0 0 4px;

  color: var(--gold-dark);

  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.listing-heading-row h1 {
  margin: 0;

  color: #111111;

  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.8rem, 2.6vw, 2.65rem);
  font-weight: 500;
}

.map-toggle {
  display: none;

  min-height: 42px;
  padding: 10px 18px;

  color: var(--black);
  background: var(--gold);
  border: 1px solid var(--gold);

  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.search-controls {
  display: grid;
  grid-template-columns: minmax(240px, 1.45fr) minmax(130px, 0.65fr) minmax(115px, 0.55fr) auto;
  gap: 10px;
}

.control {
  display: grid;
  gap: 6px;
}

.control span,
.sort-control span {
  color: #555555;

  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.control input,
.control select,
.sort-control select {
  width: 100%;
  min-height: 48px;

  padding: 11px 13px;

  color: #161616;
  background: #ffffff;
  border: 1px solid rgba(8, 8, 8, 0.16);

  font-size: 13px;
}

.control input:focus,
.control select:focus,
.sort-control select:focus {
  outline: 2px solid var(--gold);
  outline-offset: -2px;
}

.filter-button {
  align-self: end;
  min-height: 48px;
  padding: 0 19px;

  color: var(--black);
  background: var(--gold);
  border: 1px solid var(--gold);

  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;

  cursor: pointer;
}

.filter-button:hover {
  background: var(--gold-light);
}

.sort-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;

  margin-top: 14px;
}

.sort-row p {
  max-width: 520px;
  margin: 0;

  color: #666666;

  font-size: 11px;
  line-height: 1.45;
}

.sort-control {
  min-width: 160px;

  display: grid;
  gap: 6px;
}

.sort-control select {
  min-height: 40px;
  padding: 8px 11px;
}

.listing-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;

  padding: 22px;
}

.property-card {
  overflow: hidden;

  background: #ffffff;
  border: 1px solid rgba(8, 8, 8, 0.11);

  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.07);

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.property-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.12);
}

.property-photo-wrap {
  position: relative;

  aspect-ratio: 16 / 10;
  overflow: hidden;

  background: #d9d6ce;
}

.property-photo {
  width: 100%;
  height: 100%;

  object-fit: cover;

  transition: transform 0.4s ease;
}

.property-card:hover .property-photo {
  transform: scale(1.025);
}

.property-badges {
  position: absolute;
  top: 12px;
  left: 12px;

  display: flex;
  gap: 6px;
}

.property-badge {
  padding: 6px 8px;

  color: #ffffff;
  background: #111111;

  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.property-badge-gold {
  color: #080808;
  background: var(--gold);
}

.favorite-button {
  position: absolute;
  right: 12px;
  bottom: 12px;

  width: 39px;
  height: 39px;

  display: grid;
  place-items: center;

  color: #ffffff;
  background: rgba(0, 0, 0, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.55);

  font-size: 21px;
  line-height: 1;

  cursor: pointer;
}

.property-copy {
  padding: 17px 17px 18px;
}

.property-price {
  margin: 0 0 7px;

  color: var(--gold-dark);

  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.72rem;
  font-weight: 500;
  line-height: 1.1;
}

.property-address {
  margin: 0 0 8px;

  color: #151515;

  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.055em;
  line-height: 1.45;
  text-transform: uppercase;
}

.property-meta,
.property-source {
  margin: 0;

  color: #626262;

  font-size: 11px;
  line-height: 1.6;
}

.property-source {
  margin-top: 8px;
  color: #7b7b7b;
}

.empty-results {
  grid-column: 1 / -1;

  padding: 64px 28px;

  text-align: center;
  background: #ffffff;
  border: 1px solid rgba(8, 8, 8, 0.11);
}

.empty-results h2 {
  margin-bottom: 10px;
  font-size: 2rem;
}

.empty-results p {
  margin: 0;
  color: #666666;
}

.idx-notice {
  margin: 0 22px 28px;
  padding: 18px 20px;

  color: rgba(255, 255, 255, 0.8);
  background: #101010;
  border-left: 4px solid var(--gold);

  font-size: 12px;
  line-height: 1.65;
}

.idx-notice strong {
  display: block;
  margin-bottom: 5px;
  color: var(--gold-light);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.idx-notice p {
  margin: 0;
}

.idx-notice code {
  color: #ffffff;
}

.map-panel {
  position: sticky;
  top: var(--homes-header-height);

  height: calc(100vh - var(--homes-header-height));

  overflow: hidden;

  background: #ecece8;
}

#property-map {
  width: 100%;
  height: 100%;

  background: #ecece8;
}

/* =========================================================
   OWEN GROUP — LIGHT LUXURY MAP
   ========================================================= */

#property-map .leaflet-tile-pane {
  filter: saturate(0.72) contrast(0.96) brightness(1.02);
}

.owen-map-region {
  min-width: 154px;
  margin: 16px 0 0 16px;
  padding: 11px 13px 10px;

  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(8, 8, 8, 0.10);
  border-left: 3px solid var(--gold);

  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.09);
  backdrop-filter: blur(8px);
}

.owen-map-region span,
.owen-map-region strong {
  display: block;
}

.owen-map-region span {
  margin-bottom: 3px;

  color: #77726a;

  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.owen-map-region strong {
  color: #101010;

  font-family: Georgia, "Times New Roman", serif;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.035em;
}

.owen-marker-shell {
  background: transparent;
  border: 0;
}

.owen-price-marker {
  position: relative;

  min-width: 64px;
  padding: 8px 11px;

  color: #111111;
  background: rgba(255, 255, 255, 0.97);
  border: 1.5px solid var(--gold);

  box-shadow:
    0 7px 22px rgba(0, 0, 0, 0.18),
    0 1px 3px rgba(0, 0, 0, 0.10);

  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.025em;
  line-height: 1;
  text-align: center;
  white-space: nowrap;

  transform: translateY(0);
  transform-origin: 50% 100%;

  transition:
    color 0.16s ease,
    background 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    transform 0.16s ease;
}

.owen-price-marker::after {
  position: absolute;
  bottom: -7px;
  left: 50%;

  width: 12px;
  height: 12px;

  content: "";

  background: inherit;
  border-right: 1.5px solid var(--gold);
  border-bottom: 1.5px solid var(--gold);

  transform: translateX(-50%) rotate(45deg);
}

.owen-price-marker.is-active {
  color: #080808;
  background: var(--gold);
  border-color: #9d7820;

  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.24),
    0 0 0 2px rgba(255, 255, 255, 0.78);

  transform: translateY(-3px) scale(1.045);
}

.owen-price-marker.is-active::after {
  border-color: #9d7820;
}

.property-card.is-map-active {
  border-color: rgba(184, 140, 38, 0.68);

  box-shadow:
    0 21px 48px rgba(0, 0, 0, 0.14),
    0 0 0 1px rgba(184, 140, 38, 0.16);

  transform: translateY(-3px);
}

.property-card.is-map-active .property-photo {
  transform: scale(1.025);
}

.leaflet-popup-content-wrapper {
  overflow: hidden;

  color: #ffffff;
  background: #0c0c0c;
  border: 1px solid rgba(201, 159, 58, 0.55);
  border-radius: 0;

  box-shadow: 0 17px 45px rgba(0, 0, 0, 0.24);
}

.leaflet-popup-tip {
  background: #0c0c0c;
  border-right: 1px solid rgba(201, 159, 58, 0.40);
  border-bottom: 1px solid rgba(201, 159, 58, 0.40);
}

.leaflet-popup-content {
  min-width: 205px;
  margin: 15px 17px 16px;

  color: rgba(255, 255, 255, 0.82);

  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.45;
}

.owen-popup {
  display: grid;
  gap: 4px;
}

.popup-kicker {
  margin-bottom: 2px;

  color: var(--gold-light);

  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.popup-price {
  display: block;

  color: #ffffff;

  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.45rem;
  font-weight: 500;
}

.popup-address {
  display: block;
  margin-top: 2px;

  color: #ffffff;

  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.055em;
  line-height: 1.45;
  text-transform: uppercase;
}

.popup-meta {
  display: block;
  margin-top: 4px;

  color: rgba(255, 255, 255, 0.62);

  font-size: 10px;
  line-height: 1.5;
}

#property-map .leaflet-control-zoom {
  margin-top: 16px;
  margin-right: 16px;

  overflow: hidden;

  border: 0;
  border-radius: 0;

  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
}

#property-map .leaflet-control-zoom a {
  width: 36px;
  height: 36px;

  color: #111111;
  background: rgba(255, 255, 255, 0.96);
  border-bottom-color: rgba(8, 8, 8, 0.10);

  font-family: Arial, Helvetica, sans-serif;
  font-size: 20px;
  line-height: 36px;
}

#property-map .leaflet-control-zoom a:hover {
  color: #080808;
  background: var(--gold-light);
}

.map-status {
  position: absolute;
  right: 20px;
  bottom: 20px;
  z-index: 500;

  max-width: 340px;

  display: flex;
  align-items: center;
  gap: 9px;

  padding: 11px 14px;

  color: #242424;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(8, 8, 8, 0.10);
  border-left: 3px solid var(--gold);

  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.10);
  backdrop-filter: blur(8px);

  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.45;
  text-transform: uppercase;
}

.map-status-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;

  background: var(--gold);
  border-radius: 50%;

  box-shadow: 0 0 0 3px rgba(201, 159, 58, 0.14);
}

#property-map .leaflet-control-attribution {
  color: #6b6b66;
  background: rgba(255, 255, 255, 0.82);

  font-size: 8px;
}

#property-map .leaflet-control-attribution a {
  color: #4e4e49;
}

@media (max-width: 1180px) {
  :root {
    --homes-header-height: 102px;
  }

  .homes-site-header .main-navigation {
    display: none;
  }

  .property-search-app {
    grid-template-columns: minmax(520px, 55%) minmax(420px, 45%);
  }

  .search-controls {
    grid-template-columns: 1fr 1fr;
  }

  .filter-button {
    width: 100%;
  }
}

@media (max-width: 900px) {
  .property-search-app {
    display: block;
  }

  .listing-panel {
    height: auto;
    min-height: calc(100vh - var(--homes-header-height));
    overflow: visible;
    border-right: 0;
  }

  .listing-toolbar {
    position: relative;
  }

  .map-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .map-panel {
    position: fixed;
    inset: var(--homes-header-height) 0 0;
    z-index: 35;

    display: none;
    height: auto;
  }

  .map-panel.is-visible {
    display: block;
  }

  .listing-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .owen-map-region {
    margin-top: 12px;
    margin-left: 12px;
  }

  #property-map .leaflet-control-zoom {
    margin-top: 12px;
    margin-right: 12px;
  }

  .map-status {
    right: 12px;
    bottom: 12px;
    left: 12px;

    max-width: none;
  }
}

@media (max-width: 650px) {
  .listing-toolbar {
    padding: 20px 17px 16px;
  }

  .listing-heading-row {
    align-items: center;
  }

  .search-controls,
  .listing-grid {
    grid-template-columns: 1fr;
  }

  .sort-row {
    align-items: stretch;
    flex-direction: column;
  }

  .sort-control {
    min-width: 0;
  }

  .listing-grid {
    padding: 17px;
  }

  .idx-notice {
    margin-right: 17px;
    margin-left: 17px;
  }
}