/* -------------------------------------------------------------------------
   09-catalog.css — Страница каталога (archive-product)
-------------------------------------------------------------------------- */

/* ── Заголовок архива ────────────────────────────────────────────────────── */
.cat-hero {
	padding: 10px 32px;
	/* border-bottom: var(--b); */
	display: flex;
	align-items: baseline;
	gap: 16px;
}
.cat-hero h1 {
	font-family: var(--enclave-heading-font);
	font-size: 48px;
	text-transform: uppercase;
	line-height: 1;
}
.cat-hero span, .enclave-wishlist-main__count {
	font-family: var(--enclave-heading-font);
	font-size: 22px;
	color: #ccc;
	font-weight: 600;
}

/* ── Layout: sidebar + main ──────────────────────────────────────────────── */
.catalog-layout {
	display: grid;
	grid-template-columns: 200px minmax(0, 1fr);
	border-bottom: var(--b);
	align-items: start;
}

/* ── Desktop sidebar ─────────────────────────────────────────────────────── */
.filter-sidebar {
	border-right: var(--b);
	position: sticky;
	top: 90px;
	max-height: calc(100vh - 90px);
	overflow-y: auto;
	scrollbar-width: thin;
	scrollbar-color: #e0e0e0 transparent;
	height: 100%;
	z-index: 2;
}
.filter-sidebar::-webkit-scrollbar {
	width: 4px;
}
.filter-sidebar::-webkit-scrollbar-thumb {
	background: #e0e0e0;
	border-radius: 2px;
}
.fs-head {
	padding: 14px 18px;
	border-bottom: var(--b);
	display: flex;
	align-items: center;
	justify-content: space-between;
}
.fs-title {
	font-family: var(--enclave-heading-font);
	font-size: 20px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}
.fs-reset {
	font-size: 9px;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: #bbb;
	cursor: pointer;
	text-decoration: underline;
	display: none;
}
.fs-reset,
.fs-reset.show {
	display: inline;
}
.fs-reset:hover {
	color: var(--k);
}
.fs-search {
	display: flex;
	align-items: center;
	border-bottom: var(--b);
	padding: 0 12px;
	gap: 8px;
}
.fs-search i {
	font-size: 13px;
	color: #bbb;
	flex-shrink: 0;
}
.fs-search input {
	flex: 1;
	border: none;
	outline: none;
	padding: 10px 0;
	font-size: 11px;
	font-family: var(--enclave-body-font);
	color: var(--k);
}
.fs-search input::placeholder {
	color: #ccc;
}
.fs-group {
	border-bottom: 1px solid #f0f0f0;
	padding: 10px 0;
}
.fs-group:last-child {
	border-bottom: none;
}
.fs-group-title {
	font-size: 8px;
	font-weight: 700;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: #aaa;
	padding: 4px 18px 8px;
}
.fs-brand {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 6px 18px;
	cursor: pointer;
	transition: background 0.1s;
	text-decoration: none;
	color: inherit;
}
.fs-brand:hover {
	background: var(--g);
}
.fs-brand.on {
	background: var(--k);
}
.fs-brand.on .fs-brand-name {
	color: var(--w);
}
.fs-brand.on .fs-brand-cnt {
	color: rgba(255, 255, 255, 0.3);
}
.fs-brand-name {
	font-size: 11px;
	color: #555;
	font-weight: 500;
}
.fs-brand-cnt {
	font-size: 10px;
	color: #bbb;
}
.fs-brand.hidden {
	display: none;
}

/* ── Catalog main (правая колонка) ───────────────────────────────────────── */
.catalog-main {
	min-width: 0;
}

/* ── Сортировка WooCommerce ──────────────────────────────────────────────── */
.catalog-main .woocommerce-ordering {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 0 18px;
	border-bottom: var(--b);
	border-left: var(--b);
	height: 40px;
	margin: 0;
	position: relative;
}
.catalog-main .woocommerce-ordering::before {
	content: 'Сортировка';
	font-size: 10px;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: #aaa;
}
.catalog-main .woocommerce-ordering select {
	appearance: none;
	border: none;
	background: transparent;
	font-size: 10px;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: capitalize;
	color: var(--k);
	cursor: pointer;
	outline: none;
	font-family: var(--enclave-body-font);
	padding: 0;
}

