/* Catalog filters — Figma 233:1255 (PC) / 456:776 (mobile) */
.std-catalog-host {
	overflow: visible;
}
.std-catalog {
	display: flex;
	align-items: flex-start;
	gap: 20px;
	font-family: Arial, Helvetica, sans-serif;
	color: #1a1a1a;
	box-sizing: border-box;
}
.std-catalog *,
.std-catalog *::before,
.std-catalog *::after {
	box-sizing: border-box;
}
.std-catalog__main {
	flex: 1 1 0;
	min-width: 0;
}
.std-catalog__empty {
	margin: 30px 0;
	font-size: 16px;
	line-height: 1.6;
	color: #8a8a8a;
}

/* Убираем старую рамку страницы на каталоге с фильтрами */
body:has(.std-catalog) #content,
body:has(.std-catalog-host) #content {
	padding: 40px 0 60px !important;
	margin: 0 !important;
	background: #fff !important;
	border: 0 !important;
	box-shadow: none !important;
}

/* Mobile toolbar */
.std-catalog__toolbar {
	display: none;
	gap: 10px;
	margin: 0 0 20px;
	align-items: stretch;
}
.std-catalog__filters-btn {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	height: auto;
	padding: 10px 15px;
	border: 1px solid #d9d9d9;
	border-radius: 5px;
	background: #fff;
	font-family: inherit;
	font-size: 16px;
	line-height: 1.4;
	color: #1a1a1a;
	cursor: pointer;
	box-shadow: none;
	outline: none;
}
.std-catalog__filters-btn:focus,
.std-catalog__filters-btn:focus-visible {
	outline: none;
	box-shadow: none;
}
.std-catalog__badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 0;
	height: auto;
	padding: 2px 8px;
	border-radius: 10px;
	background: #0088cc;
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.4;
}
.std-catalog__bar {
	flex: 1 1 auto;
	display: flex;
	align-items: center;
	min-width: 0;
}
.std-catalog__shown {
	display: none;
	margin: 0;
	font-size: 16px;
	line-height: 1.4;
	color: #8a8a8a;
	white-space: nowrap;
}
.std-catalog__sort {
	flex: 1 1 auto;
	display: flex;
	align-items: center;
	gap: 10px;
	min-width: 0;
	height: auto;
	padding: 10px 15px;
	border: 1px solid #d9d9d9;
	border-radius: 10px;
	background: #fff;
	overflow: hidden;
	box-shadow: none;
}
.std-catalog__sort-label {
	display: flex;
	align-items: center;
	gap: 6px;
	min-width: 0;
	flex: 1 1 auto;
	margin: 0;
	font-size: 16px;
	line-height: 1.4;
	color: #1a1a1a;
	overflow: hidden;
}
.std-catalog__sort-prefix {
	flex-shrink: 0;
	color: #8a8a8a;
}
.std-catalog__sort select,
.std-catalog__sort .inputbox,
.std-catalog__count-sel select {
	flex: 1 1 auto;
	min-width: 0;
	width: 0;
	max-width: 100%;
	border: 0 !important;
	outline: none !important;
	box-shadow: none !important;
	background-color: transparent;
	font: inherit;
	color: #1a1a1a;
	padding: 0 22px 0 0;
	margin: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	-webkit-appearance: none;
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%231A1A1A' d='M1.4 0.6L6 5.2 10.6 0.6 12 2 6 8 0 2z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 2px center;
	background-size: 10px 7px;
	cursor: pointer;
}
.std-catalog__sort-dir {
	flex-shrink: 0;
	border: 0;
	background: transparent;
	padding: 4px;
	cursor: pointer;
}
.std-catalog__count-sel {
	display: none;
}

