/* MDS Productfilter – kleuren en afronding komen uit de instellingen (inline variabelen). */

.mds-pf {
	--mds-pf-primary: #1a1a1a;
	--mds-pf-text: #1a1a1a;
	--mds-pf-muted: #6b6b6b;
	--mds-pf-surface: #f4f4f2;
	--mds-pf-radius: 8px;
	--mds-pf-line: color-mix(in srgb, var(--mds-pf-text) 13%, transparent);
	--mds-pf-head: "Montserrat", Arial, Helvetica, sans-serif;

	position: relative;
	color: var(--mds-pf-text);
	font-size: 14px;
	line-height: 1.45;
}
.mds-pf *, .mds-pf *::before, .mds-pf *::after { box-sizing: border-box; }
.mds-pf [hidden] { display: none !important; }
.mds-pf button { font: inherit; }
.mds-pf .screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Knop + paneelkop (alleen mobiel zichtbaar) ---------- */

.mds-pf-open {
	display: none;
	align-items: center;
	gap: 8px;
	min-height: 44px;
	padding: 10px 16px;
	border: 1px solid var(--mds-pf-line);
	border-radius: var(--mds-pf-radius);
	background: #fff;
	color: var(--mds-pf-text);
	font-family: var(--mds-pf-head) !important;
	font-weight: 800;
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: .04em;
	cursor: pointer;
}
.mds-pf-badge {
	display: inline-grid;
	place-items: center;
	min-width: 20px;
	height: 20px;
	padding: 0 6px;
	border-radius: 10px;
	background: var(--mds-pf-primary);
	color: #fff;
	font-size: 11px;
	letter-spacing: 0;
}
.mds-pf-panel-head { display: none; }
.mds-pf-title {
	font-family: var(--mds-pf-head);
	font-weight: 800;
	font-size: 15px;
	text-transform: uppercase;
	letter-spacing: .03em;
}

/* ---------- Groepen ---------- */

.mds-pf-group details > summary {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 14px 0;
	list-style: none;
	cursor: pointer;
	font-family: var(--mds-pf-head);
	font-weight: 800;
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: .04em;
	user-select: none;
}
.mds-pf-group details > summary::-webkit-details-marker { display: none; }
.mds-pf-group-label { flex: 1; }
.mds-pf-group-sel {
	display: inline-grid;
	place-items: center;
	min-width: 20px;
	height: 20px;
	padding: 0 6px;
	border-radius: 10px;
	background: var(--mds-pf-primary);
	color: #fff;
	font-size: 11px;
	letter-spacing: 0;
}
.mds-pf-chev { flex: none; transition: transform .2s; }
.mds-pf-group details[open] .mds-pf-chev { transform: rotate(180deg); }

/* Zijbalk */
.mds-pf--sidebar .mds-pf-group { border-bottom: 1px solid var(--mds-pf-line); }
.mds-pf--sidebar .mds-pf-group:first-child { border-top: 1px solid var(--mds-pf-line); }
.mds-pf--sidebar .mds-pf-opts, .mds-pf--sidebar .mds-pf-price { padding: 0 0 16px; }

/* ---------- Opties ---------- */

.mds-pf-opt {
	position: relative;
	display: flex;
	align-items: center;
	gap: 10px;
	cursor: pointer;
}
.mds-pf-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.mds-pf-opt.is-zero { opacity: .4; cursor: not-allowed; }
.mds-pf-opt input:focus-visible ~ .mds-pf-box,
.mds-pf-opt input:focus-visible ~ .mds-pf-swatch,
.mds-pf-opts--buttons .mds-pf-opt:has(input:focus-visible) { outline: 2px solid var(--mds-pf-primary); outline-offset: 2px; }
.mds-pf-count { margin-left: auto; color: var(--mds-pf-muted); font-size: 12px; }

