.mahimzaman-bab-builder {
	--mahimzaman-bab-primary: #2271b1;
	--mahimzaman-bab-button-bg: #2271b1;
	--mahimzaman-bab-button-text: #fff;
	--mahimzaman-bab-builder-bg: #fff;
	--mahimzaman-bab-card-bg: #fff;
	--mahimzaman-bab-text: #1d2327;
	--mahimzaman-bab-muted: #646970;
	--mahimzaman-bab-border: #dcdcde;

	margin: 24px 0;
	padding: 20px;
	border: 1px solid var(--mahimzaman-bab-border);
	border-radius: 10px;
	background: var(--mahimzaman-bab-builder-bg);
	color: var(--mahimzaman-bab-text);
	box-sizing: border-box;
}

.mahimzaman-bab-section {
	margin-bottom: 28px;
}

.mahimzaman-bab-section:last-of-type {
	margin-bottom: 20px;
}

.mahimzaman-bab-section-title {
	margin: 0 0 14px;
	color: var(--mahimzaman-bab-text);
	font-size: 1.1em;
}

.mahimzaman-bab-pack-options {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 0;
	padding: 0;
	border: 0;
}

.mahimzaman-bab-pack-option {
	position: relative;
	cursor: pointer;
}

.mahimzaman-bab-pack-option input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.mahimzaman-bab-pack-option-content {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	min-width: 120px;
	padding: 12px 16px;
	border: 1px solid var(--mahimzaman-bab-border);
	border-radius: 6px;
	background: var(--mahimzaman-bab-card-bg);
	color: var(--mahimzaman-bab-text);
	box-sizing: border-box;
	transition:
		border-color 0.15s ease,
		box-shadow 0.15s ease;
}

.mahimzaman-bab-pack-option input:checked + .mahimzaman-bab-pack-option-content {
	border-color: var(--mahimzaman-bab-primary);
	box-shadow: 0 0 0 1px var(--mahimzaman-bab-primary);
}

.mahimzaman-bab-pack-option input:focus-visible + .mahimzaman-bab-pack-option-content {
	outline: 2px solid var(--mahimzaman-bab-primary);
	outline-offset: 2px;
}

.mahimzaman-bab-pack-price {
	color: var(--mahimzaman-bab-muted);
	font-size: 0.9em;
}

.mahimzaman-bab-builder-header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 20px;
	margin-bottom: 16px;
}

.mahimzaman-bab-builder-header .mahimzaman-bab-section-title {
	margin: 0;
}

.mahimzaman-bab-progress {
	color: var(--mahimzaman-bab-text);
	text-align: right;
}

.mahimzaman-bab-progress-count,
.mahimzaman-bab-progress-text {
	display: block;
}

.mahimzaman-bab-progress-text {
	margin-top: 3px;
	color: var(--mahimzaman-bab-muted);
	font-size: 0.9em;
}

.mahimzaman-bab-products {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 16px;
}

.mahimzaman-bab-product {
	overflow: hidden;
	border: 1px solid var(--mahimzaman-bab-border);
	border-radius: 14px;
	background: var(--mahimzaman-bab-card-bg);
	color: var(--mahimzaman-bab-text);
	box-shadow: 0 2px 10px rgba(29, 35, 39, 0.05);
	transition:
		transform 0.15s ease,
		border-color 0.15s ease,
		box-shadow 0.15s ease;
}

.mahimzaman-bab-product:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 22px rgba(29, 35, 39, 0.10);
}

.mahimzaman-bab-product.is-selected {
	border-color: var(--mahimzaman-bab-primary);
	box-shadow: 0 0 0 1px var(--mahimzaman-bab-primary), 0 8px 22px rgba(29, 35, 39, 0.08);
}

.mahimzaman-bab-product-image {
	aspect-ratio: 1 / 1;
	min-height: 150px;
	overflow: hidden;
	background: #f8f8f8;
	border-bottom: 1px solid #eeeeee;
}

.mahimzaman-bab-product-image img {
	display: block;
	width: 100%;
	height: 100%;
	margin: 0;
	object-fit: cover;
}

.mahimzaman-bab-product-content {
	padding: 14px;
	background: var(--mahimzaman-bab-card-bg);
	color: var(--mahimzaman-bab-text);
}