/* ——— Sidebar / sheet ——— */
.std-filters {
	width: 305px;
	flex-shrink: 0;
	position: relative;
	align-self: flex-start;
}
.std-filters__backdrop {
	display: none;
}
/* В макете у панели НЕТ внешней обводки — только radius и разделители секций */
.std-filters__panel {
	background: #fff;
	border: 0 !important;
	outline: none !important;
	box-shadow: none !important;
	border-radius: 12px;
	overflow: visible;
}
.std-filters__handle {
	display: none;
}
.std-filters__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 60px;
	padding: 0 15px;
	border-bottom: 1px solid #d9d9d9;
	background: #fff;
}
.std-filters__title {
	font-size: 18px;
	font-weight: 700;
	line-height: 1.2;
	color: #1a1a1a;
}
.std-filters__close {
	display: none;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
	box-shadow: none;
	outline: none;
}
.std-filters__close img {
	display: block;
	width: 40px;
	height: 40px;
}
.std-filters__body {
	max-height: none;
	overflow: visible;
}
.std-filters__sec {
	border-bottom: 1px solid #d9d9d9;
	padding: 15px 10px;
	background: #fff;
}
.std-filters__sec-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	height: 40px;
	padding: 0;
	border: 0 !important;
	outline: none !important;
	box-shadow: none !important;
	background: transparent;
	font-family: inherit;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.4;
	color: #1a1a1a;
	cursor: pointer;
	text-align: left;
}
.std-filters__sec-head:focus,
.std-filters__sec-head:focus-visible {
	outline: none !important;
	box-shadow: none !important;
}
.std-filters__chevron {
	width: 40px;
	height: 40px;
	flex-shrink: 0;
	transition: transform .2s ease;
	transform: rotate(180deg);
}
.std-filters__sec.is-open .std-filters__chevron {
	transform: rotate(0deg);
}
.std-filters__summary {
	display: block;
	margin: 5px 0 0;
	font-size: 16px;
	line-height: 1.6;
	color: #1a1a1a;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.std-filters__summary.is-muted {
	color: #8a8a8a;
}
.std-filters__sec.is-open .std-filters__summary {
	display: none;
}
.std-filters__sec-body {
	display: none;
	flex-direction: column;
	gap: 15px;
	padding-top: 15px;
}
.std-filters__sec.is-open .std-filters__sec-body {
	display: flex;
}
.std-filters__opts {
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.std-filters__opt {
	display: flex;
	align-items: center;
	gap: 15px;
	min-height: 40px;
	margin: 0;
	cursor: pointer;
	font-size: 16px;
	line-height: 1.6;
	color: #1a1a1a;
}
.std-filters__opt input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
	width: 0;
	height: 0;
}
.std-filters__box {
	width: 25px;
	height: 25px;
	flex-shrink: 0;
	border: 1px solid #d9d9d9;
	border-radius: 3px;
	background: #fff;
	background-repeat: no-repeat;
	background-position: center;
	background-size: 25px 25px;
	box-shadow: none;
	outline: none;
}
.std-filters__opt input:checked + .std-filters__box {
	border-color: transparent;
	background-color: transparent;
	background-image: url("../images/filters/ico-check.svg");
}
.std-filters__opt:focus-within .std-filters__box,
.std-filters__opt:focus-within .std-filters__radio,
.std-filters__opt:focus-within .std-filters__swatch {
	outline: none;
	box-shadow: none;
}
.std-filters__radio {
	width: 25px;
	height: 25px;
	flex-shrink: 0;
	border: 1px solid #d9d9d9;
	border-radius: 20px;
	background: #fff;
	background-repeat: no-repeat;
	background-position: center;
	background-size: 25px 25px;
	box-shadow: none;
}
.std-filters__opt input:checked + .std-filters__radio {
	border-color: transparent;
	background-image: url("../images/filters/ico-radio-on.svg");
}
.std-filters__swatch {
	width: 28px;
	height: 28px;
	flex-shrink: 0;
	border: 1px solid #d9d9d9;
	border-radius: 14px;
	box-shadow: none;
}
.std-filters__swatch.is-light {
	border-width: 2px;
}
.std-filters__opt--color input:checked + .std-filters__swatch {
	border-color: #0088cc;
	border-width: 2px;
	box-shadow: none;
}
.std-filters__opt-label {
	flex: 1 1 auto;
	min-width: 0;
}
.std-filters__more {
	display: inline-flex;
	align-items: center;
	height: 40px;
	border: 0;
	background: transparent;
	padding: 0;
	font-family: inherit;
	font-size: 16px;
	line-height: 1.6;
	color: #2c6fa8;
	cursor: pointer;
	box-shadow: none;
	outline: none;
}
.std-filters__opt.is-hidden-more {
	display: none;
}
.std-filters__opt.is-unavailable,
.std-filters__toggle.is-unavailable {
	display: none !important;
}
.std-filters__apply:disabled {
	opacity: 0.55;
	cursor: not-allowed;
}
.std-filters__range-inputs {
	display: flex;
	gap: 15px;
}
.std-filters__field {
	flex: 1 1 0;
	display: flex;
	align-items: center;
	gap: 5px;
	height: 45px;
	padding: 0 15px;
	border: 1px solid #d9d9d9;
	border-radius: 5px;
	background: #fff;
	margin: 0;
	font-size: 16px;
	line-height: 1.6;
	box-shadow: none;
}
.std-filters__field:focus-within {
	border-color: #d9d9d9;
	box-shadow: none;
	outline: none;
}
.std-filters__field input {
	flex: 1 1 auto;
	min-width: 0;
	width: 100%;
	border: 0 !important;
	padding: 0;
	margin: 0;
	background: transparent;
	font: inherit;
	color: #1a1a1a;
	outline: none !important;
	box-shadow: none !important;
	-moz-appearance: textfield;
}
.std-filters__field input::-webkit-outer-spin-button,
.std-filters__field input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}
.std-filters__field-prefix,
.std-filters__field-suffix {
	color: #8a8a8a;
	flex-shrink: 0;
}
.std-filters__dual {
	display: flex;
	flex-direction: column;
	gap: 15px;
}
.std-filters__dual + .std-filters__dual {
	margin-top: 10px;
}
.std-filters__dual-label {
	margin: 0;
	font-size: 16px;
	line-height: 1.6;
	color: #8a8a8a;
}
.std-filters__slider {
	position: relative;
	height: 25px;
}
.std-filters__slider-track,
.std-filters__slider-range {
	position: absolute;
	left: 0;
	right: 0;
	top: 10px;
	height: 5px;
	border-radius: 2.5px;
	background: #d9d9d9;
	pointer-events: none;
}
.std-filters__slider-range {
	right: auto;
	background: #0088cc;
}
.std-filters__slider input[type="range"] {
	position: absolute;
	left: 0;
	top: 0;
	width: 100%;
	height: 25px;
	margin: 0;
	background: transparent;
	pointer-events: none;
	-webkit-appearance: none;
	appearance: none;
	outline: none;
	border: 0;
	box-shadow: none;
}
.std-filters__slider input[type="range"]::-webkit-slider-thumb {
	-webkit-appearance: none;
	width: 25px;
	height: 25px;
	border-radius: 50%;
	border: 2px solid #0088cc;
	background: #fff;
	pointer-events: auto;
	cursor: pointer;
	box-shadow: none;
}
.std-filters__slider input[type="range"]::-moz-range-thumb {
	width: 25px;
	height: 25px;
	border-radius: 50%;
	border: 2px solid #0088cc;
	background: #fff;
	pointer-events: auto;
	cursor: pointer;
	box-shadow: none;
}
.std-filters__toggle {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 15px;
	min-height: 40px;
	margin: 0;
	cursor: pointer;
	font-size: 16px;
	line-height: 1.6;
}
.std-filters__toggle input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
	width: 0;
	height: 0;
}
.std-filters__switch {
	width: 48px;
	height: 28px;
	flex-shrink: 0;
	border-radius: 14px;
	background: #d9d9d9;
	position: relative;
	transition: background .2s ease;
	box-shadow: none;
	border: 0;
}
.std-filters__switch::after {
	content: "";
	position: absolute;
	top: 2px;
	left: 2px;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background: #fff;
	transition: transform .2s ease;
	box-shadow: 0 1px 2px rgba(0,0,0,.15);
}
.std-filters__toggle input:checked + .std-filters__switch {
	background: #0088cc;
}
.std-filters__toggle input:checked + .std-filters__switch::after {
	transform: translateX(20px);
}
.std-filters__foot {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	padding: 15px 10px;
	background: #fff;
	border: 0;
	border-top: 1px solid #d9d9d9;
	box-shadow: 0 -10px 24px rgba(255, 255, 255, 0.9);
	position: sticky;
	bottom: 0;
	z-index: 4;
}
.std-filters__apply {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 50px;
	border: 0 !important;
	outline: none !important;
	box-shadow: none !important;
	border-radius: 5px;
	background: #0088cc;
	color: #fff;
	font-family: inherit;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.4;
	cursor: pointer;
}
.std-filters__apply:focus,
.std-filters__apply:focus-visible {
	outline: none !important;
	box-shadow: none !important;
}
.std-filters__reset {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 40px;
	font-size: 16px;
	line-height: 1.6;
	color: #2c6fa8;
	text-decoration: none;
	border: 0;
	background: transparent;
	box-shadow: none;
}
.std-filters__reset:hover {
	color: #1a1a1a;
}

