/**
 * gemedo Filter – Styles (.gmf-* Namespace, konfliktfrei mit Blocksy)
 */

.gmf-layout {
	--gmf-primary: #244F52;
	--gmf-primary-dark: #18373a;
	--gmf-border: #e5e7eb;
	--gmf-text: #1f2937;
	--gmf-muted: #6b7280;
	--gmf-bg: #ffffff;
	--gmf-bg-soft: #f6f8f8;
	--gmf-radius: 10px;
	--gmf-shadow: 0 1px 3px rgba(0, 0, 0, .06), 0 6px 18px rgba(0, 0, 0, .05);

	display: flex;
	align-items: flex-start;
	gap: 28px;
	color: var(--gmf-text);
}

.gmf-layout *,
.gmf-layout *::before,
.gmf-layout *::after {
	box-sizing: border-box;
}

.gmf-main {
	flex: 1 1 auto;
	min-width: 0;
}

/* ---------- Sidebar ---------- */
.gmf-sidebar {
	flex: 0 0 280px;
	width: 280px;
	background: var(--gmf-bg);
	border: 1px solid var(--gmf-border);
	border-radius: var(--gmf-radius);
	box-shadow: var(--gmf-shadow);
	padding: 18px 18px 8px;
	position: sticky;
	top: 20px;
}

.gmf-sidebar-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 12px;
}

.gmf-sidebar-title {
	font-size: 18px;
	font-weight: 700;
}

.gmf-reset {
	background: none;
	border: none;
	color: var(--gmf-primary);
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	padding: 4px 2px;
	text-decoration: underline;
}

.gmf-reset[hidden] {
	display: none;
}

.gmf-reset:hover {
	color: var(--gmf-primary-dark);
}

/* ---------- Aktive Tags ---------- */
.gmf-active-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 8px;
}

.gmf-active-tags:empty {
	margin-bottom: 0;
}

.gmf-tag {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: #e9f1f1;
	color: var(--gmf-primary-dark);
	border: 1px solid #cfe0e0;
	border-radius: 999px;
	padding: 4px 10px;
	font-size: 12.5px;
	font-weight: 600;
	cursor: pointer;
	line-height: 1.4;
}

.gmf-tag:hover {
	background: #dcebeb;
}

.gmf-tag-x {
	font-size: 15px;
	line-height: 1;
}

/* ---------- Filter-Gruppen ---------- */
.gmf-group {
	border-top: 1px solid var(--gmf-border);
	padding: 6px 0;
}

.gmf-group:first-child {
	border-top: none;
}

.gmf-group-head {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	background: none;
	border: none;
	padding: 12px 2px;
	cursor: pointer;
	font: inherit;
	color: inherit;
}

.gmf-group-title {
	font-size: 14.5px;
	font-weight: 700;
}

.gmf-group-toggle {
	width: 12px;
	height: 12px;
	position: relative;
	flex: 0 0 auto;
}

.gmf-group-toggle::before,
.gmf-group-toggle::after {
	content: "";
	position: absolute;
	background: var(--gmf-muted);
	transition: transform .2s ease;
}

.gmf-group-toggle::before {
	top: 5px;
	left: 0;
	width: 12px;
	height: 2px;
}

.gmf-group-toggle::after {
	top: 0;
	left: 5px;
	width: 2px;
	height: 12px;
}

.gmf-group[aria-collapsed="true"] .gmf-group-toggle::after {
	transform: scaleY(0);
}

.gmf-group-body {
	padding: 2px 2px 12px;
	max-height: 320px;
	overflow-y: auto;
}

.gmf-group[aria-collapsed="true"] .gmf-group-body {
	display: none;
}

.gmf-group-body::-webkit-scrollbar {
	width: 6px;
}

.gmf-group-body::-webkit-scrollbar-thumb {
	background: #d1d5db;
	border-radius: 3px;
}

/* ---------- Optionen / Checkboxen ---------- */
.gmf-options {
	list-style: none;
	margin: 0;
	padding: 0;
}

.gmf-option {
	margin: 2px 0;
}

.gmf-check {
	display: flex;
	align-items: center;
	gap: 9px;
	padding: 6px 4px;
	cursor: pointer;
	border-radius: 6px;
	font-size: 13.5px;
	line-height: 1.35;
	margin: 0;
}

.gmf-check:hover {
	background: var(--gmf-bg-soft);
}

.gmf-input {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
}

.gmf-box {
	flex: 0 0 auto;
	width: 18px;
	height: 18px;
	border: 1.5px solid #cbd5e1;
	border-radius: 5px;
	background: #fff;
	position: relative;
	transition: background .15s ease, border-color .15s ease;
}

.gmf-box::after {
	content: "";
	position: absolute;
	left: 5.5px;
	top: 2px;
	width: 5px;
	height: 9px;
	border: solid #fff;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg) scale(0);
	transition: transform .15s ease;
}

