/*
 * Unified car media sizing for Theme Three.
 * Images are deliberately allowed to upscale so small source files still
 * fill the complete card without stretching their aspect ratio.
 */

/* Main car cards: home, listings, brands, categories and body shapes. */
.listing-one__img,
.single-product-style1__img,
.motorcycle_product_grid .item_image,
.favorite-card-media {
    position: relative;
    width: 100%;
    height: 270px;
    overflow: hidden;
    background: #f3f4f6;
}

.listing-one__img > img,
.single-product-style1__img > img,
.motorcycle_product_grid .item_image > img,
.favorite-card-media > img {
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    display: block;
    object-fit: cover !important;
    object-position: center center;
}

/* Keep both hover images in the legacy product card at the same size. */
.single-product-style1__img > img:first-child {
    inset: 0;
}

/* Interior gallery: every main slide and thumbnail has one fixed frame. */
#interior-gallery .slider-for {
    width: 100%;
    height: 460px !important;
    overflow: hidden;
    border-radius: 20px;
    background: #f3f4f6;
}

#interior-gallery .slider-for > div,
#interior-gallery .slider-for .slick-list,
#interior-gallery .slider-for .slick-track,
#interior-gallery .slider-for .slick-slide,
#interior-gallery .slider-for .slick-slide > div {
    height: 100% !important;
    min-height: 100% !important;
}

#interior-gallery .slider-for img {
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    display: block !important;
    object-fit: cover !important;
    object-position: center center;
    border-radius: 20px;
}

#interior-gallery .slider-nav .slick-slide,
#interior-gallery .slider-nav .slick-slide > div,
#interior-gallery .slider-nav .impl_thumb_ovrly {
    height: 92px !important;
}

#interior-gallery .slider-nav .impl_thumb_ovrly {
    width: 100%;
    overflow: hidden;
    border-radius: 12px;
    background: #f3f4f6;
}

#interior-gallery .slider-nav img {
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    display: block !important;
    object-fit: cover !important;
    object-position: center center;
    border-radius: 12px !important;
}

@media (max-width: 991.98px) {
    .listing-one__img,
    .single-product-style1__img,
    .motorcycle_product_grid .item_image,
    .favorite-card-media {
        height: 240px;
    }

    #interior-gallery .slider-for {
        height: 380px !important;
    }
}

@media (max-width: 575.98px) {
    .listing-one__img,
    .single-product-style1__img,
    .motorcycle_product_grid .item_image,
    .favorite-card-media {
        height: 220px;
    }

    #interior-gallery .slider-for {
        height: 280px !important;
    }

    #interior-gallery .slider-nav .slick-slide,
    #interior-gallery .slider-nav .slick-slide > div,
    #interior-gallery .slider-nav .impl_thumb_ovrly {
        height: 72px !important;
    }
}
