/* =========================================================
   ЕВРОСАНТЕХНИКА — CATALOG POLISH v1.2
========================================================= */

.shop-content ul.products {
	align-items: stretch !important;
	margin-bottom: 0 !important;
}

.shop-content ul.products li.product {
	display: flex !important;
	flex-direction: column !important;
	height: 100% !important;
	min-height: 100% !important;
}

.shop-content ul.products li.product > a.woocommerce-LoopProduct-link,
.shop-content ul.products li.product > a.woocommerce-loop-product__link {
	display: flex !important;
	flex-direction: column !important;
	flex: 1 1 auto !important;
	width: 100% !important;
}

.shop-content ul.products li.product .woocommerce-loop-product__title {
	margin: 0 0 14px !important;
}

/* «Узнать цену» — лёгкая ссылка, а не ещё одна тяжёлая чёрная кнопка. */
.shop-content ul.products li.product .es-price-access-button {
	display: inline-flex !important;
	align-items: center !important;
	align-self: flex-start !important;
	width: auto !important;
	min-width: 0 !important;
	height: auto !important;
	margin: 4px 0 18px !important;
	padding: 2px 0 5px !important;
	border: 0 !important;
	border-bottom: 1px solid #111 !important;
	background: transparent !important;
	color: #111 !important;
	font-size: 12px !important;
	line-height: 1.3 !important;
	font-weight: 800 !important;
	letter-spacing: .10em !important;
	text-transform: uppercase !important;
	box-shadow: none !important;
	border-radius: 0 !important;
}

.shop-content ul.products li.product .es-price-access-button::after {
	content: " →";
	margin-left: 6px;
}

.shop-content ul.products li.product .es-price-access-button:hover {
	color: #8b7a5a !important;
	border-bottom-color: #8b7a5a !important;
}

/* Simple product — одна основная чёрная CTA. */
.shop-content ul.products li.product .es-project-loop-button.es-project-add-button,
.shop-content ul.products li.product button.es-project-loop-button.es-project-add-button,
.shop-content ul.products li.product .es-add-to-project {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: 100% !important;
	min-height: 52px !important;
	margin: 0 !important;
	padding: 14px 18px !important;
	border: 1px solid #111 !important;
	background: #111 !important;
	color: #fff !important;
	font-size: 12px !important;
	font-weight: 800 !important;
	letter-spacing: .12em !important;
	text-transform: uppercase !important;
	border-radius: 0 !important;
	box-shadow: none !important;
}

/* Variable product — спокойная контурная CTA. */
.shop-content ul.products li.product .es-project-loop-button--choose {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: 100% !important;
	min-height: 52px !important;
	margin: 0 !important;
	padding: 14px 18px !important;
	border: 1px solid #bdb7ad !important;
	background: transparent !important;
	color: #111 !important;
	font-size: 12px !important;
	font-weight: 800 !important;
	letter-spacing: .12em !important;
	text-transform: uppercase !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	text-decoration: none !important;
}

.shop-content ul.products li.product .es-project-loop-button--choose:hover {
	border-color: #111 !important;
	background: #f5f3ef !important;
}

/* Пагинация не прилипает к последнему ряду. */
.shop-content nav.woocommerce-pagination,
.woocommerce nav.woocommerce-pagination,
nav.woocommerce-pagination {
	clear: both !important;
	display: flex !important;
	justify-content: center !important;
	margin: 72px 0 28px !important;
	padding-top: 0 !important;
}

.shop-content nav.woocommerce-pagination ul,
.woocommerce nav.woocommerce-pagination ul {
	margin: 0 !important;
}

@media (max-width: 1100px) {
	.shop-content nav.woocommerce-pagination,
	.woocommerce nav.woocommerce-pagination,
	nav.woocommerce-pagination {
		margin-top: 56px !important;
	}
}

@media (max-width: 640px) {
	.shop-content nav.woocommerce-pagination,
	.woocommerce nav.woocommerce-pagination,
	nav.woocommerce-pagination {
		margin-top: 42px !important;
	}
}


