/* Shared product-only frames; campaign and editorial photographs keep their layouts. */
body .rk-catalog-cards .rk-card-media .rk-card-photo {
    aspect-ratio: 4 / 5 !important;
    min-width: 0;
    overflow: hidden;
}
body .rk-catalog-cards .rk-card-photo .rk-card-image,
body .rk-catalog-cards .rk-card-photo .rk-card-image > a {
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
}
body .rk-catalog-cards .rk-card-photo .rk-card-image img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: none;
    margin: 0;
    aspect-ratio: auto;
    object-fit: contain !important;
    object-position: center;
    mask-image: none;
    -webkit-mask-image: none;
    transform: none !important;
}
/* The older pedal crop extended copies of the photograph into the frame. */
body .rk-catalog-cards .rk-card-photo::before,
body .rk-catalog-cards .rk-card-photo::after {
    display: none;
}
body .rk-shop-editorial.is-list-view .rk-card-media {
    align-self: start;
}
/* Reserve a clear control rail on touch screens so buttons cannot cover the product. */
@media (max-width: 700px), (hover: none) {
    body .rk-catalog-cards .rk-card-media {
        padding-block-end: 54px;
        background: var(--wp--preset--color--paper);
    }
    body .rk-catalog-cards .rk-card-photo {
        position: static;
    }
    body .rk-catalog-cards .rk-card-media > .rk-product-action {
        inset-block-end: 5px;
        height: 44px;
    }
    body .rk-catalog-cards .rk-card-quick-view {
        inset-block-end: 5px;
        box-sizing: border-box;
        height: 44px;
        min-height: 44px;
        padding-block: 2px;
        line-height: 1.3;
        text-align: center;
    }
}
/* Keep Quick View's whole image visible while leaving room for its gallery rail. */
body .rk-tools-dialog.is-quick-view .rk-quick-stage {
    width: 100%;
    height: auto;
    min-height: 0;
    aspect-ratio: 4 / 5;
    max-height: min(620px, calc(100dvh - 210px));
    padding: 54px 20px 14px;
    overflow: hidden;
}
body .rk-tools-dialog.is-quick-view .rk-quick-stage .rk-quick-image {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
    mix-blend-mode: normal;
}
body .rk-tools-dialog.is-quick-view .rk-quick-slider .rk-quick-thumbnail {
    aspect-ratio: 4 / 5;
}
@media (max-width: 640px) {
    body .rk-tools-dialog.is-quick-view .rk-quick-stage {
        max-height: min(440px, 55dvh);
        padding: 50px 16px 12px;
    }
}
