/* Shared image treatment, scoped to frames enhanced by product-motion.js. */
.catalog-hover-image { position: absolute; inset: 0; opacity: 0; pointer-events: none; }
.rb-product-media {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    background: #171717;
}
.rb-product-media > img.rb-product-primary,
.rb-product-media > img.rb-product-secondary {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    backface-visibility: hidden;
    transform-origin: 50% 45%;
    transition: transform 850ms cubic-bezier(.22,1,.36,1), opacity 480ms ease !important;
    transform: scale(1) !important;
}
.rb-product-media > img.rb-product-secondary {
    position: absolute;
    inset: 0;
    opacity: 0 !important;
    transform: scale(1.055) !important;
    pointer-events: none;
}
/* Keep the front underneath throughout the crossfade, including failed loads. */
.rb-product-media > img.rb-product-primary { opacity: 1 !important; }
.rb-product-media > img.rb-product-primary.opacity-70 { opacity: .7 !important; }
.rb-product-media.rb-image-active > img.rb-product-primary {
    transform: scale(1.035) !important;
}
.rb-product-media.rb-image-active > img.rb-product-secondary {
    opacity: 1 !important;
    transform: scale(1.015) !important;
}
.rb-image-position {
    position: absolute;
    bottom: 12px;
    left: 50%;
    z-index: 3;
    display: flex;
    gap: 5px;
    padding: 7px 9px;
    border: 1px solid rgb(255 255 255 / .2);
    border-radius: 30px;
    background: rgb(15 15 15 / .65);
    transform: translateX(-50%);
    pointer-events: none;
}
.rb-image-position i {
    width: 5px;
    height: 5px;
    border-radius: 9px;
    background: rgb(255 255 255 / .4);
    transition: width 350ms ease, background 350ms ease;
}
.rb-image-position i:first-child,
.rb-image-active .rb-image-position i:last-child { width: 16px; background: #fff; }
.rb-image-active .rb-image-position i:first-child { width: 5px; background: rgb(255 255 255 / .4); }
@media (hover: none), (pointer: coarse) {
    .rb-product-media > img.rb-product-primary,
    .rb-product-media > img.rb-product-secondary {
        transition-duration: 650ms, 400ms !important;
    }
    .rb-product-media.rb-image-active > img.rb-product-primary { transform: scale(1.02) !important; }
    .rb-product-media.rb-image-active > img.rb-product-secondary { transform: scale(1) !important; }
    .rb-image-position { bottom: 9px; }
}
@media (prefers-reduced-motion: reduce) {
    .rb-product-media > img.rb-product-primary,
    .rb-product-media > img.rb-product-secondary,
    .rb-image-position i { transition: none !important; transform: none !important; }
}
