/*
 * Панель фильтров каталога ковров.
 *
 * Ширина колонок и сетки — тема: панель живёт внутри штатного col-md-3, поэтому
 * широкий каталог остаётся широким. Здесь только содержимое панели, строка
 * инструментов над сеткой и мобильный выдвижной экран.
 */

.hb-sidebar {
	--hb-ink: var(--et_dark-2-white, #222);
	--hb-paper: var(--et_white-2-dark, #fff);
	--hb-line: var(--et_border-color, #e6e6e6);
	--hb-mute: var(--et_grey, #777);
	--hb-accent: #992238;
	--hb-soft: #f6f4f1;
}

/* ------------------------------------------------------------------ панель */

.hb-panel {
	display: flex;
	flex-direction: column;
	max-height: none;
	font-size: 14px;
	color: var(--hb-ink);
}

.hb-panel__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding-bottom: 14px;
	margin-bottom: 4px;
	border-bottom: 1px solid var(--hb-line);
}

.hb-panel__title {
	display: flex;
	align-items: center;
	gap: 9px;
	font-size: 17px;
	font-weight: 600;
	letter-spacing: .01em;
}

.hb-panel__title .hb-i {
	width: 19px;
	height: 19px;
	flex: 0 0 auto;
}

.hb-panel__close {
	display: none;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	margin: -8px -10px -8px 0;
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	cursor: pointer;
}

.hb-panel__close .hb-i {
	width: 24px;
	height: 24px;
}

.hb-panel__note {
	margin: 14px 0 4px;
	font-size: 12.5px;
	line-height: 1.45;
	color: var(--hb-mute);
}

.hb-panel__scroll {
	min-height: 0;
}

/* ------------------------------------------------------------------ фасеты */

.hb-facet {
	padding: 16px 0;
	border-bottom: 1px solid var(--hb-line);
}

.hb-facet:last-child {
	border-bottom: 0;
}

.hb-facet__title {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 10px;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: .04em;
	text-transform: uppercase;
	color: var(--hb-ink);
}

.hb-facet__badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 18px;
	height: 18px;
	padding: 0 5px;
	border-radius: 9px;
	background: var(--hb-accent);
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0;
}

.hb-facet__hint {
	margin: -4px 0 10px;
	font-size: 12px;
	color: var(--hb-mute);
}

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

.hb-cats {
	margin: 0;
	padding: 0;
	list-style: none;
}

.hb-cats li {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 8px;
	padding: 5px 0;
}

.hb-cats a {
	color: inherit;
	text-decoration: none;
	border-bottom: 1px solid transparent;
}

.hb-cats a:hover {
	border-bottom-color: currentColor;
}

.hb-cats li.is-current > a {
	font-weight: 700;
}

.hb-cats__n {
	flex: 0 0 auto;
	font-size: 12px;
	color: var(--hb-mute);
}

/* --------------------------------------------------------------- варианты */

.hb-choices {
	display: flex;
	flex-wrap: wrap;
	gap: 7px;
}

.hb-choices--list {
	flex-direction: column;
	gap: 2px;
}

.hb-choices--colors {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
	gap: 9px 6px;
}

.hb-choice {
	position: relative;
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	cursor: pointer;
	font-weight: 400;
	line-height: 1.2;
	-webkit-user-select: none;
	user-select: none;
}

.hb-panel .hb-choice input[type="checkbox"] {
	position: absolute;
	left: 0;
	top: 0;
	width: 1px;
	height: 1px;
	margin: 0;
	padding: 0;
	border: 0;
	clip-path: inset(50%);
	opacity: 0;
	pointer-events: none;
}

.hb-panel .hb-choice:focus-within {
	outline: 2px solid var(--hb-accent);
	outline-offset: 3px;
}

.hb-choice.is-folded {
	display: none;
}

.hb-facet.is-open .hb-choice.is-folded {
	display: flex;
}

/* чипы: размер и форма */

.hb-choices--chips .hb-choice {
	gap: 6px;
	padding: 7px 12px;
	border: 1px solid var(--hb-line);
	border-radius: 100px;
	font-size: 12.5px;
	transition: border-color .12s, background-color .12s, color .12s;
}

.hb-choices--chips .hb-choice:hover {
	border-color: var(--hb-ink);
}

.hb-choices--chips .hb-choice.is-on {
	background: var(--hb-ink);
	border-color: var(--hb-ink);
	color: var(--hb-paper);
}

.hb-choices--chips .hb-choice__box {
	display: none;
}

.hb-choices--chips .hb-choice__n {
	font-size: 11px;
	opacity: .55;
}

/* список: материал и способ изготовления */

.hb-choices--list .hb-choice {
	padding: 6px 0;
	font-size: 13.5px;
}

.hb-choice__box {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 17px;
	height: 17px;
	border: 1px solid var(--hb-line);
	border-radius: 3px;
	background: var(--hb-paper);
	color: transparent;
	transition: border-color .12s, background-color .12s;
}

.hb-choice__box .hb-i {
	width: 12px;
	height: 12px;
	stroke-width: 3;
}

.hb-choice:hover .hb-choice__box {
	border-color: var(--hb-ink);
}

.hb-choice.is-on .hb-choice__box {
	background: var(--hb-ink);
	border-color: var(--hb-ink);
	color: var(--hb-paper);
}

.hb-choices--list .hb-choice__name {
	flex: 1 1 auto;
}

.hb-choices--list .hb-choice__n {
	font-size: 12px;
	color: var(--hb-mute);
}

/* цвета */

.hb-choices--colors .hb-choice {
	flex-direction: row;
	gap: 7px;
	min-width: 0;
	font-size: 12px;
	min-height: 36px;
}

.hb-choices--colors .hb-choice__name {
	min-width: 0;
	overflow-wrap: normal;
	line-height: 1.25;
}

.hb-choice__swatch {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	border: 1px solid rgba(0, 0, 0, .16);
	border-radius: 50%;
	background: var(--hb-soft);
	color: transparent;
	box-shadow: 0 0 0 0 var(--hb-ink);
	transition: box-shadow .12s;
}

.hb-choice__swatch .hb-i {
	width: 12px;
	height: 12px;
	stroke-width: 3.4;
	filter: drop-shadow(0 0 1px rgba(0, 0, 0, .55));
}

.hb-choice.is-on .hb-choice__swatch {
	color: #fff;
	box-shadow: 0 0 0 2px var(--hb-paper), 0 0 0 3.5px var(--hb-ink);
}

.hb-choices--colors .hb-choice__n {
	display: none;
}

.hb-choice.is-out {
	opacity: .38;
}

.hb-choice.is-out:not(.is-on) {
	pointer-events: none;
}

/* ------------------------------------------------------------------ бюджет */

.hb-price {
	display: flex;
	align-items: flex-end;
	gap: 8px;
}

.hb-price label {
	flex: 1 1 0;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
	margin: 0;
	font-size: 11.5px;
	font-weight: 400;
	color: var(--hb-mute);
}

.hb-panel .hb-price input[type="number"] {
	width: 100%;
	min-width: 0;
	height: 38px;
	padding: 0 10px;
	border: 1px solid var(--hb-line);
	border-radius: 4px;
	background: var(--hb-paper);
	color: var(--hb-ink);
	font-size: 13.5px;
	box-shadow: none;
	margin: 0;
}

.hb-price input:focus {
	border-color: var(--hb-ink);
	outline: none;
}

.hb-price__dash {
	padding-bottom: 10px;
	color: var(--hb-mute);
}

.hb-budgets {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 10px;
}

.hb-budget {
	padding: 6px 11px;
	border: 1px solid var(--hb-line);
	border-radius: 100px;
	background: none;
	color: inherit;
	font-size: 12px;
	line-height: 1.2;
	cursor: pointer;
}

.hb-budget:hover {
	border-color: var(--hb-ink);
}

.hb-budget.is-on {
	background: var(--hb-ink);
	border-color: var(--hb-ink);
	color: var(--hb-paper);
}

.hb-price__error {
	margin: 9px 0 0;
	font-size: 12px;
	color: var(--hb-accent);
}

.hb-panel .hb-facet--price > .hb-facet__hint {
	margin: 12px 0 0;
	line-height: 1.5;
}

.hb-panel [hidden] {
	display: none !important;
}

/* ----------------------------------------------------------- кнопки панели */

.hb-expand {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	margin-top: 10px;
	padding: 0;
	border: 0;
	background: none;
	color: var(--hb-ink);
	font-size: 12.5px;
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}

.hb-expand .hb-i {
	width: 15px;
	height: 15px;
	transition: transform .15s;
}

.hb-facet.is-open .hb-expand .hb-i {
	transform: rotate(180deg);
}

.hb-panel__actions {
	position: sticky;
	bottom: 0;
	z-index: 3;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	padding: 14px 0 4px;
	background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0, var(--hb-paper) 12px);
}

.hb-apply {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	min-height: 46px;
	padding: 0 18px;
	border: 0;
	border-radius: 4px;
	background: var(--hb-ink);
	color: var(--hb-paper);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition: opacity .12s;
}

.hb-apply:hover,
.hb-apply:focus {
	color: var(--hb-paper);
	opacity: .88;
}

.hb-apply[disabled] {
	opacity: .4;
	cursor: default;
}

.hb-apply .hb-i {
	width: 17px;
	height: 17px;
}

.hb-reset {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 4px 2px;
	border: 0;
	background: none;
	color: var(--hb-mute);
	font-size: 12.5px;
	cursor: pointer;
}

.hb-reset:hover {
	color: var(--hb-ink);
}

.hb-reset .hb-i {
	width: 14px;
	height: 14px;
}

.hb-panel__changed {
	font-size: 11.5px;
	color: var(--hb-accent);
}

/* ------------------------------------------------- строка над сеткой */

.filter-wrap .filter-content > .hb-open,
.hb-open {
	display: none;
	align-items: center;
	gap: 8px;
	padding: 10px 15px;
	border: 1px solid var(--et_dark-2-white, #222);
	border-radius: 4px;
	background: var(--et_dark-2-white, #222);
	color: var(--et_white-2-dark, #fff);
	font: inherit;
	font-size: 13px;
	font-weight: 600;
	line-height: 1;
	white-space: nowrap;
	cursor: pointer;
}

.hb-open .hb-i {
	width: 16px;
	height: 16px;
}

.hb-open__n {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 18px;
	height: 18px;
	padding: 0 5px;
	border-radius: 9px;
	background: var(--et_white-2-dark, #fff);
	color: var(--et_dark-2-white, #222);
	font-size: 11px;
	font-weight: 700;
}

.hb-above {
	margin: 0 0 14px;
}

.hb-quick {
	display: flex;
	align-items: center;
	gap: 7px;
	flex-wrap: wrap;
	margin-bottom: 10px;
}

.hb-quick__label {
	font-size: 12px;
	color: var(--et_grey, #777);
}

.hb-quick__item {
	display: inline-block;
	padding: 8px 13px;
	border: 1px solid var(--et_border-color, #e6e6e6);
	border-radius: 100px;
	font-size: 12px;
	line-height: 1;
	white-space: nowrap;
	text-decoration: none;
}

.hb-quick__item:hover {
	border-color: var(--et_dark-2-white, #222);
}

.hb-quick__item.is-on {
	background: var(--et_dark-2-white, #222);
	border-color: var(--et_dark-2-white, #222);
	color: var(--et_white-2-dark, #fff);
}

.hb-active {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	margin-bottom: 10px;
}

.hb-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 10px 6px 12px;
	border: 1px solid var(--et_border-color, #e6e6e6);
	border-radius: 100px;
	background: var(--et_white-2-dark, #fff);
	color: inherit;
	font-size: 12px;
	line-height: 1.2;
	cursor: pointer;
}

.hb-chip:hover {
	border-color: #992238;
	color: #992238;
}

.hb-chip .hb-i {
	width: 13px;
	height: 13px;
	opacity: .6;
}

.hb-clear {
	margin-left: 4px;
	font-size: 12px;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.hb-status {
	margin: 0;
	font-size: 12.5px;
	color: var(--et_grey, #777);
}

/* Разбор размера отдельной страницей — приглашение под счётчиком, не кнопка:
   человек уже получил сетку, а туда идут за ответом «подойдёт ли комнате». */
.hb-guide {
	margin: 6px 0 0;
	font-size: 12.5px;
	line-height: 1.5;
}

/* Ссылка строчная, а не inline-flex: на узком экране подпись переносится на
   две строки, и стрелка должна идти за последним словом, а не улетать к
   правому краю первой. */
.hb-guide a {
	color: var(--et_grey, #777);
	text-decoration: underline;
	text-decoration-color: var(--et_border-color, #e6e6e6);
	text-underline-offset: 3px;
}

.hb-guide a:hover {
	color: var(--et_dark-2-white, #222);
	text-decoration-color: currentColor;
}

.hb-guide .hb-i {
	width: 14px;
	height: 14px;
	margin-left: 5px;
	vertical-align: -2px;
	transition: transform .18s;
}

.hb-guide a:hover .hb-i {
	transform: translateX(3px);
}

.hb-results {
	position: relative;
	transition: opacity .18s;
}

.hb-results.is-busy {
	opacity: .45;
	pointer-events: none;
}

.hb-empty {
	padding: 48px 20px 56px;
	text-align: center;
}

.hb-empty .hb-i {
	width: 32px;
	height: 32px;
	color: var(--et_grey, #777);
}

.hb-empty h2 {
	margin: 14px 0 6px;
	font-size: 20px;
}

.hb-empty p {
	margin: 0 0 18px;
	color: var(--et_grey, #777);
}

.hb-empty .hb-apply {
	width: auto;
	min-width: 220px;
}

.hb-more {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	width: 100%;
	max-width: 340px;
	min-height: 46px;
	margin: 0 auto 22px;
	padding: 0 20px;
	border: 1px solid var(--et_dark-2-white, #222);
	border-radius: 4px;
	background: none;
	color: var(--et_dark-2-white, #222);
	font-size: 13.5px;
	font-weight: 600;
	cursor: pointer;
}

.hb-more:hover {
	background: var(--et_dark-2-white, #222);
	color: var(--et_white-2-dark, #fff);
}

.hb-more .hb-i {
	width: 16px;
	height: 16px;
}

/* ------------------------------------------------- выезжающая панель */

/* С 29.10.2026 фильтры на всех ширинах живут в выезжающей панели, а сетка
   товаров занимает всю ширину страницы — 4 карточки в ряд. Кнопка «Фильтры»
   в панели инструментов — единственный вход в панель. */
.filter-wrap .filter-content > .hb-open,
.hb-open {
	display: inline-flex;
	order: -1;
}

.filter-wrap .filter-content {
	flex-wrap: wrap;
	gap: 8px;
}

/* Двойной класс — ради веса: .col-md-3/.col-md-pull-9 из bootstrap грузятся
   позже и одним классом переопределяли бы position, padding и right. */
.hb-sidebar.hb-drawer {
	position: fixed;
	top: 0;
	right: 0;
	left: auto;
	bottom: 0;
	z-index: 10001;
	display: block;
	width: min(420px, 100%);
	max-width: 100%;
	padding: 0;
	background: var(--hb-paper);
	box-shadow: -14px 0 40px rgba(0, 0, 0, .18);
	transform: translate3d(100%, 0, 0);
	transition: transform .26s ease;
	visibility: hidden;
}

body.hb-filters-open .hb-sidebar.hb-drawer {
	transform: translate3d(0, 0, 0);
	visibility: visible;
}

.hb-drawer .hb-panel {
	height: 100%;
	max-height: 100%;
}

.hb-drawer .hb-panel__head {
	flex: 0 0 auto;
	padding: 16px 18px;
	margin: 0;
}

.hb-drawer .hb-panel__close {
	display: inline-flex;
	margin: 0;
}

.hb-drawer .hb-panel__scroll {
	flex: 1 1 auto;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	overscroll-behavior: contain;
	padding: 0 18px 8px;
}

.hb-drawer .hb-panel__note {
	margin-top: 12px;
}

.hb-drawer .hb-panel__actions {
	flex: 0 0 auto;
	position: static;
	padding: 12px 18px calc(12px + env(safe-area-inset-bottom, 0px));
	border-top: 1px solid var(--hb-line);
	background: var(--hb-paper);
}

.hb-drawer .hb-apply {
	min-height: 50px;
	font-size: 15px;
}

/* Штатный боковой ярлычок темы тут больше не нужен. */
.hb-catalog-wide .et-toggle-mob-sidebars,
.hb-catalog-wide .et-toggle-mob-sidebar {
	display: none !important;
}

/* ------------------------------------------------------- сетка товаров */

/* Колонка контента XStore посчитана под сайдбар (col-md-9 + push/pull) —
   растягиваем её, а float-сетку с first/last меняем на CSS grid: она не
   зависит от того, сколько карточек в ряду, и полоса на всю ширину в ней не
   ломает ряды. */
.hb-catalog-wide .main-products-loop.content {
	width: 100%;
	left: auto;
	right: auto;
	float: none;
}

.hb-catalog-wide .products-loop.products-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 28px 24px;
	margin: 0;
}

.hb-catalog-wide .products-loop.products-grid::before,
.hb-catalog-wide .products-loop.products-grid::after {
	display: none;
}

/* body — ради веса: у темы на телефоне .shop-full-width .products-grid.row-count-4
   .product { width: 50% } того же веса и грузится позже. */
body.hb-catalog-wide .products-loop.products-grid > .product {
	width: auto;
	max-width: none;
	float: none;
	clear: none;
	padding: 0;
	margin: 0;
	position: relative;
	left: auto;
	top: auto;
}

/* У превью в разметке width="300" — без этого фото стоит узкой полосой посреди
   карточки. Кадры 3:4 приходят из hottabych-card-images. */
.hb-catalog-wide .products-loop.products-grid .product-content-image img {
	width: 100%;
	height: auto;
}

.hb-catalog-wide .products-loop.products-grid > :not(.product) {
	grid-column: 1 / -1;
}

@media only screen and (max-width: 1100px) {
	.hb-catalog-wide .products-loop.products-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media only screen and (max-width: 767px) {
	.hb-catalog-wide .products-loop.products-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 20px 12px;
	}
}

/* ---------------------------------------------------------------- телефон */

@media only screen and (max-width: 991px) {
	.hb-quick {
		flex-wrap: nowrap;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		padding-bottom: 2px;
	}

	.hb-quick::-webkit-scrollbar {
		height: 0;
	}

	.hb-quick__item {
		flex: 0 0 auto;
	}

	.hb-choices--chips .hb-choice,
	.hb-budget {
		padding-top: 9px;
		padding-bottom: 9px;
	}

	.hb-choices--list .hb-choice {
		padding: 9px 0;
	}

	.hb-choices--colors {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.hb-choices--colors .hb-choice {
		min-height: 40px;
	}
}

.hb-veil {
	position: fixed;
	inset: 0;
	z-index: 10000;
	background: rgba(0, 0, 0, .45);
	opacity: 0;
	visibility: hidden;
	transition: opacity .26s;
}

body.hb-filters-open .hb-veil {
	opacity: 1;
	visibility: visible;
}

body.hb-filters-open {
	overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
	.hb-sidebar,
	.hb-veil,
	.hb-results {
		transition: none;
	}
}
