/* PulseGK Product Filters */
.pgf {
	--pgf-accent: #111;
	--pgf-border: rgba(0, 0, 0, 0.18);
	--pgf-muted: rgba(0, 0, 0, 0.6);
	--pgf-radius: 6px;
	font-size: 15px;
	line-height: 1.4;
}

.pgf-heading { margin: 0 0 12px; }

.pgf-form { margin: 0; }

.pgf-filter {
	border: 0;
	margin: 0 0 22px;
	padding: 0;
	min-width: 0;
}

.pgf-title {
	display: block;
	width: 100%;
	padding: 0 0 8px;
	margin: 0 0 12px;
	border-bottom: 1px solid var(--pgf-border);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	font-size: 14px;
}

.pgf-options { display: flex; flex-wrap: wrap; gap: 8px; }

.pgf-option {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
	user-select: none;
	margin: 0;
}

/* Visually hidden but focusable. !important because many themes style checkboxes. */
.pgf .pgf-option input[type="checkbox"] {
	position: absolute !important;
	top: 0 !important;
	left: 0 !important;
	opacity: 0 !important;
	width: 1px !important;
	height: 1px !important;
	min-width: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	-webkit-appearance: none !important;
	appearance: none !important;
	pointer-events: none;
}
.pgf .pgf-option input[type="checkbox"]::before,
.pgf .pgf-option input[type="checkbox"]::after { display: none !important; }

.pgf-option:focus-within { outline: 2px solid var(--pgf-accent); outline-offset: 2px; }
.pgf-option:focus-within:not(:has(:focus-visible)) { outline: none; }

/* Buttons / swatches (sizes) */
.pgf-style-buttons .pgf-option {
	justify-content: center;
	min-width: 44px;
	min-height: 44px;
	padding: 6px 10px;
	border: 1px solid var(--pgf-border);
	border-radius: var(--pgf-radius);
	background: #fff;
	color: inherit;
	font-weight: 600;
	transition: border-color 0.15s, background-color 0.15s, color 0.15s;
}
.pgf-style-buttons .pgf-option:hover { border-color: var(--pgf-accent); }
.pgf-style-buttons .pgf-option.is-checked {
	background: var(--pgf-accent);
	border-color: var(--pgf-accent);
	color: #fff;
}
.pgf-style-buttons .pgf-option.has-image {
	flex-direction: column;
	gap: 2px;
	padding: 4px;
	background: #fff;
	color: inherit;
}
.pgf-style-buttons .pgf-option.has-image.is-checked {
	box-shadow: 0 0 0 2px var(--pgf-accent);
	background: #fff;
	color: inherit;
}
.pgf-swatch { display: block; width: 36px; height: 36px; object-fit: contain; }
.pgf-option.has-image .pgf-label { font-size: 12px; }

/* Checkbox list (cut) */
.pgf-style-checkboxes .pgf-options { flex-direction: column; gap: 10px; }
.pgf-box {
	flex: 0 0 auto;
	width: 18px;
	height: 18px;
	border: 1px solid var(--pgf-border);
	border-radius: 4px;
	background: #fff;
	position: relative;
	transition: background-color 0.15s, border-color 0.15s;
}
.pgf-option:hover .pgf-box { border-color: var(--pgf-accent); }
.pgf-option.is-checked .pgf-box { background: var(--pgf-accent); border-color: var(--pgf-accent); }
.pgf-option.is-checked .pgf-box::after {
	content: "";
	position: absolute;
	left: 5px;
	top: 1px;
	width: 5px;
	height: 10px;
	border: solid #fff;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}

/* Active chips */
.pgf-active { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 0 16px; }
.pgf-active:empty { display: none; }
.pgf-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 4px 10px;
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.07);
	color: inherit;
	font-size: 13px;
	text-decoration: none;
}
.pgf-chip:hover { background: rgba(0, 0, 0, 0.13); color: inherit; }
.pgf-clear { font-size: 13px; color: var(--pgf-muted); text-decoration: underline; margin-left: 4px; }
.pgf .screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px; overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}

/* Submit only needed without JavaScript */
.pgf-apply {
	padding: 10px 16px;
	border: 0;
	border-radius: var(--pgf-radius);
	background: var(--pgf-accent);
	color: #fff;
	font-weight: 600;
	cursor: pointer;
}
.pgf-js .pgf-apply { display: none; }

/* Mobile toggle */
.pgf-toggle { display: none; }

@media (max-width: 767px) {
	.pgf-has-toggle .pgf-toggle {
		display: flex;
		align-items: center;
		justify-content: center;
		gap: 8px;
		width: 100%;
		padding: 12px 16px;
		margin: 0 0 12px;
		border: 1px solid var(--pgf-border);
		border-radius: var(--pgf-radius);
		background: #fff;
		color: inherit;
		font-weight: 700;
		text-transform: uppercase;
		letter-spacing: 0.04em;
		cursor: pointer;
	}
	.pgf-toggle-count:not(:empty) {
		min-width: 22px;
		height: 22px;
		padding: 0 6px;
		border-radius: 11px;
		background: var(--pgf-accent);
		color: #fff;
		font-size: 12px;
		line-height: 22px;
	}
	.pgf-js .pgf-has-toggle .pgf-form { display: none; }
	.pgf-js .pgf-has-toggle.pgf-open .pgf-form { display: block; }
}

/* Product grid while loading */
.pgf-loading {
	opacity: 0.45;
	pointer-events: none;
	transition: opacity 0.2s;
}
