.fmo-promo{display:flex;flex-wrap:wrap;gap:.4em .55em;align-items:center;margin:.6em 0 1em;font-size:.9em;min-width:0;max-width:100%;box-sizing:border-box}.fmo-promo[hidden],.fmo-promo-label:empty,.fmo-promo-clock:empty{display:none!important}.fmo-promo-label{display:inline-block;background:#203a54;color:#fff;border-radius:5px;padding:.32em .65em;font-weight:600;line-height:1.3;max-width:100%;box-sizing:border-box;overflow-wrap:anywhere}.fmo-promo-clock{font-weight:600;font-variant-numeric:tabular-nums;line-height:1.4;max-width:100%;overflow-wrap:anywhere}.fmo-promo-loop{display:flex;flex-direction:column;align-items:flex-start;gap:4px;margin:8px 0 10px;font-size:12px;text-align:left;min-height:42px;flex-shrink:0;clear:both}.fmo-promo-loop .fmo-promo-clock{font-size:12px}.fmo-promo-note{display:block;font-size:11px;color:inherit;opacity:.8}
/* Correct native classic and Astra badge dimensions without changing the rest of the theme. */
body.fmo-fix-sale-badge.fmo-fix-sale-badge ul.products li.product :is(.onsale,.ast-onsale-card),body.fmo-fix-sale-badge.fmo-fix-sale-badge.single-product div.product :is(.onsale,.ast-onsale-card){display:inline-flex!important;align-items:center!important;justify-content:center!important;width:auto!important;height:auto!important;min-width:0!important;min-height:0!important;max-width:calc(100% - 16px)!important;max-height:none!important;box-sizing:border-box!important;padding:6px 11px!important;border-radius:6px!important;font-size:13px!important;line-height:1.3!important;font-weight:600!important;white-space:normal!important;overflow:visible!important;overflow-wrap:anywhere;transform:none!important;text-indent:0!important;z-index:5;}
body.fmo-fix-sale-badge.fmo-fix-sale-badge ul.products li.product :is(.onsale,.ast-onsale-card){position:absolute!important;top:8px!important;right:8px!important;left:auto!important;bottom:auto!important;margin:0!important;}
body.fmo-fix-sale-badge.fmo-fix-sale-badge.single-product div.product > :is(.onsale,.ast-onsale-card),body.fmo-fix-sale-badge.fmo-fix-sale-badge.single-product div.product .woocommerce-product-gallery :is(.onsale,.ast-onsale-card){position:absolute!important;top:8px!important;left:8px!important;right:auto!important;bottom:auto!important;margin:0!important;}
/* Native Astra modern-layout markers may bypass the sale flash filter. Hide them here too. */
body.fmo-hide-loop-badge.fmo-hide-loop-badge.fmo-hide-loop-badge ul.products li.product :is(.onsale,.ast-onsale-card),body.fmo-hide-single-badge.fmo-hide-single-badge.single-product div.product > :is(.onsale,.ast-onsale-card),body.fmo-hide-single-badge.fmo-hide-single-badge.single-product div.product .woocommerce-product-gallery :is(.onsale,.ast-onsale-card),body.fmo-hide-single-badge.fmo-hide-single-badge.single-product div.product .summary > :is(.onsale,.ast-onsale-card){display:none!important;visibility:hidden!important;}

.fmo-sale-inline{display:inline-flex;align-items:center;justify-content:center;background:#3b82c4;color:#fff;border-radius:6px;padding:5px 10px;font-size:13px;line-height:1.2;font-weight:700;white-space:nowrap;vertical-align:middle;box-sizing:border-box;max-width:100%;overflow-wrap:anywhere;margin-left:8px;position:relative;top:0}
.fmo-price-inline-wrap{display:inline-flex;align-items:baseline;gap:8px;flex-wrap:wrap;max-width:100%}
.fmo-promo-loop{margin-top:7px}
/* Hide the native sale badge only in catalog loops; the plugin re-renders it next to the price. */
body.fmo-loop-inline-badge ul.products li.product :is(.onsale,.ast-onsale-card){display:none!important;visibility:hidden!important;}


/* Keep catalog CTAs aligned as much as possible when promotional meta is shown. */
body.fmo-loop-below ul.products li.product,
body.fmo-loop-below .related ul.products li.product,
body.fmo-loop-below .up-sells ul.products li.product,
body.fmo-loop-below .cross-sells ul.products li.product{display:flex;flex-direction:column;}
body.fmo-loop-below ul.products li.product .astra-shop-summary-wrap,
body.fmo-loop-below .related ul.products li.product .astra-shop-summary-wrap,
body.fmo-loop-below .up-sells ul.products li.product .astra-shop-summary-wrap,
body.fmo-loop-below .cross-sells ul.products li.product .astra-shop-summary-wrap{display:flex;flex-direction:column;flex:1 1 auto;}
body.fmo-loop-below ul.products li.product .button,
body.fmo-loop-below ul.products li.product .added_to_cart,
body.fmo-loop-below .related ul.products li.product .button,
body.fmo-loop-below .up-sells ul.products li.product .button,
body.fmo-loop-below .cross-sells ul.products li.product .button{margin-top:auto;}

/* Optional photo overlay: no flow height and no interaction with the wishlist or product link. */
.fmo-photo-host{position:relative!important;}
body ul.products li.product .fmo-promo-loop.fmo-promo-photo:not([hidden]){
    position:absolute!important;left:8px!important;bottom:8px!important;top:auto!important;right:auto!important;
    display:flex!important;flex-direction:column;flex-wrap:nowrap;align-items:flex-start;gap:3px;
    width:max-content;max-width:calc(100% - 16px);min-height:0!important;margin:0!important;padding:5px 7px;
    background:rgba(255,255,255,.94);color:#203a54;border-radius:5px;box-shadow:0 1px 5px rgba(0,0,0,.12);
    z-index:4;pointer-events:none;box-sizing:border-box;text-align:left;font-size:12px;line-height:1.3;
}
.fmo-promo-photo .fmo-promo-label{font-size:12px;line-height:1.25;padding:4px 7px;}
.fmo-promo-photo .fmo-promo-clock{font-size:11px;line-height:1.35;}
.fmo-promo-photo .fmo-promo-note{font-size:10px;}
@media(max-width:480px){body ul.products li.product .fmo-promo-loop.fmo-promo-photo:not([hidden]){left:5px!important;bottom:5px!important;max-width:calc(100% - 10px);padding:4px;gap:2px;}.fmo-promo-photo .fmo-promo-label{font-size:11px;padding:3px 5px;}.fmo-promo-photo .fmo-promo-clock{font-size:10px;}}

/* Independent catalog placement; leave the original thumbnail and price intact. */
body ul.products li.product .fmo-sale-inline.fmo-sale-photo{position:absolute!important;top:8px!important;left:8px!important;right:auto!important;bottom:auto!important;margin:0!important;max-width:calc(100% - 54px);white-space:normal;overflow-wrap:anywhere;z-index:4;pointer-events:none;text-align:left;}
.fmo-sale-inline.fmo-sale-campaign{background:#000!important;color:#fff!important;white-space:normal;overflow-wrap:anywhere;flex-direction:column;}
.fmo-sale-partial{font-size:10px;line-height:1.2;font-weight:400;}
.fmo-promo-loop{min-height:0;}
body.fmo-hide-oos ul.products li.product.outofstock :is(.onsale,.ast-onsale-card,.fmo-sale-inline,.fmo-promo),body.fmo-hide-oos.single-product div.product.outofstock > :is(.onsale,.ast-onsale-card),body.fmo-hide-oos.single-product div.product.outofstock .woocommerce-product-gallery :is(.onsale,.ast-onsale-card),body.fmo-hide-oos.single-product div.product.outofstock .summary :is(.onsale,.ast-onsale-card,.fmo-promo-single){display:none!important;visibility:hidden!important;}
@media(max-width:480px){body ul.products li.product .fmo-sale-inline.fmo-sale-photo{top:5px!important;left:5px!important;padding:4px 7px;font-size:12px;max-width:calc(100% - 44px);}}

/* Native badges must remain hidden in grids even when the theme correction is active. */
body.fmo-loop-inline-badge.fmo-loop-inline-badge.fmo-loop-inline-badge ul.products li.product :is(.onsale,.ast-onsale-card){display:none!important;visibility:hidden!important;}

/* 1.2.8: user-defined backgrounds (only background alpha, never text opacity). */
.fmo-sale-inline{background:var(--fmo-badge-bg,#3b82c4)!important;}
.fmo-sale-inline.fmo-sale-campaign{background:var(--fmo-badge-campaign-bg,#000)!important;}
.fmo-promo-loop .fmo-promo-label{background:var(--fmo-campaign-bg,#203a54)!important;}
body ul.products li.product .fmo-promo-loop.fmo-promo-photo:not([hidden]){background:var(--fmo-panel-bg,rgba(255,255,255,.94));}
body ul.products li.product .fmo-photo-top-stack{position:absolute;top:8px;left:8px;right:auto;bottom:auto;display:flex;flex-direction:column;align-items:flex-start;gap:4px;width:max-content;max-width:calc(100% - 54px);z-index:4;pointer-events:none;box-sizing:border-box;}
body ul.products li.product .fmo-photo-top-stack .fmo-sale-inline.fmo-sale-photo{position:static!important;max-width:100%;margin:0!important;}
body ul.products li.product .fmo-photo-top-stack .fmo-promo-loop.fmo-promo-top:not([hidden]){position:static!important;max-width:100%;margin:0!important;}
@media(max-width:480px){body ul.products li.product .fmo-photo-top-stack{top:5px;left:5px;gap:3px;max-width:calc(100% - 44px);}}