/* ── Mobile чипы брендов ─────────────────────────────────────────────────── */
.mob-filter-wrap {
	border-bottom: var(--b);
}
.mob-filter-search {
	display: flex;
	align-items: center;
	border-bottom: 1px solid #f0f0f0;
	padding: 0 14px;
	gap: 8px;
}
.mob-filter-search i {
	font-size: 13px;
	color: #bbb;
	flex-shrink: 0;
}
.mob-filter-search input {
	flex: 1;
	border: none;
	outline: none;
	padding: 10px 0;
	font-size: 12px;
	font-family: var(--enclave-body-font);
}
.mob-filter-search input::placeholder {
	color: #ccc;
}
.mob-chips-row {
	display: flex;
	overflow-x: auto;
	padding: 10px 14px;
	gap: 7px;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
}
.mob-chips-row::-webkit-scrollbar {
	display: none;
}
.mob-chip {
	flex-shrink: 0;
	font-size: 10px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	padding: 7px 14px;
	border: var(--b);
	color: #aaa;
	cursor: pointer;
	transition: all 0.12s;
	white-space: nowrap;
	text-decoration: none;
	display: inline-block;
}
.mob-chip.on {
	background: var(--k);
	color: var(--w);
	border-color: var(--k);
}
.mob-chip:active {
	background: var(--a);
	color: var(--k);
	border-color: var(--a);
}
.mob-filter-active {
	padding: 6px 14px;
	border-top: 1px solid #f0f0f0;
	font-size: 10px;
	color: #aaa;
	display: none;
	align-items: center;
	gap: 6px;
}
.mob-filter-active.show {
	display: flex;
}
.mob-filter-active-tag {
	background: var(--k);
	color: var(--w);
	font-size: 9px;
	font-weight: 600;
	padding: 3px 10px;
	display: flex;
	align-items: center;
	gap: 5px;
}
.mob-filter-active-tag i {
	font-size: 10px;
	cursor: pointer;
	opacity: 0.6;
}
.mob-filter-active-tag a {
	color: var(--w);
	text-decoration: none;
}
.mob-filter-active-tag a:hover i {
	opacity: 1;
}

body.post-type-archive-product,
body.tax-product_cat,
body.tax-product_brand {
	overflow-x: clip;
}

.enclave-section--tile-grid {
	border-top: var(--b);
}

/* ── Catalog category tiles — match prototype .ctab ─────────────────────── */
.enclave-section--tile-grid .enclave-tile.enclave-tile--with-icon-vertical {
	padding: 16px 8px;
	gap: 8px;
	min-height: auto;
}
.enclave-section--tile-grid .enclave-tile.enclave-tile--with-icon-vertical .enclave-tile__icon,
.enclave-section--tile-grid .enclave-tile.enclave-tile--with-icon-vertical .enclave-tile__info .enclave-tile__icon {
	width: auto;
	height: auto;
}
.enclave-section--tile-grid .enclave-tile.enclave-tile--with-icon-vertical .enclave-tile__icon i,
.enclave-section--tile-grid .enclave-tile.enclave-tile--with-icon-vertical .enclave-tile__info .enclave-tile__icon i {
	font-size: 20px;
}
.enclave-section--tile-grid .enclave-tile.enclave-tile--with-icon-vertical .enclave-tile__text {
	font-size: 18px;
	letter-spacing: 0.04em;
}
.enclave-section--tile-grid .enclave-tile.enclave-tile--with-icon-vertical:hover {
	background: var(--g);
}
.enclave-section--tile-grid .enclave-tile.enclave-tile--with-icon-vertical:hover .enclave-tile__icon i {
	color: var(--k);
}
.enclave-section--tile-grid .enclave-tile.enclave-tile--with-icon-vertical.on {
	background: var(--k);
}
.enclave-section--tile-grid .enclave-tile.enclave-tile--with-icon-vertical.on .enclave-tile__icon i {
	color: var(--a);
}
.enclave-section--tile-grid .enclave-tile.enclave-tile--with-icon-vertical.on .enclave-tile__text {
	color: var(--w);
}
.enclave-section--tile-grid .enclave-tile.enclave-tile--with-icon-vertical.on .enclave-tile__subtitle {
	color: rgba(255, 255, 255, 0.3);
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 767px) {
	.catalog-layout {
		grid-template-columns: minmax(0, 1fr);
	}
	.filter-sidebar {
		display: none;
	}
	.mob-filter-wrap {
		display: block;
	}
	.cat-hero {
		padding: 14px 16px;
	}
	.cat-hero h1 {
		font-size: 36px;
	}
	.cat-hero span {
		font-size: 22px;
	}
}

