/**
 * France Propriétés — global 3:2 display rule for property photographs.
 *
 * Legacy derivatives remain valid image sources. The frame owns the ratio and
 * crops with cover, so no source is stretched and no hypothetical URL is made.
 */

:root {
    --fp-property-photo-ratio: 3 / 2;
    --fp-property-photo-position: 50% 50%;
}

/* Default property cards: home, archives, search, similar and favourites. */
.property_listing .listing-unit-img-wrapper,
.property_listing .property_unit_carousel,
.property_listing .property_unit_carousel .carousel-inner,
.property_listing .property_unit_carousel .carousel-item,
.property_listing .property_unit_carousel .carousel-item > a,
.featured_property .featured_img,
.featured_property .featured_img .property_unit_carousel,
.featured_property .featured_img .carousel-inner,
.featured_property .featured_img .carousel-item,
.featured_property .featured_img .carousel-item > a {
    aspect-ratio: var(--fp-property-photo-ratio) !important;
    box-sizing: border-box;
    height: auto !important;
    min-height: 0 !important;
    overflow: hidden;
}

.property_listing .listing-unit-img-wrapper > a,
.property_listing .listing-unit-img-wrapper .carousel-item > a,
.featured_property .featured_img > a,
.featured_property .featured_img .carousel-item > a {
    display: block;
    height: 100%;
    width: 100%;
}

.property_listing .listing-unit-img-wrapper img,
.featured_property .featured_img img {
    display: block;
    height: 100% !important;
    max-height: none !important;
    max-width: none !important;
    object-fit: cover;
    object-position: var(--fp-property-photo-position);
    width: 100% !important;
}

.listing_wrapper.col-md-12 .property_listing {
    align-items: flex-start;
}

.listing_wrapper.col-md-12 .property_listing .listing-unit-img-wrapper {
    align-self: flex-start;
    flex-shrink: 0;
}

/* Property page masonry and gallery tiles. */
.single-estate_property .gallery_wrapper .image_gallery,
.single-estate_property .property_header_gallery_wrapper .image_gallery {
    aspect-ratio: var(--fp-property-photo-ratio) !important;
    background-position: var(--fp-property-photo-position) !important;
    background-repeat: no-repeat;
    background-size: cover !important;
    box-sizing: border-box;
    height: auto !important;
    min-height: 0 !important;
    overflow: hidden;
}

/* Classic, vertical, horizontal and animation property sliders. */
.single-estate_property
    .wpestate_property_slider_thing:not(.google_map_slider_wrapper):not(.wpestate_slider_enable_video_wrapper):not(.wpestate_slider_enable_virtual_wrapper),
.single-estate_property
    .wpestate_property_slider_thing:not(.google_map_slider_wrapper):not(.wpestate_slider_enable_video_wrapper):not(.wpestate_slider_enable_virtual_wrapper)
    .carousel-inner,
.single-estate_property
    .wpestate_property_slider_thing:not(.google_map_slider_wrapper):not(.wpestate_slider_enable_video_wrapper):not(.wpestate_slider_enable_virtual_wrapper)
    .carousel-item,
.single-estate_property
    .wpestate_property_slider_thing:not(.google_map_slider_wrapper):not(.wpestate_slider_enable_video_wrapper):not(.wpestate_slider_enable_virtual_wrapper)
    .item,
.single-estate_property .property_slider2_wrapper .image_div {
    aspect-ratio: var(--fp-property-photo-ratio) !important;
    background-position: var(--fp-property-photo-position) !important;
    background-repeat: no-repeat;
    background-size: cover !important;
    box-sizing: border-box;
    height: auto !important;
    min-height: 0 !important;
    overflow: hidden;
}

.single-estate_property .wpestate_property_slider_thing img,
.single-estate_property .property_slider2_wrapper .image_div img {
    display: block;
    height: 100% !important;
    max-height: none !important;
    max-width: none !important;
    object-fit: cover !important;
    object-position: var(--fp-property-photo-position);
    width: 100% !important;
}

