/* Стили шапки сайта. */

/*
 * Прилипшая шапка остаётся в потоке документа: основной контент сохраняет
 * исходное положение и не уходит под неё на широких и мобильных экранах.
 */
#masthead {
	position: sticky;
	top: 0;
	z-index: 998;
}

/* На ПК оформляем корзину в шапке как контурную кнопку запроса прайса. */
@media (min-width: 922px) {
	.ast-site-header-cart a.cart-container {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		gap: 6px;
		min-height: 36px;
		box-sizing: border-box;
		padding: 12px 12px;
		border: 1px solid #F47F2D;
		border-radius: 4px;
		color: #F47F2D;
		font-family: 'Geist', sans-serif;
		font-size: 16px;
		font-weight: 400;
		line-height: 24px;
		text-decoration: none;
		white-space: nowrap;
		transition: background-color 180ms ease, color 180ms ease;
		margin-left: 4px;
	}

	.ast-desktop .ast-primary-header-bar .ast-header-woo-cart,
	.ast-desktop .ast-primary-header-bar .ast-header-edd-cart {
		min-height: auto;
		line-height: 1;
	}

	.ast-site-header-cart a.cart-container::after {
		content: "Сформированный заказ";
		display: block;
	}

	.ast-site-header-cart a.cart-container:hover {}

	.ast-site-header-cart a.cart-container:focus-visible {
		outline: 2px solid #F47F2D;
		outline-offset: 3px;
	}
}

.ast-site-header-cart a.cart-container * {
	display: block;
	height: auto;
	transition: all 180ms ease-in-out;
}

.ast-site-header-cart i.astra-icon:after {
	font-size: 12px;
	font-weight: 400;
	padding-right: 0;
	box-shadow: none;
}

/* Своя иконка корзины; счётчик Astra остаётся на .astra-icon::after. */
.ast-site-header-cart a.cart-container .astra-icon>.ast-icon {
	width: 24px;
	height: 24px;
	background-color: currentColor;
	-webkit-mask: url("../Icons/Shopping_Cart.svg") center / contain no-repeat;
	mask: url("../Icons/Shopping_Cart.svg") center / contain no-repeat;
}

@media (min-width: 922px) {
	.ast-site-header-cart a.cart-container .astra-icon>.ast-icon {
		width: 24px;
		height: 24px;
	}
}

.ast-site-header-cart .ast-addon-cart-wrap i.astra-icon:after {
	background-color: #f47f2d;
}

.ast-site-header-cart a.cart-container .astra-icon>.ast-icon>svg {
	display: none;
}

/* Контактная информация в шапке */

.header-contacts {
	display: flex;
	flex-direction: column;
	gap: 4px;
	justify-content: center;
}

.header-contacts .hot-tel {
	display: block;
	line-height: 1.2;
	color: #171F2C;
	font-size: 16px;
	transition: all 180ms ease-in-out;
}

.header-contacts .hot-tel:hover {
	color: #454C56;
}

.header-contacts .tel-caption {
	color: #8B8F95;
	font-size: 14px;
	line-height: 1.2;
}

/* Поле поиска */

.dgwt-wcas-style-pirx .dgwt-wcas-sf-wrapp {
	padding: 0;
	border-radius: 4px;
	background: transparent;
}

.dgwt-wcas-style-pirx .dgwt-wcas-sf-wrapp input[type=search].dgwt-wcas-search-input {
	padding: 12px 12px 12px 48px;
	line-height: 22px;
	font-size: 16px;
	border: 1px solid #E8E9EA;
	border-radius: 4px;
	height: auto;
	background-color: #f8f8f8;
	transition: all 180ms ease-in-out;
	color: #171F2C;
	font-family: 'Geist', sans-serif;
}

.dgwt-wcas-style-pirx .dgwt-wcas-sf-wrapp input[type=search].dgwt-wcas-search-input:hover {
	background-color: #ffffff;
	border: 1px solid #D1D2D5;
	transition: all 180ms ease-in-out;
}

.dgwt-wcas-style-pirx .dgwt-wcas-sf-wrapp input[type=search].dgwt-wcas-search-input:focus {
	border: 1px solid #171F2C;
	transition: all 180ms ease-in-out;
}

.dgwt-wcas-style-pirx .dgwt-wcas-sf-wrapp input[type=search].dgwt-wcas-search-input:focus:hover {
	border: 1px solid #171F2C;
	transition: all 180ms ease-in-out;
}

.dgwt-wcas-style-pirx .dgwt-wcas-sf-wrapp button.dgwt-wcas-search-submit {
	border-radius: 2px;
	min-height: 38px;
	min-width: 38px;
	height: 38px;
	width: 38px;
	left: 8px;
	top: 5px;
	pointer-events: none;
	transition: none;
}

.dgwt-wcas-style-pirx .dgwt-wcas-sf-wrapp button.dgwt-wcas-search-submit svg {
	width: 16px;
	height: 16px;
}

.dgwt-wcas-open .dgwt-wcas-style-pirx .dgwt-wcas-sf-wrapp input[type=search].dgwt-wcas-search-input {
	border-radius: 4px 4px 4px 4px;
}

.dgwt-wcas-style-pirx.dgwt-wcas-search-filled .dgwt-wcas-sf-wrapp button.dgwt-wcas-search-submit {
	right: 5px;
	transition: all 180ms ease-in-out;
	background-color: #F47F2D;
}

.dgwt-wcas-style-pirx.dgwt-wcas-search-filled .dgwt-wcas-search-submit svg path {
	fill: #ffffff;
}

.dgwt-wcas-style-pirx .dgwt-wcas-preloader {
	margin-right: 24px;
}

.dgwt-wcas-style-pirx .dgwt-wcas-sf-wrapp button.dgwt-wcas-search-submit:hover {
	border-radius: 2px;
	background-color: #F69957;
	box-shadow: none;
}

