.mix-match-builder {
	--mmb-accent: var(--ast-global-color-0, #314db4);
	--mmb-accent-dark: #213783;
	--mmb-border: #dfe3ea;
	--mmb-muted: #667085;
	--mmb-surface: #fff;
	--mmb-soft: #f7f8fb;
	margin: 2rem auto 4rem;
	color: #101828;
}

.mix-match-builder-product {
	clear: both;
	width: 100%;
}

.single-product .mix-match-bundle-product > .woocommerce-product-gallery,
.single-product .mix-match-bundle-product > .summary {
	display: none;
}

.mix-match-builder *,
.mix-match-builder *::before,
.mix-match-builder *::after {
	box-sizing: border-box;
}

.mix-match-builder [hidden] {
	display: none !important;
}

.mix-match-builder__header {
	max-width: 52rem;
	margin-bottom: 1.75rem;
}

.mix-match-builder__eyebrow {
	margin: 0 0 0.4rem;
	color: var(--mmb-accent);
	font-size: 0.78rem;
	font-weight: 800;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.mix-match-builder__title {
	margin: 0;
	font-size: clamp(2rem, 5vw, 3.2rem);
	line-height: 1.05;
}

.mix-match-builder__intro {
	margin: 0.8rem 0 0;
	color: var(--mmb-muted);
	font-size: 1rem;
}

.mix-match-builder__toolbar {
	display: flex;
	gap: 0.75rem;
	margin-bottom: 1rem;
}

.mix-match-builder__search {
	flex: 1 1 18rem;
}

.mix-match-builder__filter {
	flex: 0 1 16rem;
}

.mix-match-builder__toolbar input,
.mix-match-builder__toolbar select,
.mix-match-builder__product select {
	width: 100%;
	min-height: 44px;
	margin: 0;
	border: 1px solid var(--mmb-border);
	border-radius: 8px;
	background-color: #fff;
	color: #101828;
}

.mix-match-builder__layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(19rem, 24rem);
	gap: 1rem;
	align-items: start;
}

.mix-match-builder__products {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 0.9rem;
}

.mix-match-builder__product {
	display: flex;
	min-width: 0;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid var(--mmb-border);
	border-radius: 12px;
	background: var(--mmb-surface);
	box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.mix-match-builder__product[hidden] {
	display: none;
}

.mix-match-builder__product-image {
	display: block;
	overflow: hidden;
	aspect-ratio: 1 / 1.12;
	background: var(--mmb-soft);
}

.mix-match-builder__product-image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 180ms ease;
}

.mix-match-builder__product:hover .mix-match-builder__product-image img {
	transform: scale(1.025);
}

.mix-match-builder__product-content {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 0.65rem;
	padding: 0.85rem;
}

.mix-match-builder__product h2 {
	margin: 0;
	font-size: 1rem;
	line-height: 1.3;
}

.mix-match-builder__product h2 a {
	color: inherit;
	text-decoration: none;
}

.mix-match-builder__price {
	margin: auto 0 0;
	font-weight: 750;
}

.mix-match-builder__add-box,
.mix-match-builder__add-cart,
.mix-match-builder__show-more {
	min-height: 42px;
	border: 0;
	border-radius: 999px;
	background: var(--mmb-accent);
	color: #fff;
	font-weight: 750;
	cursor: pointer;
	transition: background 140ms ease, transform 140ms ease, opacity 140ms ease;
}

.mix-match-builder__add-box:hover,
.mix-match-builder__add-cart:hover,
.mix-match-builder__show-more:hover {
	background: var(--mmb-accent-dark);
	transform: translateY(-1px);
}

.mix-match-builder__add-box:disabled,
.mix-match-builder__add-cart:disabled {
	cursor: not-allowed;
	opacity: 0.48;
	transform: none;
}

.mix-match-builder__add-box.is-added {
	transform: scale(0.97);
}

.mix-match-builder__show-more {
	display: block;
	min-width: 13rem;
	margin: 1.25rem auto 0;
	padding: 0.65rem 1.25rem;
}

.mix-match-builder__show-more[hidden] {
	display: none;
}

.mix-match-builder__no-results {
	padding: 2rem;
	border: 1px dashed var(--mmb-border);
	border-radius: 12px;
	text-align: center;
}

.mix-match-builder__summary {
	position: sticky;
	top: 1rem;
	max-height: calc(100vh - 2rem);
	overflow: auto;
	padding: 1rem;
	border: 1px solid var(--mmb-border);
	border-radius: 12px;
	background: var(--mmb-surface);
	box-shadow: 0 8px 28px rgba(16, 24, 40, 0.08);
}

.admin-bar .mix-match-builder__summary {
	top: 3.5rem;
	max-height: calc(100vh - 4.5rem);
}

.mix-match-builder__summary-heading {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	align-items: start;
}

.mix-match-builder__summary-heading h2 {
	margin: 0;
	font-size: 1.55rem;
}

.mix-match-builder__summary-heading p {
	margin: 0.2rem 0 0;
	color: var(--mmb-muted);
	font-size: 0.88rem;
}

.mix-match-builder__clear,
.mix-match-builder__remove {
	padding: 0;
	border: 0;
	background: transparent;
	color: #b42318;
	font-size: 0.82rem;
	font-weight: 650;
	cursor: pointer;
}

.mix-match-builder__clear:disabled {
	opacity: 0.45;
}

.mix-match-builder__tiers {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(5.5rem, 1fr));
	gap: 0.4rem;
	margin-top: 1rem;
}

