/**
 * Maku – Bundle UX
 *
 * Card layout for Bopo's horizontal bundle template. Selectors are
 * prefixed with .mbux-bundle plus Bopo's own classes so they outrank both
 * bopo-frontend.css and the Customizer CSS that targets .bopobb-template-2.
 */

.mbux-bundle {
	--mbux-ink: #161619;
	--mbux-muted: #6b6b6b;
	--mbux-border: #e6e6e6;
	--mbux-soft: #f5f5f5;
	--mbux-accent: #93acfe;
	--mbux-accent-soft: #e6ecff;
	--mbux-accent-dark: #6f8ef0;
	--mbux-cream: #f9f1eb;
	--mbux-radius: 18px;
}

/* ---------------------------------------------------------------
 * Table → stacked cards
 * ------------------------------------------------------------- */

.bopobb-single-wrap.mbux-bundle .bopobb-items-bottom-wrap.bopobb-template-2 {
	border-bottom: none !important;
}

.bopobb-single-wrap.mbux-bundle .bopobb-items-bottom-wrap.bopobb-template-2 .bopobb-detail-table,
.bopobb-single-wrap.mbux-bundle .bopobb-items-bottom-wrap.bopobb-template-2 .bopobb-detail-table > tbody {
	display: block;
	width: 100%;
	margin: 0;
	border: none;
}

.bopobb-single-wrap.mbux-bundle .bopobb-items-bottom-wrap.bopobb-template-2 .bopobb-detail-table tr.bopobb-item-product.mbux-item {
	display: block;
	min-height: 0;
	margin: 0 0 12px;
	background: none;
}

.bopobb-single-wrap.mbux-bundle .bopobb-items-bottom-wrap.bopobb-template-2 .bopobb-detail-table tr.bopobb-item-product.mbux-item > td.mbux-card {
	display: flex;
	align-items: flex-start;
	gap: 16px;
	padding: 8px;
	border: 1.5px solid var(--mbux-border);
	border-radius: var(--mbux-radius);
	background: #fff;
	vertical-align: top;
	text-align: left;
}

.bopobb-single-wrap.mbux-bundle .bopobb-items-bottom-wrap.bopobb-template-2 .bopobb-detail-table tr.bopobb-item-product.mbux-item.mbux-is-empty > td.mbux-card {
	border-style: dashed;
}

/* Media */

.mbux-bundle .mbux-card__media {
	flex: 0 0 96px;
	width: 96px;
}

.bopobb-single-wrap.mbux-bundle .bopobb-items-bottom-wrap.bopobb-template-2 .bopobb-detail-table tr.bopobb-item-product.mbux-item .bopobb-item-img-wrap {
	position: relative;
	width: 96px;
	height: 96px;
	margin: 0 !important;
	border: none;
	border-radius: 12px;
	background: var(--mbux-soft);
	overflow: hidden;
	cursor: default;
}

.bopobb-single-wrap.mbux-bundle .bopobb-items-bottom-wrap.bopobb-template-2 .bopobb-detail-table tr.bopobb-item-product.mbux-item .bopobb-item-img-wrap.bopobb-item-change {
	cursor: pointer;
}

.bopobb-single-wrap.mbux-bundle .bopobb-items-bottom-wrap.bopobb-template-2 .bopobb-detail-table tr.bopobb-item-product.mbux-item .bopobb-item-img-wrap .bopobb-item-img {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	min-height: 0 !important;
}

.bopobb-single-wrap.mbux-bundle .bopobb-items-bottom-wrap.bopobb-template-2 .bopobb-detail-table tr.bopobb-item-product.mbux-item .bopobb-item-img-wrap .bopobb-item-img img {
	width: 100%;
	height: 100%;
	max-width: none;
	max-height: none;
	object-fit: cover;
}

.mbux-bundle .mbux-card__media-hint {
	position: absolute;
	left: 50%;
	bottom: 6px;
	transform: translateX(-50%);
	padding: 2px 8px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.92);
	color: var(--mbux-ink);
	font-size: 11px;
	font-weight: 600;
	line-height: 1.5;
	white-space: nowrap;
	pointer-events: none;
}

.mbux-bundle .mbux-item[data-change=""] .mbux-card__media-hint,
.mbux-bundle .mbux-item[data-change="0"] .mbux-card__media-hint {
	display: none;
}

/* Body / head */

.mbux-bundle .mbux-card__body {
	flex: 1 1 auto;
	min-width: 0;
}

.mbux-bundle .mbux-card__head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
}

