/*
 * Winkelmand-lade (inc/winkelmand.php, partials/woocommerce/winkelmand-inhoud.php, js/winkelmand.js).
 * Schuift vanaf rechts over de pagina; de lijst scrolt, kop en voet (subtotaal + knoppen) blijven staan.
 */
.winkelmand-lade-wrap {
	--wm-breedte: 440px;
	--wm-tekst: #1f2b3a;
	--wm-zacht: #5b6672;
	--wm-rand: #e1e6eb;
	--wm-vlak: #f5f7f9;
	--wm-blauw: var(--blauw-color, #004268);
	--wm-oranje: var(--oranje-color, #FF7028);
	--wm-groen: var(--green-color, #3E9629);
	position: fixed;
	inset: 0;
	z-index: 100000;
	visibility: hidden;
	pointer-events: none;
	transition: visibility 0s linear .35s;
	font-size: 14.5px;
	line-height: 1.5;
}
.winkelmand-lade-wrap.is-open { visibility: visible; pointer-events: auto; transition-delay: 0s; }
.winkelmand-lade-wrap.is-open .winkelmand-achtergrond { opacity: 1; }
.winkelmand-lade-wrap.is-open .winkelmand-lade { transform: translateX(0); }
.winkelmand-lade-wrap.is-bezig .winkelmand-inhoud { opacity: .5; pointer-events: none; }
body.winkelmand-open { overflow: hidden; }

.winkelmand-achtergrond {
	position: absolute; inset: 0;
	background: rgba(0, 30, 50, .55);
	opacity: 0; transition: opacity .35s ease;
}
.winkelmand-lade {
	position: absolute; top: 0; right: 0;
	display: flex; flex-direction: column;
	width: min(var(--wm-breedte), 100vw);
	height: 100%; height: 100dvh;
	background: var(--wm-vlak); color: var(--wm-tekst);
	box-shadow: -12px 0 40px rgba(0, 30, 50, .2);
	transform: translateX(100%);
	transition: transform .35s cubic-bezier(.22, 1, .36, 1);
	outline: none;
}
@media (prefers-reduced-motion: reduce) {
	.winkelmand-lade, .winkelmand-achtergrond, .winkelmand-lade-wrap { transition-duration: 0s; }
}

/* ----- Kop ----- */
.winkelmand-kop {
	display: flex; align-items: center; justify-content: space-between; gap: 1rem;
	flex: none; padding: 18px 24px;
	background: var(--wm-blauw); color: #fff;
}
.winkelmand-kop h2 {
	margin: 0 !important; color: #fff !important;
	font-size: 20px !important; font-weight: 700; line-height: 1.2; text-transform: uppercase;
}
.winkelmand-sluiten, .winkelmand-item-verwijder {
	position: relative; flex: none; border: 0; background: transparent; cursor: pointer; padding: 0;
	transition: background-color .2s ease, color .2s ease;
}
.winkelmand-sluiten { width: 36px; height: 36px; color: #fff; }
.winkelmand-sluiten:hover { background: rgba(255, 255, 255, .15); }
.winkelmand-item-verwijder { width: 26px; height: 26px; margin: -3px -4px 0 0; color: var(--wm-zacht); }
.winkelmand-item-verwijder:hover { background: #fde9df; color: var(--wm-oranje); }
.winkelmand-sluiten::before, .winkelmand-sluiten::after,
.winkelmand-item-verwijder::before, .winkelmand-item-verwijder::after {
	content: ''; position: absolute; top: 50%; left: 50%;
	width: 14px; height: 2px; background: currentColor;
	transform: translate(-50%, -50%) rotate(45deg);
}
.winkelmand-sluiten::before, .winkelmand-sluiten::after { width: 18px; }
.winkelmand-sluiten::after, .winkelmand-item-verwijder::after { transform: translate(-50%, -50%) rotate(-45deg); }

/* ----- Foutmelding ----- */
.winkelmand-fout {
	flex: none; margin: 0; padding: 12px 24px;
	background: #fde9df; color: #b5420c; font-size: 13px; font-weight: 600;
}
.winkelmand-fout[hidden] { display: none; }

/* ----- Inhoud: lijst scrolt, voet blijft staan ----- */
.winkelmand-inhoud { display: flex; flex: 1; flex-direction: column; min-height: 0; transition: opacity .2s ease; }
.winkelmand-lijst {
	flex: 1; min-height: 0; margin: 0 !important; padding: 4px 24px !important;
	overflow-y: auto; overscroll-behavior: contain; list-style: none;
}
.winkelmand-item {
	display: flex; gap: 14px; padding: 16px 0;
	border-bottom: 1px solid var(--wm-rand); list-style: none;
}
.winkelmand-item:last-child { border-bottom: 0; }
.winkelmand-item-afbeelding {
	flex: none; width: 84px; height: 84px; padding: 6px;
	background: #fff; border: 1px solid var(--wm-rand);
}
.winkelmand-item-afbeelding img { display: block; width: 100%; height: 100%; object-fit: contain; }
.winkelmand-item-inhoud { display: flex; flex: 1; flex-direction: column; gap: 4px; min-width: 0; }
.winkelmand-item-kop { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.winkelmand-item-titel {
	margin: 0 !important; font-size: 14px !important; font-weight: 700; line-height: 1.35;
	text-transform: none; color: var(--wm-tekst);
}
.winkelmand-item-titel a { color: var(--wm-tekst); text-decoration: none; transition: color .2s ease; }
.winkelmand-item-titel a:hover { color: var(--wm-blauw); text-decoration: underline; }
.winkelmand-item-variatie { margin: 0; color: var(--wm-zacht); font-size: 12px; line-height: 1.5; }
.winkelmand-item-variatie dl, .winkelmand-item-variatie dd, .winkelmand-item-variatie dt, .winkelmand-item-variatie p { display: inline; margin: 0; }
.winkelmand-item-onder { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; }
.winkelmand-item-prijs { font-size: 15px; font-weight: 700; color: var(--wm-blauw); white-space: nowrap; }
.winkelmand-item-prijs { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.25; }
.winkelmand-item-prijs del { font-size: 12px; font-weight: 400; color: var(--wm-zacht); }
.winkelmand-item-prijs ins { text-decoration: none; }
.winkelmand-item-prijs small, .winkelmand-subtotaal-prijs small { font-size: 11px; font-weight: 400; color: var(--wm-zacht); }
.winkelmand-subtotaal-incl { margin: 0; text-align: right; color: var(--wm-zacht); font-size: 12px; }

/* Aantal-stepper */
.winkelmand-aantal { display: inline-flex; align-items: stretch; height: 34px; background: #fff; border: 1px solid #d8d8d8; }
.winkelmand-aantal button {
	width: 32px; border: 0; background: transparent; color: var(--wm-tekst);
	font-size: 16px; line-height: 1; cursor: pointer; transition: background-color .2s ease;
}
.winkelmand-aantal button:hover:not([disabled]) { background: var(--wm-vlak); color: var(--wm-blauw); }
.winkelmand-aantal button[disabled] { opacity: .35; cursor: default; }
.winkelmand-aantal input {
	width: 38px; border: 0; border-left: 1px solid #e4e4e4; border-right: 1px solid #e4e4e4;
	text-align: center; font-size: 13px; font-weight: 700; color: var(--wm-tekst); background: #fff;
	-moz-appearance: textfield; appearance: textfield;
}
.winkelmand-aantal input::-webkit-inner-spin-button, .winkelmand-aantal input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

/* ----- Lege winkelwagen ----- */
.winkelmand-leeg {
	display: flex; flex: 1; flex-direction: column; align-items: center; justify-content: center;
	gap: 8px; padding: 40px 24px; text-align: center;
}
.winkelmand-leeg-icoon { width: 56px; height: 56px; margin-bottom: 8px; color: var(--wm-oranje); }
.winkelmand-leeg p { margin: 0; color: var(--wm-zacht); font-size: 14px; }
.winkelmand-leeg .winkelmand-leeg-titel { color: var(--wm-blauw); font-size: 20px; font-weight: 700; }
.winkelmand-leeg .winkelmand-knop { margin-top: 16px; width: auto; padding-left: 32px; padding-right: 32px; }

/* ----- Voet: verzendbalk, subtotaal, knoppen ----- */
.winkelmand-voet { flex: none; padding: 16px 24px 20px; border-top: 1px solid var(--wm-rand); background: #fff; }
.winkelmand-verzending { margin-bottom: 16px; }
.winkelmand-verzending-tekst { margin: 0 0 8px; color: var(--wm-zacht); font-size: 13px; }
.winkelmand-verzending-tekst .woocommerce-Price-amount { color: var(--wm-tekst); font-weight: 700; }
.winkelmand-verzending-balk { height: 6px; background: #e7ebef; overflow: hidden; }
.winkelmand-verzending-balk span { display: block; height: 100%; background: var(--wm-oranje); transition: width .4s ease; }
.winkelmand-verzending.is-bereikt .winkelmand-verzending-tekst { color: var(--wm-groen); font-weight: 700; }
.winkelmand-verzending.is-bereikt .winkelmand-verzending-balk span { background: var(--wm-groen); }
.winkelmand-subtotaal {
	display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
	font-size: 15px; font-weight: 700; color: var(--wm-tekst);
}
.winkelmand-subtotaal small { color: var(--wm-zacht); font-size: 12px; font-weight: 400; }
.winkelmand-subtotaal-prijs { font-size: 20px; color: var(--wm-blauw); }
.winkelmand-toelichting { margin: 4px 0 0; color: var(--wm-zacht); font-size: 12px; }
.winkelmand-knoppen { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.winkelmand-knop {
	display: block; width: 100%; padding: 13px 16px; text-align: center;
	background: var(--wm-oranje); border: 1px solid var(--wm-oranje); color: #fff !important;
	font-size: 15px; font-weight: 700; text-decoration: none !important;
	transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}
.winkelmand-knop:hover { background: #e85f1b; border-color: #e85f1b; }
.winkelmand-knop.is-omlijnd { background: #fff; border-color: var(--wm-blauw); color: var(--wm-blauw) !important; }
.winkelmand-knop.is-omlijnd:hover { background: var(--wm-blauw); color: #fff !important; }
.winkelmand-tekstlink {
	align-self: center; margin-top: 4px; padding: 4px; border: 0; background: none; cursor: pointer;
	color: var(--wm-blauw); font-weight: 600; text-decoration: underline; text-underline-offset: 3px;
}
.winkelmand-tekstlink:hover { color: var(--wm-oranje); }

/* Foutmelding onder het koopformulier op de productpagina */
.winkelmand-formulier-fout { margin: 12px 0 0; color: #b5420c; font-size: 13px; font-weight: 600; }

/* Laadstatus op knoppen tijdens toevoegen */
.single_add_to_cart_button.loading, .add-to-cart-button .loading, button.loading { opacity: .7; cursor: progress; }

@media (max-width: 575px) {
	.winkelmand-kop, .winkelmand-lijst, .winkelmand-voet, .winkelmand-fout { padding-left: 18px !important; padding-right: 18px !important; }
	.winkelmand-item-afbeelding { width: 68px; height: 68px; }
}