.mix-match-builder__tier {
	padding: 0.65rem 0.35rem;
	border: 1px solid var(--mmb-border);
	border-radius: 9px;
	text-align: center;
	transition: border-color 140ms ease, background 140ms ease, color 140ms ease;
}

.mix-match-builder__tier strong,
.mix-match-builder__tier span {
	display: block;
}

.mix-match-builder__tier strong {
	font-size: 0.82rem;
}

.mix-match-builder__tier span {
	font-size: 0.75rem;
}

.mix-match-builder__tier.is-unlocked {
	border-color: #75c59b;
	background: #effaf4;
}

.mix-match-builder__tier.is-active {
	border-color: var(--mmb-accent);
	background: var(--mmb-accent);
	color: #fff;
}

.mix-match-builder__progress-message {
	min-height: 2.5rem;
	margin: 0.9rem 0 0.4rem;
	text-align: center;
	font-size: 0.9rem;
	font-weight: 700;
}

.mix-match-builder__progress {
	height: 6px;
	overflow: hidden;
	border-radius: 999px;
	background: #e7eaf0;
}

.mix-match-builder__progress span {
	display: block;
	width: 0;
	height: 100%;
	border-radius: inherit;
	background: #75c59b;
	transition: width 180ms ease;
}

.mix-match-builder__count {
	margin: 0.9rem 0 0.45rem;
	font-size: 0.9rem;
	font-weight: 700;
}

.mix-match-builder__items {
	display: grid;
	gap: 0.55rem;
	max-height: 18rem;
	margin: 0;
	padding: 0;
	overflow-y: auto;
	list-style: none;
}

.mix-match-builder__item {
	display: grid;
	grid-template-columns: 54px minmax(0, 1fr);
	gap: 0.65rem;
	padding: 0.55rem;
	border-radius: 8px;
	background: var(--mmb-soft);
}

.mix-match-builder__item img {
	width: 54px;
	height: 64px;
	border-radius: 6px;
	object-fit: cover;
}

.mix-match-builder__item-body {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 0.15rem 0.5rem;
	align-items: center;
	font-size: 0.78rem;
}

.mix-match-builder__item-body strong,
.mix-match-builder__item-body > span:not(.mix-match-builder__item-price) {
	grid-column: 1;
}

.mix-match-builder__item-price {
	grid-column: 2;
	grid-row: 1 / span 2;
	font-weight: 700;
}

.mix-match-builder__quantity {
	display: inline-flex;
	width: max-content;
	align-items: center;
	gap: 0.45rem;
	margin-top: 0.2rem;
	border: 1px solid var(--mmb-border);
	border-radius: 999px;
	background: #fff;
}

.mix-match-builder__quantity-button {
	width: 26px;
	height: 26px;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
}

.mix-match-builder__remove {
	justify-self: end;
}

.mix-match-builder__empty {
	margin: 0;
	padding: 1.4rem 0.75rem;
	border: 1px dashed var(--mmb-border);
	border-radius: 8px;
	color: var(--mmb-muted);
	text-align: center;
	font-size: 0.85rem;
}

.mix-match-builder__totals {
	display: grid;
	gap: 0.4rem;
	margin-top: 0.9rem;
	padding-top: 0.8rem;
	border-top: 1px solid var(--mmb-border);
}

.mix-match-builder__totals > div {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
}

.mix-match-builder__discount {
	color: #067647;
}

.mix-match-builder__total {
	font-size: 1.1rem;
}

.mix-match-builder__status {
	min-height: 1.25rem;
	margin: 0.55rem 0;
	color: #b42318;
	font-size: 0.8rem;
}

.mix-match-builder__add-cart {
	width: 100%;
	padding: 0.65rem 1rem;
}

.mix-match-builder__add-cart.is-loading {
	cursor: progress;
}

@media (max-width: 1024px) {
	.mix-match-builder__layout {
		grid-template-columns: minmax(0, 1fr) minmax(17rem, 20rem);
	}

	.mix-match-builder__products {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 767px) {
	.mix-match-builder {
		margin-top: 1rem;
	}

	.mix-match-builder__toolbar,
	.mix-match-builder__layout {
		display: grid;
		grid-template-columns: 1fr;
	}

	.mix-match-builder__filter {
		max-width: none;
	}

	.mix-match-builder__products {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 0.55rem;
	}

	.mix-match-builder__product-content {
		padding: 0.65rem;
	}

	.mix-match-builder__summary {
		position: static;
		order: -1;
		max-height: none;
		margin: 0 0 0.5rem;
	}
}

@media (max-width: 420px) {
	.mix-match-builder__products {
		grid-template-columns: 1fr;
	}
}
