/* Sold-out round stamp — Team Moon Options */

body.tm-soldout-stamp .product-wrapper .product-element-top,
body.tm-soldout-stamp .product-wrapper .product-image-link,
body.tm-soldout-stamp.single-product .product-image-wrap,
body.tm-soldout-stamp.single-product .woocommerce-product-gallery,
body.tm-soldout-stamp.single-product .wd-gallery-images {
	position: relative;
}

body.tm-soldout-stamp .outofstock .product-labels .product-label:not(.out-of-stock) {
	display: none;
}

body.tm-soldout-stamp .product-wrapper .product-labels:has(.out-of-stock.product-label),
body.tm-soldout-stamp.single-product .product-labels:has(.out-of-stock.product-label) {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: auto;
	height: auto;
	top: 50%;
	left: 50%;
	right: auto;
	bottom: auto;
	transform: translate(-50%, -50%);
	z-index: 20;
	pointer-events: none;
}

body.tm-soldout-stamp .product-wrapper .product-labels:has(.out-of-stock.product-label) .product-label:not(.out-of-stock),
body.tm-soldout-stamp.single-product .product-labels:has(.out-of-stock.product-label) .product-label:not(.out-of-stock) {
	display: none;
}

body.tm-soldout-stamp .product-wrapper .out-of-stock.product-label,
body.tm-soldout-stamp.single-product .out-of-stock.product-label,
body.tm-soldout-stamp .product-labels.labels-rounded .out-of-stock.product-label {
	position: relative;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0;

	width: 160px !important;
	height: 160px !important;
	min-width: 0 !important;
	min-height: 0 !important;
	max-width: none !important;
	padding: 0;

	border-radius: 50% !important;
	border: 3.5px solid var(--tm-soldout, #d32f2f);
	background: rgba(var(--tm-soldout-rgb, 211, 47, 47), 0.09);

	color: var(--tm-soldout, #d32f2f);
	font-family: "Tajawal", sans-serif;
	font-weight: 900;
	font-size: clamp(20px, 2vw, 26px);
	line-height: 1;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	text-align: center;
	white-space: nowrap;
	overflow: visible;

	transform: rotate(-18deg);
}

body.tm-soldout-stamp .product-wrapper .out-of-stock.product-label::before,
body.tm-soldout-stamp.single-product .out-of-stock.product-label::before,
body.tm-soldout-stamp .product-labels.labels-rounded .out-of-stock.product-label::before {
	content: "";
	position: absolute;
	inset: 10px;
	border-radius: 50%;
	border: 1.5px dashed rgba(var(--tm-soldout-rgb, 211, 47, 47), 0.7);
	pointer-events: none;
}

body.tm-soldout-stamp .product-wrapper .out-of-stock.product-label::after,
body.tm-soldout-stamp.single-product .out-of-stock.product-label::after,
body.tm-soldout-stamp .product-labels.labels-rounded .out-of-stock.product-label::after {
	content: "";
	position: absolute;
	inset: 20px;
	border-radius: 50%;
	border: 1px solid rgba(var(--tm-soldout-rgb, 211, 47, 47), 0.28);
	pointer-events: none;
}

body.tm-soldout-stamp .products .product-wrapper .out-of-stock.product-label {
	width: 120px !important;
	height: 120px !important;
	font-size: clamp(16px, 1.6vw, 20px);
}

@media (max-width: 767px) {
	body.tm-soldout-stamp .product-wrapper .out-of-stock.product-label,
	body.tm-soldout-stamp.single-product .out-of-stock.product-label {
		width: 100px !important;
		height: 100px !important;
		font-size: clamp(14px, 3.5vw, 17px);
		border-width: 3px;
		transform: rotate(-15deg);
	}
}

body.tm-soldout-grayscale .wd-product.outofstock .product-image-link img:not(.zoomImg):not([class*="hover"]) {
	filter: grayscale(100%) !important;
	opacity: 0.45 !important;
	transition: filter 0.3s ease, opacity 0.3s ease !important;
}

body.tm-soldout-grayscale.single-product .product.outofstock .woocommerce-product-gallery__image > a > img:not(.zoomImg):not([class*="hover"]) {
	filter: grayscale(100%) !important;
	opacity: 0.45 !important;
	transition: filter 0.3s ease, opacity 0.3s ease !important;
}

body.tm-soldout-hide-stock.single-product .stock.in-stock,
body.tm-soldout-hide-stock.single-product .stock.out-of-stock {
	display: none !important;
}

body.tm-soldout-stamp .tm-soldout-badge {
	position: absolute;
	z-index: 20;
	top: 50%;
	left: 50%;
	box-sizing: border-box;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 160px;
	height: 160px;
	padding: 0;
	border-radius: 50%;
	border: 3.5px solid var(--tm-soldout, #d32f2f);
	background: rgba(var(--tm-soldout-rgb, 211, 47, 47), 0.09);
	color: var(--tm-soldout, #d32f2f);
	font-family: "Tajawal", sans-serif;
	font-weight: 900;
	font-size: clamp(20px, 2vw, 26px);
	line-height: 1;
	letter-spacing: 0.06em;
	text-align: center;
	pointer-events: none;
	transform: translate(-50%, -50%) rotate(-18deg);
}

body.tm-soldout-stamp .tm-soldout-badge::before,
body.tm-soldout-stamp .tm-soldout-badge::after {
	content: "";
	position: absolute;
	border-radius: 50%;
	pointer-events: none;
}

body.tm-soldout-stamp .tm-soldout-badge::before {
	inset: 10px;
	border: 1.5px dashed rgba(var(--tm-soldout-rgb, 211, 47, 47), 0.7);
}

body.tm-soldout-stamp .tm-soldout-badge::after {
	inset: 20px;
	border: 1px solid rgba(var(--tm-soldout-rgb, 211, 47, 47), 0.28);
}

body.tm-soldout-stamp .wd-product .tm-soldout-badge {
	width: 120px;
	height: 120px;
	font-size: clamp(16px, 1.6vw, 20px);
}

@media (max-width: 767px) {
	body.tm-soldout-stamp .tm-soldout-badge {
		width: 100px;
		height: 100px;
		font-size: clamp(14px, 3.5vw, 17px);
		border-width: 3px;
		transform: translate(-50%, -50%) rotate(-15deg);
	}
}