.dgwt-wcas-open-pirx .dgwt-wcas-open .dgwt-wcas-suggestions-wrapp,
.dgwt-wcas-open-pirx .dgwt-wcas-open.dgwt-wcas-nores .dgwt-wcas-suggestions-wrapp {
	border-radius: 4px 4px 4px 4px;
	margin: 0px;
	border: 1px solid #E8E9EA;
	padding: 0px;
	margin-top: 4px;
}

.dgwt-wcas-sku {
	font-size: 12px;
	color: #8B8F95;
}

.dgwt-wcas-sp {
	font-weight: 600;
	padding-left: 0px;
}

.dgwt-wcas-has-img .dgwt-wcas-suggestion.dgwt-wcas-suggestion-product {
	padding: 8px;
	transition: all 180ms ease-in-out !important;
}

.dgwt-wcas-has-img .dgwt-wcas-suggestion.dgwt-wcas-suggestion-product:hover {
	background-color: #F3F5F6;
}

.dgwt-wcas-si img {
	padding: 0px;
	border-radius: 4px;
	border: 1px solid #E8E9EA;
	max-height: 100%;
	max-width: 100%;
}

/*
 * колонка получает только ширину избранного, корзины, контактов и кнопки.
 * Благодаря этому колонки больше не делятся пополам.
 */
.site-primary-header-wrap>.ast-builder-grid-row {
	grid-template-columns: minmax(0, 1fr) auto;
}

/* Разрешаем левой части сжиматься только по содержимому правой части. */
.site-primary-header-wrap .site-header-primary-section-left {
	min-width: 0;
	width: 100%;
}

/* Виджет поиска занимает всю доступную ширину внутри левой колонки. */
.site-primary-header-wrap .site-header-primary-section-left>.header-widget-area {
	flex: 1 1 auto;
	min-width: 0;
	width: auto;
	display: flex;
	justify-content: flex-start;
	gap: 16px;
}

/* Секции виджета идут в одну строку: каталог — по содержимому, поиск — в остаток. */
.site-primary-header-wrap .site-header-primary-section-left>.header-widget-area>section {
	width: auto;
	max-width: none;
	min-width: 0;
}

/* Кнопка каталога не получает лишнюю ширину от растягиваемого виджета. */
.site-primary-header-wrap .site-header-primary-section-left>.header-widget-area>section:first-child {
	flex: 0 0 auto;
}

/* Внутренний блок и ссылка каталога тоже остаются шириной по тексту кнопки. */
.site-primary-header-wrap .site-header-primary-section-left>.header-widget-area>section:first-child .wp-block-buttons,
.site-primary-header-wrap .site-header-primary-section-left>.header-widget-area>section:first-child .wp-block-button,
.site-primary-header-wrap .site-header-primary-section-left>.header-widget-area>section:first-child .wp-block-button__link {
	width: max-content;
	max-width: none;
}

/* Размещаем текст каталога и иконку горизонтально с небольшим промежутком. */
.site-primary-header-wrap .site-header-primary-section-left>.header-widget-area>section:first-child .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 12px 24px;
	border-radius: 4px !important;
}

/* Триггер Max Mega Menu оформлен как основная кнопка «Каталог». */

#mega-menu-wrap-secondary_menu {
	background-color: transparent !important;
}

#mega-menu-wrap-secondary_menu #mega-menu-secondary_menu>li#mega-menu-item-151>a.mega-menu-link {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	gap: 8px !important;
	width: max-content !important;
	min-height: 48px !important;
	position: relative;
	box-sizing: border-box;
	padding: 12px 24px !important;
	border: 0 !important;
	border-radius: 4px !important;
	overflow: hidden !important;
	background: #004451 !important;
	background-clip: padding-box;
	color: #fff !important;
	font-family: inherit !important;
	font-size: 16px !important;
	font-weight: 400 !important;
	line-height: 24px !important;
	text-decoration: none !important;
	text-transform: none !important;
}

#mega-menu-wrap-secondary_menu #mega-menu-secondary_menu>li#mega-menu-item-151>a.mega-menu-link:hover,
#mega-menu-wrap-secondary_menu #mega-menu-secondary_menu>li#mega-menu-item-151>a.mega-menu-link:focus-visible,
#mega-menu-wrap-secondary_menu #mega-menu-secondary_menu>li#mega-menu-item-151.mega-toggle-on>a.mega-menu-link {
	background: #004451 !important;
	color: #fff !important;
}

/* Прячем штатный шеврон у триггера. */
#mega-menu-wrap-secondary_menu #mega-menu-secondary_menu>li#mega-menu-item-151>a.mega-menu-link .mega-indicator {
	display: none !important;
}

.site-primary-header-wrap .site-header-primary-section-left>.header-widget-area>section:first-child .wp-block-button__link:after {
	content: "";
	display: block;
	flex: 0 0 24px;
	width: 24px;
	height: 24px;
	background-color: currentColor;
	-webkit-mask: url("../Icons/List_Horizontal.svg") center / contain no-repeat;
	mask: url("../Icons/List_Horizontal.svg") center / contain no-repeat;
}

/* Иконка каталога плавно переключается между списком и крестиком. */
#mega-menu-wrap-secondary_menu #mega-menu-secondary_menu>li#mega-menu-item-151>a.mega-menu-link:before,
#mega-menu-wrap-secondary_menu #mega-menu-secondary_menu>li#mega-menu-item-151>a.mega-menu-link:after {
	content: "" !important;
	display: block !important;
	width: 24px;
	height: 24px;
	margin: 0 !important;
	background-repeat: no-repeat;
	background-position: center;
	background-size: contain;
	transition: opacity 180ms ease-in-out;
	pointer-events: none;
}