/* Desktop toolbar */
@media (min-width: 992px) {
	.std-catalog__toolbar {
		display: block;
		margin-bottom: 20px;
	}
	.std-catalog__filters-btn {
		display: none;
	}
	.std-catalog__bar {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 16px;
		width: 100%;
		min-height: 56px;
		padding: 8px 16px;
		background: #ececec;
		border-radius: 8px;
		border: 0;
		box-shadow: none;
	}
	.std-catalog__shown {
		display: block;
	}
	.std-catalog__sort {
		flex: 0 1 auto;
		width: auto;
		max-width: min(360px, 48%);
		height: 40px;
		padding: 0 12px;
		background: #fff;
		border: 1px solid #d9d9d9;
		border-radius: 5px;
	}
	.std-catalog__sort select,
	.std-catalog__sort .inputbox {
		width: auto;
		min-width: 8em;
		max-width: 220px;
	}
	.std-catalog__sort-dir {
		display: none;
	}
	.std-filters__handle,
	.std-filters__close {
		display: none !important;
	}
}

@media (max-width: 991px) {
	body:has(.std-catalog) #content,
	body:has(.std-catalog-host) #content {
		padding: 20px 0 40px !important;
	}
	.std-catalog {
		display: block;
	}
	.std-catalog__toolbar {
		display: flex;
	}
	.std-catalog__bar {
		flex: 1 1 auto;
		min-width: 0;
	}
	.std-catalog__sort-prefix {
		display: none;
	}
	.std-catalog__sort-dir {
		display: none;
	}
	.std-filters {
		width: auto;
		position: static;
	}
	.std-filters__backdrop {
		display: block;
		position: fixed;
		inset: 0;
		z-index: 1200;
		background: rgba(0, 0, 0, 0.5);
		opacity: 0;
		pointer-events: none;
		transition: opacity .2s ease;
		border: 0;
	}
	.std-filters.is-open .std-filters__backdrop {
		opacity: 1;
		pointer-events: auto;
	}
	.std-filters__panel {
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 1201;
		max-height: min(92vh, 820px);
		height: min(92vh, 820px);
		border: 0 !important;
		border-radius: 15px 15px 0 0;
		display: flex;
		flex-direction: column;
		transform: translateY(105%);
		transition: transform .25s ease;
		box-shadow: none !important;
		padding-top: 15px;
		overflow: hidden;
	}
	.std-filters.is-open .std-filters__panel {
		transform: translateY(0);
	}
	.std-filters__handle {
		display: block;
		position: absolute;
		top: 8px;
		left: 50%;
		width: 40px;
		height: 4px;
		margin-left: -20px;
		border-radius: 2px;
		background: #d9d9d9;
		z-index: 3;
	}
	.std-filters__head {
		flex-shrink: 0;
	}
	.std-filters__close {
		display: block;
	}
	.std-filters__sec {
		padding: 10px 15px 20px;
	}
	.std-filters__body {
		flex: 1 1 auto;
		min-height: 0;
		max-height: none;
		overflow-x: hidden;
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
		overscroll-behavior: contain;
	}
	.std-filters__foot {
		flex-shrink: 0;
		position: relative;
		z-index: 2;
		padding: 15px 15px calc(15px + env(safe-area-inset-bottom, 0px));
		border-top: 1px solid #d9d9d9;
		background: #fff;
		box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.06);
	}
	body.std-filters-open {
		overflow: hidden;
	}
}

/* Hide legacy filter chrome if any leaks */
.std-catalog-host .form_sort_count .jshop_filters,
.std-catalog-host .block_sorting_count_to_page {
	display: none;
}

/* Каталог с фильтрами: убираем левый модуль «Категории» — в макете его нет */
body:has(.std-catalog) #sidebar,
body:has(.std-catalog-host) #sidebar {
	display: none !important;
}
body:has(.std-catalog) #middlecol,
body:has(.std-catalog-host) #middlecol,
body:has(.std-catalog) #middlecol.sidebar_left,
body:has(.std-catalog-host) #middlecol.sidebar_left,
body:has(.std-catalog) #middlecol.sidebar_right,
body:has(.std-catalog-host) #middlecol.sidebar_right {
	width: 100% !important;
	max-width: 100% !important;
	flex: 1 1 100% !important;
	float: none !important;
}
body:has(.std-catalog) #middlecol .inside,
body:has(.std-catalog-host) #middlecol .inside {
	padding-left: 0 !important;
	padding-right: 0 !important;
}

body:has(.std-catalog) .jshop_list_category,
body:has(.std-catalog-host) .jshop_list_category {
	display: none !important;
}
