/*
 * Winkelmand (winkelmand.php), live sinds 7 oktober 2026.
 *
 * Rustig, in de kleuren van de site: petrol voor tekst die iets zegt, salie
 * voor lijnen, oranje alleen voor de knop die bestelt. Kleuren en vormen van
 * knoppen gaan via de variabelen van Blocksy (zoals .single_add_to_cart_button
 * op de productpagina), niet met zwaardere selectors.
 *
 * Dit bestand laadt met de vlag op elke pagina, want de verzendbalk staat ook
 * in de mini-winkelmand. Alles voor de winkelmand zelf begint met .nrd-mand.
 */

:root {
	--nrd-m-petrol: var(--theme-palette-color-10, #31545b);
	--nrd-m-salie: var(--theme-palette-color-1, #749b8d);
	--nrd-m-oranje: var(--theme-palette-color-3, #e94e1b);
	--nrd-m-oranje-donker: #c64217;
	--nrd-m-lijn: #d6e5df;
	--nrd-m-rustig: #557277;
}

/* Verzendbalk: één zin, de balk, en de grenzen eronder ------------------- */

.nrd-staffel-bericht--nieuw {
	display: block;
	font-size: 15px;
	line-height: 1.45;
	text-wrap: pretty;
}

.nrd-staffel-bericht--nieuw strong {
	font-weight: 700;
}

.nrd-schaal {
	grid-row: 3;
	position: relative;
	display: block;
	height: 36px;
	margin-top: 6px;
	font-size: 12px;
	line-height: 1.35;
}

.nrd-schaal__grens {
	position: absolute;
	top: 0;
	left: var(--nrd-plek);
	display: flex;
	flex-direction: column;
	align-items: center;
	transform: translateX(-50%);
	white-space: nowrap;
	opacity: 0.75;
}

/* De laatste grens (gratis) staat aan het eind van de balk: rechts uitlijnen. */
.nrd-schaal__grens:last-child {
	align-items: flex-end;
	transform: translateX(-100%);
}

/* Een streepje op de balk, boven de grens. 6px marge plus 5px balk. */
.nrd-schaal__grens::before {
	content: "";
	position: absolute;
	top: -12px;
	left: 50%;
	width: 2px;
	height: 6px;
	margin-left: -1px;
	background: var(--theme-palette-color-8, #fff);
}

.nrd-schaal__grens:last-child::before {
	display: none;
}

.nrd-schaal__grens--gehaald {
	opacity: 1;
}

.nrd-schaal__bedrag {
	font-weight: 700;
}

/* De winkelmand ---------------------------------------------------------- */

/* Lagere hero: geen kruimelpad (de ruimte zelf staat in de inline stijl). */
.nrd-mand .hero-section .ct-breadcrumbs {
	display: none;
}

.nrd-mand .checkout-button {
	--theme-button-background-initial-color: var(--nrd-m-oranje);
	--theme-button-background-hover-color: var(--nrd-m-oranje-donker);
	--theme-button-font-size: 19px;
	--theme-button-font-weight: 700;
	--theme-button-min-height: 56px;
	--theme-button-border-radius: 6px;
	letter-spacing: 0.01em;
}

.nrd-mand .checkout-button:focus-visible {
	outline: 3px solid var(--nrd-m-petrol);
	outline-offset: 3px;
}

/* De drie beloftes onder de knop (ook op afrekenen). */
.nrd-beloftes {
	display: grid;
	gap: 10px;
	margin: 20px 0 0;
	padding: 0;
	color: var(--nrd-m-petrol);
	font-size: 15px;
	line-height: 1.4;
	list-style: none;
}

.nrd-beloftes li {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0;
}

.nrd-beloftes a {
	color: inherit;
	text-decoration: underline;
	text-decoration-color: var(--nrd-m-lijn);
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
	transition: text-decoration-color 0.2s;
}

.nrd-beloftes a:hover {
	text-decoration-color: currentColor;
}

.nrd-mand-icoon {
	flex: none;
	width: 22px;
	height: 22px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.6;
	stroke-linecap: round;
	stroke-linejoin: round;
}

/*
 * Kortingscode: dicht tot een klik. De server zet de knop in het vak van het
 * veld ("Kortingscode" in winkelmand.php, live sinds 11 oktober 2026). Zolang
 * hij er staat zijn het veld en "Waardebon toepassen" weg: zo zie je het veld
 * niet eerst en daarna pas de tekst.
 *
 * De regel noemt wat er in het vak staat: het label, het veld en de knop van
 * WooCommerce. Eindigt een regel achter een :has() op een willekeurig element
 * (> :not(...), zoals eerst), dan rekent de browser na elke wijziging daaronder
 * alles opnieuw uit (zie zuinige-start.php).
 */
.coupon:has(> .nrd-code-knop) > :is(label, .input-text, .button) {
	display: none;
}

/*
 * In een browser zonder :has zet het script de knop voor het vak en geeft
 * het vak deze klasse (zet() in winkelmand.js).
 */
.nrd-mand .coupon.nrd-code--dicht {
	display: none;
}

/*
 * Op een telefoon geeft Blocksy het vak 0,8em ondermarge. Met alleen de knop
 * erin hoort die er niet bij: anders staat alles eronder 12px lager.
 */
.nrd-mand .coupon:has(> .nrd-code-knop) {
	margin-bottom: 0;
}

.nrd-code-knop {
	display: block;
	width: fit-content;
	margin-right: auto;
	padding: 8px 0;
	border: 0;
	background: none;
	color: var(--nrd-m-petrol);
	font: inherit;
	font-size: 15px;
	font-weight: 600;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
	cursor: pointer;
}

.nrd-code-knop:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 3px;
	border-radius: 4px;
}

/* Zonder JavaScript doet de knop niets: dan het veld, zoals het was. */
@media (scripting: none) {
	.coupon > .nrd-code-knop {
		display: none;
	}

	.coupon:has(> .nrd-code-knop) > :is(.input-text, .button) {
		display: revert;
	}
}

/*
 * Het pijltje van de kassa (.nrd-kassa-code > summary::after in
 * afrekenen-kader.css): het wijst omlaag en draait niet. Live sinds
 * 11 oktober 2026.
 */
.nrd-code-knop::after {
	content: "";
	display: inline-block;
	width: 7px;
	height: 7px;
	margin-left: 10px;
	border-right: 1.5px solid currentColor;
	border-bottom: 1.5px solid currentColor;
	transform: translateY(-2px) rotate(45deg);
	vertical-align: middle;
}

/* Onder de tabel: de suggestie en "Snel verzonden". */
.nrd-mand-extra {
	display: grid;
	gap: 40px;
	margin-top: 32px;
}

.nrd-mand-extra:empty {
	display: none;
}

.nrd-mand-suggestie {
	display: grid;
	grid-template-columns: 72px minmax(0, 1fr) auto;
	align-items: center;
	gap: 18px;
	padding: 16px 20px 16px 16px;
	border: 1px solid var(--nrd-m-lijn);
	border-radius: 12px;
}

.nrd-mand-suggestie__foto img {
	display: block;
	width: 72px;
	height: 72px;
	object-fit: cover;
	border-radius: 8px;
}

.nrd-mand-suggestie .nrd-mand-suggestie__kop {
	margin: 0 0 4px;
	font-family: Acme, var(--theme-font-family, sans-serif);
	font-size: 19px;
	font-weight: 400;
	line-height: 1.25;
}

.nrd-mand-suggestie__kop a {
	color: var(--nrd-m-petrol);
	text-decoration: none;
}

.nrd-mand-suggestie__kop a:hover {
	text-decoration: underline;
	text-underline-offset: 3px;
}

.nrd-mand-suggestie p {
	margin: 0;
	color: var(--nrd-m-rustig);
	font-size: 15px;
	line-height: 1.5;
	text-wrap: pretty;
}

.nrd-mand-suggestie__maling {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 10px 0 0;
	color: var(--nrd-m-petrol);
	font-size: 14px;
	font-weight: 600;
}

.nrd-mand-suggestie__maling select {
	width: auto;
	min-width: 0;
	max-width: 100%;
	height: 36px;
	font-size: 14px;
}

.nrd-mand-suggestie__actie {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 8px;
}

.nrd-mand-suggestie__prijs {
	color: var(--nrd-m-petrol);
	font-size: 16px;
	font-weight: 700;
}

.nrd-mand-suggestie__knop {
	display: inline-flex;
	align-items: center;
	min-height: 40px;
	padding: 0 18px;
	border: 1.5px solid var(--nrd-m-petrol);
	border-radius: 999px;
	color: var(--nrd-m-petrol);
	font-size: 15px;
	font-weight: 700;
	text-decoration: none;
	white-space: nowrap;
	transition: background-color 0.2s, color 0.2s;
}

.nrd-mand-suggestie__knop:hover,
.nrd-mand-suggestie__knop:focus-visible {
	background: var(--nrd-m-petrol);
	color: #fff;
}

.nrd-mand-suggestie__knop:focus-visible {
	outline: 2px solid var(--nrd-m-petrol);
	outline-offset: 3px;
}

/* "Snel verzonden": de opmaak van het smaakbewijs op de productpagina. */
.nrd-smaak--mand {
	margin: 0;
}

.nrd-smaak--mand .nrd-mand-icoon {
	width: 24px;
	height: 24px;
	margin-top: 1px;
	color: var(--theme-palette-color-2, #121723);
}

/*
 * Mobiel en tablet: Blocksy zet formulier en totaal onder elkaar. De
 * suggestie en "Snel verzonden" komen dan na het totaal en de knop, anders
 * duwen ze de knop een scherm omlaag. Het formulier wordt display: contents,
 * zodat zijn kinderen naast het totaal kunnen schuiven; in de DOM blijft
 * alles staan waar het stond, dus versturen werkt als altijd.
 */
@media (max-width: 999.98px) {
	.nrd-mand .ct-woocommerce-cart-form {
		display: flex;
		flex-direction: column;
	}

	.nrd-mand .woocommerce-cart-form {
		display: contents;
	}

	/*
	 * Blocksy houdt het totaal sticky. Nu er iets onder staat, schoof het bij
	 * het scrollen over de suggestie heen. Zelfde gewicht als de regel van
	 * Blocksy; dit bestand laadt na ct-woocommerce-styles.
	 */
	.nrd-mand .cart_totals {
		position: relative;
		top: auto;
	}

	.nrd-mand .nrd-mand-extra {
		order: 2;
		margin-top: 40px;
	}
}

@media (max-width: 689.98px) {
	.nrd-mand-suggestie {
		grid-template-columns: 56px minmax(0, 1fr);
		gap: 12px 14px;
		padding: 14px;
	}

	.nrd-mand-suggestie__foto img {
		width: 56px;
		height: 56px;
	}

	.nrd-mand-suggestie__maling {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 10px 0 0;
	color: var(--nrd-m-petrol);
	font-size: 14px;
	font-weight: 600;
}

.nrd-mand-suggestie__maling select {
	width: auto;
	min-width: 0;
	max-width: 100%;
	height: 36px;
	font-size: 14px;
}

.nrd-mand-suggestie__actie {
		grid-column: 1 / -1;
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
	}
}

@media (prefers-reduced-motion: reduce) {
	.nrd-beloftes a,
	.nrd-mand-suggestie__knop {
		transition: none;
	}
}

/* De tip voor een cadeaubon achter "Nog €8 en je verzending is gratis."
   (cadeaubon-inwisselen.php, achter de vlag). Een gewone link in de zin. */
.nrd-verzendtip {
	color: var(--nrd-m-petrol);
	font-weight: 700;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}

.nrd-verzendtip:hover {
	text-decoration-thickness: 2px;
}