#mega-menu-wrap-secondary_menu #mega-menu-secondary_menu>li#mega-menu-item-151>a.mega-menu-link:before {
	position: absolute;
	top: 50%;
	right: 24px;
	transform: translateY(-50%);
	opacity: 0;
	background-image: url("../Icons/Close_MD.svg");
}

#mega-menu-wrap-secondary_menu #mega-menu-secondary_menu>li#mega-menu-item-151>a.mega-menu-link:after {
	flex: 0 0 24px;
	opacity: 1;
	background-image: url("../Icons/List_Horizontal.svg");
}

#mega-menu-wrap-secondary_menu #mega-menu-secondary_menu>li#mega-menu-item-151.mega-toggle-on>a.mega-menu-link:before {
	opacity: 1;
}

#mega-menu-wrap-secondary_menu #mega-menu-secondary_menu>li#mega-menu-item-151.mega-toggle-on>a.mega-menu-link:after {
	opacity: 0;
}

@media (prefers-reduced-motion: reduce) {

	#mega-menu-wrap-secondary_menu #mega-menu-secondary_menu>li#mega-menu-item-151>a.mega-menu-link:before,
	#mega-menu-wrap-secondary_menu #mega-menu-secondary_menu>li#mega-menu-item-151>a.mega-menu-link:after {
		transition: none;
	}

	#mega-menu-wrap-secondary_menu #mega-menu-secondary_menu>li#mega-menu-item-151>.mega-sub-menu {
		-webkit-transition: none !important;
		transition: none !important;
	}
}

#mega-menu-wrap-secondary_menu #mega-menu-secondary_menu li.mega-menu-item a.mega-menu-link:before {
	margin: 0 !important;
}

/* Поиск занимает всё место, оставшееся после логотипа и кнопки каталога. */
.site-primary-header-wrap .site-header-primary-section-left>.header-widget-area>section:last-child {
	flex: 1 1 auto;
}

.site-primary-header-wrap .site-header-primary-section-left>.header-widget-area>section:last-child>.widget_block,
.site-primary-header-wrap .site-header-primary-section-left .dgwt-wcas-search-wrapp,
.site-primary-header-wrap .site-header-primary-section-left .dgwt-wcas-search-form,
.site-primary-header-wrap .site-header-primary-section-left .dgwt-wcas-sf-wrapp {
	width: 100%;
	max-width: none;
}

/* Правая часть сохраняет ширину своих элементов и не занимает лишнее место. */
.site-primary-header-wrap .site-header-primary-section-right {
	min-width: max-content;
	width: auto;
}

/* Поле растягивается вместе с формой и не ограничивается шириной плагина. */
.site-primary-header-wrap .dgwt-wcas-search-input {
	width: 100%;
	box-sizing: border-box;
}

/*
 * Max Mega Menu в шапке Astra вложено в узкий элемент меню. Закрепляем
 * панель относительно нижнего края закреплённой шапки и сохраняем её раскладку при закрытии:
 * плагин снимает mega-toggle-on до конца анимации.
 */
#mega-menu-wrap-secondary_menu #mega-menu-secondary_menu>li.mega-menu-item-object-custom.mega-menu-item-has-children>.mega-sub-menu {
	position: fixed !important;
	top: var(--altyn-mega-menu-top, 113px) !important;
	left: 0 !important;
	right: 0 !important;
	bottom: 0 !important;
	width: auto !important;
	max-width: none !important;
	height: auto !important;
	max-height: none !important;
	box-sizing: border-box;
	padding: 32px 24px 24px 24px !important;
	background: rgba(255, 255, 255, .8) !important;
	backdrop-filter: blur(24px) saturate(180%) contrast(90%) brightness(100%);
	overflow-x: hidden;
	overflow-y: auto !important;
	overscroll-behavior-y: contain;
	z-index: 99999;
}

/* Шторка раскрывается сверху вниз и закрывается обратным движением на всех экранах. */
@supports (clip-path: inset(0 0 100% 0)) {
	#mega-menu-wrap-secondary_menu #mega-menu-secondary_menu>li#mega-menu-item-151>.mega-sub-menu {
		-webkit-clip-path: inset(0 0 100% 0);
		clip-path: inset(0 0 100% 0);
		visibility: hidden !important;
		opacity: 1 !important;
		transform: none !important;
		-webkit-transition: -webkit-clip-path 420ms cubic-bezier(0.32, 1, 0.42, 1), visibility 0s linear 420ms;
		transition: clip-path 420ms cubic-bezier(0.32, 1, 0.42, 1), visibility 0s linear 420ms;
	}

	#mega-menu-wrap-secondary_menu #mega-menu-secondary_menu>li#mega-menu-item-151.mega-toggle-on>.mega-sub-menu {
		-webkit-clip-path: inset(0);
		clip-path: inset(0);
		visibility: visible !important;
		-webkit-transition: -webkit-clip-path 420ms cubic-bezier(0.32, 1, 0.42, 1), visibility 0s linear 0s;
		transition: clip-path 420ms cubic-bezier(0.32, 1, 0.42, 1), visibility 0s linear 0s;
	}
}

#mega-menu-wrap-secondary_menu #mega-menu-secondary_menu li.mega-menu-megamenu>ul.mega-sub-menu>li.mega-menu-row .mega-menu-column>ul.mega-sub-menu>li.mega-menu-item {
	padding: 0;
}

.woocommerce ul.product-categories>li ul li a {
	margin-left: 0;
}

/* В панели один столбец Max Mega Menu, а дерево формирует WooCommerce widget. */
#mega-menu-wrap-secondary_menu #mega-menu-secondary_menu>li.mega-menu-item-object-custom.mega-menu-item-has-children .mega-menu-column,
#mega-menu-wrap-secondary_menu #mega-menu-secondary_menu>li.mega-menu-item-object-custom.mega-menu-item-has-children .mega-menu-column>.mega-sub-menu {
	width: 100% !important;
	max-width: none !important;
	margin: 0 !important;
	padding: 0 !important;
}

