/* =============================================================================
   Smart Bundles – Frontend Styles
   ============================================================================= */

.smart-bundles-widget {
	margin: 0 0 40px 0;
	padding: 20px;
	background: #fff;
	border: 1px solid #ededed;
	border-radius: 5px;
	box-sizing: border-box;
}

.smart-bundles-title {
	margin: 0 0 20px;
	font-size: 1.25rem;
	font-weight: 700;
	color: #1a1a1a;
}

/* =============================================================================
   Grid – 3 productkolommen elk 2/9 (= samen 2/3), summary 1/3.
   Plus-tekens absoluut gepositioneerd op de grens tussen productkolommen.
   ============================================================================= */

.smart-bundles-grid {
	display: flex;
	flex-wrap: nowrap;
	align-items: flex-end; /* uitlijning onderkant voor alle kolommen */
	width: 100%;
}

/* Productkolommen: elk 2/9 van de totale breedte */
.sb-col-product {
	flex: 0 0 calc(100% * 2 / 9);
	max-width: calc(100% * 2 / 9);
	position: relative;
	padding-left: 12px;
	padding-right: 8px;
	/* Producten zelf bovenaan uitlijnen */
	align-self: flex-start;
}

/* Summary kolom: 1/3 van de totale breedte, uitlijnen onderkant */
.sb-col-summary {
	flex: 0 0 calc(100% / 3);
	max-width: calc(100% / 3);
	align-self: flex-end;
}

/* Plus-teken: absoluut links van de kolom, ter hoogte van de afbeelding */
.smart-bundles-plus {
	position: absolute;
	left: -16px;
	top: 0;
	width: 32px;
	height: 192px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.5rem;
	font-weight: 700;
	color: #bbb;
	z-index: 1;
	pointer-events: none;
}

/* Summary kolom wrapper */
.smart-bundles-summary-col {
	padding-left: 16px;
}

/* =============================================================================
   Product card
   ============================================================================= */

.smart-bundles-product {
	display: flex;
	flex-direction: column;
}

.smart-bundles-product__inner {
	display: flex;
	flex-direction: column;
	gap: 8px;
	cursor: pointer;
}

/* Checkbox */
.smart-bundles-product__check {
	position: relative;
	display: flex;
	align-items: center;
	height: 22px;
}

.smart-bundles-product__check input[type="checkbox"] {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
}

.sb-checkmark {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	border: 2px solid #ccc;
	border-radius: 4px;
	background: #fff;
	flex-shrink: 0;
	transition: border-color .15s, background .15s;
}

.smart-bundles-product__check input[type="checkbox"]:checked + .sb-checkmark {
	background: #219ebc;
	border-color: #219ebc;
}

.sb-checkmark::after {
	content: '';
	display: none;
	width: 5px;
	height: 9px;
	border: 2px solid #fff;
	border-top: none;
	border-left: none;
	transform: rotate(45deg) translateY(-1px);
}

.smart-bundles-product__check input[type="checkbox"]:checked + .sb-checkmark::after {
	display: block;
}