/* =========================================================
   CATALOG FILTER UX v1.3
   Кнопка «Показать» всегда видна на desktop.
   Список параметров прокручивается внутри панели.
========================================================= */

@media (min-width: 901px) {
	.shop-sidebar {
		overflow: visible !important;
		max-height: none !important;
	}

	.shop-sidebar .es-catalog-filter {
		display: flex !important;
		flex-direction: column !important;
		height: calc(100vh - 132px) !important;
		max-height: calc(100vh - 132px) !important;
		overflow: hidden !important;
	}

	.shop-sidebar .es-catalog-filter__head {
		flex: 0 0 auto !important;
	}

	.shop-sidebar .es-catalog-filter__body {
		display: flex !important;
		flex-direction: column !important;
		flex: 1 1 auto !important;
		min-height: 0 !important;
		padding-bottom: 0 !important;
	}

	.shop-sidebar .es-catalog-filter__scroll {
		flex: 1 1 auto !important;
		min-height: 0 !important;
		overflow-y: auto !important;
		overscroll-behavior: contain;
		padding-right: 4px !important;
	}

	.shop-sidebar .es-catalog-filter__scroll::-webkit-scrollbar {
		width: 5px;
	}

	.shop-sidebar .es-catalog-filter__scroll::-webkit-scrollbar-thumb {
		background: #d8c9ad;
	}

	.shop-sidebar .es-catalog-filter__actions {
		flex: 0 0 auto !important;
		margin: 0 !important;
		padding: 18px 0 22px !important;
		background: #fff !important;
		border-top: 1px solid #eee8df !important;
		z-index: 5;
	}

	.shop-sidebar .es-catalog-filter__submit {
		width: 100% !important;
	}
}

/* Нулевые значения оставляем видимыми, но приглушаем:
   пользователь понимает, что такая комбинация даст 0 товаров. */
.es-filter-option.is-zero {
	opacity: .42;
}


/* =========================================================
   FILTER UX HOTFIX v1.4
========================================================= */

@media (min-width: 901px) {
	.shop-sidebar {
		position: sticky !important;
		top: 112px !important;
		align-self: flex-start !important;
		max-height: none !important;
		overflow: visible !important;
	}

	.shop-sidebar .es-catalog-filter {
		display: flex !important;
		flex-direction: column !important;
		height: calc(100vh - 132px) !important;
		max-height: calc(100vh - 132px) !important;
		overflow: hidden !important;
	}

	.shop-sidebar .es-catalog-filter__head {
		flex: 0 0 auto !important;
	}

	.shop-sidebar .es-catalog-filter__body {
		display: block !important;
		flex: 1 1 auto !important;
		min-height: 0 !important;
		overflow-y: auto !important;
		overscroll-behavior: contain !important;
		padding-bottom: 0 !important;
	}

	.shop-sidebar .es-catalog-filter__body::-webkit-scrollbar {
		width: 5px !important;
	}

	.shop-sidebar .es-catalog-filter__body::-webkit-scrollbar-thumb {
		background: #d8c9ad !important;
	}

	/* «Показать» всегда у нижнего края фильтра. */
	.shop-sidebar .es-catalog-filter__actions {
		position: sticky !important;
		left: 0 !important;
		right: 0 !important;
		bottom: 0 !important;
		z-index: 20 !important;
		margin: 0 !important;
		padding: 18px 0 22px !important;
		background: #fff !important;
		border-top: 1px solid #eee8df !important;
		box-shadow: 0 -12px 22px rgba(255,255,255,.94) !important;
	}

	.shop-sidebar .es-catalog-filter__submit {
		width: 100% !important;
		margin: 0 !important;
	}
}

/* Вариант, который при текущих фильтрах даст 0 товаров. */
.es-filter-option.is-zero {
	opacity: .34 !important;
	cursor: not-allowed !important;
}

