/* ==========================================================================
   Shielding Shop Filters — Grouped Category Filter Styles
   ========================================================================== */

.ssf-filters {
	width: 100%;
	box-sizing: border-box;
	margin-bottom: 1.5rem;
	padding: 1.5rem;
	background: #f9f9f9;
	border: 1px solid #e0e0e0;
	border-radius: 6px;
}

/* ---- Accordion (mobile/tablet) ---- */

.ssf-filters__accordion {
	border: none;
}

.ssf-filters__accordion-trigger {
	list-style: none;
	cursor: pointer;
	user-select: none;
}

.ssf-filters__accordion-trigger::-webkit-details-marker {
	display: none;
}

.ssf-filters__accordion-title {
	font-size: 1.35rem;
	font-weight: 700;
	color: #222;
}

.ssf-filters__accordion-icon {
	display: none; /* Hidden on desktop */
	margin-left: 0.5rem;
}

.ssf-filters__accordion-icon::after {
	content: '▼';
	font-size: 0.75em;
	color: #666;
}

.ssf-filters__accordion[open] .ssf-filters__accordion-icon::after {
	content: '▲';
}

/* Desktop: summary looks like a static header, no chevron */
@media (min-width: 769px) {
	.ssf-filters__accordion-trigger {
		cursor: default;
		pointer-events: none;
	}

	.ssf-filters__accordion-icon {
		display: none !important;
	}
}

/* ---- Header row (clear button) ---- */

.ssf-filters__header {
	display: flex;
	justify-content: flex-end;
	align-items: center;
	margin-bottom: 1rem;
}

.ssf-filters__clear {
	background: none;
	border: none;
	color: #666;
	font-size: 1rem;
	cursor: pointer;
	text-decoration: underline;
	padding: 0;
	transition: color 0.2s ease;
}

.ssf-filters__clear:hover {
	color: #111;
}

/* ---- Group sections ---- */

.ssf-filters__group {
	margin-bottom: 1.25rem;
}

.ssf-filters__group:last-child {
	margin-bottom: 0;
}

.ssf-filters__group-title {
	font-size: 1.25rem;
	font-weight: 700;
	text-transform: none;
	color: #222;
	margin: 0 0 0.5rem 0;
	padding: 0;
	line-height: 1.3;
}

/* ---- Category list (vertical) ---- */

.ssf-filters__list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.ssf-filters__item {
	position: relative;
	margin-bottom: 0.3rem;
}

.ssf-filters__label-wrap {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	cursor: pointer;
	font-size: 1.25rem;
	color: #444;
	transition: color 0.15s ease;
	padding: 0.2rem 0;
}

.ssf-filters__label-wrap:hover {
	color: #111;
}

.ssf-filter-checkbox {
	width: 18px;
	height: 18px;
	flex-shrink: 0;
	cursor: pointer;
	accent-color: #333;
}

.ssf-filters__label {
	user-select: none;
}

.ssf-filters__count {
	color: #999;
	font-size: 1rem;
}

/* ---- Expand / Collapse toggle ---- */

.ssf-filters__toggle {
	position: absolute;
	right: 0;
	top: 0.2rem;
	width: 26px;
	height: 26px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: none;
	border: 1px solid #ccc;
	border-radius: 3px;
	font-size: 1.1rem;
	line-height: 1;
	color: #555;
	cursor: pointer;
	padding: 0;
	transition: background 0.15s ease, color 0.15s ease;
}

.ssf-filters__toggle:hover {
	background: #eee;
	color: #111;
}

/* ---- Nested children ---- */

.ssf-filters__children {
	list-style: none;
	margin: 0.15rem 0 0 1.4rem;
	padding: 0;
	overflow: hidden;
	transition: max-height 0.25s ease, opacity 0.25s ease;
}

.ssf-filters__children--collapsed {
	max-height: 0 !important;
	opacity: 0;
	margin-top: 0;
}

/* ---- Loading state ---- */

.ssf-loading {
	opacity: 0.4;
	pointer-events: none;
	transition: opacity 0.2s ease;
}

/* ---- No results ---- */

.ssf-no-results {
	text-align: center;
	padding: 3rem 1rem;
	color: #666;
	font-size: 1rem;
}

/* ---- Responsive: Accordion on tablet/mobile ---- */

@media (max-width: 768px) {
	.ssf-filters__accordion-trigger {
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding: 0.75rem 0;
		min-height: 44px; /* Touch-friendly tap target */
	}

	.ssf-filters__accordion-icon {
		display: inline-block;
	}

	.ssf-filters__accordion-content {
		padding-top: 0.5rem;
		border-top: 1px solid #e0e0e0;
		margin-top: 0.25rem;
	}
}

/* ---- Responsive: Smaller mobile ---- */

@media (max-width: 600px) {
	.ssf-filters {
		padding: 1rem;
	}

	.ssf-filters__accordion-title {
		font-size: 1.15rem;
	}

	.ssf-filters__group-title {
		font-size: 1rem;
	}

	.ssf-filters__label-wrap {
		font-size: 0.95rem;
	}
}