/* Vinkjes */
.mds-pf-opts--checkbox { display: grid; gap: 9px; }
.mds-pf-box {
	flex: none;
	width: 18px;
	height: 18px;
	border: 1.5px solid color-mix(in srgb, var(--mds-pf-text) 35%, transparent);
	border-radius: 4px;
	background: #fff;
	transition: background .15s, border-color .15s;
}
.mds-pf-opt.is-on .mds-pf-box {
	border-color: var(--mds-pf-primary);
	background: var(--mds-pf-primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 13px no-repeat;
}

/* Knoppen (maten) */
.mds-pf-opts--buttons { display: flex; flex-wrap: wrap; gap: 6px; }
.mds-pf-opts--buttons .mds-pf-opt {
	justify-content: center;
	min-width: 42px;
	height: 40px;
	padding: 0 10px;
	border-radius: var(--mds-pf-radius);
	background: var(--mds-pf-surface);
	font-family: var(--mds-pf-head);
	font-weight: 800;
	font-size: 12px;
	text-transform: uppercase;
	transition: background .15s, color .15s;
}
.mds-pf-opts--buttons .mds-pf-opt:hover { background: color-mix(in srgb, var(--mds-pf-text) 10%, var(--mds-pf-surface)); }
.mds-pf-opts--buttons .mds-pf-opt.is-on { background: var(--mds-pf-primary); color: #fff; }
.mds-pf-opts--buttons .mds-pf-opt.is-zero { text-decoration: line-through; }

/* Kleurbolletjes */
.mds-pf-opts--swatches { display: flex; flex-wrap: wrap; gap: 10px 8px; }
.mds-pf-opts--swatches .mds-pf-opt.has-swatch .mds-pf-label,
.mds-pf-opts--swatches .mds-pf-opt.has-swatch .mds-pf-count { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.mds-pf-opts--swatches .mds-pf-opt:not(.has-swatch) {
	height: 32px;
	padding: 0 10px;
	border-radius: var(--mds-pf-radius);
	background: var(--mds-pf-surface);
	font-size: 12px;
}
.mds-pf-swatch {
	display: block;
	width: 32px;
	height: 32px;
	border-radius: 9px;
	background: var(--mds-pf-c, #ccc);
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12);
	transition: outline-offset .15s;
}
.mds-pf-opt.is-on .mds-pf-swatch { outline: 1.5px solid var(--mds-pf-text); outline-offset: 2px; }

/* Prijs */
.mds-pf-price { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mds-pf-price label > span { display: block; margin-bottom: 4px; font-size: 12px; color: var(--mds-pf-muted); }
.mds-pf-price input {
	width: 100%;
	min-height: 40px;
	padding: 8px 10px;
	border: 1px solid var(--mds-pf-line);
	border-radius: var(--mds-pf-radius);
	background: #fff;
	color: var(--mds-pf-text);
	font: inherit;
}
.mds-pf-price input:focus { outline: none; border-color: var(--mds-pf-primary); }

/* ---------- Gekozen filters ---------- */

.mds-pf-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 14px 0 0; }
.mds-pf-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	height: 30px;
	padding: 0 10px;
	border: 0;
	border-radius: 15px;
	background: var(--mds-pf-surface);
	color: var(--mds-pf-text);
	font-size: 12px !important;
	cursor: pointer;
}
.mds-pf-chip:hover { background: color-mix(in srgb, var(--mds-pf-text) 12%, var(--mds-pf-surface)); }
.mds-pf-reset { margin-left: 4px; color: var(--mds-pf-text) !important; font-size: 12px; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Toepassen ---------- */

.mds-pf-actions { margin-top: 16px; }
.mds-pf-apply {
	width: 100%;
	min-height: 46px;
	padding: 12px 20px;
	border: 0;
	border-radius: var(--mds-pf-radius);
	background: var(--mds-pf-primary);
	color: #fff;
	font-family: var(--mds-pf-head) !important;
	font-weight: 800;
	font-size: 13px !important;
	text-transform: uppercase;
	letter-spacing: .05em;
	cursor: pointer;
}
.mds-pf.is-ajax .mds-pf-actions { display: none; }   /* desktop: direct resultaat */

/* ---------- Filterbalk (desktop) ---------- */

@media (min-width: 768px) {
	.mds-pf--balk .mds-pf-groups { display: flex; flex-wrap: wrap; gap: 8px; }
	.mds-pf--balk .mds-pf-group { position: relative; }
	.mds-pf--balk .mds-pf-group details > summary {
		gap: 8px;
		min-height: 42px;
		padding: 0 14px;
		border: 1px solid var(--mds-pf-line);
		border-radius: var(--mds-pf-radius);
		background: #fff;
		font-size: 12px;
	}
	.mds-pf--balk .mds-pf-group.is-on details > summary { border-color: var(--mds-pf-text); }
	.mds-pf--balk .mds-pf-group details[open] > summary { border-color: var(--mds-pf-text); }
	.mds-pf--balk .mds-pf-group-label { flex: none; }
	.mds-pf--balk .mds-pf-opts,
	.mds-pf--balk .mds-pf-price {
		position: absolute;
		z-index: 50;
		top: calc(100% + 6px);
		left: 0;
		width: max-content;
		min-width: 240px;
		max-width: 340px;
		max-height: 360px;
		overflow: auto;
		padding: 16px;
		border-radius: var(--mds-pf-radius);
		background: #fff;
		box-shadow: 0 12px 32px rgba(0, 0, 0, .14), 0 0 0 1px var(--mds-pf-line);
	}
}

/* ---------- Mobiel paneel ---------- */

@media (max-width: 767px) {
	.mds-pf-open { display: inline-flex; }
	.mds-pf-panel {
		position: fixed;
		z-index: 99999;
		top: 0;
		bottom: 0;
		left: 0;
		width: min(88vw, 380px);
		display: flex;
		flex-direction: column;
		background: #fff;
		transform: translateX(-102%);
		transition: transform .28s ease;
		visibility: hidden;
	}
	.mds-pf.is-open .mds-pf-panel { transform: none; visibility: visible; }
	.mds-pf-panel-head {
		display: flex;
		align-items: center;
		justify-content: space-between;
		flex: none;
		padding: 14px 18px;
		border-bottom: 1px solid var(--mds-pf-line);
	}
	.mds-pf-close {
		width: 38px;
		height: 38px;
		padding: 0;
		border: 0;
		border-radius: 50%;
		background: var(--mds-pf-surface);
		color: var(--mds-pf-text);
		font-size: 22px !important;
		line-height: 1;
		cursor: pointer;
	}
	.mds-pf-form { flex: 1; display: flex; flex-direction: column; min-height: 0; }
	.mds-pf-groups { flex: 1; overflow: auto; padding: 0 18px; -webkit-overflow-scrolling: touch; }
	.mds-pf .mds-pf-group { border-bottom: 1px solid var(--mds-pf-line); border-top: 0 !important; }
	.mds-pf .mds-pf-opts, .mds-pf .mds-pf-price { padding: 0 0 16px; }
	.mds-pf-chips { order: -1; margin: 0; padding: 12px 18px; border-bottom: 1px solid var(--mds-pf-line); }
	.mds-pf.is-ajax .mds-pf-actions,
	.mds-pf-actions { display: block; flex: none; margin: 0; padding: 14px 18px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--mds-pf-line); }
	.mds-pf-backdrop {
		position: fixed;
		z-index: 99998;
		inset: 0;
		background: rgba(0, 0, 0, .4);
	}
	html.mds-pf-lock, html.mds-pf-lock body { overflow: hidden; }
}

/* ---------- Laden en leeg ---------- */

.mds-pf-loading { opacity: .45; pointer-events: none; transition: opacity .2s; }
.mds-pf.is-loading .mds-pf-apply { opacity: .7; }
.mds-pf-empty { padding: 40px 20px; text-align: center; border-radius: var(--mds-pf-radius, 8px); background: #f4f4f2; }
.mds-pf-empty p { margin: 0 0 8px; }
.mds-pf-empty a { color: inherit; text-decoration: underline; }

@media (prefers-reduced-motion: reduce) {
	.mds-pf *, .mds-pf-panel { transition: none !important; }
}

/* Zijbalk op desktop: gekozen filters bovenaan. */
@media (min-width: 768px) {
	.mds-pf--sidebar .mds-pf-form { display: flex; flex-direction: column; }
	.mds-pf--sidebar .mds-pf-chips { order: -1; margin: 0 0 14px; }
}

/* =====================================================================
   MAN-D-SIGN-stijl + bescherming tegen thema/Elementor-knopstijlen (v1.2)
   Dubbele klasse (.mds-pf.mds-pf) wint van o.a. .elementor-kit-x button.
   ===================================================================== */

.mds-pf.mds-pf { --mds-pf-line: color-mix(in srgb, var(--mds-pf-text) 12%, transparent); }

.mds-pf.mds-pf button {
	margin: 0;
	min-height: 0;
	width: auto;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
	box-shadow: none;
	color: inherit;
	font: inherit;
	text-transform: none;
	letter-spacing: normal;
	line-height: inherit;
}

/* Desktop: geen "Filters"-knop, filters staan er direct */
@media (min-width: 768px) {
	.mds-pf.mds-pf .mds-pf-open,
	.mds-pf.mds-pf .mds-pf-backdrop,
	.mds-pf.mds-pf .mds-pf-panel-head { display: none !important; }
	.mds-pf.mds-pf .mds-pf-panel { position: static; transform: none; visibility: visible; width: auto; background: none; }
}

/* Mobiel: knop "Filters" als pil */
@media (max-width: 767px) {
	.mds-pf.mds-pf .mds-pf-open {
		display: inline-flex !important;
		align-items: center;
		gap: 8px;
		min-height: 44px;
		padding: 10px 20px;
		border: 1px solid var(--mds-pf-line);
		border-radius: 999px;
		background: #fff;
		color: var(--mds-pf-text);
		font-family: var(--mds-pf-head);
		font-weight: 800;
		font-size: 12px;
		text-transform: uppercase;
		letter-spacing: .12em;
	}
	.mds-pf.mds-pf .mds-pf-close {
		display: grid;
		place-items: center;
		width: 38px;
		height: 38px;
		border-radius: 50%;
		background: #fff;
		box-shadow: 0 0 0 1px var(--mds-pf-line);
		font-size: 22px;
		line-height: 1;
	}
}

/* Kopjes van groepen */
.mds-pf.mds-pf .mds-pf-group details > summary { font-size: 12px; letter-spacing: .1em; }
.mds-pf.mds-pf .mds-pf-group-sel,
.mds-pf.mds-pf .mds-pf-badge { background: var(--mds-pf-primary); color: #fff; }

/* Maten: zoals op de productpagina (wit, afgerond, geselecteerd = zwarte rand) */
.mds-pf.mds-pf .mds-pf-opts--buttons { gap: 8px; }
.mds-pf.mds-pf .mds-pf-opts--buttons .mds-pf-opt,
.mds-pf.mds-pf .mds-pf-opts--swatches .mds-pf-opt:not(.has-swatch) {
	min-width: 40px;
	height: 40px;
	padding: 0 10px;
	border-radius: 10px;
	background: #fff;
	box-shadow: inset 0 0 0 1px var(--mds-pf-line), 0 1px 2px rgba(0, 0, 0, .04);
	color: var(--mds-pf-text);
	font-family: var(--mds-pf-head);
	font-weight: 800;
	font-size: 12px;
	text-transform: uppercase;
	transition: box-shadow .15s;
}
.mds-pf.mds-pf .mds-pf-opts--buttons .mds-pf-opt:hover,
.mds-pf.mds-pf .mds-pf-opts--swatches .mds-pf-opt:not(.has-swatch):hover { background: #fff; box-shadow: inset 0 0 0 1px var(--mds-pf-text); }
.mds-pf.mds-pf .mds-pf-opts--buttons .mds-pf-opt.is-on,
.mds-pf.mds-pf .mds-pf-opts--swatches .mds-pf-opt.is-on:not(.has-swatch) { background: #fff; color: var(--mds-pf-text); box-shadow: inset 0 0 0 1.5px var(--mds-pf-text); }

/* Kleuren: ronde bolletjes zoals op de productpagina */
.mds-pf.mds-pf .mds-pf-opts--swatches { gap: 10px; }
.mds-pf.mds-pf .mds-pf-swatch {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .14);
}
.mds-pf.mds-pf .mds-pf-opt.is-on .mds-pf-swatch { outline: 1.5px solid var(--mds-pf-text); outline-offset: 3px; }
.mds-pf.mds-pf .mds-pf-opt.has-swatch:hover .mds-pf-swatch { outline: 1px solid color-mix(in srgb, var(--mds-pf-text) 40%, transparent); outline-offset: 3px; }
.mds-pf.mds-pf .mds-pf-opt.has-swatch.is-zero .mds-pf-swatch { opacity: .35; }

/* Vinkjes in magenta */
.mds-pf.mds-pf .mds-pf-opt.is-on .mds-pf-box { border-color: var(--mds-pf-primary); background-color: var(--mds-pf-primary); }

/* Gekozen filters als pillen */
.mds-pf.mds-pf .mds-pf-chip {
	height: 30px;
	padding: 0 12px;
	border-radius: 999px;
	background: color-mix(in srgb, var(--mds-pf-primary) 10%, #fff);
	color: var(--mds-pf-text);
	font-size: 12px;
}
.mds-pf.mds-pf .mds-pf-chip:hover { background: color-mix(in srgb, var(--mds-pf-primary) 18%, #fff); }
.mds-pf.mds-pf .mds-pf-reset { color: var(--mds-pf-primary) !important; }

/* Knop "Toon x producten" (mobiel en zonder JavaScript) */
.mds-pf.mds-pf .mds-pf-apply {
	width: 100%;
	min-height: 48px;
	padding: 14px 24px;
	border-radius: 999px;
	background: var(--mds-pf-primary);
	color: #fff;
	font-family: var(--mds-pf-head);
	font-weight: 800;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: .16em;
}

/* Filterbalk (desktop): pillen */
@media (min-width: 768px) {
	.mds-pf--balk.mds-pf .mds-pf-group details > summary { border-radius: 999px; padding: 0 18px; }
	.mds-pf--balk.mds-pf .mds-pf-group.is-on details > summary,
	.mds-pf--balk.mds-pf .mds-pf-group details[open] > summary { border-color: var(--mds-pf-text); }
}

/* Prijs-velden */
.mds-pf.mds-pf .mds-pf-price input { border-radius: 10px; background: #fff; }
.mds-pf.mds-pf .mds-pf-price input:focus { border-color: var(--mds-pf-primary); }

/* "Toon meer…" */
.mds-pf .mds-pf-opt.is-more { display: none; }
.mds-pf .mds-pf-group.is-expanded .mds-pf-opt.is-more { display: flex; }
.mds-pf.mds-pf .mds-pf-more,
.mds-pf.mds-pf .mds-pf-more:hover,
.mds-pf.mds-pf .mds-pf-more:focus {
	display: inline-block;
	margin: -6px 0 16px;
	padding: 0;
	border: 0;
	background: none;
	color: var(--mds-pf-primary);
	font-size: 13px;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}