/* Контент меню совпадает по ширине с контейнером сайта и центрируется. */
#mega-menu-wrap-secondary_menu #mega-menu-secondary_menu>li.mega-menu-item-object-custom.mega-menu-item-has-children .mega-menu-row {
	float: none !important;
	width: 100% !important;
	max-width: 1440px !important;
	margin: 0 auto !important;
	padding: 0 12px !important;
	box-sizing: border-box;
}

#mega-menu-wrap-secondary_menu #mega-menu-secondary_menu>li.mega-menu-item-object-custom.mega-menu-item-has-children .widget_product_categories {
	width: 100%;
}

#mega-menu-wrap-secondary_menu #mega-menu-secondary_menu>li.mega-menu-item-object-custom.mega-menu-item-has-children .mega-block-title {
	margin: 0 0 24px !important;
	color: #171f2c !important;
	font-size: 24px !important;
	font-weight: 600 !important;
	line-height: 32px !important;
	padding: 0 !important;
	text-transform: math-auto !important;
}

#mega-menu-wrap-secondary_menu .mega-block-title .altyn-catalog-menu-title-link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: inherit;
	text-decoration: none;
	transition: all 180ms ease-in-out;
}

#mega-menu-wrap-secondary_menu .mega-block-title .altyn-catalog-menu-title-link:hover {
	color: #F47F2D !important;
	text-decoration: none !important;
}

#mega-menu-wrap-secondary_menu .mega-block-title .altyn-catalog-menu-title-link img {
	display: block;
	width: 20px;
	height: 20px;
}

#mega-menu-wrap-secondary_menu .mega-block-title .altyn-catalog-menu-title-link:hover,
#mega-menu-wrap-secondary_menu .mega-block-title .altyn-catalog-menu-title-link:focus-visible {
	color: inherit;
	text-decoration: underline;
}

/* Настоящий список WooCommerce разбит на колонки по родительским категориям. */
#mega-menu-wrap-secondary_menu #mega-menu-secondary_menu>li.mega-menu-item-object-custom.mega-menu-item-has-children ul.product-categories {
	display: grid !important;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	align-content: start;
	align-items: start;
	gap: 24px 32px;
	width: 100% !important;
	margin: 0 0 24px 0 !important;
	padding: 0 !important;
}

/* Скрываем только в мегаменю целые ветки: Акции, Новинки, Полиграфия,
   Распродажа, Хозтовары и По отраслям. ID категорий не зависят от названий. */
#mega-menu-wrap-secondary_menu #mega-menu-secondary_menu ul.product-categories>li:is(.cat-item-491, .cat-item-492, .cat-item-569, .cat-item-570, .cat-item-676, .cat-item-678) {
	display: none !important;
}

/* Сбрасываем вложенные стили списка плагина и WooCommerce. */
#mega-menu-wrap-secondary_menu #mega-menu-secondary_menu>li.mega-menu-item-object-custom.mega-menu-item-has-children ul.product-categories li,
#mega-menu-wrap-secondary_menu #mega-menu-secondary_menu>li.mega-menu-item-object-custom.mega-menu-item-has-children ul.product-categories ul.children {
	min-width: 0;
	margin: 0 !important;
	padding: 0 !important;
	list-style: none !important;
}

#mega-menu-wrap-secondary_menu #mega-menu-secondary_menu>li.mega-menu-item-object-custom.mega-menu-item-has-children ul.product-categories li::marker {
	content: "";
}

/* Заголовки родительских категорий и ссылки подкатегорий. */
#mega-menu-wrap-secondary_menu #mega-menu-secondary_menu>li.mega-menu-item-object-custom.mega-menu-item-has-children ul.product-categories>li.cat-item {
	grid-column: auto !important;
	width: auto !important;
	max-width: none !important;
	align-self: start;
}

#mega-menu-wrap-secondary_menu #mega-menu-secondary_menu>li.mega-menu-item-object-custom.mega-menu-item-has-children ul.product-categories a {
	display: inline-block;
	max-width: 100%;
	padding: 0;
	border: 0;
	background: transparent !important;
	color: #454c56 !important;
	font-family: inherit;
	font-size: 14px !important;
	font-weight: 400 !important;
	line-height: 20px !important;
	text-decoration: none;
	white-space: normal;
}

#mega-menu-wrap-secondary_menu #mega-menu-secondary_menu>li.mega-menu-item-object-custom.mega-menu-item-has-children ul.product-categories>li.cat-item>a {
	margin-bottom: 8px;
	color: #171f2c !important;
	font-weight: 600 !important;
	font-size: 16px !important;
	line-height: 24px !important;
	transition: all 180ms ease-in-out;
}

#mega-menu-wrap-secondary_menu #mega-menu-secondary_menu>li.mega-menu-item-object-custom.mega-menu-item-has-children ul.product-categories>li.cat-item>a:hover {
	color: #f47f2d !important;
}

/* Родительские категории ведут к списку подкатегорий, поэтому счёт им не нужен. */
#mega-menu-wrap-secondary_menu #mega-menu-secondary_menu>li.mega-menu-item-object-custom.mega-menu-item-has-children ul.product-categories>li.cat-item>a>.count,
#mega-menu-wrap-secondary_menu #mega-menu-secondary_menu>li.mega-menu-item-object-custom.mega-menu-item-has-children ul.product-categories>li.cat-item>.count {
	display: none !important;
}

/* Стрелка показывает, что родительскую категорию можно открыть. */
#mega-menu-wrap-secondary_menu #mega-menu-secondary_menu>li.mega-menu-item-object-custom.mega-menu-item-has-children ul.product-categories>li.cat-item>a:after {
	content: "";
	display: inline-block;
	width: 16px;
	height: 16px;
	margin-left: 0px;
	background-color: currentColor;
	vertical-align: -3px;
	-webkit-mask: url("../Icons/Chevron_Right.svg") center / contain no-repeat;
	mask: url("../Icons/Chevron_Right.svg") center / contain no-repeat;
}

