/**
 * EC Cart 1.4.1
 * Locatie: wp-content/mu-plugins/ec/cart/ec-cart.css
 * Gebruikt bestaande tokens uit het GeneratePress palet. Geen nieuwe :root variabelen.
 */

/* ==========================================================================
   Productnaam en kenmerken (winkelwagen en checkout, alle schermen)
   ========================================================================== */

.ec-cart-item__title,
body.woocommerce-cart table.cart td.product-name span.ec-cart-item__title.ec-cart-item__title,
body.woocommerce-checkout table.shop_table td.product-name span.ec-cart-item__title.ec-cart-item__title {
	display: block !important;
	font-weight: 600;
	line-height: 1.3;
	color: var(--contrast);
}

.ec-cart-item__link,
.ec-cart-item__link:visited {
	color: inherit;
	text-decoration: none;
}

.ec-cart-item__link:hover,
.ec-cart-item__link:focus {
	text-decoration: underline;
}

/* Kenmerken: elke rij een eigen regel, labels en waarden in vaste kolommen */
.ec-cart-item__meta,
body.woocommerce-cart table.cart td.product-name span.ec-cart-item__meta.ec-cart-item__meta,
body.woocommerce-checkout table.shop_table td.product-name span.ec-cart-item__meta.ec-cart-item__meta {
	display: grid !important;
	grid-template-columns: max-content minmax(0, 1fr);
	column-gap: 1rem;
	row-gap: 0.25rem;
	margin: 0.625rem 0 0;
	padding: 0;
	font-size: 0.875rem;
	line-height: 1.5;
	letter-spacing: 0;
	text-transform: none;
}

.ec-cart-item__meta-row,
body.woocommerce-cart table.cart td.product-name span.ec-cart-item__meta-row.ec-cart-item__meta-row,
body.woocommerce-checkout table.shop_table td.product-name span.ec-cart-item__meta-row.ec-cart-item__meta-row {
	display: contents !important;
}

.ec-cart-item__meta-label,
body.woocommerce-cart table.cart td.product-name span.ec-cart-item__meta-label.ec-cart-item__meta-label,
body.woocommerce-checkout table.shop_table td.product-name span.ec-cart-item__meta-label.ec-cart-item__meta-label {
	display: block !important;
	font-weight: 400;
	color: var(--contrast-2);
}

.ec-cart-item__meta-label::first-letter,
body.woocommerce-cart table.cart td.product-name span.ec-cart-item__meta-label.ec-cart-item__meta-label::first-letter,
body.woocommerce-checkout table.shop_table td.product-name span.ec-cart-item__meta-label.ec-cart-item__meta-label::first-letter {
	text-transform: uppercase;
}

.ec-cart-item__meta-value,
body.woocommerce-cart table.cart td.product-name span.ec-cart-item__meta-value.ec-cart-item__meta-value,
body.woocommerce-checkout table.shop_table td.product-name span.ec-cart-item__meta-value.ec-cart-item__meta-value {
	display: block !important;
	font-weight: 500;
	color: var(--contrast);
}

/* ==========================================================================
   Checkout: besteloverzicht met afbeelding
   ========================================================================== */

.ec-cart-item--checkout {
	display: flex !important;
	align-items: flex-start;
	gap: 0.75rem;
}

.ec-cart-item--checkout .ec-cart-item__thumb {
	display: block !important;
	flex: 0 0 64px;
	width: 64px;
}

.ec-cart-item--checkout .ec-cart-item__thumb img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: var(--radius-lg);
	background: var(--base-2);
}

.ec-cart-item--checkout .ec-cart-item__body {
	display: block !important;
	flex: 1 1 auto;
	min-width: 0;
}

.woocommerce-checkout-review-order-table td.product-name {
	padding-top: 0.75rem;
	padding-bottom: 0.75rem;
}

.woocommerce-checkout-review-order-table td.product-total {
	vertical-align: top;
	padding-top: 0.75rem;
	white-space: nowrap;
	font-weight: 600;
}

/* ==========================================================================
   Winkelwagen: verwijderen als afvalbakje (alle schermen)
   Het kruisje blijft in de HTML staan voor schermlezers (aria-label van WooCommerce).
   ========================================================================== */

.woocommerce-cart table.cart td.product-remove a.remove {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.25rem;
	height: 2.25rem;
	font-size: 0 !important;
	line-height: 1;
	color: var(--contrast-2) !important;
	background: transparent !important;
	border: 0 !important;
	box-shadow: none !important;
	border-radius: 50%;
	text-decoration: none;
}

.woocommerce-cart table.cart td.product-remove a.remove::before {
	content: "";
	display: block;
	width: 1.25rem;
	height: 1.25rem;
	background-color: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7h16M10 11v6M14 11v6M6 7l1 12a2 2 0 0 0 2 2h6a2 2 0 0 0 2-2l1-12M9 7V4a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v3'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7h16M10 11v6M14 11v6M6 7l1 12a2 2 0 0 0 2 2h6a2 2 0 0 0 2-2l1-12M9 7V4a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v3'/%3E%3C/svg%3E") center / contain no-repeat;
}

.woocommerce-cart table.cart td.product-remove a.remove:hover,
.woocommerce-cart table.cart td.product-remove a.remove:focus-visible {
	color: var(--contrast) !important;
	background: var(--base-2) !important;
}

/* ==========================================================================
   Winkelwagen desktop: iets grotere afbeelding
   ========================================================================== */

@media (min-width: 769px) {
	.woocommerce-cart table.cart td.product-thumbnail img {
		width: 80px;
		height: auto;
		border-radius: var(--radius-lg);
		background: var(--base-2);
	}
}

