/* Cart (classic [woocommerce_cart], custom templates)
 *
 * Two columns: line items (left) + sticky order summary (right). Chosen
 * accessories render as shaded, indented sub-lines under their parent product.
 * Suggestions ("you may be interested in") span full width below.
 */

/* The classic cart renders via the [woocommerce_cart] shortcode inside the
   constrained post-content (narrow). Let the WooCommerce wrapper use the wide
   content area so the two-column layout has room. */
body.woocommerce-cart .woocommerce {
	max-width: min(1900px, 94vw); /* fill the body width, responsive */
	margin-left: auto;
	margin-right: auto;
}

.bollaert-cartpage {
	margin: var(--wp--preset--spacing--6) auto var(--wp--preset--spacing--12);
}

.bollaert-cart__layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 360px;
	gap: var(--wp--preset--spacing--6);
	align-items: start;
}

/* ---------------------------------------------------------------- Items */

.bollaert-cart__items {
	list-style: none;
	margin: 0;
	padding: 0;
	background: var(--wp--preset--color--white);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 16px;
	overflow: hidden;
	box-shadow: var(--wp--preset--shadow--subtle);
}

.bollaert-cart__item {
	display: grid;
	grid-template-columns: 76px minmax(0, 1fr) auto auto 30px;
	grid-template-areas: "media info qty subtotal x";
	align-items: center;
	gap: var(--wp--preset--spacing--4);
	padding: var(--wp--preset--spacing--4) var(--wp--preset--spacing--5);
	border-top: 1px solid var(--wp--preset--color--border);
}
.bollaert-cart__item:first-child { border-top: 0; }

.bollaert-cart__item-media { grid-area: media; }
.bollaert-cart__item-info { grid-area: info; min-width: 0; }
.bollaert-cart__item-qty { grid-area: qty; }
.bollaert-cart__item-subtotal { grid-area: subtotal; }
.bollaert-cart__item-x { grid-area: x; }

.bollaert-cart__item-media img {
	width: 76px;
	height: 76px;
	object-fit: contain;
	border-radius: 10px;
	background: var(--wp--preset--color--brand-bg);
}

.bollaert-cart__item-name {
	display: block;
	font-weight: 600;
	line-height: 1.3;
	color: var(--wp--preset--color--text);
}
.bollaert-cart__item-name a {
	color: inherit;
	text-decoration: none;
}
.bollaert-cart__item-name a:hover { color: var(--wp--preset--color--brand); }

.bollaert-cart__item-unit {
	display: block;
	margin-top: 2px;
	font-size: var(--wp--preset--font-size--sm);
	color: var(--wp--preset--color--muted);
}

.bollaert-cart__item-subtotal {
	font-weight: 700;
	white-space: nowrap;
	color: var(--wp--preset--color--text);
}

/* Remove × */
.bollaert-cart__item-x {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 999px;
	font-size: 20px;
	line-height: 1;
	color: var(--wp--preset--color--muted);
	text-decoration: none;
	transition: background-color 0.15s ease, color 0.15s ease;
}
.bollaert-cart__item-x:hover {
	background: var(--wp--preset--color--brand-tint);
	color: var(--wp--preset--color--danger);
}

/* Accessory sub-lines */
/* Accessory sub-lines + their heading — clearly indented under the parent,
   tied together with a vertical connector line. */