@media (min-width: 768px) {
	.mob-filter-wrap {
		display: none;
	}
	.catalog-layout {
		grid-template-columns: 200px minmax(0, 1fr);
	}
	.filter-sidebar {
		display: block;
	}
}

/* =========================================================================
   ВКЛАДКИ КАТЕГОРИЙ (.enclave-section--tile-grid с иконочными плитками)
   — применяются везде, где выводится блок category-promo-tiles
   (каталог, страница бренда, гутенберг-блок на главной).
   в прототипе enclave_frontend2.html: на мобиле горизонтальная лента
   со скроллом, компактные иконки + подписи; на десктопе равные вкладки.
   ========================================================================= */
.enclave-section--tile-grid .enclave-section {
	margin: 0;
}
.enclave-section--tile-grid .enclave-tiles.enclave-tiles--fluid {
	display: flex;
	border-bottom: var(--b);
}
.enclave-section--tile-grid .enclave-tile.enclave-tile--with-icon-vertical {
	flex: 1 1 0;
	min-width: 0;
	width: auto !important;
	min-height: auto;
	border-bottom: none;
	border-left: none;
	border-right: var(--b);
}
.enclave-section--tile-grid .enclave-tile.enclave-tile--with-icon-vertical:last-of-type {
	border-right: none;
}

@media (max-width: 767px) {
	.enclave-section--tile-grid .enclave-tiles.enclave-tiles--fluid {
		overflow-x: auto;
		scrollbar-width: none;
		-webkit-overflow-scrolling: touch;
	}
	.enclave-section--tile-grid .enclave-tiles.enclave-tiles--fluid::-webkit-scrollbar {
		display: none;
	}
	.enclave-section--tile-grid .enclave-tile.enclave-tile--with-icon-vertical {
		flex: 0 0 auto;
		width: auto !important;
		min-width: 60px;
		min-height: auto;
		padding: 12px 6px;
		gap: 6px;
	}
	.enclave-section--tile-grid .enclave-tile--with-icon-vertical .enclave-tile__icon,
	.enclave-section--tile-grid .enclave-tile.enclave-tile--with-icon-vertical .enclave-tile__info .enclave-tile__icon {
		width: auto;
		height: auto;
	}
	.enclave-section--tile-grid .enclave-tile--with-icon-vertical .enclave-tile__icon i,
	.enclave-section--tile-grid .enclave-tile.enclave-tile--with-icon-vertical .enclave-tile__info .enclave-tile__icon i {
		font-size: 18px;
	}
	.enclave-section--tile-grid .enclave-tile--with-icon-vertical .enclave-tile__info {
		gap: 6px;
	}
	.enclave-section--tile-grid .enclave-tile.enclave-tile--with-icon-vertical .enclave-tile__text {
		font-size: 8px;
		letter-spacing: 0.02em;
		font-family: var(--enclave-body-font);
		font-weight: 600;
	}
	.enclave-section--tile-grid .enclave-tile--with-icon-vertical .enclave-tile__subtitle {
		display: none;
	}
}

/* SM 360px */
@media (min-width: 360px) and (max-width: 767px) {
	.enclave-section--tile-grid .enclave-tile.enclave-tile--with-icon-vertical {
		min-width: 64px;
	}
}

/* MD 390px */
@media (min-width: 390px) and (max-width: 767px) {
	.enclave-section--tile-grid .enclave-tile.enclave-tile--with-icon-vertical {
		min-width: 68px;
	}
	.enclave-section--tile-grid .enclave-tile.enclave-tile--with-icon-vertical .enclave-tile__text {
		font-size: 8px;
	}
}