/* Счётчики подкатегорий остаются лёгкими и визуально похожи на верхний индекс. */
#mega-menu-wrap-secondary_menu #mega-menu-secondary_menu>li.mega-menu-item-object-custom.mega-menu-item-has-children ul.product-categories .count {
	display: inline !important;
	float: none !important;
	margin-left: 2px;
	color: #8b8f95 !important;
	font-size: 11px !important;
	font-weight: 400 !important;
	line-height: 0 !important;
	vertical-align: super !important;
	white-space: nowrap !important;
}

#mega-menu-wrap-secondary_menu #mega-menu-secondary_menu>li.mega-menu-item-object-custom.mega-menu-item-has-children ul.product-categories ul.children {
	display: flex !important;
	width: 100%;
	gap: 4px 0;
	flex-direction: column;
}

/* Убираем декоративные стрелки перед дочерними категориями. */
#mega-menu-wrap-secondary_menu #mega-menu-secondary_menu>li.mega-menu-item-object-custom.mega-menu-item-has-children ul.product-categories ul.children li::before,
#mega-menu-wrap-secondary_menu #mega-menu-secondary_menu>li.mega-menu-item-object-custom.mega-menu-item-has-children ul.product-categories ul.children li::after,
#mega-menu-wrap-secondary_menu #mega-menu-secondary_menu>li.mega-menu-item-object-custom.mega-menu-item-has-children ul.product-categories ul.children a::before,
#mega-menu-wrap-secondary_menu #mega-menu-secondary_menu>li.mega-menu-item-object-custom.mega-menu-item-has-children ul.product-categories ul.children a::after {
	display: none !important;
	content: none !important;
	background: none !important;
}

#mega-menu-wrap-secondary_menu #mega-menu-secondary_menu>li.mega-menu-item-object-custom.mega-menu-item-has-children ul.product-categories a:hover,
#mega-menu-wrap-secondary_menu #mega-menu-secondary_menu>li.mega-menu-item-object-custom.mega-menu-item-has-children ul.product-categories a:focus-visible {
	color: #f47f2d !important;
}

#mega-menu-wrap-secondary_menu #mega-menu-secondary_menu>li.mega-menu-item-object-custom.mega-menu-item-has-children>.mega-sub-menu,
#mega-menu-wrap-secondary_menu #mega-menu-secondary_menu>li.mega-menu-item-object-custom.mega-menu-item-has-children>.mega-sub-menu * {
	word-break: normal;
	overflow-wrap: anywhere;
}

/* Каунтер вишлиста */
.wlfmc-counter-wrapper .wlfmc-counter-icon .wlfmc-counter-number.position-top-right {
	right: -12px;
}

.wlfmc-counter-wrapper .wlfmc-counter-icon .wlfmc-counter-number {
	top: calc(50% - 22px);
	font-size: 12px;
	font-family: 'Geist', sans-serif;
}

.dgwt-wcas-open-pirx .dgwt-wcas-details-inner,
.dgwt-wcas-open-pirx .dgwt-wcas-suggestions-wrapp>.dgwt-wcas-suggestion {
	padding-left: 8px;
	padding-right: 8px;
}

.dgwt-wcas-suggestion {
	padding: 6px 8px;
}

.dgwt-wcas-has-headings .dgwt-wcas-suggestion.dgwt-wcas-suggestion-tax.dgwt-wcas-suggestion-selected,
.dgwt-wcas-has-headings .dgwt-wcas-suggestion.dgwt-wcas-suggestion-tax:hover {
	text-decoration: none;
}

.dgwt-wcas-has-headings .dgwt-wcas-suggestion.dgwt-wcas-suggestion-tax.dgwt-wcas-suggestion-selected,
.dgwt-wcas-has-headings .dgwt-wcas-suggestion.dgwt-wcas-suggestion-tax:hover .dgwt-wcas-st {
	color: #F47F2D;
}

.dgwt-wcas-has-headings .dgwt-wcas-suggestion-headline .dgwt-wcas-st {
	border-bottom: 1px solid #E8E9EA;
	padding-bottom: 4px;
	text-transform: uppercase;
	margin-top: 8px;
	font-size: 12px;
}

.dgwt-wcas-st {
	color: #454C56;
	transition: all 180ms ease;
}

dgwt-wcas-st-breadcrumbs {
	font-size: 12px;
	line-height: 20px;
}

.dgwt-wcas-has-sku .dgwt-wcas-st-title {
	line-height: 20px;
	margin-right: 8px;
	margin-bottom: 2px;
}

.dgwt-wcas-meta {
	max-width: 160px;
	width: 160px;
}

.dgwt-wcas-content-wrapp {
	padding-left: 12px;
}

.dgwt-wcas-suggestion-selected {
	background-color: #F3F4F4;
}

.dgwt-wcas-open-pirx .dgwt-wcas-suggestion-nores {
	padding: 12px;
}

#altyn-search-analog-popup-trigger {
	display: none !important;
}

.dgwt-wcas-suggestion-nores .altyn-search-analog {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
	margin-top: 4px;
	white-space: normal;
}

.dgwt-wcas-suggestion-nores .altyn-search-analog-caption {
	flex: 1 1 220px;
	margin: 0;
	color: #8B8F95;
	font-size: 14px;
	line-height: 1.5;
}

.dgwt-wcas-suggestion-nores .altyn-search-analog-button {
	flex: 0 1 auto;
	min-height: 32px;
	max-width: 100%;
	padding: 8px 16px;
	border-radius: 4px;
	background: rgba(0, 68, 81, .1);
	color: rgba(0, 68, 81, 1);
	font-family: 'Geist', sans-serif;
	font-size: 14px;
	font-weight: 400;
	line-height: 20px;
	text-align: center;
	white-space: normal;
	cursor: pointer;
	transition: all 180ms ease-in-out;
}

