

.bzs {
	--bzs-border: #e0dfdf;
	--bzs-border-strong: #b9b8b8;
	--bzs-text: #373736;
	--bzs-muted: #939292;
	--bzs-chip: #f5f5f5;
	--bzs-hover: #f7f7f7;
	--bzs-accent: #333;
	--bzs-height: 50px;

	position: relative;
	z-index: 2000;
	width: 100%;
	margin-top: 12px;
	font-family: 'Play', Verdana, Arial, sans-serif;
	text-align: left;
	-webkit-tap-highlight-color: transparent;
}

.bzs *,
.bzs *:before,
.bzs *:after {
	-webkit-box-sizing: border-box;
	-moz-box-sizing: border-box;
	box-sizing: border-box;
}

.bzs__form {
	margin: 0;
	position: relative;
}

/* --- Поле ------------------------------------------------------------ */

.bzs__field {
	display: -webkit-box;
	display: -ms-flexbox;
	display: flex;
	-webkit-box-align: center;
	-ms-flex-align: center;
	align-items: center;
	height: var(--bzs-height);
	padding: 0 0 0 6px;
	background: #fff;
	border: 1px solid var(--bzs-border);
	border-radius: 0;
	-webkit-transition: border-color .15s ease;
	transition: border-color .15s ease;
}

.bzs.is-focused .bzs__field {
	border-color: var(--bzs-border-strong);
}

.bzs-icon {
	display: block;
	width: 18px;
	height: 18px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.6;
	stroke-linecap: round;
	stroke-linejoin: round;
}

/* --- Селектор категории ---------------------------------------------- */

.bzs__cat {
	position: relative;
	-ms-flex-negative: 0;
	flex-shrink: 0;
	max-width: 46%;
}

.bzs__cat-label {
	display: -webkit-box;
	display: -ms-flexbox;
	display: flex;
	-webkit-box-align: center;
	-ms-flex-align: center;
	align-items: center;
	max-width: 100%;
	height: 34px;
	margin: 0;
	padding: 0 6px 0 10px;
	color: var(--bzs-muted);
	font: inherit;
	font-size: 12px;
	line-height: 1;
	text-transform: uppercase;
	background: var(--bzs-chip);
	border: 0;
	border-radius: 2px;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
	-webkit-transition: color .15s ease, background-color .15s ease;
	transition: color .15s ease, background-color .15s ease;
}

.bzs__cat-label:hover,
.bzs__cat.is-open .bzs__cat-label {
	color: var(--bzs-text);
	background: #ededed;
}