.mahimzaman-bab-product-title {
	display: block;
	width: 100%;
	margin: 0 0 8px;
	color: var(--mahimzaman-bab-text);
	font-size: 0.98rem;
	font-weight: 600;
	line-height: 1.35;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.mahimzaman-bab-product-price {
	margin-bottom: 12px;
	color: var(--mahimzaman-bab-text);
	font-size: 0.94rem;
	font-weight: 600;
}

.mahimzaman-bab-quantity-control {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	max-width: 154px;
	margin-top: 2px;
	border: 1px solid #d9dce1;
	border-radius: 10px;
	background: #fff;
	overflow: hidden;
}

.mahimzaman-bab-quantity-button {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	padding: 0;
	border: 0;
	background: var(--mahimzaman-bab-card-bg);
	color: var(--mahimzaman-bab-text);
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	touch-action: manipulation;
}

.mahimzaman-bab-quantity-button:hover:not(:disabled) {
	background: var(--mahimzaman-bab-primary);
	color: var(--mahimzaman-bab-button-text);
}

.mahimzaman-bab-quantity-button:disabled {
	opacity: 0.35;
	cursor: not-allowed;
}

.mahimzaman-bab-quantity-button:focus-visible,
.mahimzaman-bab-add-to-cart:focus-visible {
	outline: 2px solid var(--mahimzaman-bab-primary);
	outline-offset: 2px;
}

.mahimzaman-bab-product-quantity {
	flex: 1 1 auto;
	min-width: 42px;
	width: 58px !important;
	height: 42px;
	margin: 0 !important;
	padding: 0 10px !important;
	border: 0 !important;
	border-radius: 6px !important;
	background: var(--mahimzaman-bab-card-bg) !important;
	color: var(--mahimzaman-bab-text) !important;
	text-align: center;
	font-size: 15px;
	font-weight: 700;
	box-shadow: none !important;
	appearance: textfield;
}

.mahimzaman-bab-product-quantity:focus {
	outline: 2px solid var(--mahimzaman-bab-primary);
	outline-offset: -2px;
}

.mahimzaman-bab-product-quantity::-webkit-outer-spin-button,
.mahimzaman-bab-product-quantity::-webkit-inner-spin-button {
	margin: 0;
	appearance: none;
}

.mahimzaman-bab-product.is-selected .mahimzaman-bab-quantity-control {
	border-color: var(--mahimzaman-bab-primary);
}

.mahimzaman-bab-product.is-selected .mahimzaman-bab-product-title {
	color: var(--mahimzaman-bab-primary);
}

.mahimzaman-bab-summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	margin: 8px 0 16px;
	padding: 14px 16px;
	border: 1px solid var(--mahimzaman-bab-border);
	border-radius: 6px;
	background: var(--mahimzaman-bab-card-bg);
	color: var(--mahimzaman-bab-text);
}

.mahimzaman-bab-summary-label,
.mahimzaman-bab-summary-price span {
	margin-right: 6px;
	color: var(--mahimzaman-bab-muted);
}

.mahimzaman-bab-summary-count,
.mahimzaman-bab-total-price {
	color: var(--mahimzaman-bab-text);
}

.mahimzaman-bab-builder.needs-more-products .mahimzaman-bab-summary {
	border-color: #d98c00;
}

.mahimzaman-bab-builder.needs-more-products .mahimzaman-bab-summary-count {
	color: #b56b00;
	font-weight: 700;
}

.mahimzaman-bab-builder.is-complete .mahimzaman-bab-product.is-selected .mahimzaman-bab-quantity-control {
	border-color: var(--mahimzaman-bab-primary);
}

.mahimzaman-bab-product.is-selected .mahimzaman-bab-product-title {
	color: var(--mahimzaman-bab-primary);
}

.mahimzaman-bab-summary {
	border-color: var(--mahimzaman-bab-primary);
}

.mahimzaman-bab-builder.is-complete .mahimzaman-bab-summary-count {
	color: var(--mahimzaman-bab-primary);
	font-weight: 700;
}

.mahimzaman-bab-add-to-cart {
	width: 100%;
	min-height: 46px;
	border-color: var(--mahimzaman-bab-button-bg) !important;
	background: var(--mahimzaman-bab-button-bg) !important;
	color: var(--mahimzaman-bab-button-text) !important;
}

.mahimzaman-bab-add-to-cart:hover:not(:disabled) {
	filter: brightness(0.92);
}

.mahimzaman-bab-add-to-cart:disabled {
	opacity: 0.55;
	cursor: not-allowed;
}

.mahimzaman-bab-builder .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;
}