.bopobb-single-wrap.mbux-bundle .bopobb-items-bottom-wrap.bopobb-template-2 .bopobb-detail-table tr.bopobb-item-product.mbux-item .bopobb-item-detail {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	min-width: 0;
	padding: 0;
	align-self: flex-start;
	text-align: left;
}

.bopobb-single-wrap.mbux-bundle .bopobb-items-bottom-wrap.bopobb-template-2 .bopobb-detail-table tr.bopobb-item-product.mbux-item .bopobb-item-detail .bopobb-item-title {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2 !important;
	overflow: hidden;
	color: var(--mbux-ink);
	font-size: 16px;
	font-weight: 600;
	line-height: 1.3;
	text-decoration: none;
}

.bopobb-single-wrap.mbux-bundle .bopobb-items-bottom-wrap.bopobb-template-2 .bopobb-detail-table tr.bopobb-item-product.mbux-item .bopobb-item-detail p.stock {
	margin: 4px 0 0;
	font-size: 13px;
	line-height: 1.3;
	text-align: left;
}

.bopobb-single-wrap.mbux-bundle .bopobb-items-bottom-wrap.bopobb-template-2 .bopobb-detail-table tr.bopobb-item-product.mbux-item .bopobb-item-detail .star-rating {
	margin: 4px 0 0;
}

.bopobb-single-wrap.mbux-bundle .bopobb-items-bottom-wrap.bopobb-template-2 .bopobb-detail-table tr.bopobb-item-product.mbux-item .bopobb-item-right {
	display: flex;
	flex: 0 0 auto;
	flex-direction: column;
	align-items: flex-end;
	gap: 4px;
}

.bopobb-single-wrap.mbux-bundle .bopobb-items-bottom-wrap.bopobb-template-2 .bopobb-detail-table tr.bopobb-item-product.mbux-item .bopobb-item-right .bopobb-item-quantity {
	margin: 0;
}

/* Fixed quantity: keep Bopo's input (it reads it) but don't show it. */
.bopobb-single-wrap.mbux-bundle .bopobb-items-bottom-wrap.bopobb-template-2 .bopobb-detail-table tr.bopobb-item-product.mbux-item .bopobb-item-right .bopobb-item-quantity.mbux-qty-fixed .bopobb-item-qty {
	display: none;
}

.mbux-bundle .mbux-qty-label {
	color: var(--mbux-muted);
	font-size: 13px;
}

.bopobb-single-wrap.mbux-bundle .bopobb-items-bottom-wrap.bopobb-template-2 .bopobb-detail-table tr.bopobb-item-product.mbux-item .bopobb-item-right .bopobb-item-price {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	align-self: flex-end;
	margin: 0;
	font-size: 15px;
	line-height: 1.3;
	text-align: right;
	white-space: nowrap;
}

/* ---------------------------------------------------------------
 * Modal mode: summary + "Elegir" button
 * ------------------------------------------------------------- */

.mbux-bundle .mbux-summary {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 2px 6px;
	margin-top: 6px;
	color: var(--mbux-muted);
	font-size: 14px;
	line-height: 1.4;
}

.mbux-bundle .mbux-summary:empty {
	display: none;
}

.mbux-bundle .mbux-summary strong {
	color: var(--mbux-ink);
	font-weight: 600;
}

.mbux-bundle .mbux-summary__sep {
	color: #c4c4c4;
}

.bopobb-single-wrap.mbux-bundle .bopobb-items-bottom-wrap.bopobb-template-2 .bopobb-detail-table tr.bopobb-item-product.mbux-item .bopobb-item-change-wrap {
	width: auto;
	height: auto;
	margin: 10px 0 0;
	align-self: flex-start;
}

.bopobb-single-wrap.mbux-bundle .bopobb-items-bottom-wrap.bopobb-template-2 .bopobb-detail-table tr.bopobb-item-product.mbux-item .mbux-choose {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 38px;
	margin: 0;
	padding: 8px 18px;
	border: none;
	border-radius: 999px;
	background: var(--mbux-ink);
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: 0;
	text-transform: none;
	cursor: pointer;
	transition: background-color 0.15s ease;
}

.bopobb-single-wrap.mbux-bundle .bopobb-items-bottom-wrap.bopobb-template-2 .bopobb-detail-table tr.bopobb-item-product.mbux-item .mbux-choose:hover,
.bopobb-single-wrap.mbux-bundle .bopobb-items-bottom-wrap.bopobb-template-2 .bopobb-detail-table tr.bopobb-item-product.mbux-item .mbux-choose:focus-visible {
	background: var(--mbux-accent-dark);
}

.mbux-bundle .mbux-choose__icon {
	flex: none;
}

