/* Картки товарів у каталозі (магазин, категорії, мітки, пошук).
   Підключається лише там, де на body є .yx-catalog (functions.php, yonex_is_catalog_page).
   У css/style.css і style.css на картках багато правил з !important і term-* селекторами,
   тож префікс навмисно довгий — щоб перебити їх без нових !important, де це можливо. */

/* Сітка */

/* !important — у css/style.css на мобайлі .woo-prod ul.products { display: flex !important } */
body.yx-catalog.woocommerce ul.products {
	display: grid !important;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 28px 12px;
	margin: 0 0 32px;
	padding: 0;
}

body.yx-catalog.woocommerce ul.products::before,
body.yx-catalog.woocommerce ul.products::after {
	display: none;
}

@media (min-width: 768px) {
	body.yx-catalog.woocommerce ul.products {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 40px 24px;
	}
}

@media (min-width: 1280px) {
	body.yx-catalog.woocommerce ul.products.columns-4 {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

/* Картка */

body.yx-catalog.woocommerce ul.products li.product,
body.yx-catalog.woocommerce ul.products[class*=columns-] li.product {
	position: relative;
	isolation: isolate; /* z-index міток BeRocket (400) не виходить за картку — інакше перекриває список «Сортування» */
	display: flex;
	flex-direction: column;
	float: none;
	width: auto !important;
	height: auto;
	min-height: 0;
	margin: 0 !important;
	padding: 0 !important;
	border: 0;
	background: transparent;
	box-shadow: none;
	transform: none;
	transition: none;
}

body.yx-catalog.woocommerce ul.products li.product:hover {
	box-shadow: none;
	transform: none;
}

body.yx-catalog.woocommerce ul.products li.product a.woocommerce-LoopProduct-link {
	display: flex;
	flex: 0 0 auto;
	flex-direction: column;
	color: #1F2427;
	text-decoration: none;
}

/* Фото: квадрат на тлі #F8F8F8. Фото товарів — на білому або #F8F8F8 тлі; darken
   «розчиняє» обидва в плашці без смуг, кольори самого товару не змінюються. */

body.yx-catalog.woocommerce ul.products li.product .yx-card-media {
	position: relative;
	display: block;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	background: #F8F8F8;
}

body.yx-catalog.woocommerce ul.products li.product a.woocommerce-LoopProduct-link .yx-card-media img {
	position: absolute;
	top: 0;
	left: 0;
	width: 100% !important;
	max-width: none !important;
	height: 100% !important;
	min-height: 0 !important;
	max-height: none !important;
	margin: 0 !important;
	padding: 7%;
	object-fit: contain !important;
	mix-blend-mode: darken;
	transition: opacity .45s ease, transform .6s cubic-bezier(.2, .7, .2, 1);
}

body.yx-catalog.woocommerce ul.products li.product .yx-card-media .yx-card-img-alt {
	opacity: 0;
}

/* Мітки «Немає в наявності», sale, характеристики — всередині фото */

body.yx-catalog.woocommerce ul.products li.product .soldoutgrey {
	display: none;
}

/* Лише головне фото: друге (.yx-card-img-alt) має лишатися прихованим до наведення */
body.yx-catalog.woocommerce ul.products li.product.outofstock .yx-card-media img.wp-post-image {
	opacity: .45;
}

body.yx-catalog.woocommerce ul.products li.product .yx-card-media .soldout {
	position: absolute;
	top: 12px;
	right: auto !important; /* у темі .soldout розтягнута на всю ширину */
	left: 12px;
	z-index: 2;
	width: auto !important;
	max-width: calc(100% - 24px);
	margin: 0;
	padding: 4px 10px;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: .5px;
	text-transform: uppercase;
	color: #fff;
	background: #1F2427;
}

body.yx-catalog.woocommerce ul.products li.product .yx-card-media .onsale {
	display: none;
}

body.yx-catalog.woocommerce ul.products li.product .yx-card-media .attribute-div {
	position: absolute;
	top: auto;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 3;
	display: block;
	float: none;
	width: auto;
	min-height: 0;
	margin: 0;
	padding: 12px 16px;
	font-size: 13px;
	line-height: 1.45;
	color: #1F2427;
	background: rgba(255, 255, 255, .94);
	border: 0;
	box-shadow: none;
	opacity: 0;
	transform: translateY(100%);
	transition: opacity .3s ease, transform .35s cubic-bezier(.2, .7, .2, 1);
	pointer-events: none;
}

body.yx-catalog.woocommerce ul.products li.product .yx-card-media .attribute-div p.attribute-val {
	display: block;
	height: auto;
	margin: 0;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.45;
}

body.yx-catalog.woocommerce ul.products li.product .yx-card-media .attribute-div p.attribute-val span {
	font-weight: 400;
	color: #6c757d;
}

/* Мітки BeRocket із шаблоном css-14 («Новинка», «Уцінка», «Передзамовлення», «Розпродаж»):
   замість скошеної стрічки — плоский прапорець. Колір — з самої мітки (inline-стиль на i.template-span-before).
   Інші шаблони (image-1000, css-27 тощо) не чіпаємо. */

body.yx-catalog.woocommerce ul.products li.product .berocket_better_labels {
	padding: 12px !important;
	pointer-events: none;
}

body.yx-catalog.woocommerce ul.products li.product .berocket_better_labels .br_alabel:has(> span > b.br-labels-css-14) {
	width: auto !important;
	height: auto !important;
	margin: 0 !important;
	padding: 0 !important;
	transform: none !important;
}

body.yx-catalog.woocommerce ul.products li.product .berocket_better_labels .br_alabel:has(> span > b.br-labels-css-14) > span {
	position: relative !important;
	display: inline-block !important;
	width: auto !important;
	height: auto !important;
	margin: 0 !important;
	padding: 4px 10px !important;
	line-height: 1.3 !important;
	background: none !important;
	transform: none !important;
}

body.yx-catalog.woocommerce ul.products li.product .berocket_better_labels .br_alabel:has(> span > b.br-labels-css-14) > span > i {
	display: none !important;
}

body.yx-catalog.woocommerce ul.products li.product .berocket_better_labels .br_alabel:has(> span > b.br-labels-css-14) > span > i.template-span-before {
	position: absolute !important;
	clip-path: none !important;
	top: 0 !important;
	right: 0 !important;
	bottom: 0 !important;
	left: 0 !important;
	display: block !important;
	width: auto !important;
	height: auto !important;
	margin: 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	transform: none !important;
}

body.yx-catalog.woocommerce ul.products li.product .berocket_better_labels .br_alabel:has(> span > b.br-labels-css-14) > span > i.template-span-before::before,
body.yx-catalog.woocommerce ul.products li.product .berocket_better_labels .br_alabel:has(> span > b.br-labels-css-14) > span > i.template-span-before::after {
	display: none !important;
}

body.yx-catalog.woocommerce ul.products li.product .berocket_better_labels .br_alabel:has(> span > b.br-labels-css-14) > span > b {
	position: relative !important;
	z-index: 1 !important;
	display: block !important;
	width: auto !important;
	height: auto !important;
	margin: 0 !important;
	padding: 0 !important;
	font-size: 12px !important;
	font-weight: 700 !important;
	line-height: 1.3 !important;
	letter-spacing: .5px;
	text-transform: uppercase;
	color: #fff !important;
	background: none !important;
	transform: none !important;
}

/* Назва і ціна */

body.yx-catalog.woocommerce ul.products li.product h2.woocommerce-loop-product__title,
body.yx-catalog.archive.woocommerce ul.products li.product h2.woocommerce-loop-product__title {
	display: -webkit-box;
	height: auto !important;
	min-height: calc(3em * 1.35) !important; /* 3 рядки — ціни в ряду на одній висоті */
	margin: 14px 0 8px;
	padding: 0;
	overflow: hidden;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	font-size: 16px;
	font-weight: 500;
	line-height: 1.35;
	text-decoration: none;
	color: #1F2427;
	transition: color .2s ease;
}

body.yx-catalog.woocommerce ul.products li.product .preorder_text_info {
	margin: 0 0 6px;
	font-size: 13px;
	color: #009E42;
}

body.yx-catalog.woocommerce ul.products li.product .price {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 2px 8px;
	margin: 0;
	padding: 0;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.3;
	color: #1F2427;
}

body.yx-catalog.woocommerce ul.products li.product .price ins {
	order: 0;
	margin: 0;
	padding: 0 !important;
	font-size: 18px;
	font-weight: 700;
	text-decoration: none;
	color: #009E42;
}

body.yx-catalog.woocommerce ul.products li.product .price .screen-reader-text {
	position: absolute !important;
}

body.yx-catalog.woocommerce ul.products li.product .price del {
	order: 1;
	margin: 0;
	font-size: 14px;
	font-weight: 400;
	color: #8a8f94;
	opacity: 1;
}

/* Варіації (розмір ручки, сума сертифіката) — компактні «чипси» під ціною */

/* css/style.css (768–1023px): .fleximob .products.columns-3 li { height: 670px } чіпляє і вкладені li варіацій */
body.yx-catalog.woocommerce ul.products li.product li {
	height: auto;
}

body.yx-catalog.woocommerce ul.products li.product .wvs-archive-variations-wrapper,
body.yx-catalog.woocommerce ul.products li.product .wvs-archive-variation-wrapper {
	height: auto !important;
	margin: 10px 0 0;
}

/* WVS виводить англійське «This product is currently out of stock…» — дублює мітку «Немає в наявності» на фото */
body.yx-catalog.woocommerce ul.products li.product .wvs-archive-variations-wrapper p.stock.out-of-stock {
	display: none;
}

body.yx-catalog.woocommerce ul.products li.product .wvs-archive-variations-wrapper ul.variations {
	margin: 0;
	padding: 0;
}

body.yx-catalog.woo-variation-swatches.wvs-style-squared ul.products li.product .variable-items-wrapper .variable-item.button-variable-item,
body.yx-catalog.woocommerce ul.products li.product .variable-items-wrapper .variable-item.button-variable-item {
	min-width: 32px;
	height: 24px;
	margin: 0 4px 4px 0;
	padding: 0 6px;
	line-height: 22px;
	font-size: 12px;
	color: #1F2427;
	background: #fff;
	border-radius: 0;
	box-shadow: 0 0 0 1px #CCC;
}

body.yx-catalog.woocommerce ul.products li.product .variable-items-wrapper .variable-item.button-variable-item:hover,
body.yx-catalog.woocommerce ul.products li.product .variable-items-wrapper .variable-item.button-variable-item.selected {
	box-shadow: 0 0 0 1px #1F2427;
}

/* Кнопка «у кошик» прибрана в PHP; підстраховка для карток, що приходять з кешу */

body.yx-catalog.woocommerce ul.products li.product a.button.add_to_cart_button {
	display: none !important;
}

/* Наведення — лише там, де є миша */

@media (hover: hover) and (pointer: fine) {
	body.yx-catalog.woocommerce ul.products li.product:hover a.woocommerce-LoopProduct-link .yx-card-media img {
		transform: scale(1.04);
	}

	body.yx-catalog.woocommerce ul.products li.product:hover .yx-card-media .yx-card-img-alt {
		opacity: 1;
	}

	body.yx-catalog.woocommerce ul.products li.product:hover .yx-card-media--alt img.wp-post-image {
		opacity: 0;
	}

	body.yx-catalog.woocommerce ul.products li.product.outofstock:hover .yx-card-media .yx-card-img-alt {
		opacity: .45;
	}

	body.yx-catalog.woocommerce ul.products li.product:hover .yx-card-media .attribute-div {
		opacity: 1;
		transform: translateY(0);
	}

	body.yx-catalog.woocommerce ul.products li.product:hover h2.woocommerce-loop-product__title {
		color: #009E42;
	}
}

@media (prefers-reduced-motion: reduce) {
	body.yx-catalog.woocommerce ul.products li.product a.woocommerce-LoopProduct-link .yx-card-media img,
	body.yx-catalog.woocommerce ul.products li.product .yx-card-media .attribute-div {
		transition: none;
	}
}

/* Мобайл: характеристики не показуємо (на тач-пристроях немає наведення) */

@media (max-width: 767px) {
	body.yx-catalog.woocommerce ul.products li.product .yx-card-media .attribute-div {
		display: none;
	}

	body.yx-catalog.woocommerce ul.products li.product h2.woocommerce-loop-product__title,
	body.yx-catalog.archive.woocommerce ul.products li.product h2.woocommerce-loop-product__title {
		margin-top: 10px;
		font-size: 14px;
	}

	body.yx-catalog.woocommerce ul.products li.product .price,
	body.yx-catalog.woocommerce ul.products li.product .price ins {
		font-size: 16px;
	}

	body.yx-catalog.woocommerce ul.products li.product .price del {
		font-size: 13px;
	}
}

/* ===== Рядок над товарами: «Показано …» + «Сортування» ===== */

@media (min-width: 992px) {
	/* Рядок стоїть над сайдбаром і сіткою разом; зсуваємо його на ширину сайдбару (col-lg-3 = 25%),
	   щоб лічильник починався над першою карткою */
	body.yx-catalog .woocommerce-result-count-wrap {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 16px;
		min-height: 0;
		margin: 0 0 20px;
		padding: 0 0 0 25%;
	}

	body.yx-catalog .woocommerce-result-count-wrap::after {
		display: none;
	}

	/* Тема дає колонкам margin-top: 40px — разом із рядком «Показано …» виходив зайвий розрив */
	body.yx-catalog .fleximob > .woo-prod,
	body.yx-catalog .fleximob > .sidebar-woo {
		margin-top: 0;
	}

	body.yx-catalog .woocommerce-result-count-wrap .woocommerce-result-count {
		float: none;
		margin: 0;
		font-size: 14px;
		color: #6c757d;
	}

	body.yx-catalog .woocommerce-result-count-wrap .woocommerce-ordering {
		float: none;
		margin: 0;
	}

	body.yx-catalog .woocommerce-result-count-wrap .new-select {
		padding: 8px 32px 8px 0;
		font-size: 15px;
		font-weight: 500;
		color: #1F2427;
		border: 0;
	}

	body.yx-catalog .woocommerce-result-count-wrap .new-select__list {
		top: calc(100% + 4px);
		right: 0;
		z-index: 20;
		padding: 6px 0;
		background: #fff;
		box-shadow: 0 8px 24px rgba(31, 36, 39, .12);
	}
}

/* Порожні <br> між рядом «Показано …» і сіткою (archive-product.php) */
body.yx-catalog .fleximob > br {
	display: none;
}

/* ===== Фільтри (woo-product-filter) ===== */

body.yx-catalog .sidebar-woo .wpfMainWrapper {
	padding-bottom: 24px;
}

/* Тема ставить віджету overflow-y: scroll — на десктопі це лише сіра смуга прокрутки збоку */
@media (min-width: 992px) {
	body.yx-catalog .sidebar-woo .WpfWoofiltersWidget {
		overflow: visible;
	}
}

body.yx-catalog .sidebar-woo .wpfFilterWrapper {
	margin: 0;
	padding: 18px 0;
	border-bottom: 1px solid #EAEAEA;
}

body.yx-catalog .sidebar-woo .wpfFilterWrapper:first-of-type {
	padding-top: 0;
}

body.yx-catalog .sidebar-woo .wpfFilterTitle {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin: 0;
	padding: 0;
	cursor: pointer;
}

body.yx-catalog .sidebar-woo .wpfFilterTitle .wfpTitle {
	margin: 0;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: #1F2427;
}

/* Шеврон замість іконки remixicon/FontAwesome */
body.yx-catalog .sidebar-woo .wpfFilterTitle .wpfTitleToggle {
	position: relative;
	flex: 0 0 auto;
	width: 10px;
	height: 10px;
	margin: 0 4px 0 12px;
}

body.yx-catalog .sidebar-woo .wpfFilterTitle .fa.wpfTitleToggle::before {
	content: "";
	position: absolute;
	top: 1px;
	right: 1px;
	width: 7px;
	height: 7px;
	border-right: 1.5px solid #1F2427;
	border-bottom: 1.5px solid #1F2427;
	opacity: 1;
	transform: rotate(45deg);
	transition: transform .2s ease;
}

body.yx-catalog .sidebar-woo .wpfFilterTitle .fa.wpfTitleToggle.fa-minus::before {
	top: 4px;
	transform: rotate(-135deg);
}

body.yx-catalog .sidebar-woo .wpfFilterTitle .wfpTitle {
	order: 0;
}

body.yx-catalog .sidebar-woo .wpfFilterTitle .wpfTitleToggle {
	order: 2;
}

body.yx-catalog .sidebar-woo .wpfFilterTitle .wpfBlockClear {
	order: 1;
	margin: 0 0 0 auto;
	font-size: 13px;
	font-weight: 400;
	color: #6c757d;
	text-decoration: underline;
	cursor: pointer;
}

body.yx-catalog .sidebar-woo .wpfFilterContent {
	margin-top: 14px;
}

/* Значення — «чипси» замість чекбоксів, без внутрішньої прокрутки */
body.yx-catalog .sidebar-woo .wpfFilterContent ul.wpfFilterVerScroll {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	max-height: none !important;
	margin: 0;
	padding: 0;
	overflow: visible !important;
}

body.yx-catalog .sidebar-woo .wpfFilterContent ul.wpfFilterVerScroll > li {
	display: block;
	width: auto;
	margin: 0 !important;
	padding: 0;
}

body.yx-catalog .sidebar-woo .wpfFilterContent ul.wpfFilterVerScroll > li > label.wpfLiLabel {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	min-height: 32px;
	margin: 0;
	padding: 5px 12px;
	font-size: 14px;
	line-height: 1.3;
	color: #1F2427;
	background: #fff;
	border: 1px solid #CCC;
	cursor: pointer;
	transition: border-color .15s ease, background-color .15s ease, color .15s ease;
}

body.yx-catalog .sidebar-woo .wpfFilterContent ul.wpfFilterVerScroll > li > label.wpfLiLabel:hover {
	border-color: #1F2427;
}

body.yx-catalog .sidebar-woo .wpfFilterContent ul.wpfFilterVerScroll > li > label.wpfLiLabel:has(input:checked) {
	color: #fff;
	background: #1F2427;
	border-color: #1F2427;
}

body.yx-catalog .sidebar-woo .wpfFilterContent ul.wpfFilterVerScroll > li > label.wpfLiLabel .wpfCheckbox {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
}

body.yx-catalog .sidebar-woo .wpfFilterContent ul.wpfFilterVerScroll > li > label.wpfLiLabel .wpfDisplay,
body.yx-catalog .sidebar-woo .wpfFilterContent ul.wpfFilterVerScroll > li > label.wpfLiLabel .wpfValue,
body.yx-catalog .sidebar-woo .wpfFilterContent ul.wpfFilterVerScroll > li > label.wpfLiLabel .wpfFilterTaxNameWrapper {
	display: inline;
	margin: 0;
	padding: 0;
	font-size: inherit;
	color: inherit;
}

body.yx-catalog .sidebar-woo .wpfFilterContent ul.wpfFilterVerScroll > li > label.wpfLiLabel .wpfCount {
	margin: 0;
	font-size: 12px;
	color: inherit;
	opacity: .55;
}

/* Ціна */
body.yx-catalog .sidebar-woo .wpfPriceFilterRange.ui-slider {
	height: 2px;
	margin: 10px 9px 18px !important; /* 9px = половина ручки, інакше права ручка обрізається */
	background: #EAEAEA;
	border: 0;
}

body.yx-catalog .sidebar-woo .wpfPriceFilterRange .ui-slider-range {
	background: #1F2427;
}

body.yx-catalog .sidebar-woo .wpfPriceFilterRange .ui-slider-handle {
	top: -8px;
	width: 18px;
	height: 18px;
	margin-left: -9px;
	background: #fff;
	border: 2px solid #1F2427;
	border-radius: 50%;
	cursor: grab;
}

body.yx-catalog .sidebar-woo .wpfPriceInputs {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	color: #6c757d;
}

body.yx-catalog .sidebar-woo .wpfPriceInputs input.wpfPriceRangeField {
	flex: 1 1 0;
	min-width: 0;
	width: auto !important;
	height: 36px;
	padding: 0 10px;
	font-size: 14px;
	color: #1F2427;
	border: 1px solid #CCC;
	border-radius: 0;
}

/* «Очистити» */
body.yx-catalog .sidebar-woo .wpfFilterButtons {
	margin-top: 20px;
}

body.yx-catalog .sidebar-woo button.wpfClearButton.wpfButton {
	width: 100%;
	min-height: 44px;
	padding: 10px 16px;
	font-size: 14px;
	letter-spacing: 1px;
	text-transform: uppercase;
	border: 1px solid #1F2427 !important;
}

/* Обрані фільтри над блоками: темні «чипси» з хрестиком + «Очистити всі» */
body.yx-catalog .sidebar-woo .wpfSelectedParameters {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 10px;
	margin: 0 0 18px;
	padding: 0 0 18px;
	border-bottom: 1px solid #EAEAEA;
}

body.yx-catalog .sidebar-woo .wpfSelectedParameters .wpfSelectedParameter {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	padding: 5px 10px 5px 12px;
	font-size: 14px;
	line-height: 1.3;
	color: #fff;
	background: #1F2427 !important; /* у плагіна inline background */
	border-radius: 0;
	cursor: pointer;
}

body.yx-catalog .sidebar-woo .wpfSelectedParameters .wpfSelectedTitle {
	order: 0;
	margin: 0;
	color: inherit;
}

body.yx-catalog .sidebar-woo .wpfSelectedParameters .wpfSelectedDelete {
	order: 1;
	margin: 0;
	font-size: 0;
	line-height: 1;
}

body.yx-catalog .sidebar-woo .wpfSelectedParameters .wpfSelectedDelete::before {
	content: "×";
	font-size: 18px;
	color: #fff;
	opacity: .7;
}

body.yx-catalog .sidebar-woo .wpfSelectedParameters .wpfSelectedParameter:hover .wpfSelectedDelete::before {
	opacity: 1;
}

body.yx-catalog .sidebar-woo .wpfSelectedParameters .wpfSelectedParametersClear {
	margin: 0;
	font-size: 13px;
	color: #6c757d;
	text-decoration: underline;
	cursor: pointer;
}

/* ===== До 991px: «Показано …», під ним дві кнопки — «Фільтр» і «Сортування» ===== */
/* Кнопка #filtershow у темі стоїть у nav.wall-header__nav з position:absolute; top:-30px —
   на телефоні вона ховалася під шапку, і фільтри відкрити було неможливо. Ставимо її в потік:
   контейнер — flex, обгортка лічильника — display:contents, порядок задаємо через order. */
@media (max-width: 991px) {
	body.yx-catalog .container:has(> .wall-header__nav) {
		display: flex;
		flex-wrap: wrap;
		align-items: stretch;
		gap: 0 8px;
	}

	body.yx-catalog .container:has(> .wall-header__nav) > * {
		flex: 0 0 100%;
		order: 10;
		min-width: 0;
	}

	body.yx-catalog .container:has(> .wall-header__nav) > .woocommerce-breadcrumb { order: 1; }
	body.yx-catalog .container:has(> .wall-header__nav) > .woocommerce-products-header { order: 2; }
	body.yx-catalog .container:has(> .wall-header__nav) > .woocommerce-notices-wrapper { order: 3; }

	body.yx-catalog .container:has(> .wall-header__nav) > .woocommerce-result-count-wrap {
		display: contents;
	}

	body.yx-catalog .woocommerce-result-count-wrap .woocommerce-result-count {
		flex: 0 0 100%;
		order: 4;
		float: none;
		margin: 0 0 10px;
		padding: 0 10px; /* вирівнювання з кнопками і сіткою (у колонок теми бічні відступи) */
		font-size: 14px;
		color: #6c757d;
		text-align: left;
	}

	body.yx-catalog .container:has(> .wall-header__nav) > .wall-header__nav {
		position: static;
		flex: 1 1 calc(50% - 4px); /* не 0: інакше кнопка стискається і стає в рядок із лічильником */
		order: 5;
		width: auto;
		height: auto;
		margin: 0 0 20px !important; /* у темі padding: 30px; margin-top: -5px */
		padding: 0 !important;
	}

	body.yx-catalog .woocommerce-result-count-wrap .woocommerce-ordering {
		flex: 1 1 calc(50% - 4px);
		order: 6;
		float: none;
		width: auto;
		max-width: none;
		margin: 0 0 20px !important;
	}

	body.yx-catalog .wall-header__nav #filtershow,
	body.yx-catalog .woocommerce-result-count-wrap .new-select {
		display: flex;
		align-items: center;
		justify-content: center;
		gap: 8px;
		width: 100%;
		height: 44px;
		margin: 0;
		padding: 0 12px;
		font-size: 15px;
		font-weight: 500;
		line-height: 1;
		color: #1F2427;
		background: #fff;
		border: 1px solid #CCC;
		border-radius: 0;
	}

	body.yx-catalog .woocommerce-result-count-wrap .new-select::after {
		position: static;
		margin-left: 2px;
	}

	body.yx-catalog .woocommerce-result-count-wrap .new-select__list {
		top: 100%;
		right: 0;
		left: auto;
		z-index: 20;
		width: min(330px, calc(100vw - 32px));
		background: #fff;
		box-shadow: 0 8px 24px rgba(31, 36, 39, .12);
	}

	/* main.js після відкриття підставляє в кнопку і заголовок панелі російське «Фильтр» */
	body.yx-catalog .wall-header__nav #filtershow > span:first-child,
	body.yx-catalog .sidebar-woo .title-close-mobile-title {
		font-size: 0;
	}

	body.yx-catalog .wall-header__nav #filtershow > span:first-child::before {
		content: "Фільтр";
		font-size: 15px;
	}

	/* Панель фільтрів (тема робить її на весь екран). Плагін ховає назви блоків на мобайлі — без них незрозуміло, що це за чипси */
	body.yx-catalog .sidebar-woo .wpfFilterTitle .wfpTitle {
		display: block !important;
	}

	body.yx-catalog .sidebar-woo .wpfMainWrapper {
		padding-bottom: 96px; /* місце під нижню панель кнопок */
	}

	/* Нижня панель: «Очистити» | «Показати» */
	body.yx-catalog .sidebar-woo .wpfFilterButtons {
		position: fixed;
		right: 0;
		bottom: 0;
		left: 0;
		z-index: 100000000;
		display: flex;
		gap: 8px;
		margin: 0;
		padding: 12px 15px calc(12px + env(safe-area-inset-bottom));
		background: #fff;
		border-top: 1px solid #EAEAEA;
	}

	body.yx-catalog .sidebar-woo .wpfFilterButtons > .title-close-mobile,
	body.yx-catalog .sidebar-woo .wpfFilterButtons > button.wpfClearButton.wpfButton {
		position: static !important;
		flex: 1 1 0;
		order: 2;
		display: block;
		width: auto;
		min-height: 48px;
		margin: 0;
	}

	body.yx-catalog .sidebar-woo .wpfFilterButtons > button.wpfClearButton.wpfButton {
		order: 1;
		background: #fff !important;
	}

	body.yx-catalog .sidebar-woo .wpfFilterButtons .title-close-mobile-close.button-close-mob {
		position: static;
		display: flex;
		align-items: center;
		justify-content: center;
		width: 100%;
		height: 100%;
		min-height: 48px;
		font-size: 14px;
		font-weight: 700;
		letter-spacing: 1px;
		text-transform: uppercase;
		color: #fff !important; /* у темі колір кнопки з !important */
		background: #1F2427 !important;
		cursor: pointer;
	}

	body.yx-catalog .sidebar-woo .WpfWoofiltersWidget > .title-close-mobile {
		margin-bottom: 20px;
	}

	body.yx-catalog .sidebar-woo .title-close-mobile-title::before {
		content: "Фільтри";
		font-size: 18px;
		font-weight: 700;
		letter-spacing: 1px;
		text-transform: uppercase;
	}
}

/* ===== Завантаження після вибору фільтра ===== */
/* У фільтрах увімкнено «ajax_leave_products»: товари лишаються, плагін кладе поверх .wpf-loader-decorator.
   Замість кубиків — товари трохи тьмяніють, згори біжить тонка смужка. */
body.yx-catalog.woocommerce ul.products > .wpf-loader-decorator {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 30;
	margin: 0;
	background: rgba(255, 255, 255, .55);
	cursor: progress;
	animation: yx-loader-in .2s ease both;
}

body.yx-catalog.woocommerce ul.products > .wpf-loader-decorator .wpfPreview {
	display: none;
}

body.yx-catalog.woocommerce ul.products > .wpf-loader-decorator::before {
	content: "";
	position: absolute;
	top: -12px;
	left: 0;
	width: 100%;
	height: 3px;
	background: linear-gradient(90deg, transparent 0, #009E42 30%, #009E42 70%, transparent 100%) no-repeat;
	background-size: 40% 100%;
	animation: yx-loader-bar 1s ease-in-out infinite;
}

@keyframes yx-loader-in {
	from { opacity: 0; }
	to { opacity: 1; }
}

@keyframes yx-loader-bar {
	from { background-position: -40% 0; }
	to { background-position: 140% 0; }
}

@media (prefers-reduced-motion: reduce) {
	body.yx-catalog.woocommerce ul.products > .wpf-loader-decorator::before {
		background-size: 100% 100%;
		animation: none;
	}
}

/* Перше завантаження фільтрів: плагін ховає блоки (visibility: hidden) і показує .wpfLoaderLayout зі спінером.
   Замість спінера — «скелетон»: смужки на місці заголовків і чипсів, що м'яко пульсують. */
body.yx-catalog .sidebar-woo .wpfMainWrapper {
	position: relative;
}

body.yx-catalog .sidebar-woo .wpfMainWrapper > .wpfLoaderLayout {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 5;
	margin: 0;
	padding: 0;
	background:
		linear-gradient(to bottom, #ECECEC 0 12px, transparent 12px 120px) 0 0 / 45% 120px repeat-y,
		linear-gradient(to bottom, transparent 0 32px, #F3F3F3 32px 62px, transparent 62px 120px) 0 0 / 100% 120px repeat-y;
	animation: yx-skeleton 1.2s ease-in-out infinite alternate;
}

body.yx-catalog .sidebar-woo .wpfMainWrapper > .wpfLoaderLayout > * {
	display: none !important;
}

@keyframes yx-skeleton {
	from { opacity: 1; }
	to { opacity: .45; }
}

@media (prefers-reduced-motion: reduce) {
	body.yx-catalog .sidebar-woo .wpfMainWrapper > .wpfLoaderLayout {
		animation: none;
	}
}

/* ===== Заголовок категорії: менше порожнього місця ===== */
body.yx-catalog .woocommerce-breadcrumb {
	margin-bottom: 0 !important;
}

body.yx-catalog .woocommerce-products-header {
	padding-top: 12px;
}

body.yx-catalog .woocommerce-products-header .title-categories {
	margin-bottom: 12px;
}

/* ===== «Завантажити ще» (BeRocket Load More): кнопка + прогрес (js/catalog.js) ===== */
body.yx-catalog .lmp_load_more_button {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 14px;
	margin: 8px 0 40px;
	text-align: center;
}

body.yx-catalog .yx-load-progress {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	margin: 8px 0 14px;
	font-size: 14px;
	color: #6c757d;
	text-align: center;
}

body.yx-catalog .yx-load-progress[hidden] {
	display: none;
}

body.yx-catalog .yx-load-progress__bar {
	display: block;
	width: 200px;
	height: 2px;
	overflow: hidden;
	background: #EAEAEA;
}

body.yx-catalog .yx-load-progress__bar span {
	display: block;
	height: 100%;
	background: #1F2427;
	transition: width .3s ease;
}

/* У посилання плагін пише стилі inline — тому !important */
body.yx-catalog .lmp_load_more_button a.lmp_button {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	min-width: 260px;
	min-height: 48px;
	margin: 0 !important;
	padding: 12px 32px !important;
	font-size: 14px !important;
	font-weight: 700;
	letter-spacing: 2px;
	text-transform: uppercase;
	text-decoration: none;
	color: #1F2427 !important;
	background: #fff !important;
	border: 1px solid #1F2427 !important;
	border-radius: 0 !important;
	box-shadow: none;
	transition: background-color .2s ease, box-shadow .2s ease;
}

body.yx-catalog .lmp_load_more_button a.lmp_button:hover {
	background: #F3F3F3 !important;
	box-shadow: inset 0 0 0 1px #1F2427;
}

body.yx-catalog .lmp_load_more_button a.lmp_button::after {
	display: none; /* іконка «оновити» теми */
}

@media (max-width: 767px) {
	body.yx-catalog .lmp_load_more_button a.lmp_button {
		width: 100%;
	}
}

/* ===== SEO-текст категорії: згорнутий, «Читати далі» (js/catalog.js) ===== */
body.yx-catalog .term-description.yx-desc {
	position: relative;
	clear: both;
	float: none; /* у темі float: left — інакше margin: auto не центрує */
	max-width: 880px;
	margin: 0 auto 48px !important; /* у теми margin: 0 0 50px */
	padding: 28px 0 0;
	font-size: 15px;
	line-height: 1.65;
	color: #212529;
	border-top: 1px solid #EAEAEA;
}

body.yx-catalog .term-description.yx-desc p {
	margin: 0 0 12px;
}

body.yx-catalog .term-description.yx-desc h2,
body.yx-catalog .term-description.yx-desc h3 {
	margin: 20px 0 10px;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.3;
	text-decoration: none;
}

body.yx-catalog .term-description.yx-desc--collapsed {
	max-height: 210px;
	overflow: hidden;
}

body.yx-catalog .term-description.yx-desc--collapsed::after {
	content: "";
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	height: 90px;
	background: linear-gradient(rgba(255, 255, 255, 0), #fff 75%);
	pointer-events: none;
}

body.yx-catalog .term-description .yx-desc__toggle {
	position: relative;
	z-index: 1;
	display: inline-block;
	margin: 4px 0 0;
	padding: 0;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: #1F2427;
	background: none;
	border: 0;
	border-bottom: 1px solid #1F2427;
	cursor: pointer;
}

body.yx-catalog .term-description.yx-desc--collapsed .yx-desc__toggle {
	position: absolute;
	bottom: 0;
	left: 0;
	z-index: 2;
}

body.yx-catalog .sidebar-woo button.wpfClearButton.wpfButton {
	transition: background-color .2s ease, box-shadow .2s ease;
}

body.yx-catalog .sidebar-woo button.wpfClearButton.wpfButton:hover {
	background: #F3F3F3 !important;
	box-shadow: inset 0 0 0 1px #1F2427;
}

/* Варіанти фільтра без товарів за поточного вибору (js/catalog.js, markEmptyChips) */
body.yx-catalog .sidebar-woo .wpfFilterContent ul.wpfFilterVerScroll > li.yx-chip-empty {
	opacity: .35;
	pointer-events: none;
}

/* «Тільки в наявності» (js/catalog.js) */
body.yx-catalog .sidebar-woo .yx-instock {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 18px;
	padding: 0 0 18px;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: .5px;
	text-transform: uppercase;
	color: #1F2427;
	border-bottom: 1px solid #EAEAEA;
	cursor: pointer;
	user-select: none;
}

body.yx-catalog .sidebar-woo .yx-instock input {
	position: absolute;
	width: 1px;
	height: 1px;
	opacity: 0;
}

body.yx-catalog .sidebar-woo .yx-instock__switch {
	position: relative;
	flex: 0 0 36px;
	width: 36px;
	height: 20px;
	background: #CCC;
	border-radius: 10px;
	transition: background-color .2s ease;
}

body.yx-catalog .sidebar-woo .yx-instock__switch::after {
	content: "";
	position: absolute;
	top: 2px;
	left: 2px;
	width: 16px;
	height: 16px;
	background: #fff;
	border-radius: 50%;
	transition: transform .2s ease;
}

body.yx-catalog .sidebar-woo .yx-instock input:checked + .yx-instock__switch {
	background: #009E42;
}

body.yx-catalog .sidebar-woo .yx-instock input:checked + .yx-instock__switch::after {
	transform: translateX(16px);
}

body.yx-catalog .sidebar-woo .yx-instock input:focus-visible + .yx-instock__switch {
	outline: 2px solid #1F2427;
	outline-offset: 2px;
}

/* Поки фільтр вантажиться — блок фільтрів не приймає кліків (інакше другий клік губився: пізня відповідь
   на перший запит перезаписувала вибір). */
body.yx-catalog.yx-filtering .sidebar-woo .wpfMainWrapper,
body.yx-catalog.yx-filtering .sidebar-woo .yx-instock,
body.yx-catalog:has(ul.products > .wpf-loader-decorator) .sidebar-woo .wpfMainWrapper,
body.yx-catalog:has(ul.products > .wpf-loader-decorator) .sidebar-woo .yx-instock {
	opacity: .6;
	pointer-events: none;
	transition: opacity .2s ease;
}

/* Миттєвий відгук на вибір фільтра (js/catalog.js, filteringFeedback) */
body.yx-catalog.woocommerce ul.products {
	position: relative;
}

body.yx-catalog.yx-filtering.woocommerce ul.products > li.product {
	opacity: .45;
	transition: opacity .15s ease;
}

body.yx-catalog.yx-filtering.woocommerce ul.products::before {
	content: "";
	position: absolute;
	top: -12px;
	left: 0;
	z-index: 31;
	display: block;
	width: 100%;
	height: 3px;
	background: linear-gradient(90deg, transparent 0, #009E42 30%, #009E42 70%, transparent 100%) no-repeat;
	background-size: 40% 100%;
	animation: yx-loader-bar 1s ease-in-out infinite;
}

body.yx-catalog.woocommerce ul.products > li.product.yx-card-in {
	animation: yx-card-in .35s ease both;
}

@keyframes yx-card-in {
	from { opacity: 0; transform: translateY(8px); }
	to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
	body.yx-catalog.woocommerce ul.products > li.product.yx-card-in,
	body.yx-catalog.yx-filtering.woocommerce ul.products::before {
		animation: none;
	}
}

/* ===== Мобайл-правки 2026-10-05 ===== */
/* Тема (css/style.css) задає назві font-size: 17px !important, а на ≤767px ще й padding: 10px !important —
   через відступ знизу з-під обрізки «3 рядки» визирав верх четвертого рядка. */
body.yx-catalog.woocommerce ul.products li.product h2.woocommerce-loop-product__title,
body.yx-catalog.archive.woocommerce ul.products li.product h2.woocommerce-loop-product__title {
	padding: 0 !important;
	font-size: 16px !important;
}

@media (max-width: 991px) {
	/* у теми .col-lg-9.woo-prod має margin-top: -25px — сітка наїжджала на кнопки «Фільтр»/«Сортування» */
	body.yx-catalog .fleximob > .woo-prod {
		margin-top: 0 !important;
	}
}

@media (max-width: 767px) {
	body.yx-catalog.woocommerce ul.products li.product h2.woocommerce-loop-product__title,
	body.yx-catalog.archive.woocommerce ul.products li.product h2.woocommerce-loop-product__title {
		font-size: 14px !important;
	}

	/* довгі ярлики («Найкраща пропозиція») — в один рядок */
	body.yx-catalog.woocommerce ul.products li.product .berocket_better_labels {
		padding: 8px !important;
	}

	body.yx-catalog.woocommerce ul.products li.product .berocket_better_labels .br_alabel:has(> span > b.br-labels-css-14) > span {
		padding: 3px 7px !important;
	}

	body.yx-catalog.woocommerce ul.products li.product .berocket_better_labels .br_alabel:has(> span > b.br-labels-css-14) > span > b {
		font-size: 10px !important;
		letter-spacing: .2px;
		white-space: nowrap;
	}
}

/* ===== «Нічого не знайдено» після фільтра (woo-product-filter, no_redirect_by_no_products = 1) =====
   Раніше плагін при порожньому результаті перезавантажував сторінку і скидав останній вибір без пояснень. */
body.yx-catalog.woocommerce ul.products .wpfNoProducts {
	grid-column: 1 / -1;
	width: 100%;
	max-width: none !important;
	box-shadow: none !important;
	margin: 0;
	padding: 24px 28px;
	font-size: 16px;
	font-weight: 400;
	line-height: 1.5;
	text-align: left;
	color: #1F2427;
	background: #F7F7F7;
	border: 0;
	border-left: 3px solid #1F2427;
	border-radius: 0;
}

/* yx-filter-hover-flicker (2026-10-13): style.css темы показує вкладені підкатегорії при наведенні (.wpfFilterVerScroll li:hover ul) —
   у розкладці «чипсами» список з'являвся всередині рядка, чипси перестрибували з-під курсора, і він блимав. Вкладені не показуємо. */
body.yx-catalog .sidebar-woo .wpfFilterContent ul.wpfFilterVerScroll li:hover ul,
body.yx-catalog .sidebar-woo .wpfFilterContent ul.wpfFilterVerScroll li > ul {
	display: none !important;
}