.bollaert-cart__item.is-accessory,
.bollaert-cart__acc-head {
	position: relative;
	background: var(--wp--preset--color--brand-bg);
	padding-left: calc(var(--wp--preset--spacing--6) + 64px);
}
.bollaert-cart__item.is-accessory {
	grid-template-columns: 48px minmax(0, 1fr) auto auto 30px;
	border-top: 1px solid var(--wp--preset--color--border);
	padding-top: var(--wp--preset--spacing--3);
	padding-bottom: var(--wp--preset--spacing--3);
}
.bollaert-cart__item.is-accessory .bollaert-cart__item-media img {
	width: 48px;
	height: 48px;
}
.bollaert-cart__item.is-accessory .bollaert-cart__item-name {
	font-weight: 500;
	font-size: var(--wp--preset--font-size--sm);
}
.bollaert-cart__acc-head::before,
.bollaert-cart__item.is-accessory::before {
	content: "";
	position: absolute;
	left: calc(var(--wp--preset--spacing--6) + 30px);
	top: 0;
	bottom: 0;
	width: 2px;
	background: var(--wp--preset--color--border);
}
.bollaert-cart__acc-head {
	list-style: none;
	font-size: var(--wp--preset--font-size--xs);
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--wp--preset--color--brand);
	padding-top: var(--wp--preset--spacing--3);
	padding-bottom: 2px;
	border-top: 1px dashed var(--wp--preset--color--border);
}
.bollaert-cart__plus {
	color: var(--wp--preset--color--brand);
	font-weight: 700;
}
.bollaert-cart__qty-fixed {
	font-size: var(--wp--preset--font-size--sm);
	font-weight: 600;
	color: var(--wp--preset--color--muted);
}

/* Quantity stepper (WC .quantity + injected buttons) */
.bollaert-cart__item-qty .quantity {
	display: inline-flex;
	align-items: center;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 999px;
	overflow: hidden;
	background: var(--wp--preset--color--white);
}
.bollaert-cart__item-qty input.qty {
	width: 38px;
	border: 0;
	background: transparent;
	text-align: center;
	font-family: inherit;
	font-size: var(--wp--preset--font-size--sm);
	font-weight: 600;
	color: var(--wp--preset--color--text);
	padding: 8px 0;
	-moz-appearance: textfield;
}
.bollaert-cart__item-qty input.qty::-webkit-outer-spin-button,
.bollaert-cart__item-qty input.qty::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}
.bollaert-qty-btn {
	width: 32px;
	height: 36px;
	border: 0;
	background: transparent;
	color: var(--wp--preset--color--brand-dark);
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease;
}
.bollaert-qty-btn:hover {
	background: var(--wp--preset--color--brand-tint);
	color: var(--wp--preset--color--brand);
}

/* ------------------------------------------------------------- Actions */

.bollaert-cart__actions {
	display: flex;
	flex-wrap: wrap;
	gap: var(--wp--preset--spacing--3);
	align-items: center;
	margin-top: var(--wp--preset--spacing--4);
}
.bollaert-cart__coupon {
	display: flex;
	gap: var(--wp--preset--spacing--2);
	flex: 1 1 auto;
}
.bollaert-cart__coupon-input {
	flex: 0 1 220px;
	min-width: 0;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 999px;
	padding: 0.6em 1.1em;
	font-family: inherit;
	font-size: var(--wp--preset--font-size--sm);
	background: var(--wp--preset--color--white);
}
.bollaert-cart__coupon-input:focus {
	outline: none;
	border-color: var(--wp--preset--color--brand);
}
.bollaert-cart__update { margin-left: auto; }

/* Buttons */
.bollaert-cart__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.4em;
	padding: 0.7em 1.3em;
	border: 1px solid transparent;
	border-radius: 999px;
	font-family: inherit;
	font-size: var(--wp--preset--font-size--sm);
	font-weight: 600;
	line-height: 1;
	cursor: pointer;
	text-decoration: none;
	transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.bollaert-cart__btn--ghost {
	background: var(--wp--preset--color--white);
	border-color: var(--wp--preset--color--border);
	color: var(--wp--preset--color--brand-dark);
}
.bollaert-cart__btn--ghost:hover {
	border-color: var(--wp--preset--color--brand);
	color: var(--wp--preset--color--brand);
}
.bollaert-cart__btn--primary {
	background: var(--wp--preset--color--brand);
	color: var(--wp--preset--color--white);
}
.bollaert-cart__btn--primary:hover { background: var(--wp--preset--color--brand-dark); }