.dgwt-wcas-suggestion-nores .altyn-search-analog-button:hover {
	background: rgba(0, 68, 81, .2);
}

.dgwt-wcas-suggestion-nores .altyn-search-analog-button:focus-visible {
	outline: 2px solid #004753;
	outline-offset: 3px;
}

@media screen and (max-width: 768px) {
	.dgwt-wcas-suggestion-nores .altyn-search-analog {
		align-items: stretch;
		flex-direction: column;
	}

	.dgwt-wcas-suggestion-nores .altyn-search-analog-caption {
		flex-basis: auto;
	}

	.dgwt-wcas-suggestion-nores .altyn-search-analog-button {
		width: 100%;
	}
}

.dgwt-wcas-suggestion.dgwt-wcas-suggestion-headline-v2 {
	font-weight: 400;
	font-size: 14px;
	margin-top: 4px;
	margin-bottom: 4px;
}

.dgwt-wcas-sugg-hist-clear {
	color: #F47F2D;
}

/* Адаптация */

@media screen and (max-width: 1336px) {
	.ast-builder-menu-1 .menu-item>.menu-link {
		padding-left: 12px;
		padding-right: 12px;
		font-size: 14px;
	}

	.ast-desktop .ast-below-header-bar .main-header-menu>.menu-item {
		line-height: 24px;
	}

	.ast-header-button-1[data-section*="section-hb-button-"] .ast-builder-button-wrap .ast-custom-button {
		padding: 12px 20px;
		font-size: 14px;
	}

	.header-contacts .hot-tel {
		font-size: 14px;
	}

	.header-contacts .tel-caption {
		font-size: 12px;
	}

	.dgwt-wcas-style-pirx .dgwt-wcas-sf-wrapp input[type="search"].dgwt-wcas-search-input {
		padding: 8px 12px 8px 40px;
		line-height: 22px;
		font-size: 14px;
	}

	.dgwt-wcas-style-pirx .dgwt-wcas-sf-wrapp button.dgwt-wcas-search-submit {
		border-radius: 2px;
		min-height: 34px;
		min-width: 34px;
		height: 34px;
		width: 34px;
		left: 3px;
		top: 3px;
		pointer-events: none;
		transition: none;
	}

	.dgwt-wcas-style-pirx.dgwt-wcas-search-filled .dgwt-wcas-sf-wrapp button.dgwt-wcas-search-submit {
		right: 3px;
	}

	.dgwt-wcas-style-pirx.dgwt-wcas-search-filled .dgwt-wcas-sf-wrapp input[type="search"].dgwt-wcas-search-input {
		padding-right: 72px;
		padding-left: 12px;
	}

	.dgwt-wcas-style-pirx .dgwt-wcas-preloader {
		margin-right: 16px;
	}

	#mega-menu-wrap-secondary_menu #mega-menu-secondary_menu>li#mega-menu-item-151>a.mega-menu-link {
		gap: 8px !important;
		min-height: 40px !important;
		padding: 12px 20px !important;
		font-size: 14px !important;
		line-height: 20px !important;
	}

	#mega-menu-wrap-secondary_menu #mega-menu-secondary_menu>li#mega-menu-item-151>a.mega-menu-link::before {
		right: 20px;
		width: 20px;
		height: 20px;
	}

	#mega-menu-wrap-secondary_menu #mega-menu-secondary_menu>li#mega-menu-item-151>a.mega-menu-link::after {
		flex: 0 0 20px;
		width: 20px;
		height: 20px;
	}

	header .custom-logo-link img {
		width: 128px;
	}
}