/* ---------------------------------------------------------------
 * Inline mode: chips, swatches, pills
 * ------------------------------------------------------------- */

.mbux-bundle .mbux-attr {
	margin-top: 12px;
}

.mbux-bundle .mbux-attr__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 8px;
	font-size: 14px;
	line-height: 1.3;
}

.mbux-bundle .mbux-attr__label {
	color: var(--mbux-muted);
}

.mbux-bundle .mbux-attr__label strong {
	color: var(--mbux-ink);
	font-weight: 600;
}

.mbux-bundle .mbux-attr__options {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.mbux-bundle .mbux-attr__foot {
	margin-top: 10px;
	font-size: 14px;
}

.mbux-bundle .mbux-size-guide {
	color: var(--mbux-ink);
	font-size: 13px;
	font-weight: 500;
	text-decoration: underline;
	text-underline-offset: 3px;
	white-space: nowrap;
}

.mbux-bundle .mbux-swatch,
.mbux-bundle .mbux-pill,
.mbux-bundle .mbux-chip {
	position: relative;
	margin: 0;
	font-family: inherit;
	letter-spacing: 0;
	text-transform: none;
	cursor: pointer;
	transition: box-shadow 0.15s ease, border-color 0.15s ease, background-color 0.15s ease, opacity 0.15s ease;
}

/* Swatches */

.mbux-bundle .mbux-swatch {
	display: inline-flex;
	width: 36px;
	height: 36px;
	padding: 3px;
	border: none;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 0 0 1px var(--mbux-border);
}

.mbux-bundle .mbux-swatch__fill {
	display: block;
	width: 100%;
	height: 100%;
	border-radius: 50%;
	background-position: center;
	background-size: cover;
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
}

.mbux-bundle .mbux-swatch:hover {
	box-shadow: 0 0 0 1px var(--mbux-muted);
}

.mbux-bundle .mbux-swatch.is-selected {
	box-shadow: 0 0 0 2px var(--mbux-ink);
}

/* Pills */

.mbux-bundle .mbux-pill {
	min-width: 48px;
	min-height: 36px;
	padding: 6px 14px;
	border: 1.5px solid #a8a8a8;
	border-radius: 999px;
	background: #fff;
	color: var(--mbux-ink);
	font-size: 14px;
	font-weight: 500;
	line-height: 1.2;
}

.mbux-bundle .mbux-pill:hover {
	background: var(--mbux-soft);
}

.mbux-bundle .mbux-pill.is-selected {
	background: #68C191;
	color:white;
	border-color: #41A36B;
}

/* Product chips */

.mbux-bundle .mbux-chip {
	display: inline-flex;
	width: 56px;
	height: 56px;
	padding: 0;
	border: 2px solid transparent;
	border-radius: 12px;
	background: var(--mbux-soft);
	overflow: hidden;
	box-shadow: 0 0 0 1px var(--mbux-border);
}

.mbux-bundle .mbux-chip__img {
	display: block;
	width: 100%;
	height: 100%;
}

.mbux-bundle .mbux-chip__img img {
	display: block;
	width: 100%;
	height: 100%;
	margin: 0;
	object-fit: cover;
}

.mbux-bundle .mbux-chip:hover {
	box-shadow: 0 0 0 1px var(--mbux-muted);
}

.mbux-bundle .mbux-chip.is-selected {
	border-color: var(--mbux-ink);
	box-shadow: none;
}

/* Availability states */

.mbux-bundle .is-incompatible {
	opacity: 0.55;
}

.mbux-bundle .mbux-swatch.is-disabled,
.mbux-bundle .mbux-pill.is-disabled,
.mbux-bundle .mbux-chip.is-disabled {
	opacity: 0.35;
	cursor: not-allowed;
}

.mbux-bundle .mbux-pill.is-disabled {
	text-decoration: line-through;
}

.mbux-bundle .mbux-swatch.is-disabled::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 4px;
	right: 4px;
	height: 1.5px;
	background: var(--mbux-ink);
	transform: rotate(-45deg);
}

.mbux-bundle .mbux-swatch:focus-visible,
.mbux-bundle .mbux-pill:focus-visible,
.mbux-bundle .mbux-chip:focus-visible,
.mbux-bundle .mbux-toggle__input:focus-visible + .mbux-toggle__switch {
	outline: 2px solid var(--mbux-accent-dark);
	outline-offset: 2px;
}

/* ---------------------------------------------------------------
 * Toggle mode ("Casilla")
 * ------------------------------------------------------------- */