/* LG ≥430px — вкладки растягиваются на всю ширину, скролл не нужен.
   Подпись (.enclave-tile__subtitle) остаётся скрытой на всех мобильных. */
@media (min-width: 430px) and (max-width: 767px) {
	.enclave-section--tile-grid .enclave-tiles.enclave-tiles--fluid {
		overflow-x: visible;
	}
	.enclave-section--tile-grid .enclave-tile.enclave-tile--with-icon-vertical {
		flex: 1 1 0;
		min-width: 0;
	}
}

/* ── Панель инструментов: сортировка + фильтр цены ───────────────────────── */
.catalog-toolbar {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0 16px;
	border-bottom: var(--b);
	border-left: var(--b);
	padding-right: 18px;
	min-width: 0;
}
.catalog-main .catalog-toolbar .woocommerce-ordering {
	border-bottom: 0;
	border-left: 0;
}

/* ── Фильтр по цене (двойной ползунок) ───────────────────────────────────── */
.ep-price-filter {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-left: auto;
	min-width: 0;
}
.ep-price-filter__title {
	font-size: 10px;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: #aaa;
	white-space: nowrap;
}
.ep-price-filter__slider {
	position: relative;
	width: 180px;
	height: 30px;
	flex-shrink: 0;
}
.ep-price-filter__track {
	position: absolute;
	left: 0;
	right: 0;
	top: 13px;
	height: 2px;
	background: #e3e3e3;
	border-radius: 2px;
}
.ep-price-filter__range {
	position: absolute;
	top: 13px;
	height: 2px;
	background: var(--k);
	border-radius: 2px;
}
.ep-price-filter__input {
	position: absolute;
	left: 0;
	right: 0;
	top: 0;
	width: 100%;
	height: 30px;
	margin: 0;
	padding: 0;
	background: none;
	pointer-events: none;
	-webkit-appearance: none;
	appearance: none;
	outline: none;
	border: 0;
	box-shadow: none;
	opacity: 0;
}
.ep-price-filter__input::-webkit-slider-runnable-track {
	background: transparent;
	border: none;
	height: 2px;
}
.ep-price-filter__input::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	pointer-events: auto;
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: var(--k);
	border: 0;
	outline: none;
	box-shadow: none;
	cursor: pointer;
	margin-top: 0;
}
.ep-price-filter__input::-moz-range-track {
	background: transparent;
	border: none;
	height: 2px;
}
.ep-price-filter__input::-moz-range-thumb {
	pointer-events: auto;
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: var(--k);
	border: 0;
	outline: none;
	box-shadow: none;
	cursor: pointer;
}
.ep-price-filter__input:focus,
.ep-price-filter__input:focus-visible,
.ep-price-filter__input:focus::-webkit-slider-thumb,
.ep-price-filter__input:focus::-moz-range-thumb {
	outline: none;
	box-shadow: none;
	border: 0;
}
.ep-price-filter__vals {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	text-align: center;
	font-size: 9px;
	font-weight: 600;
	color: var(--k);
	letter-spacing: 0.02em;
	line-height: 1;
	white-space: nowrap;
	pointer-events: none;
}
.ep-price-filter__dash {
	margin: 0 3px;
	color: #bbb;
}

/* Кастомные кружки-ползунки (позиционируются из JS, center на линии) */
.ep-price-filter__thumb {
	position: absolute;
	top: 8px;
	width: 12px;
	height: 12px;
	margin-left: -6px;
	left: 0;
	border-radius: 50%;
	background: var(--k);
	border: 2px solid #fff;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
	pointer-events: none;
	touch-action: none;
}
.ep-price-filter__thumb--max {
	z-index: 2;
}
.ep-price-filter__thumb:focus-visible {
	outline: 2px solid var(--k);
	outline-offset: 2px;
}

/* AJAX-загрузка каталога */
.ep-catalog-loading .catalog-main {
	opacity: 0.45;
	pointer-events: none;
	transition: opacity 0.15s ease;
}

@media (max-width: 767px) {
	.ep-price-filter {
		margin-left: 0;
		width: 100%;
		padding: 8px 18px 12px;
		border-top: 1px solid #f0f0f0;
	}
	.ep-price-filter__slider {
		width: 160px;
	}
}
