/*
 * Motors gives the main listing image a viewport-based fixed height and uses
 * object-fit: cover. On phones that crops the vehicle. Keep the desktop design,
 * but let the full image determine its own height on mobile listing pages.
 */
@media (max-width: 767px) {
    .motors-elementor-single-listing-gallery .motors-elementor-big-gallery,
    .motors-elementor-single-listing-gallery .motors-elementor-big-gallery .swiper-wrapper,
    .motors-elementor-single-listing-gallery .motors-elementor-big-gallery .swiper-slide,
    .motors-elementor-single-listing-gallery .motors-elementor-big-gallery .stm-single-image,
    .motors-elementor-single-listing-gallery .motors-elementor-big-gallery .stm-single-image > a {
        height: auto !important;
        min-height: 0 !important;
    }

    .motors-elementor-single-listing-gallery .motors-elementor-big-gallery .stm-single-image > a {
        display: block !important;
    }

    .motors-elementor-single-listing-gallery .motors-elementor-big-gallery .stm-single-image > a > img,
    .motors-elementor-single-listing-gallery .motors-elementor-big-gallery .stm-single-image > img {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        max-height: none !important;
        aspect-ratio: auto !important;
        object-fit: contain !important;
        object-position: center center !important;
    }

    /* Support the classic Motors gallery if a listing template uses it. */
    .stm-car-carousels .stm-big-car-gallery .stm-single-image {
        max-height: none !important;
    }

    .stm-car-carousels .stm-big-car-gallery .stm-single-image img {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        max-height: none !important;
        aspect-ratio: auto !important;
        object-fit: contain !important;
        object-position: center center !important;
    }
}
