/* DeezCount Frontend Styles */

/* Ensure product containers support absolute badge positioning */
.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product,
.wc-block-grid__product,
ul.products li.product {
	position: relative;
}

/* Hide WC default sale badge when our badge is present */
.woocommerce ul.products li.product .onsale,
.woocommerce-page ul.products li.product .onsale,
.woocommerce div.product .onsale {
	/* Only hidden when DeezCount badge replaces it via sale_flash filter */
}

/* ---------- DeezCount Badge ---------- */
.deezcount-badge {
	position: absolute !important;
	z-index: 10 !important;
	display: inline-block !important;
	padding: 5px 12px !important;
	font-family: inherit !important;
	font-size: 13px !important;
	font-weight: 700 !important;
	line-height: 1.4 !important;
	text-transform: uppercase !important;
	letter-spacing: 0.5px !important;
	white-space: nowrap !important;
	box-sizing: border-box !important;
	pointer-events: none !important;
	box-shadow: none !important;
	/* Reset any inherited styles from theme/WC */
	float: none !important;
	margin: 0 !important;
	min-width: auto !important;
	min-height: auto !important;
	width: auto !important;
	height: auto !important;
	text-align: center !important;
	text-decoration: none !important;
	border: none !important;
}

/* Badge shape styles — with !important to override everything */
.deezcount-badge.deezcount-badge--square {
	border-radius: 0 !important;
	padding: 5px 12px !important;
}

.deezcount-badge.deezcount-badge--rounded {
	border-radius: 6px !important;
	padding: 5px 12px !important;
}

.deezcount-badge.deezcount-badge--pill {
	border-radius: 50px !important;
	padding: 5px 16px !important;
}

/* ---------- Single Product Page ---------- */
.woocommerce div.product div.images {
	position: relative;
}

.woocommerce div.product div.images .woocommerce-product-gallery {
	position: relative;
}

.woocommerce div.product div.images .woocommerce-product-gallery__wrapper {
	position: relative;
}

.woocommerce div.product div.images .deezcount-badge {
	z-index: 100 !important;
}

/* ---------- Elementor Compatibility ---------- */
.elementor-widget-woocommerce-products .product,
.elementor-widget-loop-grid .product,
.e-loop-item {
	position: relative;
}

.elementor-widget-woocommerce-products .deezcount-badge,
.elementor-widget-loop-grid .deezcount-badge,
.e-loop-item .deezcount-badge {
	z-index: 10 !important;
}
