/* Ora Promotions – unified product labels (catalog cards).
 *
 * CANONICAL LOOK = the site's own catalog-card standard (the owner's snippet
 * "catalog cards: image labels — DESKTOP: all label fonts aligned to the
 * אזל המלאי size (30px); MOBILE: half size", i.e. the li.product span.onsale
 * badge): dark #23252a box, global text font, font-size 30px / line-height
 * 30px / padding 0 7.5px on desktop, 16.5px / 16.5px / 0 3.75px on mobile,
 * square corners, margin .5em .6em from the image's top-left corner.
 *
 * This rule set applies that ONE look to every catalog badge — promo labels,
 * sale (מבצע), sold-out (אזל המלאי / wcsob_soldout), Premium widget badges —
 * with doubled-class specificity so exactly one rule wins everywhere and no
 * other system (theme, plugin settings, older snippets) fights it.
 *
 * Deliberately SCOPED to li.product (catalog cards): the single-product
 * gallery has its own owner-managed label system (top-right, 33px) which we
 * must not touch. Our own .ora-promo-label elements are styled everywhere.
 * No `display` on native selectors, so badges a widget hides stay hidden.
 */

/* ---- canonical badge look ---- */
body li.product span.onsale.onsale,
body li.product .wcsob_soldout.wcsob_soldout,
body li.product .premium-woo-product-onsale.premium-woo-product-onsale,
body li.product .premium-woo-product-featured.premium-woo-product-featured,
body li.product .pa-out-of-stock.pa-out-of-stock,
.ora-badge,
.ora-promo-label {
	box-sizing: border-box !important;
	width: auto !important;
	height: auto !important;
	min-width: 0 !important;
	min-height: 0 !important;
	margin: .5em .6em !important;
	padding: 0 7.5px !important;
	background: #23252a !important;
	color: #ffffff !important;
	border: 0 !important;
	border-radius: 0 !important;
	font-family: var( --e-global-typography-text-font-family, "Amatic SC" ), sans-serif !important;
	font-weight: var( --e-global-typography-text-font-weight, 400 ) !important;
	letter-spacing: var( --e-global-typography-text-letter-spacing, 0 ) !important;
	font-size: 30px !important;
	line-height: 30px !important;
	text-align: center !important;
	text-transform: none !important;
	white-space: nowrap !important;
}

/* Mobile — half size (the owner's own mobile treatment). */
@media ( max-width: 767px ) {
	body li.product span.onsale.onsale,
	body li.product .wcsob_soldout.wcsob_soldout,
	body li.product .premium-woo-product-onsale.premium-woo-product-onsale,
	body li.product .premium-woo-product-featured.premium-woo-product-featured,
	body li.product .pa-out-of-stock.pa-out-of-stock,
	.ora-badge,
	.ora-promo-label {
		font-size: 16.5px !important;
		line-height: 16.5px !important;
		padding: 0 3.75px !important;
	}
}

/* Our own labels are always visible blocks; native badges keep their own
 * display (widget-hidden ones stay hidden). JS adds .ora-badge only to
 * VISIBLE native badges. */
.ora-badge,
.ora-promo-label {
	display: block !important;
}

/* ---- one corner for everything (catalog cards): physical top-left ----
 * inset-inline-start would mean "right" on this RTL site, so force physical
 * left. Stacking offsets for a second label are set by labels.js. The
 * single-product gallery is NOT matched (no li.product there) — its labels
 * stay where the owner's gallery system puts them. */
body ul.products li.product .premium-woo-ribbon-container,
body ul.products li.product .pa-out-of-stock,
body ul.products li.product span.onsale,
body ul.products li.product .wcsob_soldout,
.ora-promo-label--standalone {
	position: absolute !important;
	top: 0 !important;
	left: 0 !important;
	right: auto !important;
	inset-inline-start: auto !important;
	inset-inline-end: auto !important;
	bottom: auto !important;
	z-index: 9 !important;
}

/* The ribbon wrapper is just a positioner — its child badges stack in block
 * flow (second below first). */
.premium-woocommerce .premium-woo-ribbon-container {
	margin: 0 !important;
}

/* A catalog card is the containing block for its pinned badge, even pre-JS. */
.woocommerce ul.products li.product,
ul.products li.product {
	position: relative;
}

/* Our own injected/standalone labels never intercept clicks on the product. */
.ora-promo-label--standalone,
.ora-promo-ribbon {
	pointer-events: none !important;
}
