/* Standalone styles: keep the theme's right-hand purchases badge unchanged. */
.mo-product-custom-badges[hidden] {
    display: none !important;
}
.image-block > .mo-product-badge-stack,
.woocommerce-product-gallery > .mo-product-badge-stack {
    position: absolute;
    top: 8px;
    left: 8px;
    right: auto;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    max-width: calc(50% - 12px);
    pointer-events: none;
}
.mo-product-badge-stack .mo-product-custom-badge {
    display: block;
    box-sizing: border-box;
    max-width: 100%;
    background: var(--mo-badge-background, #fb5607);
    color: var(--mo-badge-text, #ffffff);
    border: 0;
    border-radius: 2px;
    box-shadow: 0 4px 4px 0 #0000001f;
    font-family: inherit;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
    padding: 4px 8px;
    text-align: center;
    white-space: normal;
    overflow-wrap: anywhere;
}
.mo-product-badge-stack > .mo-product-custom-badges {
    display: contents;
}
/* Override the theme's absolute Sale placement only inside this new stack. */
body .image-block > .mo-product-badge-stack > .onsale,
body .woocommerce-product-gallery > .mo-product-badge-stack > .onsale {
    position: relative;
    inset: auto;
    float: none;
    margin: 0;
    max-width: 100%;
    box-sizing: border-box;
    height: auto;
    white-space: normal;
    overflow-wrap: anywhere;
}
.woocommerce-product-gallery > .mo-product-badge-stack .mo-product-custom-badge {
    font-size: 14px;
}
@media (max-width: 767px) {
    .image-block > .mo-product-badge-stack {
        top: 4px;
        left: 4px;
        gap: 4px;
        max-width: calc(50% - 8px);
    }
    .image-block > .mo-product-badge-stack .mo-product-custom-badge {
        font-size: 12px;
        line-height: 15px;
        padding: 2px 4px;
    }
}