.bzs__cat-text {
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.bzs__cat-label .bzs-icon {
	-ms-flex-negative: 0;
	flex-shrink: 0;
	width: 14px;
	height: 14px;
	margin-left: 4px;
	-webkit-transition: -webkit-transform .15s ease;
	transition: transform .15s ease;
}

.bzs__cat.is-open .bzs__cat-label .bzs-icon {
	-webkit-transform: rotate(180deg);
	transform: rotate(180deg);
}

.bzs__cat-list {
	position: absolute;
	top: calc(100% + 8px);
	left: -7px;
	z-index: 10;
	min-width: 200px;
	max-height: 320px;
	margin: 0;
	padding: 6px 0;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	list-style: none;
	background: #fff;
	border: 1px solid var(--bzs-border);
	-webkit-box-shadow: 0 6px 20px rgba(0, 0, 0, .10);
	box-shadow: 0 6px 20px rgba(0, 0, 0, .10);
}

.bzs__cat-list[hidden] {
	display: none;
}

/* Полоса прокрутки — та же, что у выпадающего списка товаров. */
.bzs__cat-list::-webkit-scrollbar {
	width: 6px;
}

.bzs__cat-list::-webkit-scrollbar-track {
	background: transparent;
}

.bzs__cat-list::-webkit-scrollbar-thumb {
	background: #cfcfcf;
	border-radius: 3px;
}

.bzs__cat-list li {
	margin: 0;
	padding: 0;
	list-style: none;
}

.bzs__cat-item {
	display: block;
	width: 100%;
	margin: 0;
	padding: 9px 16px;
	color: var(--bzs-text);
	font: inherit;
	font-size: 14px;
	text-align: left;
	text-transform: uppercase;
	background: none;
	border: 0;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
}

.bzs__cat-item:hover,
.bzs__cat-item:focus {
	background: var(--bzs-hover);
	outline: 0;
}

.bzs__cat-item.is-selected {
	font-weight: bold;
}

/* --- Строка ввода ----------------------------------------------------- */

.bzs__input-wrap {
	-webkit-box-flex: 1;
	-ms-flex: 1 1 auto;
	flex: 1 1 auto;
	min-width: 0;
}

/*
 * Селектор нарочно утяжелён до `.bzs input.bzs__input`: в теме подключён
 * reset-bootstrap.css с правилом `input[type="search"] { border: 1px solid
 * #ccc; box-shadow: inset ...; }`, которое по специфичности перебивает
 * одиночный класс и рисует вокруг поля лишнюю рамку.
 */
.bzs input.bzs__input,
.bzs input.bzs__input:focus,
.bzs input.bzs__input:focus-visible,
.bzs input.bzs__input:hover,
.bzs input.bzs__input:active {
	/*
	 * `!important` здесь вынужденный, а не «на всякий случай»:
	 * в style.css (строка ~995) для `input[type="search"]:focus` стоит
	 *   box-shadow: 0 1px 1px rgba(0,0,0,.075) inset,
	 *               0 0 3px rgba(0,0,0,.2) !important;
	 *   border-color: rgba(0,0,0,.2) !important;
	 * Без `!important` перебить это правило нельзя никакой
	 * специфичностью, и при фокусе вокруг строки ввода появлялась
	 * серая рамка с подсветкой — внутри общей рамки поля.
	 */
	border: 0 !important;
	outline: 0 !important;
	-webkit-box-shadow: none !important;
	box-shadow: none !important;
	background: none !important;
}

.bzs input.bzs__input {
	width: 100%;
	height: 100%;
	min-height: 0;
	margin: 0;
	padding: 0 8px 0 10px;
	color: var(--bzs-text);
	font-family: inherit;
	font-size: 15px;
	line-height: normal;
	text-transform: uppercase;
	background: none;
	border: 0;
	border-radius: 0;
	-webkit-box-shadow: none;
	box-shadow: none;
	-webkit-appearance: none;
	appearance: none;
}

.bzs input.bzs__input:focus {
	background: none;
	border: 0;
	outline: 0;
	-webkit-box-shadow: none;
	box-shadow: none;
}

/* Убираем встроенный крестик Safari/Chrome — у нас свой. */
.bzs__input::-webkit-search-cancel-button,
.bzs__input::-webkit-search-decoration {
	-webkit-appearance: none;
	appearance: none;
}

/*
 * Подсказка «Найти модель, например Lowmel» — обычным регистром и 13px:
 * капсом и крупнее она не помещается в поле шапки рядом с селектором
 * категорий (на ширине 1280 для текста остаётся около 210px).
 */
.bzs input.bzs__input::-webkit-input-placeholder { color: var(--bzs-muted); font-size: 13px; text-transform: none; text-overflow: ellipsis; }
.bzs input.bzs__input::-moz-placeholder { color: var(--bzs-muted); opacity: 1; font-size: 13px; text-transform: none; text-overflow: ellipsis; }
.bzs input.bzs__input:-ms-input-placeholder { color: var(--bzs-muted); font-size: 13px; text-transform: none; }
.bzs input.bzs__input::placeholder { color: var(--bzs-muted); font-size: 13px; text-transform: none; text-overflow: ellipsis; }

/* --- Кнопки ----------------------------------------------------------- */

.bzs__clear,
.bzs__submit,
.bzs__back {
	display: -webkit-box;
	display: -ms-flexbox;
	display: flex;
	-webkit-box-align: center;
	-ms-flex-align: center;
	align-items: center;
	-webkit-box-pack: center;
	-ms-flex-pack: center;
	justify-content: center;
	-ms-flex-negative: 0;
	flex-shrink: 0;
	width: 44px;
	height: 100%;
	margin: 0;
	padding: 0;
	color: var(--bzs-muted);
	background: none;
	border: 0;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
}

.bzs__clear[hidden] {
	display: none;
}

.bzs__clear:hover,
.bzs__back:hover {
	color: var(--bzs-text);
}

.bzs__submit {
	width: 52px;
	color: var(--bzs-accent);
}

.bzs__submit .bzs-icon {
	width: 21px;
	height: 21px;
	stroke-width: 1.7;
}

.bzs__submit:hover {
	color: #000;
}

/* Кнопка «назад» нужна только в мобильном оверлее. */
.bzs__back {
	display: none;
	width: 40px;
	color: var(--bzs-text);
}

/* --- Выпадающий список ------------------------------------------------ */

.bzs__dropdown {
	position: absolute;
	top: calc(100% + 6px);
	left: 0;
	right: 0;
	z-index: 5;
	max-height: 60vh;
	padding: 8px 0;
	overflow-x: hidden;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	overscroll-behavior: contain;
	background: #fff;
	border: 1px solid var(--bzs-border);
	-webkit-box-shadow: 0 8px 28px rgba(0, 0, 0, .12);
	box-shadow: 0 8px 28px rgba(0, 0, 0, .12);
}

.bzs__dropdown[hidden] {
	display: none;
}

/*
 * Аккуратная полоса прокрутки вместо системной.
 *
 * `scrollbar-width` объявлен только для браузеров без поддержки
 * `::-webkit-scrollbar` (Firefox). Это не перестраховка: начиная с
 * Chrome 121 стандартное свойство отменяет действие webkit-псевдо-
 * элементов целиком, и полоса возвращалась к системному виду —
 * 10px шириной и со стрелками по краям. Под `@supports` правило
 * достаётся Firefox, а Chrome и Safari берут оформление ниже.
 */
@supports not selector(::-webkit-scrollbar) {
	.bzs__dropdown,
	.bzs__cat-list {
		scrollbar-width: thin;
		scrollbar-color: #cfcfcf transparent;
	}
}

.bzs__dropdown::-webkit-scrollbar {
	width: 6px;
}

.bzs__dropdown::-webkit-scrollbar-track {
	margin: 6px 0;
	background: transparent;
}

.bzs__dropdown::-webkit-scrollbar-thumb {
	background: #cfcfcf;
	border-radius: 3px;
}

.bzs__dropdown::-webkit-scrollbar-thumb:hover {
	background: #b0afaf;
}

/*
 * Кнопки-стрелки по краям полосы. На macOS их нет, а на Windows
 * и Linux они делают полосу заметно грубее — убираем везде.
 */
.bzs__dropdown::-webkit-scrollbar-button,
.bzs__cat-list::-webkit-scrollbar-button,
.bzs__dropdown::-webkit-scrollbar-button:start:decrement,
.bzs__dropdown::-webkit-scrollbar-button:end:increment,
.bzs__cat-list::-webkit-scrollbar-button:start:decrement,
.bzs__cat-list::-webkit-scrollbar-button:end:increment {
	display: none;
	width: 0;
	height: 0;
}

.bzs__dropdown::-webkit-scrollbar-corner,
.bzs__cat-list::-webkit-scrollbar-corner {
	background: transparent;
}

.bzs__group[hidden] {
	display: none;
}

/*
 * Разделитель ставится только между двумя видимыми группами.
 * Проверка `:not([hidden])` обязательна: скрытая группа остаётся
 * соседом в DOM, и без неё «Товары» получали линию сверху, хотя
 * над ними ничего не отображалось.
 */
.bzs__group:not([hidden]) + .bzs__group:not([hidden]) {
	margin-top: 4px;
	padding-top: 4px;
	border-top: 1px solid #f2f2f2;
}

.bzs__group-title {
	display: -webkit-box;
	display: -ms-flexbox;
	display: flex;
	-webkit-box-align: center;
	-ms-flex-align: center;
	align-items: center;
	-webkit-box-pack: justify;
	-ms-flex-pack: justify;
	justify-content: space-between;
	padding: 8px 16px;
	color: var(--bzs-muted);
	font-size: 13px;
	letter-spacing: .04em;
	text-transform: uppercase;
}

.bzs__group-clear {
	padding: 0;
	color: var(--bzs-muted);
	font: inherit;
	font-size: 12px;
	text-transform: none;
	background: none;
	border: 0;
	border-bottom: 1px dotted currentColor;
	cursor: pointer;
}

.bzs__group-clear:hover {
	color: var(--bzs-text);
}

/* Строка подсказки (популярное / история). */

.bzs__suggest {
	display: -webkit-box;
	display: -ms-flexbox;
	display: flex;
	-webkit-box-align: center;
	-ms-flex-align: center;
	align-items: center;
	padding: 9px 16px;
	color: var(--bzs-text);
	font-size: 14px;
	text-decoration: none;
}

.bzs__suggest .bzs-icon {
	-ms-flex-negative: 0;
	flex-shrink: 0;
	width: 15px;
	height: 15px;
	margin-right: 10px;
	color: var(--bzs-muted);
}

.bzs__suggest:hover,
.bzs__suggest.is-active {
	color: var(--bzs-text);
	background: var(--bzs-hover);
	text-decoration: none;
}

/* Строка товара. */

.bzs__product {
	display: -webkit-box;
	display: -ms-flexbox;
	display: flex;
	-webkit-box-align: center;
	-ms-flex-align: center;
	align-items: center;
	padding: 8px 16px;
	color: var(--bzs-text);
	text-decoration: none;
}

.bzs__product:hover,
.bzs__product.is-active {
	background: var(--bzs-hover);
	text-decoration: none;
}

.bzs__product-thumb {
	-ms-flex-negative: 0;
	flex-shrink: 0;
	width: 52px;
	height: 52px;
	margin-right: 14px;
	overflow: hidden;
	background: #fafafa;
}

.bzs__product-img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	-o-object-fit: contain;
	object-fit: contain;
}