.bopobb-single-wrap.mbux-bundle .bopobb-items-bottom-wrap.bopobb-template-2 .bopobb-detail-table tr.bopobb-item-product.mbux-item.mbux-item--toggle > td.mbux-card {
	align-items: center;
	border-style: solid;
	background: var(--mbux-cream);
	border-color: transparent;
}

.mbux-bundle .mbux-item--toggle .mbux-card__media {
	flex-basis: 56px;
	width: 56px;
}

.bopobb-single-wrap.mbux-bundle .bopobb-items-bottom-wrap.bopobb-template-2 .bopobb-detail-table tr.bopobb-item-product.mbux-item.mbux-item--toggle .bopobb-item-img-wrap {
	display: none;
}

.mbux-bundle .mbux-toggle__thumb {
	width: 56px;
	height: 56px;
	border-radius: 10px;
	background: #fff;
	overflow: hidden;
}

.mbux-bundle .mbux-toggle__thumb img {
	display: block;
	width: 100%;
	height: 100%;
	margin: 0;
	object-fit: cover;
}

.mbux-bundle .mbux-item--toggle .mbux-card__body {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.mbux-bundle .mbux-item--toggle .mbux-card__head {
	order: 2;
	flex: none;
}

.bopobb-single-wrap.mbux-bundle .bopobb-items-bottom-wrap.bopobb-template-2 .bopobb-detail-table tr.bopobb-item-product.mbux-item.mbux-item--toggle .bopobb-item-detail {
	display: none;
}

.bopobb-single-wrap.mbux-bundle .bopobb-items-bottom-wrap.bopobb-template-2 .bopobb-detail-table tr.bopobb-item-product.mbux-item.mbux-item--toggle.mbux-is-empty .bopobb-item-price {
	visibility: hidden;
}

.mbux-bundle .mbux-toggle {
	display: flex;
	flex: 1 1 auto;
	align-items: center;
	gap: 12px;
	min-width: 0;
	margin: 0;
	color: var(--mbux-ink);
	font-size: 15px;
	font-weight: 600;
	line-height: 1.3;
	cursor: pointer;
}

.mbux-bundle .mbux-toggle__input {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: 0;
	opacity: 0;
}

.mbux-bundle .mbux-toggle__switch {
	position: relative;
	flex: none;
	width: 44px;
	height: 26px;
	border-radius: 999px;
	background: #cfcfcf;
	transition: background-color 0.15s ease;
}

.mbux-bundle .mbux-toggle__switch::after {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
	transition: transform 0.15s ease;
}

.mbux-bundle .mbux-toggle__input:checked + .mbux-toggle__switch {
	background: var(--mbux-ink);
}

.mbux-bundle .mbux-toggle__input:checked + .mbux-toggle__switch::after {
	transform: translateX(18px);
}

/* ---------------------------------------------------------------
 * Engraving hint
 * ------------------------------------------------------------- */

.mbux-bundle .mbux-engrave-hint {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-top: 10px;
	padding: 6px 12px;
	border-radius: 8px;
	background: var(--mbux-cream);
	color: var(--mbux-ink);
	font-size: 13px;
	font-weight: 500;
	text-decoration: none;
}

.mbux-bundle .mbux-engrave-hint[hidden] {
	display: none;
}

.mbux-bundle .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ---------------------------------------------------------------
 * Small screens
 * ------------------------------------------------------------- */

@media (max-width: 600px) {
	.bopobb-single-wrap.mbux-bundle .bopobb-items-bottom-wrap.bopobb-template-2 .bopobb-detail-table tr.bopobb-item-product.mbux-item > td.mbux-card {
		gap: 12px;
		padding: 8px;
	}

	.mbux-bundle .mbux-card__media {
		flex-basis: 80px;
		width: 80px;
	}

	.bopobb-single-wrap.mbux-bundle .bopobb-items-bottom-wrap.bopobb-template-2 .bopobb-detail-table tr.bopobb-item-product.mbux-item .bopobb-item-img-wrap {
		width: 80px;
		height: 80px;
	}

	.bopobb-single-wrap.mbux-bundle .bopobb-items-bottom-wrap.bopobb-template-2 .bopobb-detail-table tr.bopobb-item-product.mbux-item .bopobb-item-detail .bopobb-item-title {
		font-size: 15px;
	}

	.bopobb-single-wrap.mbux-bundle .bopobb-items-bottom-wrap.bopobb-template-2 .bopobb-detail-table tr.bopobb-item-product.mbux-item .bopobb-item-right .bopobb-item-price {
		font-size: 14px;
	}

	.mbux-bundle .mbux-chip {
		width: 48px;
		height: 48px;
	}

	.mbux-bundle .mbux-toggle {
		font-size: 14px;
	}
}
