.s4pf-sheethead,
.s4pf-sheetfoot,
[data-s4pf-backdrop] {
	display: none;
}

.s4pf {
	display: flex;
	flex-direction: column;
	gap: 4px;
	margin: 0;
}

.s4pf__head {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 12px;
	margin-bottom: 8px;
}

.s4pf__head h2 {
	margin: 0;
	font-size: 20px;
}

.s4pf button[data-s4pf-clear],
.s4pf-sheethead button[data-s4pf-clear] {
	border: 0;
	background: none;
	color: var(--s4p-green-dark);
	font: inherit;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	padding: 8px 0;
}

.s4pf__stock {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	background: #eaf5e7;
	border-radius: 12px;
	padding: 12px 14px;
	cursor: pointer;
	margin-bottom: 8px;
}

.s4pf__stock span {
	display: flex;
	flex-direction: column;
}

.s4pf__stock strong {
	font-size: 15px;
}

.s4pf__stock small {
	color: #3c4a40;
	font-size: 13px;
}

.s4pf__stock input,
.s4pf__row input {
	width: 18px;
	height: 18px;
	margin: 0;
	accent-color: var(--s4p-green-dark);
}

.s4pf__stock input {
	width: 22px;
	height: 22px;
}

.s4pf__group {
	border: 0;
	border-top: 1px solid var(--s4p-line);
	margin: 0;
	padding: 14px 0 10px;
	min-inline-size: 0;
}

.s4pf__group legend {
	float: left;
	width: 100%;
	padding: 0 0 8px;
	font-weight: 700;
	font-size: 15px;
}

.s4pf__options {
	display: flex;
	flex-direction: column;
	clear: both;
}

.s4pf__row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 10px;
	min-height: 36px;
	font-size: 15px;
	cursor: pointer;
}

.s4pf__row > span:first-child {
	display: flex;
	align-items: center;
	gap: 10px;
	min-width: 0;
}

.s4pf__count {
	flex: none;
	color: #5e6b62;
	font-size: 13px;
}

.s4pf__row.is-disabled {
	color: #9aa89e;
	cursor: default;
}

.s4pf__group:not(.is-expanded) .s4pf__row.is-extra {
	display: none;
}

.s4pf__more,
.s4pf__noscript button {
	border: 0;
	background: none;
	color: var(--s4p-green-dark);
	font: inherit;
	font-weight: 600;
	cursor: pointer;
	padding: 6px 0 0;
}

.s4pf-js .s4pf__noscript {
	display: none;
}

.s4pf-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 0 12px;
}

.s4pf-chip {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 36px;
	padding: 0 12px;
	border-radius: 999px;
	background: var(--s4p-ink);
	color: #fff;
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
}

.s4pf-empty {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	margin: 8px 0 16px;
	padding: 32px;
	border-radius: 16px;
	background: var(--s4p-soft);
	text-align: center;
}

.s4pf-empty strong {
	font-size: 18px;
}

.s4pf-empty p {
	margin: 0;
	color: #3c4a40;
}

