/* HomeLynx V8.1.37.2 — systemic property-sheet media fit patch.
   Scope: inside-card/detail hero gallery only. Search/homepage result-card media is intentionally untouched.
   Preserve source pixels and MLS/copyright markings: never crop, mask, filter, or rewrite the image. */

/* The legacy gallery reset uses display:...!important on both the image and fallback.
   Make the HTML hidden state authoritative so a successful image never leaves a fallback
   block in layout, and a failed image can actually disappear when JS marks it hidden. */
.hlx-v8-hero-photo .hlx-v8-photo-fallback[hidden],
.hlx-v8-hero-photo .hlx-v8-photo-img[hidden]{
  display:none!important;
}

/* Detail sheet owns only the natural height of the active source image. */
.hlx-v8-hero-photo .hlx-v8-photo-stage[data-photo-rail]{
  display:block!important;
  width:100%!important;
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  overflow:hidden!important;
  background:transparent!important;
}

.hlx-v8-hero-photo .hlx-v8-photo-stage[data-photo-rail] .hlx-v8-photo-slide.is-active{
  display:block!important;
  width:100%!important;
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  margin:0!important;
  padding:0!important;
  line-height:0!important;
  background:transparent!important;
}

/* Full-width, proportional, uncropped source image. This keeps corner MLS/copyright
   pixels visible and prevents a fixed legacy aspect-ratio box from stretching the sheet. */
.hlx-v8-hero-photo .hlx-v8-photo-stage[data-photo-rail] .hlx-v8-photo-slide.is-active .hlx-v8-photo-img:not([hidden]){
  display:block!important;
  width:100%!important;
  max-width:100%!important;
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  aspect-ratio:auto!important;
  object-fit:contain!important;
  object-position:center center!important;
  margin:0!important;
  padding:0!important;
  background:transparent!important;
  border:0!important;
  border-radius:0!important;
  filter:none!important;
  clip-path:none!important;
  mask:none!important;
}

/* Only a real error/no-media state gets a fallback surface. */
.hlx-v8-hero-photo .hlx-v8-photo-fallback:not([hidden]){
  display:grid!important;
  width:100%!important;
  min-height:clamp(220px,55vw,360px)!important;
  height:auto!important;
  aspect-ratio:auto!important;
  place-items:center!important;
  box-sizing:border-box!important;
  line-height:1.35!important;
  background:#eef1ef!important;
}
