/* DEYNU R76 — property gallery frame stabilization.
   Problem: intrinsic portrait/landscape image sizing expands desktop CSS Grid
   because its two tracks have 1fr sizing but the grid has no definite height.
   Scope: property detail image preview only; fullscreen originals unaffected.
   Applies to desktop/tablet. PWA/mobile WebView carousel remains swipeable.
*/
@media (min-width: 761px) {
  .property-detail-page .property-boutique-gallery-grid {
    box-sizing: border-box !important;
    width: 100% !important;
    height: clamp(340px, 38vw, 520px) !important;
    min-height: 0 !important;
    max-height: 520px !important;
    grid-template-rows: repeat(2, minmax(0, 1fr)) !important;
    align-content: stretch !important;
    overflow: hidden !important;
  }
  .property-detail-page .property-boutique-gallery-grid > .property-gallery-tile {
    box-sizing: border-box !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: hidden !important;
  }
  .property-detail-page .property-boutique-gallery-grid > .property-gallery-tile picture {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }
  .property-detail-page .property-boutique-gallery-grid > .property-gallery-tile img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    min-height: 0 !important;
    object-fit: cover !important;
    object-position: center center;
  }
}
/* Mobile, PWA and Android WebView: keep existing horizontal swipe gallery,
   but constrain each picture and image inside the fixed-height swipe tile. */
@media (max-width: 760px) {
  .property-detail-page .property-boutique-gallery-grid > .property-gallery-tile {
    min-width: 0 !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }
  .property-detail-page .property-boutique-gallery-grid > .property-gallery-tile picture {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    overflow: hidden !important;
  }
  .property-detail-page .property-boutique-gallery-grid > .property-gallery-tile img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: cover !important;
  }
}