/* Property lightbox: keep the contact panel outside the 3:2 photo frame. */
.single-estate_property .lightbox_property_content {
    align-items: flex-start;
}

.single-estate_property .lightbox_property_slider,
.single-estate_property .lightbox_property_slider .owl-stage-outer,
.single-estate_property .lightbox_property_slider .owl-item,
.single-estate_property .lightbox_property_slider .item,
.single-estate_property .lightbox_property_slider .itemimage,
.single-estate_property .lightbox_property_slider .slick-list,
.single-estate_property .lightbox_property_slider .slick-slide {
    aspect-ratio: var(--fp-property-photo-ratio) !important;
    box-sizing: border-box;
    height: auto !important;
    min-height: 0 !important;
}

.single-estate_property .lightbox_property_slider,
.single-estate_property .lightbox_property_slider .owl-stage-outer,
.single-estate_property .lightbox_property_slider .owl-item,
.single-estate_property .lightbox_property_slider .item,
.single-estate_property .lightbox_property_slider .itemimage,
.single-estate_property .lightbox_property_slider .slick-list,
.single-estate_property .lightbox_property_slider .slick-slide {
    overflow: hidden;
}

.single-estate_property .lightbox_property_slider .item,
.single-estate_property .lightbox_property_slider .itemimage {
    background-position: var(--fp-property-photo-position) !important;
    background-repeat: no-repeat;
    background-size: cover !important;
}

.single-estate_property .lightbox_property_slider img {
    display: block;
    height: 100% !important;
    max-height: none !important;
    max-width: none !important;
    object-fit: cover !important;
    object-position: var(--fp-property-photo-position);
    width: 100% !important;
}

/* Elementor and WPResidence property-only sliders and featured units. */
.property_slider2_wrapper .image_div,
.property_slider_carousel_elementor_v2_image_wrapper,
.property_slider_carousel_elementor_v2_image_container,
.property_slider_carousel_elementor_v3_image_wrapper,
.property_slider_carousel_elementor_v3_image_container,
.property_slider_editorial_image,
.featured_article_type2.featured_prop_type4,
.featured_article_type2.featured_prop_type5 .image_gallery,
.featured_article_type2.featured_prop_type6,
.featured_article_type2.featured_prop_type6 .featured_img_type2,
.wpestate_content_grid_wrapper_second_col_image.property_listing {
    aspect-ratio: var(--fp-property-photo-ratio) !important;
    background-position: var(--fp-property-photo-position) !important;
    background-repeat: no-repeat;
    background-size: cover !important;
    box-sizing: border-box;
    height: auto !important;
    min-height: 0 !important;
    overflow: hidden;
}

.property_slider2_wrapper .image_div img,
.property_slider_carousel_elementor_v2_image_wrapper img,
.property_slider_carousel_elementor_v3_image_wrapper img,
.property_slider_editorial_image img,
.featured_article_type2[class*="featured_prop_type"] img,
.wpestate_content_grid_wrapper_second_col_image.property_listing img {
    display: block;
    height: 100% !important;
    max-height: none !important;
    max-width: none !important;
    object-fit: cover !important;
    object-position: var(--fp-property-photo-position);
    width: 100% !important;
}

/* Property thumbnails in the negotiator dashboard and favourites. */
.page-template-user_dashboard .dashbard_unit_image,
.page-template-user_dashboard_favorite .dashbard_unit_image {
    aspect-ratio: var(--fp-property-photo-ratio) !important;
    display: block;
    height: auto !important;
    min-height: 0 !important;
    overflow: hidden;
}

.page-template-user_dashboard .dashbard_unit_image img,
.page-template-user_dashboard_favorite .dashbard_unit_image img {
    display: block;
    height: 100% !important;
    max-height: none !important;
    max-width: none !important;
    object-fit: cover !important;
    object-position: var(--fp-property-photo-position);
    width: 100% !important;
}

@media (max-width: 1200px) {
    .single-estate_property .lightbox_property_slider .item,
    .single-estate_property .lightbox_property_slider .itemimage {
        background-size: cover !important;
        padding: 0 !important;
    }
}
