/* Only the main cover is affected. Catalog photographs retain their own fit. */
body[data-store-hero-fit="auto"] .hero .hero-photo > img:first-child,
body[data-store-hero-fit="auto"] .hero .m6-image-surface > img,
body[data-store-hero-fit="contain"] .hero .hero-photo > img:first-child,
body[data-store-hero-fit="contain"] .hero .m6-image-surface > img,
body[data-store-hero-fit="auto"] .hero .hero-photo > img.abw-hero-contain:first-child,
body[data-store-hero-fit="auto"] .hero .m6-image-surface > img.abw-hero-contain {
    object-fit: contain !important;
}
body[data-store-hero-fit="cover"] .hero .hero-photo > img:first-child,
body[data-store-hero-fit="cover"] .hero .m6-image-surface > img,
body[data-store-hero-fit="auto"] .hero .hero-photo > img.abw-hero-cover:first-child,
body[data-store-hero-fit="auto"] .hero .m6-image-surface > img.abw-hero-cover {
    object-fit: cover !important;
}
/* Decorative image masks must not add a second, uncontrolled crop. */
body:is([data-store-hero-fit="auto"], [data-store-hero-fit="contain"]) .hero .hero-photo > img:first-child,
body:is([data-store-hero-fit="auto"], [data-store-hero-fit="contain"]) .hero .m6-image-surface > img {
    clip-path: none !important;
    mask-image: none !important;
}
/* The arch in Maestra 16 otherwise removes a large part of the image. */
body[data-storefront-template="master_16"]:is([data-store-hero-fit="auto"], [data-store-hero-fit="contain"]) .hero .hero-photo,
body[data-storefront-template="master_16"]:is([data-store-hero-fit="auto"], [data-store-hero-fit="contain"]) .hero .hero-photo > img:first-child {
    border-radius: 0 !important;
}