/* ==========================================================================
   Winkelwagen mobiel: kaart per product
   Zelfde breekpunt als woocommerce-smallscreen.css (768px)
   ========================================================================== */

@media (max-width: 768px) {

	.woocommerce-cart table.shop_table_responsive.cart,
	.woocommerce-cart table.shop_table_responsive.cart tbody {
		display: block;
		border: 0;
	}

	.woocommerce-cart table.shop_table_responsive.cart tr.cart_item {
		display: grid;
		grid-template-columns: 96px minmax(0, 1fr) auto;
		grid-template-areas:
			"thumb name  remove"
			"thumb qty   total";
		column-gap: 0.875rem;
		row-gap: 0.75rem;
		align-items: start;
		padding: 1rem 0;
		margin: 0;
		background: transparent;
		border: 0;
		border-bottom: 1px solid var(--dust-grey);
	}

	/* Reset van de standaard "label links, waarde rechts" weergave */
	.woocommerce-cart table.shop_table_responsive.cart tr.cart_item td {
		display: block;
		padding: 0;
		border: 0;
		background: transparent !important;
		text-align: left !important;
	}

	.woocommerce-cart table.shop_table_responsive.cart tr.cart_item td::before {
		display: none !important;
		content: none !important;
	}

	/* Afbeelding. WooCommerce verbergt deze standaard op mobiel. */
	.woocommerce-cart table.shop_table_responsive.cart tr.cart_item td.product-thumbnail {
		display: block !important;
		grid-area: thumb;
		grid-row: 1 / span 2;
	}

	.woocommerce-cart table.shop_table_responsive.cart tr.cart_item td.product-thumbnail a {
		display: block;
	}

	.woocommerce-cart table.shop_table_responsive.cart tr.cart_item td.product-thumbnail img {
		display: block;
		width: 100%;
		max-width: none;
		height: auto;
		border-radius: var(--radius-lg);
		background: var(--base-2);
	}

	/* Naam en kenmerken */
	.woocommerce-cart table.shop_table_responsive.cart tr.cart_item td.product-name {
		grid-area: name;
	}

	/* Verwijderen, rechtsboven */
	.woocommerce-cart table.shop_table_responsive.cart tr.cart_item td.product-remove {
		grid-area: remove;
		justify-self: end;
		margin: -0.4rem -0.4rem 0 0;
	}

	/* Stukprijs verbergen, het subtotaal per regel blijft zichtbaar */
	.woocommerce-cart table.shop_table_responsive.cart tr.cart_item td.product-price {
		display: none !important;
	}

	/* Aantal */
	.woocommerce-cart table.shop_table_responsive.cart tr.cart_item td.product-quantity {
		grid-area: qty;
		align-self: end;
	}

	/* Een geheel: min, getal en plus even hoog, randen tegen elkaar aan.
	   Werkt los van de gebruikte elementen (button, a of span) voor min en plus. */
	body.woocommerce-cart table.cart tr.cart_item td.product-quantity .quantity {
		display: inline-flex !important;
		flex-wrap: nowrap;
		align-items: stretch;
		float: none;
		width: auto;
		height: 2.75rem;
		margin: 0;
		padding: 0;
		border: 1px solid var(--dust-grey);
		border-radius: var(--radius-lg);
		overflow: hidden;
		background: var(--base-3, #fff);
	}

	body.woocommerce-cart table.cart tr.cart_item td.product-quantity .quantity > * {
		display: flex !important;
		align-items: center;
		justify-content: center;
		flex: 0 0 2.75rem;
		width: 2.75rem !important;
		min-width: 0;
		height: auto !important;
		min-height: 0 !important;
		margin: 0 !important;
		padding: 0 !important;
		border: 0 !important;
		border-radius: 0 !important;
		box-shadow: none !important;
		background: transparent;
		font-size: 1rem;
		line-height: 1;
		color: var(--contrast);
	}

	/* Verborgen label voor schermlezers niet meetellen in de rij */
	body.woocommerce-cart table.cart tr.cart_item td.product-quantity .quantity > label,
	body.woocommerce-cart table.cart tr.cart_item td.product-quantity .quantity > .screen-reader-text {
		display: none !important;
	}

	body.woocommerce-cart table.cart tr.cart_item td.product-quantity .quantity > input.qty {
		flex-basis: 3rem;
		width: 3rem !important;
		border-left: 1px solid var(--dust-grey) !important;
		border-right: 1px solid var(--dust-grey) !important;
		text-align: center;
		font-weight: 600;
		-moz-appearance: textfield;
		appearance: textfield;
	}

	body.woocommerce-cart table.cart tr.cart_item td.product-quantity .quantity > input.qty::-webkit-outer-spin-button,
	body.woocommerce-cart table.cart tr.cart_item td.product-quantity .quantity > input.qty::-webkit-inner-spin-button {
		-webkit-appearance: none;
		margin: 0;
	}

	/* Subtotaal, rechtsonder */
	.woocommerce-cart table.shop_table_responsive.cart tr.cart_item td.product-subtotal {
		grid-area: total;
		align-self: end;
		justify-self: end;
		text-align: right !important;
		font-size: 1.0625rem;
		font-weight: 700;
		white-space: nowrap;
		color: var(--contrast);
	}

	/* Kortingscode en bijwerken: los van de kaarten */
	.woocommerce-cart table.shop_table_responsive.cart tr:not(.cart_item) td.actions {
		padding: 1rem 0 0;
		background: transparent !important;
		border: 0;
	}
}