/* --------------------------------------------------------- Order summary */

.bollaert-cart-totals {
	position: sticky;
	top: 96px;
	background: var(--wp--preset--color--white);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 16px;
	padding: var(--wp--preset--spacing--5);
	box-shadow: var(--wp--preset--shadow--medium);
}
.bollaert-cart-totals__title {
	margin: 0 0 var(--wp--preset--spacing--4);
	font-size: var(--wp--preset--font-size--lg);
}
.bollaert-cart-totals__rows { display: flex; flex-direction: column; gap: var(--wp--preset--spacing--3); }
.bollaert-cart-totals__row {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: var(--wp--preset--spacing--3);
	font-size: var(--wp--preset--font-size--sm);
	color: var(--wp--preset--color--muted);
}
.bollaert-cart-totals__row span:last-child {
	color: var(--wp--preset--color--text);
	font-weight: 600;
	text-align: right;
}
.bollaert-cart-totals__row.is-discount span:last-child { color: var(--wp--preset--color--success); }
.bollaert-cart-totals__row.is-total {
	margin-top: var(--wp--preset--spacing--2);
	padding-top: var(--wp--preset--spacing--3);
	border-top: 1px solid var(--wp--preset--color--border);
	font-size: var(--wp--preset--font-size--md);
}
.bollaert-cart-totals__row.is-total span { color: var(--wp--preset--color--text); }
.bollaert-cart-totals__row.is-total span:last-child {
	min-width: 0;
	font-size: var(--wp--preset--font-size--lg);
	font-weight: 800;
	color: var(--wp--preset--color--brand);
	overflow-wrap: anywhere;
}
/* Keep the "(inclusief … BTW)" tax note on its own line so it can't overflow. */
.bollaert-cart-totals__row.is-total small {
	display: block;
	margin-top: 2px;
	font-size: var(--wp--preset--font-size--xs);
	font-weight: 500;
	color: var(--wp--preset--color--muted);
}
.bollaert-cart-totals__shipping table { width: 100%; border: 0; margin: 0; font-size: var(--wp--preset--font-size--sm); }
.bollaert-cart-totals__shipping th { text-align: left; font-weight: 500; color: var(--wp--preset--color--muted); padding: 0; }
.bollaert-cart-totals__shipping td { text-align: right; padding: 0; }
.bollaert-cart-totals__shipping ul { margin: 0; padding: 0; list-style: none; }

/* Checkout CTA (WC outputs a.checkout-button) */
.bollaert-cart-totals__checkout { margin-top: var(--wp--preset--spacing--5); }
.bollaert-cart-totals__checkout .checkout-button,
.bollaert-cart-totals__checkout a.button {
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
	padding: 0.95em 1.2em;
	border-radius: 999px;
	background: #22c55e;             /* vivid green checkout CTA */
	color: var(--wp--preset--color--white);
	font-size: var(--wp--preset--font-size--md);
	font-weight: 700;
	text-align: center;
	white-space: normal;
	text-decoration: none;
	transition: background-color 0.15s ease;
}
.bollaert-cart-totals__checkout .checkout-button:hover,
.bollaert-cart-totals__checkout a.button:hover { background: #16a34a; }

.bollaert-cart-totals__assurances {
	margin: var(--wp--preset--spacing--4) 0 0;
	padding: var(--wp--preset--spacing--4) 0 0;
	border-top: 1px solid var(--wp--preset--color--border);
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--2);
}
.bollaert-cart-totals__assurances li {
	display: flex;
	align-items: center;
	gap: 0.5em;
	font-size: var(--wp--preset--font-size--sm);
	color: var(--wp--preset--color--muted);
}
.bollaert-cart-totals__assurances svg { color: var(--wp--preset--color--brand); flex-shrink: 0; }