.gmf-input:checked ~ .gmf-box {
	background: var(--gmf-primary);
	border-color: var(--gmf-primary);
}

.gmf-input:checked ~ .gmf-box::after {
	transform: rotate(45deg) scale(1);
}

.gmf-input:focus-visible ~ .gmf-box {
	outline: 2px solid var(--gmf-primary);
	outline-offset: 2px;
}

.gmf-label-text {
	flex: 1 1 auto;
}

.gmf-count {
	color: var(--gmf-muted);
	font-size: 12.5px;
	flex: 0 0 auto;
}

.gmf-option--disabled .gmf-check {
	opacity: .45;
	cursor: not-allowed;
}

/* ---------- Bewertung ---------- */
.gmf-stars {
	letter-spacing: 1px;
	font-size: 14px;
}

.gmf-star {
	color: #d1d5db;
}

.gmf-star--on {
	color: #f5a623;
}

/* ---------- Preis-Slider ---------- */
.gmf-price-values {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 13.5px;
	font-weight: 600;
	margin: 4px 2px 16px;
}

.gmf-price-sep {
	color: var(--gmf-muted);
}

.gmf-slider {
	position: relative;
	height: 28px;
	margin: 0 9px 10px;
}

.gmf-slider-track {
	position: absolute;
	top: 12px;
	left: 0;
	right: 0;
	height: 4px;
	background: #e5e7eb;
	border-radius: 2px;
}

.gmf-slider-range {
	position: absolute;
	top: 12px;
	height: 4px;
	background: var(--gmf-primary);
	border-radius: 2px;
}

.gmf-slider-input {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 28px;
	margin: 0;
	background: none;
	pointer-events: none;
	-webkit-appearance: none;
	appearance: none;
}

.gmf-slider-input::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	pointer-events: all;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: #fff;
	border: 2px solid var(--gmf-primary);
	box-shadow: 0 1px 3px rgba(0, 0, 0, .2);
	cursor: pointer;
}

.gmf-slider-input::-moz-range-thumb {
	pointer-events: all;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: #fff;
	border: 2px solid var(--gmf-primary);
	box-shadow: 0 1px 3px rgba(0, 0, 0, .2);
	cursor: pointer;
}

.gmf-slider-input::-moz-range-track {
	background: none;
	border: none;
}

/* ---------- Lade-Zustand ---------- */
.gmf-main {
	position: relative;
}

.gmf-main.is-loading {
	min-height: 200px;
}

.gmf-main.is-loading .products,
.gmf-main.is-loading .woocommerce-pagination {
	opacity: .4;
	pointer-events: none;
	transition: opacity .15s ease;
}

.gmf-main.is-loading::after {
	content: "";
	position: absolute;
	top: 80px;
	left: 50%;
	width: 36px;
	height: 36px;
	margin-left: -18px;
	border: 3px solid #cfe0e0;
	border-top-color: var(--gmf-primary);
	border-radius: 50%;
	animation: gmf-spin .7s linear infinite;
	z-index: 5;
}

@keyframes gmf-spin {
	to {
		transform: rotate(360deg);
	}
}

/* ---------- Mobile ---------- */
.gmf-mobile-toggle {
	display: none;
	align-items: center;
	gap: 8px;
	background: var(--gmf-primary);
	color: #fff;
	border: none;
	border-radius: 8px;
	padding: 11px 18px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	margin-bottom: 16px;
}

.gmf-mobile-toggle-icon {
	width: 16px;
	height: 12px;
	position: relative;
}

.gmf-mobile-toggle-icon::before,
.gmf-mobile-toggle-icon::after {
	content: "";
	position: absolute;
	left: 0;
	width: 16px;
	height: 2px;
	background: #fff;
	box-shadow: 0 5px 0 #fff;
}

.gmf-mobile-toggle-icon::before {
	top: 0;
}

.gmf-mobile-close {
	display: none;
	position: absolute;
	top: 10px;
	right: 12px;
	background: none;
	border: none;
	font-size: 28px;
	line-height: 1;
	color: var(--gmf-muted);
	cursor: pointer;
}

.gmf-overlay {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, .45);
	z-index: 998;
}

@media (max-width: 991px) {
	.gmf-layout {
		display: block;
	}

	.gmf-mobile-toggle {
		display: inline-flex;
	}

	.gmf-mobile-close {
		display: block;
	}

	.gmf-sidebar {
		position: fixed;
		top: 0;
		left: 0;
		bottom: 0;
		width: 86%;
		max-width: 360px;
		border-radius: 0;
		z-index: 999;
		transform: translateX(-100%);
		transition: transform .28s ease;
		overflow-y: auto;
		padding-top: 52px;
	}

	body.gmf-drawer-open .gmf-sidebar {
		transform: translateX(0);
	}

	body.gmf-drawer-open .gmf-overlay {
		display: block;
	}

	body.gmf-no-scroll {
		overflow: hidden;
	}

	.gmf-group-body {
		max-height: none;
	}
}
