/**
 * MK Offers — storefront badges
 */

.mk-badge-stack {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 4px;
	pointer-events: none;
}

.mk-badge-stack--collection {
	position: absolute;
	top: 0.5rem;
	left: 0.5rem;
	z-index: 3;
}

.mk-badge-stack--product {
	position: absolute;
	top: 12px;
	left: 12px;
	z-index: 6;
}

.woocommerce-product-gallery,
.woocommerce-product-gallery__image,
.woocommerce-product-gallery .flex-viewport {
	position: relative;
}

.mk-badge {
	display: inline-block;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	padding: 4px 10px;
	border-radius: 40px;
	line-height: 1.2;
	max-width: 12rem;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.mk-badge--offer {
	background: var(--mk-red, #ff6b35);
	color: #fff;
}

.mk-badge--sale {
	background: var(--mk-black, #000);
	color: var(--mk-white, #faeec2);
}

.mk-badge--type-bogo {
	background: #1a5f4a;
	color: #faeec2;
}

.mk-badge--type-free_gift {
	background: #5b2d8e;
	color: #fff;
}

/* Card must be positioned for absolute stack */
.mk-product-card {
	position: relative;
}

/* Hide legacy single Sale pill when stack present */
.mk-product-card .mk-product-card__badge {
	display: none;
}

.mk-offer-gift-label {
	font-weight: 600;
	opacity: 0.85;
}

.mk-offers-applied th,
.mk-offers-applied td {
	font-size: 0.9em;
}

.mk-offers-applied-note {
	margin: 0 0 12px;
	padding: 10px 12px;
	background: #113a2d;
	color: #faeec2;
	border-radius: 6px;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.35;
}

.mk-mini-cart .mk-offers-applied-note,
.mk-mini-cart__footer .mk-offers-applied-note {
	margin: 0 0 10px;
}

.mk-offers-applied-save {
	font-weight: 500;
	opacity: 0.95;
}

/* Ensure offer badges sit above card media */
.mk-product-card .mk-badge-stack,
.mk-collection-card .mk-badge-stack {
	z-index: 5;
}