.es-filter-option.is-zero input,
.es-filter-option.is-zero .es-filter-option__label,
.es-filter-option.is-zero .es-filter-option__count {
	cursor: not-allowed !important;
}

/* Уже выбранная невозможная комбинация: оставляем возможность снять галочку. */
.es-filter-option.is-invalid .es-filter-option__count {
	font-weight: 800 !important;
}

/* Убираем стандартную синюю WooCommerce-заглушку. */
.woocommerce-info.es-catalog-empty-state {
	display: flex !important;
	flex-direction: column !important;
	align-items: flex-start !important;
	gap: 10px !important;
	margin: 0 !important;
	padding: 34px 36px !important;
	border: 1px solid #e7e1d8 !important;
	border-top: 1px solid #e7e1d8 !important;
	background: #fff !important;
	color: #111 !important;
	box-shadow: none !important;
}

.woocommerce-info.es-catalog-empty-state::before,
.woocommerce-info.es-catalog-empty-state::after {
	display: none !important;
	content: none !important;
}

.woocommerce-info.es-catalog-empty-state strong {
	display: block !important;
	font-size: 24px !important;
	line-height: 1.15 !important;
	font-weight: 800 !important;
	letter-spacing: -.02em !important;
}

.woocommerce-info.es-catalog-empty-state span {
	display: block !important;
	color: #6f6a62 !important;
	font-size: 15px !important;
	line-height: 1.55 !important;
}

.woocommerce-info.es-catalog-empty-state a {
	display: inline-block !important;
	margin-top: 8px !important;
	padding-bottom: 4px !important;
	border-bottom: 1px solid #111 !important;
	color: #111 !important;
	font-size: 12px !important;
	line-height: 1.2 !important;
	font-weight: 800 !important;
	letter-spacing: .12em !important;
	text-transform: uppercase !important;
	text-decoration: none !important;
}


/* =========================================================
   FILTER APPLY BUTTON HOTFIX v1.4.1
   На desktop «Показать» находится сверху и всегда доступна.
========================================================= */

.es-catalog-filter__top-apply {
	display: none;
}

@media (min-width: 901px) {
	.shop-sidebar .es-catalog-filter__top-apply {
		display: block !important;
		flex: 0 0 auto !important;
		padding: 14px 24px 16px !important;
		background: #fff !important;
		border-bottom: 1px solid #eee8df !important;
	}

	.shop-sidebar .es-catalog-filter__top-submit {
		display: flex !important;
		align-items: center !important;
		justify-content: center !important;
		width: 100% !important;
		min-height: 50px !important;
		margin: 0 !important;
		padding: 14px 18px !important;
		border: 1px solid #111 !important;
		background: #111 !important;
		color: #fff !important;
		font-size: 12px !important;
		font-weight: 800 !important;
		letter-spacing: .18em !important;
		text-transform: uppercase !important;
		border-radius: 0 !important;
		box-shadow: none !important;
		cursor: pointer !important;
	}

	/* Нижнюю кнопку на desktop больше не показываем — дублировать её нет смысла. */
	.shop-sidebar .es-catalog-filter__actions {
		display: none !important;
	}
}


/* =========================================================
   FILTER SCROLL BOTTOM FIX v1.4.2
   Последний раздел фильтра можно полностью прокрутить и открыть.
========================================================= */

@media (min-width: 901px) {
	/* Чуть больше запаса снизу относительно окна браузера. */
	.shop-sidebar .es-catalog-filter {
		height: calc(100vh - 150px) !important;
		max-height: calc(100vh - 150px) !important;
	}

	/* Нижний запас внутри скролла нужен, чтобы «Размер»
	   и его раскрытые значения не упирались в край панели. */
	.shop-sidebar .es-catalog-filter__body {
		padding-bottom: 110px !important;
		scroll-padding-bottom: 110px !important;
	}

	/* Небольшой дополнительный отступ у последней секции. */
	.shop-sidebar .es-catalog-filter__body > .es-filter-section:last-of-type {
		margin-bottom: 24px !important;
	}
}