@media screen and (max-width: 1140px) {

	/* В планшетной шапке слева остаётся ширина логотипа и кнопки, справа — поиск и иконки. */
	.site-primary-header-wrap>.ast-builder-grid-row {
		grid-template-columns: max-content minmax(0, 1fr);
	}

	.site-primary-header-wrap .site-header-primary-section-left {
		flex: 0 0 auto;
		width: max-content;
		max-width: 100%;
	}

	.site-primary-header-wrap .site-header-primary-section-right {
		display: flex;
		align-items: center;
		justify-content: flex-end;
		gap: 8px;
		width: 100%;
		min-width: 0;
	}

	.site-primary-header-wrap .site-header-primary-section-right>.header-widget-area {
		display: flex;
		flex: 1 1 0%;
		width: 100%;
		min-width: 0;
	}

	.site-primary-header-wrap .site-header-primary-section-right>.header-widget-area>section {
		flex: 1 1 0%;
		width: 100%;
		min-width: 0;
	}

	.site-primary-header-wrap .site-header-primary-section-right .dgwt-wcas-search-wrapp,
	.site-primary-header-wrap .site-header-primary-section-right .dgwt-wcas-search-form,
	.site-primary-header-wrap .site-header-primary-section-right .dgwt-wcas-sf-wrapp {
		width: 100%;
		max-width: none;
		min-width: 0;
	}

	.ast-builder-grid-row {
		grid-column-gap: 8px;
	}

	.ast-header-break-point .ast-builder-menu {
		width: auto;
	}

	/* Не даём области виджетов сжимать поиск из-за ширины вложенного списка меню. */
	.site-primary-header-wrap .site-header-primary-section-left>.header-widget-area {
		min-width: 0;
		gap: 12px;
	}

	/* Закрепляем секцию каталога и её обёртку по фактической ширине кнопки. */
	.site-primary-header-wrap .site-header-primary-section-left>.header-widget-area>section:first-child {
		flex: 0 0 auto;
		width: max-content;
		min-width: 0;
	}

	/* Убираем растягивание Max Mega Menu на всю строку шапки. */
	.site-primary-header-wrap #mega-menu-wrap-secondary_menu {
		flex: 0 0 auto;
		width: max-content !important;
		max-width: max-content !important;
	}

	/* Список верхнего уровня и пункт каталога занимают только необходимую ширину. */
	.site-primary-header-wrap #mega-menu-wrap-secondary_menu #mega-menu-secondary_menu {
		display: flex !important;
		width: max-content !important;
		max-width: max-content !important;
	}

	/* Не позволяем пункту каталога растягиваться по ширине списка. */
	.site-primary-header-wrap #mega-menu-wrap-secondary_menu #mega-menu-secondary_menu>li#mega-menu-item-151 {
		flex: 0 0 auto;
		width: max-content !important;
		max-width: max-content !important;
	}

	/* Отдаём поиску всё свободное место и разрешаем ему сжиматься на узких экранах. */
	.site-primary-header-wrap .site-header-primary-section-left>.header-widget-area>section:last-child {
		flex: 1 1 0%;
		min-width: 0;
	}

	/* Форма, виджет и поле поиска не должны задавать минимальную ширину секции. */
	.site-primary-header-wrap .site-header-primary-section-left>.header-widget-area>section:last-child>.widget_block,
	.site-primary-header-wrap .site-header-primary-section-left .dgwt-wcas-search-wrapp,
	.site-primary-header-wrap .site-header-primary-section-left .dgwt-wcas-search-form,
	.site-primary-header-wrap .site-header-primary-section-left .dgwt-wcas-sf-wrapp,
	.site-primary-header-wrap .dgwt-wcas-search-input {
		min-width: 0;
		max-width: 100%;
	}

	.woocommerce .ast-header-woo-cart .ast-site-header-cart .ast-addon-cart-wrap,
	.ast-header-woo-cart .ast-site-header-cart .ast-addon-cart-wrap {
		margin-right: 8px;
	}

	.header-contacts {
		display: flex;
		flex-direction: row-reverse;
		gap: 6px;
		justify-content: center;
	}

	.header-contacts .tel-caption {
		font-size: 14px;
	}

	.ast-header-button-1[data-section*="section-hb-button-"] .ast-builder-button-wrap .ast-custom-button {
		padding: 4px 0;
		border: none;
		border-radius: 0;
	}

	.header-widget-area:has(.header-contacts) {
		padding: 0;
	}

	.ast-header-break-point .main-header-bar.ast-header-breadcrumb {
		border: none;
		padding: 16px 0;
	}

	#mega-menu-wrap-secondary_menu #mega-menu-secondary_menu>li.mega-menu-item-object-custom.mega-menu-item-has-children>.mega-sub-menu {
		top: var(--altyn-mega-menu-top, 104px) !important;
	}

	#mega-menu-wrap-secondary_menu #mega-menu-secondary_menu>li.mega-menu-item-object-custom.mega-menu-item-has-children ul.product-categories {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 40px 24px;
	}

	#mega-menu-wrap-secondary_menu #mega-menu-secondary_menu>li.mega-menu-item-object-custom.mega-menu-item-has-children>.mega-sub-menu {
		padding: 20px;
	}

	.ast-mobile-popup-drawer .ast-mobile-popup-header .menu-toggle-close .ahfb-svg-iconset svg {
		width: 24px;
		height: 24px;
	}

	.ast-mobile-popup-drawer .ast-mobile-popup-header .menu-toggle-close {
		padding: 16px;
	}

	.ast-mobile-popup-drawer .ast-mobile-popup-header {
		padding: 8px 8px 8px 8px;
		border-bottom: 1px solid #E8E9EA;
	}
}


@media screen and (max-width: 921px) {

	/* В мобильной версии поиск — компактная иконка в общем ряду с избранным и корзиной. */
	.site-primary-header-wrap .site-header-primary-section-right {
		display: flex;
		align-items: center;
		justify-content: flex-end;
		flex-wrap: nowrap;
		gap: 8px;
		width: auto;
		min-width: 0;
	}

	.site-primary-header-wrap .site-header-primary-section-right>.header-widget-area {
		display: flex;
		flex: 1 1 0%;
		width: 100%;
		min-width: 0;
	}

	.site-primary-header-wrap .site-header-primary-section-right>.header-widget-area>section {
		flex: auto;
		width: max-content;
		min-width: 0;
	}

	.site-primary-header-wrap .site-header-primary-section-right .dgwt-wcas-search-wrapp {
		width: auto;
		max-width: none;
	}

	.dgwt-wcas-search-wrapp {
		margin: 0;
	}

	.dgwt-wcas-style-pirx.dgwt-wcas-search-wrapp-mobile .dgwt-wcas-sf-wrapp input[type="search"].dgwt-wcas-search-input {
		border-radius: 4px;
	}

	.dgwt-wcas-overlay-mobile {
		background-color: rgba(255, 255, 255, .8);
		backdrop-filter: blur(64px);
	}

	.dgwt-wcas-style-pirx.dgwt-wcas-search-wrapp-mobile .dgwt-wcas-sf-wrapp input[type="search"].dgwt-wcas-search-input {
		border: 1px solid #E8E9EA;
		border-radius: 4px;
		height: auto;
		background-color: #f8f8f8;
		transition: all 180ms ease-in-out;
		color: #171F2C;
		font-family: 'Geist', sans-serif;
	}

	.dgwt-wcas-style-pirx.dgwt-wcas-search-wrapp-mobile.dgwt-wcas-search-focused .dgwt-wcas-sf-wrapp input[type="search"].dgwt-wcas-search-input {
		border-color: #171F2C;
	}

	.dgwt-wcas-overlay-mobile-on .dgwt-wcas-suggestions-wrapp {
		top: 74px !important;
		height: calc(100% - 74px) !important;
	}

	.dgwt-wcas-open-pirx .dgwt-wcas-open .dgwt-wcas-suggestions-wrapp,
	.dgwt-wcas-open-pirx .dgwt-wcas-open.dgwt-wcas-nores .dgwt-wcas-suggestions-wrapp {
		border-radius: 0;
		margin: 0px;
		margin-top: 0px;
		border: none;
		padding: 0px;
		margin-top: 4px;
	}

	.dgwt-wcas-open-pirx .dgwt-wcas-details-inner,
	.dgwt-wcas-open-pirx .dgwt-wcas-suggestions-wrapp>.dgwt-wcas-suggestion {
		padding-left: 24px;
		padding-right: 24px;
	}

	.dgwt-wcas-om-bar {
		display: flex;
		height: auto;
		width: 100%;
		padding: 16px 16px 16px 4px;
		border-bottom: 1px solid #E8E9EA;
	}

	.dgwt-wcas-suggestions-wrapp {
		background: transparent;
	}
}

