/* WEBDO badge is anchored to the product tile (archive) or gallery (single).
   Size capped to its local container; keep WooCommerce sale markup intact. */
.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product,
.woocommerce div.product div.images,
.woocommerce div.product .woocommerce-product-gallery { position: relative; }
.woocommerce .webdo-bfm-sale-badge,
.woocommerce-page .webdo-bfm-sale-badge {
    position:absolute!important;top:10px!important;right:10px!important;left:auto!important;bottom:auto!important;
    display:inline-flex!important;align-items:center!important;justify-content:center!important;
    box-sizing:border-box!important;z-index:12!important;
    width:var(--webdo-bfm-desktop-size,110px)!important;
    max-width:calc(100% - 20px)!important;height:auto!important;min-height:0!important;
    padding:0!important;margin:0!important;border:0!important;border-radius:0!important;
    background:transparent!important;box-shadow:none!important;color:inherit!important;
    line-height:1.1!important;float:none!important;transform:none!important;
}
.woocommerce .webdo-bfm-sale-badge img,
.woocommerce-page .webdo-bfm-sale-badge img {
    display:block!important;width:100%!important;max-width:100%!important;height:auto!important;
    object-fit:contain!important;border-radius:0!important;box-shadow:none!important;
}
.woocommerce .webdo-bfm-text-badge,
.woocommerce-page .webdo-bfm-text-badge {
    background:#151515!important;color:#fff!important;padding:7px 5px!important;
    font-size:clamp(9px, 1.2vw, 12px)!important;font-weight:800!important;
    letter-spacing:.3px!important;text-align:left!important;
}
@media (max-width:767px) {
    .woocommerce .webdo-bfm-sale-badge,
    .woocommerce-page .webdo-bfm-sale-badge {
        width:var(--webdo-bfm-mobile-size,75px)!important;
        max-width:calc(100% - 12px)!important;
    }
    .woocommerce .webdo-bfm-text-badge,
    .woocommerce-page .webdo-bfm-text-badge { font-size:13px!important;letter-spacing:0!important;padding:5px 10px!important; }
}

/* Qode/Askka homepage product-list grid (not a standard WooCommerce loop). */
.qodef-e.qodef-grid-item .qodef-woo-product-image { position:relative; }
.qodef-e.qodef-grid-item .qodef-woo-product-image > .webdo-bfm-sale-badge {
    position:absolute!important;z-index:20!important;
    display:inline-flex!important;align-items:center!important;justify-content:center!important;
    width:var(--webdo-bfm-desktop-size,110px)!important;
    max-width:calc(100% - 20px)!important;height:auto!important;
    box-sizing:border-box!important;padding:0!important;margin:0!important;
    border:0!important;border-radius:0!important;box-shadow:none!important;
    transform:none!important;float:none!important;
}
.qodef-e.qodef-grid-item .qodef-woo-product-image > .webdo-bfm-has-image {background:transparent!important;}
.qodef-e.qodef-grid-item .qodef-woo-product-image > .webdo-bfm-sale-badge img {
    display:block!important;width:100%!important;height:auto!important;max-width:100%!important;object-fit:contain!important;
}
.qodef-e.qodef-grid-item .qodef-woo-product-image > .webdo-bfm-text-badge {
    background:#151515!important;color:white!important;padding:7px 5px!important;
    font-weight:800!important;font-size:12px!important;letter-spacing:.3px!important;line-height:1.1!important;
}
@media(max-width:767px) {
    .qodef-e.qodef-grid-item .qodef-woo-product-image > .webdo-bfm-sale-badge {
        width:var(--webdo-bfm-mobile-size,75px)!important;max-width:calc(100% - 12px)!important;
    }
    .qodef-e.qodef-grid-item .qodef-woo-product-image > .webdo-bfm-text-badge {
        font-size:13px!important;padding:5px 10px!important;
    }
}
