/**
 * HalalEco Sale Badge
 * Green disc with the calculated discount, top-right of the product image.
 * Colour and typography match .hpr-card-badge on the Promotions page.
 */

:root {
	--hsb-green: #5da22b;
}

/* ---------------------------------------------------------------
   Product loops (archives, shop, search, related, category tiles)
   --------------------------------------------------------------- */

.woocommerce ul.products li.product .onsale,
ul.products li.product .onsale {
	position: absolute !important;
	top: 10px !important;
	right: 10px !important;
	bottom: auto !important;
	left: auto !important;
	z-index: 3;
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	width: 52px !important;
	height: 52px !important;
	min-width: 0 !important;
	min-height: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
	border-radius: 50% !important;
	background: var(--hsb-green) !important;
	color: #fff !important;
	font-size: 14px !important;
	font-weight: 800 !important;
	line-height: 1 !important;
	letter-spacing: -0.01em;
	text-align: center;
	box-shadow: 0 3px 10px rgba(20, 23, 15, 0.18);
}

/* Category browser tiles are smaller and have clipped rounded corners.
   Selector is deliberately longer than the rule above so it wins. */
.hcb-cat-tiles .woocommerce ul.products li.product .onsale,
.hcb-cat-tiles ul.products li.product .onsale {
	top: 8px !important;
	right: 8px !important;
	width: 44px !important;
	height: 44px !important;
	font-size: 12.5px !important;
}

/* ---------------------------------------------------------------
   Single product page: recolour only, leave the theme's placement
   and sizing alone.
   --------------------------------------------------------------- */

.woocommerce div.product .onsale,
.single-product .onsale {
	background: var(--hsb-green) !important;
	color: #fff !important;
}

@media (max-width: 680px) {
	.woocommerce ul.products li.product .onsale,
	ul.products li.product .onsale {
		width: 44px !important;
		height: 44px !important;
		font-size: 12.5px !important;
	}
}