@media screen and (max-width: 768px) {

	/* В мобильной версии поиск — компактная иконка в общем ряду с избранным и корзиной. */
	.site-primary-header-wrap .site-header-primary-section-right {
		display: flex;
		align-items: center;
		justify-content: flex-end;
		flex-wrap: nowrap;
		gap: 8px;
		width: auto;
		min-width: 0;
	}

	.site-primary-header-wrap .site-header-primary-section-right>.header-widget-area {
		display: flex;
		flex: 0 0 auto;
		width: max-content;
		min-width: 0;
	}

	.site-primary-header-wrap .site-header-primary-section-right>.header-widget-area>section {
		flex: 0 0 auto;
		width: max-content;
		min-width: 0;
	}

	.site-primary-header-wrap .site-header-primary-section-right .dgwt-wcas-search-wrapp {
		width: auto;
		max-width: none;
	}

	#mega-menu-wrap-secondary_menu #mega-menu-secondary_menu>li.mega-menu-item-object-custom.mega-menu-item-has-children ul.product-categories {
		grid-template-columns: repeat(1, minmax(0, 1fr));
		gap: 40px 24px;
	}
}

@media screen and (max-width: 568px) {
	header .custom-logo-link img {
		width: 92px;
	}

	.ast-desktop .ast-primary-header-bar.main-header-bar,
	.ast-header-break-point #masthead .ast-primary-header-bar.main-header-bar {
		padding-left: 12px;
		padding-right: 12px;
	}

	#mega-menu-wrap-secondary_menu #mega-menu-secondary_menu>li#mega-menu-item-151>a.mega-menu-link {
		padding: 12px 12px !important;
		gap: 4px !important;
	}

	.ast-header-break-point .ast-header-woo-cart {
		display: none;
	}

	#mega-menu-wrap-secondary_menu #mega-menu-secondary_menu>li#mega-menu-item-151>a.mega-menu-link::after {
		flex: 0 0 16px;
		width: 16px;
		height: 16px;
	}

	#mega-menu-wrap-secondary_menu #mega-menu-secondary_menu>li#mega-menu-item-151>a.mega-menu-link::before {
		right: 12px;
		width: 16px;
		height: 16px;
	}

	.site-header-section>* {
		padding: 0 4px;
	}

	.ast-button-wrap .menu-toggle.main-header-menu-toggle {
		padding: 4px 0 4px 4px;
	}

	[data-section="section-header-mobile-trigger"] .ast-button-wrap .mobile-menu-toggle-icon .ast-mobile-svg {
		fill: #171F2C;
	}

	.header-contacts .hot-tel,
	.header-contacts .tel-caption,
	.ast-header-button-1[data-section*="section-hb-button-"] .ast-builder-button-wrap .ast-custom-button {
		font-size: 12px;
	}

	.site-primary-header-wrap .site-header-primary-section-right {
		gap: 6px;
	}

	#mega-menu-wrap-secondary_menu #mega-menu-secondary_menu>li.mega-menu-item-object-custom.mega-menu-item-has-children ul.product-categories {
		grid-template-columns: repeat(1, minmax(0, 1fr));
		gap: 40px 24px;
	}

	#mega-menu-wrap-secondary_menu #mega-menu-secondary_menu>li.mega-menu-item-object-custom.mega-menu-item-has-children>.mega-sub-menu {
		padding: 24px 8px 24px 16px !important;
	}

	#mega-menu-wrap-secondary_menu #mega-menu-secondary_menu>li.mega-menu-item-object-custom.mega-menu-item-has-children .mega-block-title {
		margin: 0 0 16px !important;
	}

	#mega-menu-wrap-secondary_menu #mega-menu-secondary_menu>li.mega-menu-item-object-custom.mega-menu-item-has-children ul.product-categories ul.children {
		gap: 8px 0;
	}

	#mega-menu-wrap-secondary_menu #mega-menu-secondary_menu>li.mega-menu-item-object-custom.mega-menu-item-has-children ul.product-categories a {
		font-size: 16px !important;
		line-height: 24px;
	}

	#mega-menu-wrap-secondary_menu #mega-menu-secondary_menu>li.mega-menu-item-object-custom.mega-menu-item-has-children ul.product-categories>li.cat-item>a::after {
		margin-left: 0px;
	}

	.ast-mobile-popup-drawer .ast-mobile-popup-header .menu-toggle-close {
		padding: 4px;
	}

	.dgwt-wcas-sp span {
		font-size: 13px;
	}

	.dgwt-wcas-has-sku .dgwt-wcas-st-title {
		font-size: 14px;
		line-height: 18px;
	}

	.dgwt-wcas-meta {
		max-width: 112px;
		width: 112px;
	}

	.dgwt-wcas-open-pirx .dgwt-wcas-details-inner,
	.dgwt-wcas-open-pirx .dgwt-wcas-suggestions-wrapp>.dgwt-wcas-suggestion {
		padding-left: 12px;
		padding-right: 12px;
	}

	.dgwt-wcas-si {
		width: 72px;
	}
}