/**
 * WAP Sale Manager - Frontend styles.
 *
 * The badge must overlap the product image the same way the theme's own
 * sale flash does. We do not rely on the theme's `.onsale` positioning
 * rules to carry over correctly (some themes only make the badge absolute
 * inside their own limited markup/selectors), so we set positioning
 * ourselves. `!important` is required to win against theme cascade rules
 * (Woodmart etc.) that would otherwise reset display/position on `.onsale`.
 */

span.onsale.wap-sm-sale-badge {
	position: absolute !important;
	top: 12px !important;
	left: 12px !important;
	right: auto !important;
	bottom: auto !important;
	z-index: 9 !important;
	background: transparent !important;
	border: none !important;
	border-radius: 0 !important;
	padding: 0 !important;
	margin: 0 !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	overflow: visible !important;
	line-height: 0 !important;
	min-width: 0 !important;
	min-height: 0 !important;
	pointer-events: none !important;
}

span.onsale.wap-sm-sale-badge img {
	display: block !important;
	width: 100% !important;
	height: 100% !important;
	max-width: 100% !important;
	object-fit: contain !important;
}

/* RTL support: mirror the badge to the top-right instead of top-left. */
.rtl span.onsale.wap-sm-sale-badge {
	left: auto !important;
	right: 12px !important;
}
