/* Listing details opened from the homepage rows.
   Uses the homepage type tokens: Cormorant Garamond and Jost. */
.home-detail[hidden] { display: none; }
.home-detail {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: end center;
}
.home-detail__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
}
.home-detail__panel {
  position: relative;
  z-index: 1;
  width: min(1240px, 100%);
  max-height: 100dvh;
  overflow: auto;
  background: var(--color-bg, #000);
  color: var(--color-text, #f0ece0);
  border: 1px solid var(--color-border, #2e2b1e);
  border-radius: 1.25rem 1.25rem 0 0;
  padding: 0.75rem 1rem 1.25rem;
  font-family: var(--font-body, 'Jost', sans-serif);
}
.home-detail__bar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 0.5rem;
}
.home-detail__close,
.home-detail__contact,
.home-detail__nav {
  font-family: var(--font-body, 'Jost', sans-serif);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}
.home-detail__close {
  border: 1px solid var(--color-border, #2e2b1e);
  background: transparent;
  color: var(--color-text, #f0ece0);
  border-radius: 999px;
  min-height: 44px;
  padding: 0 1rem;
}
.home-detail__layout {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.home-detail__media,
.home-detail__copy { display: contents; }
.home-detail__gallery { order: 1; }
.home-detail__summary { order: 2; }
.home-detail__contact-wrap { order: 3; }
.home-detail__mapwrap { order: 4; }
.home-detail__featurewrap { order: 5; }
.home-detail__story { order: 6; }
.home-detail__stage {
  position: relative;
  background: var(--color-surface-offset, #141410);
  border-radius: 0.75rem;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  min-height: 220px;
  height: min(34vh, 320px);
}
.home-detail__stage img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.home-detail__navs {
  position: absolute;
  inset: auto 0.5rem 0.5rem;
  display: flex;
  justify-content: space-between;
}
.home-detail__nav {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 0;
  background: rgba(0, 0, 0, 0.65);
  color: #f0ece0;
}
.home-detail__title {
  font-family: var(--font-display, 'Cormorant Garamond', serif);
  font-weight: 600;
  font-size: clamp(1.6rem, 2vw, 2.2rem);
  line-height: 1.1;
  margin: 0 0 0.35rem;
}
.home-detail__price {
  color: var(--color-primary, #c9a84c);
  font-weight: 600;
  margin: 0 0 0.75rem;
}
.home-detail__facts,
.home-detail__features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.75rem;
  color: var(--color-text-muted, #9a9180);
  font-size: 0.9rem;
}
.home-detail__story { margin-top: 0.75rem; }
.home-detail__description {
  margin: 0;
  line-height: 1.6;
  max-height: 9.6rem;
  overflow: hidden;
}
.home-detail__description.is-open { max-height: none; }
.home-detail__more {
  margin-top: 0.5rem;
  border: 0;
  background: none;
  color: var(--color-primary, #c9a84c);
  font-family: var(--font-body, 'Jost', sans-serif);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  min-height: 44px;
}
.home-detail__subhead {
  font-family: var(--font-display, 'Cormorant Garamond', serif);
  font-weight: 600;
  font-size: 1.35rem;
  margin: 0 0 0.35rem;
}
.home-detail__where {
  margin: 0 0 0.75rem;
  color: var(--color-text-muted, #9a9180);
}
.home-detail__map {
  height: 168px;
  border-radius: 0.75rem;
  overflow: hidden;
  background: var(--color-surface, #0a0a08);
  margin-bottom: 0.75rem;
}
.home-detail__map[hidden] { display: none; }
.home-detail__pin {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: var(--color-primary, #c9a84c);
  border: 2px solid #000;
}
.home-detail__pin--approx {
  box-shadow: 0 0 0 7px rgba(201, 168, 76, 0.35);
}
.home-detail__contact {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 1.1rem;
  border: 0;
  border-radius: 999px;
  background: var(--color-primary, #c9a84c);
  color: #000;
}
@media (min-width: 860px) {
  .home-detail { place-items: center; padding: 1.25rem; }
  .home-detail__panel {
    border-radius: 1.25rem;
    max-height: calc(100dvh - 2.5rem);
  }
  .home-detail__layout {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.85fr);
    column-gap: 1.5rem;
    align-items: start;
  }
  .home-detail__media,
  .home-detail__copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 0.75rem;
  }
  .home-detail__copy { gap: 0; }
  .home-detail__gallery,
  .home-detail__summary,
  .home-detail__mapwrap,
  .home-detail__featurewrap,
  .home-detail__contact-wrap,
  .home-detail__story { order: 0; }
  .home-detail__stage { aspect-ratio: auto; height: min(42vh, 420px); min-height: 300px; }
  .home-detail__map { height: min(20vh, 190px); margin-bottom: 0; }
  .home-detail__description { max-height: 14rem; }
}
.home-detail__map .maplibregl-ctrl-attrib:not(.maplibregl-compact-show) .maplibregl-ctrl-attrib-inner {
  display: none;
}
.home-detail__map .maplibregl-ctrl-attrib-button {
  display: block;
  width: 22px;
  height: 22px;
}
.home-detail__map .maplibregl-ctrl-attrib.maplibregl-compact-show {
  max-width: 70%;
  font-size: 10px;
}
@media (prefers-reduced-motion: reduce) {
  .home-detail, .home-detail * { scroll-behavior: auto; }
}

/* A full page uses the same blocks as the homepage panel.
   Mobile order stays gallery, summary, Contact, map, features, description. */
.home-detail.home-detail--page {
  position: static;
  display: block;
  z-index: auto;
  inset: auto;
}
.home-detail--page .home-detail__panel {
  width: 100%;
  max-height: none;
  overflow: visible;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
}
.home-detail--page .home-detail__stage {
  height: min(52vh, 420px);
  min-height: 240px;
}
a.home-detail__contact { text-decoration: none; }
@media (min-width: 860px) {
  .home-detail--page .home-detail__stage {
    height: min(68vh, 640px);
    min-height: 420px;
  }
  .home-detail--page .home-detail__map { height: 240px; }
}