@media (max-width: 900px) {
	.mahimzaman-bab-products {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 600px) {
	.mahimzaman-bab-builder {
		padding: 16px;
	}

	.mahimzaman-bab-builder-header,
	.mahimzaman-bab-product.is-selected .mahimzaman-bab-quantity-control {
	border-color: var(--mahimzaman-bab-primary);
}

.mahimzaman-bab-product.is-selected .mahimzaman-bab-product-title {
	color: var(--mahimzaman-bab-primary);
}

.mahimzaman-bab-summary {
		align-items: stretch;
		flex-direction: column;
	}

	.mahimzaman-bab-progress {
		text-align: left;
	}

	.mahimzaman-bab-products {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 10px;
	}

	.mahimzaman-bab-pack-options {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.mahimzaman-bab-pack-option-content {
		min-width: 0;
		width: 100%;
	}
}

@media (max-width: 480px) {
	.mahimzaman-bab-builder {
		margin: 18px 0;
		padding: 14px;
	}

	.mahimzaman-bab-section {
		margin-bottom: 22px;
	}

	.mahimzaman-bab-pack-options {
		grid-template-columns: 1fr;
	}

	.mahimzaman-bab-products {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 8px;
	}

	.mahimzaman-bab-product-content {
		padding: 10px;
	}

	.mahimzaman-bab-product-title {
		font-size: 0.88rem;
	}

	.mahimzaman-bab-product-price {
		margin-bottom: 8px;
		font-size: 0.85rem;
	}

	.mahimzaman-bab-quantity-control {
		width: 100%;
		max-width: none;
	}

	.mahimzaman-bab-quantity-button {
		width: 34px;
		height: 38px;
	}

	.mahimzaman-bab-product-quantity {
		width: 40px !important;
		height: 38px;
		padding: 0 4px !important;
	}



	.mahimzaman-bab-add-to-cart {
		min-height: 48px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.mahimzaman-bab-product,
	.mahimzaman-bab-pack-option-content {
		transition: none;
	}
}


.mahimzaman-bab-pack-discount {
	display: inline-block;
	margin-left: 8px;
	padding: 3px 7px;
	border-radius: 999px;
	background: var(--mahimzaman-bab-primary);
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.2;
}

/* v1.0.6 purchase-mode-first UI */
.mahimzaman-bab-mode-label {
	display: block;
	margin-bottom: 7px;
	font-weight: 600;
}

.mahimzaman-bab-mode-select {
	display: block;
	width: min(100%, 520px);
	min-height: 46px;
	padding: 8px 12px;
	border: 1px solid var(--mahimzaman-bab-border);
	border-radius: 8px;
	background: #fff;
	color: var(--mahimzaman-bab-text);
	font-size: 15px;
}

.mahimzaman-bab-mode-select:focus {
	outline: 2px solid var(--mahimzaman-bab-primary);
	outline-offset: 1px;
}

.mahimzaman-bab-mode-help {
	display: none;
	margin: 9px 0 0;
	color: var(--mahimzaman-bab-muted);
	font-size: 0.92em;
	line-height: 1.5;
}

.mahimzaman-bab-mode-section {
	padding: 16px;
	border: 1px solid var(--mahimzaman-bab-border);
	border-radius: 10px;
	background: #fafafa;
}

.mahimzaman-bab-mode-carton .mahimzaman-bab-product,
.mahimzaman-bab-mode-mix .mahimzaman-bab-product {
	transition: opacity .15s ease, transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.mahimzaman-bab-select-carton {
	display: none;
	width: 100%;
	min-height: 42px;
	margin-top: 8px;
	padding: 8px 12px;
	border: 1px solid var(--mahimzaman-bab-primary);
	border-radius: 8px;
	background: var(--mahimzaman-bab-primary);
	color: #fff;
	font-weight: 600;
	cursor: pointer;
}

.mahimzaman-bab-mode-carton .mahimzaman-bab-select-carton {
	display: block;
}

.mahimzaman-bab-mode-carton .mahimzaman-bab-mix-quantity-control {
	display: none;
}

.mahimzaman-bab-carton-selected {
	display: none;
	margin-top: 8px;
	font-size: 13px;
	font-weight: 600;
	color: var(--mahimzaman-bab-muted);
}

.mahimzaman-bab-mode-carton .mahimzaman-bab-carton-selected {
	display: block;
}

.mahimzaman-bab-mode-not-selected .mahimzaman-bab-products,
.mahimzaman-bab-mode-not-selected .mahimzaman-bab-summary {
	display: none;
}

.mahimzaman-bab-mode-not-selected .mahimzaman-bab-add-to-cart {
	display: none;
}

.mahimzaman-bab-mode-carton .mahimzaman-bab-product.is-selected .mahimzaman-bab-select-carton {
	background: #135e96;
}