/* Coupon, now inside the summary card */
.bollaert-cart-totals__coupon {
	margin-top: var(--wp--preset--spacing--4);
	padding-top: var(--wp--preset--spacing--4);
	border-top: 1px solid var(--wp--preset--color--border);
}
.bollaert-cart-totals__coupon-label {
	display: block;
	margin-bottom: var(--wp--preset--spacing--2);
	font-size: var(--wp--preset--font-size--sm);
	font-weight: 600;
	color: var(--wp--preset--color--text);
}
.bollaert-cart-totals__coupon-row {
	display: flex;
	gap: var(--wp--preset--spacing--2);
}
.bollaert-cart-totals__coupon-input {
	flex: 1 1 auto;
	min-width: 0;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 999px;
	padding: 0.75em 1.1em;
	font-family: inherit;
	font-size: var(--wp--preset--font-size--sm);
	background: var(--wp--preset--color--white);
}
.bollaert-cart-totals__coupon-input:focus {
	outline: none;
	border-color: var(--wp--preset--color--brand);
}
.bollaert-cart-totals__coupon .bollaert-cart__btn { flex: 0 0 auto; }

/* Continue-shopping link in the cart actions */
.bollaert-cart__continue {
	display: inline-flex;
	align-items: center;
	font-size: var(--wp--preset--font-size--sm);
	font-weight: 600;
	color: var(--wp--preset--color--brand);
	text-decoration: none;
}
.bollaert-cart__continue:hover { color: var(--wp--preset--color--brand-dark); }

/* ----------------------------------------------------------- Suggestions */

.bollaert-cart-suggest { margin-top: var(--wp--preset--spacing--10); }
.bollaert-cart-suggest__title {
	margin: 0 0 var(--wp--preset--spacing--5);
	font-size: var(--wp--preset--font-size--xl);
}
.bollaert-cart-suggest__grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
	gap: var(--wp--preset--spacing--4);
}
/* Smaller, image-filled suggestion cards (the photo fills the card top). */
.bollaert-cart-suggest .bollaert-product-card__media {
	display: block;
	aspect-ratio: 1 / 1;
	overflow: hidden;
}
.bollaert-cart-suggest .bollaert-product-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* ------------------------------------------------------------- Empty cart */

.bollaert-cart-empty {
	text-align: center;
	padding: var(--wp--preset--spacing--12) var(--wp--preset--spacing--4);
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--wp--preset--spacing--4);
}
.bollaert-cart-empty__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 80px;
	height: 80px;
	border-radius: 999px;
	background: var(--wp--preset--color--brand-tint);
	color: var(--wp--preset--color--brand);
}
.bollaert-cart-empty__msg { margin: 0; font-size: var(--wp--preset--font-size--lg); color: var(--wp--preset--color--muted); }

/* ------------------------------------------------------------ Responsive */

@media (max-width: 980px) {
	.bollaert-cart__layout { grid-template-columns: 1fr; }
	.bollaert-cart-totals { position: static; }
}

@media (max-width: 560px) {
	.bollaert-cart__item {
		grid-template-columns: 56px minmax(0, 1fr) auto;
		grid-template-areas:
			"media info x"
			"media qty  subtotal";
		row-gap: var(--wp--preset--spacing--2);
		column-gap: var(--wp--preset--spacing--3);
	}
	.bollaert-cart__item.is-accessory {
		grid-template-columns: 44px minmax(0, 1fr) auto;
		padding-left: var(--wp--preset--spacing--5);
	}
	.bollaert-cart__item-media { align-self: start; }
	.bollaert-cart__item-qty { justify-self: start; }
	.bollaert-cart__item-subtotal { justify-self: end; align-self: end; }
	.bollaert-cart__item-x { justify-self: end; align-self: start; }
	.bollaert-cart__update { margin-left: 0; }
	.bollaert-cart-suggest__grid { grid-template-columns: repeat(2, 1fr); gap: var(--wp--preset--spacing--4); }
}