.bzs__product-body {
	-webkit-box-flex: 1;
	-ms-flex: 1 1 auto;
	flex: 1 1 auto;
	min-width: 0;
}

.bzs__product-title {
	display: block;
	margin-bottom: 4px;
	color: var(--bzs-text);
	font-size: 14px;
	line-height: 1.25;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.bzs__product-title mark {
	padding: 0;
	color: inherit;
	font-weight: bold;
	background: none;
}

/*
 * WooCommerce печатает цену в порядке «старая (del), новая (ins)».
 * На макете сначала идёт актуальная цена, поэтому меняем порядок
 * флексом, а не разбором HTML.
 */
.bzs__product-price {
	display: -webkit-box;
	display: -ms-flexbox;
	display: flex;
	-webkit-box-align: baseline;
	-ms-flex-align: baseline;
	align-items: baseline;
	-ms-flex-wrap: wrap;
	flex-wrap: wrap;
	font-size: 14px;
	line-height: 1.2;
}

.bzs__product-price del,
.bzs__product-price ins {
	margin: 0 8px 0 0;
	background: none;
}

.bzs__product-price ins {
	-webkit-box-ordinal-group: 2;
	-ms-flex-order: 1;
	order: 1;
	color: var(--bzs-text);
	font-weight: bold;
	text-decoration: none;
}

.bzs__product-price del {
	-webkit-box-ordinal-group: 3;
	-ms-flex-order: 2;
	order: 2;
	color: var(--bzs-muted);
	font-size: 13px;
	text-decoration: line-through;
}

.bzs__product-price .amount {
	white-space: nowrap;
}

/* Подвал и пустая выдача. */

/*
 * Кнопка повторяет основную кнопку сайта («В корзину»):
 * фон #333, белый текст, верхний регистр, прямые углы.
 */
.bzs__more {
	display: block;
	margin: 10px 16px 4px;
	padding: 11px 20px;
	color: #fff;
	font-size: 12px;
	font-weight: bold;
	letter-spacing: .03em;
	line-height: 1.2;
	text-align: center;
	text-transform: uppercase;
	text-decoration: none;
	background: var(--bzs-accent);
	border-radius: 0;
	-webkit-transition: background-color .15s ease;
	transition: background-color .15s ease;
}

.bzs__more:hover,
.bzs__more:focus,
.bzs__more.is-active {
	color: #fff;
	background: #000;
	text-decoration: none;
}

/* «Найдено в категориях» в выпадающем списке. */

.bzs__category {
	display: -webkit-box;
	display: -ms-flexbox;
	display: flex;
	-webkit-box-align: center;
	-ms-flex-align: center;
	align-items: center;
	-webkit-box-pack: justify;
	-ms-flex-pack: justify;
	justify-content: space-between;
	padding: 9px 16px;
	color: var(--bzs-text);
	font-size: 14px;
	line-height: 1.3;
	text-decoration: none;
}

.bzs__category:hover,
.bzs__category.is-active {
	color: var(--bzs-text);
	background: var(--bzs-hover);
	text-decoration: none;
}

.bzs__category-parent {
	color: var(--bzs-muted);
}

.bzs__category-count {
	-ms-flex-negative: 0;
	flex-shrink: 0;
	min-width: 26px;
	margin-left: 12px;
	padding: 2px 7px;
	color: var(--bzs-muted);
	font-size: 12px;
	text-align: center;
	background: var(--bzs-chip);
	border-radius: 10px;
}

/* Пометка об исправленном запросе: «Показаны результаты по запросу …». */

.bzs__note {
	padding: 10px 16px 4px;
	color: var(--bzs-muted);
	font-size: 13px;
}

.bzs__note b {
	color: var(--bzs-text);
	font-weight: 600;
}

.bzs__empty {
	padding: 18px 16px;
	color: var(--bzs-muted);
	font-size: 14px;
	text-align: center;
}

.bzs__spinner {
	display: block;
	width: 22px;
	height: 22px;
	margin: 18px auto;
	border: 2px solid var(--bzs-border);
	border-top-color: var(--bzs-accent);
	border-radius: 50%;
	-webkit-animation: bzs-spin .7s linear infinite;
	animation: bzs-spin .7s linear infinite;
}

@-webkit-keyframes bzs-spin {
	to { -webkit-transform: rotate(360deg); transform: rotate(360deg); }
}

@keyframes bzs-spin {
	to { -webkit-transform: rotate(360deg); transform: rotate(360deg); }
}

/* --- Планшет ---------------------------------------------------------- */

@media screen and (max-width: 979px) {
	.bzs__cat {
		max-width: 40%;
	}

	.bzs__cat-label {
		font-size: 12px;
	}
}

/* --- Телефон: полноэкранный оверлей ----------------------------------- */

@media screen and (max-width: 767px) {
	/*
	 * Высота 50px намеренно совпадает с прежним полем `#search_mini`:
	 * шапка не меняет размеров, а тач-таргет остаётся крупнее 44pt,
	 * как рекомендуют гайдлайны iOS.
	 */

	/*
	 * `font-size: 16px` обязателен: при меньшем значении Safari на iOS
	 * зумит страницу при фокусе в поле ввода.
	 */
	.bzs input.bzs__input {
		font-size: 16px;
	}

	.bzs.is-overlay {
		position: fixed;
		top: 0;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 100000;
		width: auto;
		margin: 0;
		padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
		padding-top: calc(10px + env(safe-area-inset-top));
		background: #fff;
		-webkit-overflow-scrolling: touch;
	}

	.bzs.is-overlay .bzs__field {
		padding-left: 0;
	}

	.bzs.is-overlay .bzs__back {
		display: -webkit-box;
		display: -ms-flexbox;
		display: flex;
	}

	/*
	 * На макете в мобильном оверлее селектора категорий нет: строка
	 * состоит из «назад», поля, крестика и лупы. Выбранная на десктопе
	 * категория при этом не теряется — скрытое поле `product_cat`
	 * остаётся в форме и уходит вместе с запросом.
	 */
	.bzs.is-overlay .bzs__cat {
		display: none;
	}

	.bzs.is-overlay .bzs__dropdown {
		position: static;
		max-height: none;
		margin-top: 10px;
		border: 0;
		-webkit-box-shadow: none;
		box-shadow: none;
	}

	.bzs.is-overlay .bzs__form {
		display: -webkit-box;
		display: -ms-flexbox;
		display: flex;
		-webkit-box-orient: vertical;
		-webkit-box-direction: normal;
		-ms-flex-direction: column;
		flex-direction: column;
		height: 100%;
	}

	.bzs.is-overlay .bzs__dropdown {
		-webkit-box-flex: 1;
		-ms-flex: 1 1 auto;
		flex: 1 1 auto;
		overflow-y: auto;
	}

	.bzs__dropdown {
		max-height: 70vh;
	}

	.bzs__cat-label {
		height: 30px;
		font-size: 11px;
	}

	.bzs__product-thumb {
		width: 48px;
		height: 48px;
		margin-right: 12px;
	}
}

/* Блокировка прокрутки страницы под открытым оверлеем. */
body.bzs-locked {
	overflow: hidden;
	-webkit-overflow-scrolling: auto;
}

/* --- Доступность ------------------------------------------------------ */

.bzs__cat-label:focus-visible,
.bzs__clear:focus-visible,
.bzs__submit:focus-visible,
.bzs__back:focus-visible,
.bzs__cat-item:focus-visible {
	outline: 2px solid var(--bzs-accent);
	outline-offset: -2px;
}

@media (prefers-reduced-motion: reduce) {
	.bzs *,
	.bzs *:before,
	.bzs *:after {
		-webkit-transition-duration: .01ms !important;
		transition-duration: .01ms !important;
		-webkit-animation-duration: .01ms !important;
		animation-duration: .01ms !important;
		-webkit-animation-iteration-count: 1 !important;
		animation-iteration-count: 1 !important;
	}
}
