/* Keep complete product photos inside equal-sized catalogue frames. */
body [productlistblock="1"] .sc-block-item > .item-inner > .item-img {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    height: auto !important;
    padding: 0 !important;
    box-sizing: border-box;
    overflow: hidden;
    background: #fff;
}
body [productlistblock="1"] .sc-block-item > .item-inner > .item-img > img {
    position: absolute !important;
    inset: 0;
    display: block;
    width: 100% !important;
    height: 100% !important;
    max-width: 100%;
    max-height: 100%;
    margin: 0;
    object-fit: contain !important;
    object-position: center;
}

/* A shared column aligns Gutenberg detail headings and standalone photos. */
.ss-product-detail-content {
    width: 100%;
    max-width: 1024px;
    margin-inline: auto;
    box-sizing: border-box;
    display: flow-root;
    visibility: visible;
}
.ss-product-detail-content > figure.wp-block-image {
    width: 100% !important;
    max-width: 100% !important;
    margin: 16px 0 !important;
    float: none !important;
}
.ss-product-detail-content > figure.wp-block-image img {
    contain: none !important;
    contain-intrinsic-size: none !important;
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    margin-inline: auto;
}
.ss-product-detail-content > .wp-block-heading.has-background {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    margin: 16px 0 !important;
    padding: 10px 18px !important;
    line-height: 1.3;
}
.ss-product-detail-content > .wp-block-heading.has-background sub {
    vertical-align: baseline;
    position: static;
    font-size: inherit;
    line-height: inherit;
}
.ss-product-detail-content > .wp-block-heading.has-background code {
    background: transparent;
    color: inherit;
    font: inherit;
    padding: 0;
}
.ss-product-detail-content > .wp-block-heading.is-style-shanshui-compact-label {
    width: fit-content;
    margin-inline: auto !important;
}
