/* ==================================================================
 * Shop filter sidebar
 * ================================================================ */

.je-shop--has-filters {
	display: grid;
	grid-template-columns: 268px minmax(0, 1fr);
	gap: 36px;
	align-items: start;
	max-width: 1320px;
	margin: 0 auto;
	padding: 28px 20px 70px;
}

.je-shop--has-filters > .je-shop__main {
	min-width: 0;
}

/* ---- the panel ---- */

.je-filters {
	position: sticky;
	top: 20px;
}

.je-filters__form {
	border: 1px solid #e6e9ee;
	border-radius: 10px;
	background: #fff;
	padding: 4px 18px 18px;
}

.je-filters__group {
	padding: 18px 0;
	border-bottom: 1px solid #eef1f5;
}

.je-filters__group:last-of-type {
	border-bottom: 0;
}

.je-filters__title {
	font-size: 13px;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--je-ink, #1a1a1a);
	margin: 0 0 12px;
}

.je-filters__list {
	list-style: none;
	margin: 0;
	padding: 0;
	max-height: 430px;
	overflow-y: auto;
	overscroll-behavior: contain;
}

.je-filters__list li {
	list-style: none;
	margin: 0;
}

.je-filters__list label {
	display: flex;
	align-items: center;
	gap: 9px;
	padding: 6px 0;
	font-size: 14px;
	line-height: 1.35;
	cursor: pointer;
	color: #333c48;
}

.je-filters__list label:hover {
	color: var(--je-accent, #1c6fc4);
}

.je-filters__list input[type="checkbox"] {
	width: 16px;
	height: 16px;
	accent-color: var(--je-accent, #1c6fc4);
	margin: 0;
	flex: 0 0 auto;
}

.je-filters__list span {
	flex: 1 1 auto;
	min-width: 0;
}

.je-filters__list em {
	font-style: normal;
	font-size: 12px;
	color: #98a1ad;
	flex: 0 0 auto;
}

.je-filters__sub {
	list-style: none;
	margin: 2px 0 6px 25px;
	padding: 0;
}

.je-filters__sub label {
	font-size: 13.5px;
	color: #5b6672;
}

/* ---- price ---- */

.je-filters__price {
	display: flex;
	align-items: center;
	gap: 8px;
}

.je-filters__price input {
	width: 100%;
	min-width: 0;
	height: 40px;
	border: 1px solid #d9dde3;
	border-radius: 6px;
	padding: 0 10px;
	font-size: 14px;
	background: #fff;
	color: var(--je-ink, #1a1a1a);
}

.je-filters__price input:focus {
	outline: 0;
	border-color: var(--je-accent, #1c6fc4);
	box-shadow: 0 0 0 3px rgba(28, 111, 196, 0.15);
}

.je-filters__dash {
	color: #98a1ad;
	flex: 0 0 auto;
}

.je-filters__hint {
	margin: 9px 0 0;
	font-size: 12px;
	color: #98a1ad;
}

/* ---- actions ---- */

.je-filters__apply {
	display: block;
	width: 100%;
	margin-top: 16px;
	background: var(--je-accent, #1c6fc4);
	color: #fff;
	border: 0;
	border-radius: 6px;
	padding: 13px 16px;
	font-size: 13px;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	cursor: pointer;
	transition: background 0.15s;
}

.je-filters__apply:hover {
	background: var(--je-accent-dark, #14559b);
}

.je-filters__active {
	padding: 16px 0 0;
}

.je-filters__clear {
	display: inline-block;
	font-size: 13px;
	font-weight: 700;
	color: var(--je-accent, #1c6fc4);
	text-decoration: none;
}

.je-filters__clear:hover {
	text-decoration: underline;
}

/* ---- mobile toggle ---- */

.je-filters__toggle {
	display: none;
	align-items: center;
	gap: 9px;
	width: 100%;
	background: #fff;
	border: 1px solid #d9dde3;
	border-radius: 8px;
	padding: 13px 16px;
	font-size: 14px;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--je-ink, #1a1a1a);
	cursor: pointer;
	position: relative;
}

.je-filters__dot {
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: var(--je-accent, #1c6fc4);
	display: inline-block;
}

.icon-filter {
	background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%231a1a1a" stroke-width="2" stroke-linecap="round"><path d="M3 5h18M6 12h12M10 19h4"/></svg>');
	width: 18px;
	height: 18px;
	display: inline-block;
	background-repeat: no-repeat;
	background-position: center;
	background-size: contain;
}

/* With the sidebar taking 268px, four cards get cramped — step the grid
   down one notch earlier than it does on the full-width shop. */
.je-shop--has-filters ul.products,
body.woocommerce .je-shop--has-filters ul.products {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (min-width: 1460px) {
	.je-shop--has-filters ul.products,
	body.woocommerce .je-shop--has-filters ul.products {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

@media (max-width: 1100px) {
	.je-shop--has-filters ul.products,
	body.woocommerce .je-shop--has-filters ul.products {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 980px) {
	.je-shop--has-filters {
		grid-template-columns: minmax(0, 1fr);
		gap: 18px;
	}

	.je-filters {
		position: static;
	}

	.je-filters__toggle {
		display: flex;
	}

	.je-filters__form {
		display: none;
		margin-top: 12px;
	}

	.je-filters.is-open .je-filters__form {
		display: block;
	}

	.je-filters__list {
		max-height: none;
	}
}
