.spf-layout {
	/* Theme colours: MyListing's --accent (navy #15294d) with a fallback. */
	--spf-accent: var(--accent, #15294d);
	--spf-accent-dark: var(--accent, #15294d);
	--spf-accent-hover: #24406f;
	--spf-track: #d3d8e2;
	--spf-heading: var(--accent, #15294d);
	--spf-text: #242429;
	--spf-line: #e6e8ea;
	display: grid;
	grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
	gap: 0 48px;
	align-items: start;
	width: 100%;
}

.spf-sidebar {
	position: relative;
	padding-right: 40px;
	border-right: 1px solid var(--spf-line);
	min-height: 100%;
	color: var(--spf-text);
}
.spf-main { min-width: 0; }

.spf-block { margin: 0 0 40px; }

.spf-label {
	display: block;
	margin: 0 0 10px;
	font-size: 16px;
	color: var(--spf-text);
}
.spf-title {
	margin: 0 0 18px !important;
	font-size: 26px !important;
	line-height: 1.2 !important;
	font-weight: 700 !important;
	color: var(--spf-heading) !important;
}

/* Search */
.spf-search-form { display: flex; gap: 10px; margin: 0; }
.spf-search-form input[type="search"] {
	flex: 1 1 auto;
	min-width: 0;
	height: 46px;
	padding: 0 12px;
	border: 1px solid #d5d5d5;
	border-radius: 0;
	background: #fff;
	font-size: 15px;
	box-shadow: none;
}
.spf-search-form button {
	flex: 0 0 52px;
	height: 46px;
	padding: 0;
	border: 0;
	border-radius: 3px;
	background: var(--spf-accent);
	color: #fff;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}
.spf-search-form button:hover { background: var(--spf-accent-hover); }

/* Price slider */
.spf-range { position: relative; height: 24px; margin: 4px 6px 18px; }
.spf-range-track {
	position: absolute; left: 0; right: 0; top: 50%;
	height: 4px; margin-top: -2px; border-radius: 2px; background: var(--spf-track);
}
.spf-range-fill { position: absolute; top: 0; bottom: 0; left: 0; right: 0; background: var(--spf-accent-dark); border-radius: 2px; }
.spf-range input[type="range"] {
	position: absolute; left: -6px; right: -6px; top: 0;
	width: calc(100% + 12px); height: 24px; margin: 0; padding: 0;
	background: none; border: 0; pointer-events: none;
	-webkit-appearance: none; appearance: none; z-index: 3;
}
.spf-range input[type="range"]:focus { outline: none; }
.spf-range input[type="range"]::-webkit-slider-runnable-track { background: none; border: 0; height: 24px; }
.spf-range input[type="range"]::-moz-range-track { background: none; border: 0; }
.spf-range input[type="range"]::-webkit-slider-thumb {
	-webkit-appearance: none; appearance: none; pointer-events: auto; cursor: pointer;
	width: 18px; height: 18px; margin-top: 3px; border-radius: 50%;
	background: var(--spf-accent-dark); border: 0;
}
.spf-range input[type="range"]::-moz-range-thumb {
	pointer-events: auto; cursor: pointer;
	width: 18px; height: 18px; border-radius: 50%;
	background: var(--spf-accent-dark); border: 0;
}
.spf-range input[type="range"]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 3px rgba(21,41,77,.3); }

.spf-price-boxes { display: flex; justify-content: flex-end; gap: 14px; }
.spf-price-boxes label { display: flex; flex-direction: column; align-items: flex-start; margin: 0; }
.spf-price-boxes input {
	width: 92px; height: 46px; padding: 0 10px;
	border: 1px solid #555; border-radius: 0; background: #fff;
	font-size: 16px; color: var(--spf-text); box-shadow: none;
}
.spf-price-boxes span { margin-top: 8px; font-size: 14px; color: var(--spf-text); }
.spf-price-form.is-loading { opacity: .6; pointer-events: none; }

/* Categories */
.spf-cats ul { list-style: none !important; margin: 0 !important; padding: 0 0 0 4px !important; }
.spf-cats li { list-style: none !important; margin-left: 0 !important; }
.spf-cats li::before, .spf-cats li::marker { content: none !important; display: none !important; }
.spf-cats ul ul { padding-left: 24px !important; margin-top: 12px !important; }
.spf-cats li { margin: 0 0 18px; font-size: 16px; color: var(--spf-text); line-height: 1.35; }
.spf-cats li li { margin-bottom: 12px; }
.spf-cats a { color: var(--spf-accent-dark); text-decoration: none; }
.spf-cats a:hover { text-decoration: underline; }
.spf-cats .current-cat > a { font-weight: 700; }

.spf-clear { margin: -20px 0 0; font-size: 14px; }
.spf-clear a { color: var(--spf-accent-dark); text-decoration: underline; }

.spf-empty { margin: 0 0 24px; }

/* Donasies: the sidebar replaces the storefront's own search bar. */
.spf-donations .ssd-shop-bar { display: none; }

/* Tablet / phone: stack the sidebar above the products. */
@media (max-width: 991px) {
	.spf-layout { grid-template-columns: minmax(0, 1fr); }
	.spf-sidebar {
		padding: 0 0 8px;
		margin-bottom: 32px;
		border-right: 0;
		border-bottom: 1px solid var(--spf-line);
		min-height: 0;
	}
	.spf-block { margin-bottom: 28px; }
	.spf-price-boxes { justify-content: flex-start; }
	.spf-cats ul { display: flex; flex-wrap: wrap; gap: 8px 22px; }
	.spf-cats li { margin: 0; }
	.spf-cats ul ul { flex-basis: 100%; margin-top: 0; }
}