/* Afbeelding */
.smart-bundles-product__image {
	height: 140px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.smart-bundles-product__image img {
	width: 100%;
	height: 100%;
	max-height: 140px;
	object-fit: contain;
}

.smart-bundles-product:has(input:not(:checked)) .smart-bundles-product__image {
	opacity: .4;
}

/* Info */
.smart-bundles-product__info {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

/* Titel */
.smart-bundles-product__title {
	font-size: 16px !important;
	color: #333 !important;
	font-weight: 700 !important;
	font-family: Montserrat, sans-serif !important;
	text-decoration: none !important;
	line-height: 1.3;
	display: block;
}

.smart-bundles-product__title:hover,
.smart-bundles-product__title:focus {
	color: #333 !important;
	text-decoration: none !important;
}

/* USP */
.smart-bundles-product__usp,
.smart-bundles-product__usp p,
.smart-bundles-product__usp li {
	font-size: 14px !important;
	color: #777 !important;
	font-family: 'Open Sans', sans-serif !important;
	font-weight: 400 !important;
	line-height: 1.45;
	margin: 0;
}

.smart-bundles-product__usp ul {
	margin: 0;
	padding-left: 16px;
}

/* Prijzen */
.smart-bundles-product__price {
	display: flex;
	align-items: baseline;
	flex-wrap: wrap;
	gap: 5px;
	margin-top: 2px;
}

/* Alle doorgestreepte prijzen in de widget */
.smart-bundles-widget del,
.smart-bundles-widget del bdi,
.smart-bundles-widget del .woocommerce-Price-amount,
.smart-bundles-widget del .woocommerce-Price-currencySymbol {
	color: #a7a7a7 !important;
	font-weight: 700 !important;
	font-size: 0.9rem !important;
	text-decoration: line-through;
}

/* Huidige prijs op productkaart */
.smart-bundles-product__price .price,
.smart-bundles-product__price .price bdi,
.smart-bundles-product__price .price .woocommerce-Price-amount {
	color: #212529 !important;
	font-size: 1.125rem !important;
	font-weight: 700 !important;
}

/* Voorraad per product */
.smart-bundles-product__stock p,
.smart-bundles-product__stock span {
	color: #3a7c3a !important;
	font-size: inherit;
	margin: 0;
}

/* =============================================================================
   Summary kolom
   ============================================================================= */

.smart-bundles-summary {
	border-left: 1px solid #ededed;
	padding-left: 16px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

/* Totaalprijs */
.smart-bundles-summary__sale,
.smart-bundles-summary__sale bdi,
.smart-bundles-summary__sale .woocommerce-Price-amount {
	font-size: 1.4rem !important;
	font-weight: 700 !important;
	color: #212529 !important;
	line-height: 1.2;
}

/* Voorraad in summary */
.smart-bundles-summary__stock p,
.smart-bundles-summary__stock span {
	color: #3a7c3a !important;
	margin: 0;
}

/* Form */
.smart-bundles-form {
	margin: 0 !important;
	padding: 0 !important;
	border: none !important;
	background: none !important;
	box-shadow: none !important;
}

.smart-bundles-form::before,
.smart-bundles-form::after {
	display: none !important;
}

/* Qty + knop rij */
.smart-bundles-qty-row {
	display: flex;
	align-items: stretch;
	gap: 8px;
	width: 100%;
}

.smart-bundles-qty {
	flex-shrink: 0;
	display: flex !important;
	align-items: stretch !important;
}

.smart-bundles-qty .minus,
.smart-bundles-qty .plus,
.smart-bundles-qty .input-text.qty {
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	align-self: stretch !important;
	height: auto !important;
	box-sizing: border-box;
}

/* Knop */
.single_add_to_cart_button_bundle {
	flex: 1 !important;
	text-align: center !important;
	margin: 0 !important;
	white-space: nowrap !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	align-self: stretch !important;
	height: auto !important;
}

.single_add_to_cart_button_bundle i.fa,
.single_add_to_cart_button_bundle i.fas,
.single_add_to_cart_button_bundle i.far,
.single_add_to_cart_button_bundle .button-icon {
	display: none !important;
}

/* Totaal label boven prijs in summary */
.smart-bundles-summary__total-label {
	display: block;
	font-size: 15px;
	font-weight: bold;
	color: #212529;
}

/* =============================================================================
   Responsive – mobiel ≤ 768px
   ============================================================================= */

@media (max-width: 768px) {
	.smart-bundles-grid {
		flex-wrap: wrap;
	}

	.sb-col-product,
	.sb-col-summary {
		flex: 0 0 100% !important;
		max-width: 100% !important;
		padding-left: 0 !important;
		padding-right: 0 !important;
		align-self: auto !important;
	}

	/* Border + padding per product op mobiel */
	.smart-bundles-product-col {
		border-top: 1px solid #ededed;
		padding-top: 20px !important;
		padding-bottom: 20px;
	}

	/* Geen border/padding-top bij het eerste product */
	.smart-bundles-product-col:first-child {
		border-top: none;
		padding-top: 0 !important;
	}

	.smart-bundles-plus {
		display: none !important;
	}

	.smart-bundles-summary-col {
		padding-left: 0 !important;
	}

	.smart-bundles-summary {
		border-left: none;
		border-top: 1px solid #ededed;
		padding-left: 0;
		padding-top: 16px;
	}

	.smart-bundles-qty-row {
		width: 100%;
	}

	.single_add_to_cart_button_bundle {
		width: 100%;
	}
}
