/**
 * WoodMart-style product label shapes (Sale, Hot, New, custom).
 */

.cuvys-ec-product-labels .ckit-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	font-weight: 600;
	text-transform: none;
	letter-spacing: 0.02em;
	opacity: 1;
}

/* Shared by the shop card, the gallery badge, and the summary badge. */
body.cuvys-ec-labels-shape-rounded .cuvys-ec-product-labels .ckit-badge,
body.cuvys-ec-labels-shape-rounded .ckit-badge_wrapper .ckit-badge,
body.single-product.cuvys-ec-labels-shape-rounded div.product .summary .ckit-badge_wrapper.ckit-badge-summary .ckit-badge {
	width: auto !important;
	height: auto !important;
	min-width: 0 !important;
	min-height: 0 !important;
	aspect-ratio: auto !important;
	align-self: flex-start !important;
	padding: 5px 10px !important;
	border-radius: 35px !important;
	line-height: 1.2 !important;
	white-space: nowrap;
}

body.cuvys-ec-labels-shape-rectangle .cuvys-ec-product-labels .ckit-badge,
body.cuvys-ec-labels-shape-rectangle .ckit-badge_wrapper .ckit-badge,
body.single-product.cuvys-ec-labels-shape-rectangle div.product .summary .ckit-badge_wrapper.ckit-badge-summary .ckit-badge {
	width: auto !important;
	height: auto !important;
	min-width: 0 !important;
	min-height: 0 !important;
	aspect-ratio: auto !important;
	align-self: flex-start !important;
	padding: 3px 9px !important;
	border-radius: 0 !important;
	line-height: 15px !important;
	white-space: nowrap;
}

body.cuvys-ec-labels-shape-circle .cuvys-ec-product-labels .ckit-badge,
body.cuvys-ec-labels-shape-circle .ckit-badge_wrapper .ckit-badge,
body.single-product.cuvys-ec-labels-shape-circle div.product .summary .ckit-badge_wrapper.ckit-badge-summary .ckit-badge {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	align-self: flex-start !important;
	box-sizing: border-box !important;
	width: max-content !important;
	height: auto !important;
	min-width: 46px !important;
	min-height: 46px !important;
	max-width: 4.75rem !important;
	aspect-ratio: 1 !important;
	padding: 8px !important;
	border-radius: 50% !important;
	line-height: 1.1 !important;
	text-align: center !important;
	white-space: normal !important;
	overflow-wrap: anywhere;
}

/* Shop image: keep the custom title under the discount percentage. Summary stays in flow. */
.woocommerce-image__wrapper .sale-item.product-label ~ .ckit-badge_wrapper:not(.ckit-badge-summary),
.woocommerce-image__wrapper .onsale ~ .ckit-badge_wrapper:not(.ckit-badge-summary) {
	top: 62px !important;
}

/* Summary (in-flow PDP) labels stay compact. */
.ckit-badge_wrapper.ckit-badge-summary .ckit-badge {
	position: relative;
	top: 0;
	left: 0;
	min-width: 0;
	min-height: 0;
}

.ckit-badge_wrapper.ckit-badge-summary.cuvys-ec-product-labels .ckit-badge {
	display: inline-flex;
	margin-right: 5px;
	margin-bottom: 5px;
}

/* Breadcrumb bar keeps 1rem until a label row follows it. */
body.single-product div.product .summary .cuvys-commerce-pdp-summary-top:has(+ .ckit-badge_wrapper.ckit-badge-summary) {
	margin-bottom: 6px;
}

/* PDP summary: sit in-flow, same left edge as the title. Shape stays on the badge. */
body.single-product div.product .summary .ckit-badge_wrapper.ckit-badge-summary,
body.single-product div.product .summary .ckit-badge_wrapper.ckit-badge-summary.cuvys-ec-product-labels {
	display: flex !important;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	position: static !important;
	float: none !important;
	inset: auto !important;
	top: auto !important;
	left: 0 !important;
	right: auto !important;
	width: 100% !important;
	max-width: 100% !important;
	margin: 0 0 6px 0 !important;
	padding: 0 !important;
	text-align: left !important;
	transform: none !important;
}

body.single-product div.product .summary .ckit-badge_wrapper.ckit-badge-summary .ckit-badge {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	align-self: flex-start !important;
	float: none !important;
	margin: 0 !important;
	font-size: 12px !important;
	font-weight: 600;
	letter-spacing: 0.02em;
	text-align: center !important;
	transform: none !important;
}

body.single-product.pdp-summary-txt-center div.product .summary .ckit-badge_wrapper.ckit-badge-summary {
	text-align: center !important;
}