.s4pf-empty button {
	height: 44px;
	padding: 0 18px;
	border: 0;
	border-radius: 10px;
	background: var(--s4p-ink);
	color: #fff;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}

.s4p-archive.is-loading .s4p-grid,
.s4p-archive.is-loading .s4pf-chips {
	opacity: 0.45;
}

.s4pf-badge:not([hidden]) {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 22px;
	height: 22px;
	padding: 0 6px;
	border-radius: 999px;
	background: var(--s4p-green);
	color: var(--s4p-ink);
	font-size: 12px;
	font-weight: 800;
}

.s4pf [hidden],
.s4pf-chips[hidden],
.s4pf-badge[hidden],
.s4pf-empty[hidden],
[data-s4pf-grid][hidden],
[data-s4pf-compare][hidden],
[data-s4pf-backdrop][hidden] {
	display: none !important;
}

html.s4pf-lock,
html.s4pf-lock body {
	overflow: hidden;
}

@media (max-width: 899px) {
	.s4pf-chips {
		grid-column: 1 / -1;
	}

	[data-s4pf-pagination],
	.s4pf-empty {
		grid-column: 1 / -1;
	}

	.s4p-filter-panel.is-open {
		display: flex;
		flex-direction: column;
		position: fixed;
		z-index: 80;
		left: 0;
		right: 0;
		bottom: 0;
		top: 72px;
		background: #fff;
		border-radius: 20px 20px 0 0;
		overflow: hidden;
		box-shadow: 0 -12px 40px rgba(14, 23, 18, 0.18);
	}

	.s4p-filter-panel.is-open .s4pf-sheethead {
		display: flex;
		justify-content: space-between;
		align-items: center;
		gap: 8px;
		padding: 16px 16px 12px;
		border-bottom: 1px solid var(--s4p-line);
	}

	.s4p-filter-panel.is-open .s4pf-sheethead strong {
		font-family: var(--s4p-display);
		font-size: 20px;
	}

	.s4p-filter-panel.is-open .s4pf-sheethead__tools {
		display: flex;
		align-items: center;
		gap: 4px;
	}

	.s4p-filter-panel.is-open [data-s4pf-sheet-close] {
		width: 44px;
		height: 44px;
		border: 0;
		border-radius: 10px;
		background: var(--s4p-soft);
		color: var(--s4p-ink);
		display: inline-flex;
		align-items: center;
		justify-content: center;
		cursor: pointer;
	}

	.s4p-filter-panel.is-open .s4pf__head,
	.s4p-filter-panel.is-open .s4p-help {
		display: none;
	}

	.s4p-filter-panel.is-open .s4pf {
		flex: 1;
		overflow: auto;
		padding: 8px 16px 16px;
		-webkit-overflow-scrolling: touch;
	}

	.s4p-filter-panel.is-open .s4pf__options {
		flex-direction: row;
		flex-wrap: wrap;
		gap: 8px;
	}

	.s4p-filter-panel.is-open .s4pf__row,
	.s4p-filter-panel.is-open .s4pf__group:not(.is-expanded) .s4pf__row.is-extra {
		display: inline-flex;
		width: auto;
		min-height: 40px;
		padding: 0 12px;
		border: 1px solid #cbd5cc;
		border-radius: 999px;
		background: #fff;
	}

	.s4p-filter-panel.is-open .s4pf__row:has(input:checked) {
		background: var(--s4p-ink);
		border-color: var(--s4p-ink);
		color: #fff;
	}

	.s4p-filter-panel.is-open .s4pf__row:has(input:checked) .s4pf__count {
		color: rgba(255, 255, 255, 0.75);
	}

	.s4p-filter-panel.is-open .s4pf__row input {
		position: absolute;
		opacity: 0;
		pointer-events: none;
	}

	.s4p-filter-panel.is-open .s4pf__count::before {
		content: "(";
	}

	.s4p-filter-panel.is-open .s4pf__count::after {
		content: ")";
	}

	.s4p-filter-panel.is-open .s4pf__more {
		display: none;
	}

	.s4p-filter-panel.is-open .s4pf-sheetfoot {
		display: block;
		padding: 12px 16px calc(16px + env(safe-area-inset-bottom));
		border-top: 1px solid var(--s4p-line);
	}

	.s4p-filter-panel.is-open .s4pf-sheetfoot button {
		width: 100%;
		height: 54px;
		border: 0;
		border-radius: 12px;
		background: var(--s4p-green);
		color: var(--s4p-ink);
		font: inherit;
		font-weight: 800;
		font-size: 16px;
		cursor: pointer;
	}

	[data-s4pf-backdrop]:not([hidden]) {
		display: block;
		position: fixed;
		inset: 0;
		z-index: 70;
		background: rgba(14, 23, 18, 0.45);
	}
}

@media (min-width: 900px) {
	.s4pf__row input:focus-visible,
	.s4pf__stock input:focus-visible {
		outline: 2px solid var(--s4p-green-dark);
		outline-offset: 2px;
	}
}
