/* Анимация увеличения */
@keyframes vm-badge-pop {
	0%   { transform: scale(1); }
	50%  { transform: scale(1.5); background-color: #ff1f00; }
	100% { transform: scale(1); }
}

/* Фиксация мобильной шапки */
.vm-mobile-header {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 60px;
	background: #fff;
	z-index: 9999;
	box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.vm-mobile-container {
	display: flex;
	justify-content: space-between;
	align-items: center;
	height: 100%;
	padding: 0 15px;
}

.vm-mobile-logo img {
	height: 35px;
	width: auto;
}

/* Стили бургера */
.vm-mobile-burger {
	width: 30px;
	height: 30px;
	position: relative;
	cursor: pointer;
	display: flex;
	flex-direction: column;
	/*justify-content: space-between;*/
	justify-content: center;
}

.burger-line {
	width: 22px;
	height: 2px;
	background-color: #333;
	transition: all 0.3s ease;
	margin: 3px 0;
	transition: 0.3s;
}

/* Анимация бургера в крестик (при наличии класса is-active) */
.vm-mobile-burger.is-active .burger-line:nth-child(1) {
	transform: translateY(8px) rotate(45deg);
}
.vm-mobile-burger.is-active .burger-line:nth-child(2) {
	opacity: 0;
}
.vm-mobile-burger.is-active .burger-line:nth-child(3) {
	transform: translateY(-8px) rotate(-45deg);
}


@media screen and (max-width: 991px) {
	:root {
		--m-header-height: 55px;
		--m-bottom-height: 60px;
	}
	/* 5. НИЖНЕЕ МЕНЮ (Tab Bar) - ГОРИЗОНТАЛЬНО */
	.vm-bottom-nav {
		position: fixed !important;
		bottom: 0 !important;
		left: 0 !important;
		width: 100% !important;
		height: var(--m-bottom-height) !important;
		background: #ffffff !important;
		display: flex !important; 
		flex-direction: row !important; /* Строго в ряд */
		justify-content: space-around !important;
		align-items: center !important;
		z-index: 10001 !important;
		border-top: 1px solid #eeeeee !important;
		margin: 0 !important;
		padding: 0 !important;
		padding-bottom: env(safe-area-inset-bottom) !important;
	}

	.vm-nav-item {
		flex: 1 !important;
		display: flex !important;
		flex-direction: column !important; /* Иконка над текстом */
		justify-content: center !important;
		align-items: center !important;
		text-decoration: none !important;
		color: #333333 !important;
		height: 100% !important;
	}

	.vm-nav-item span {
		font-size: 10px !important;
		font-weight: 700 !important;
		text-transform: uppercase !important;
		margin-top: 4px !important;
		line-height: 1 !important;
	}

	.vm-nav-item.is-active { color: var(--red) !important; }


	/* Стили панели поиска */
	.vm-mobile-search-bar {
		display: none;
		background: #fff;
		border-bottom: 1px solid #eee;
		padding: 10px 15px;
		position: absolute;
		top: 60px;
		left: 0;
		width: 100%;
	}

	.vm-mobile-search-overlay {
		display: none;
		position: absolute;
		top: 0;
		left: 0;
		width: 100%;
		background: #fff;
		padding: 10px;
		z-index: 1001;
	}
	.vm-search-inner{
		display: flex;
	}
	#vm-search-close{
		width: 10%;
		max-width: 35px;
	}

	/* Иконки поиска и корзины (делаем красными из белых) */
	#vm-search-open{
		background-color: inherit;
	}
	.vm-icon-dark img {
		filter: brightness(0) saturate(100%) invert(43%) sepia(97%) saturate(2053%) hue-rotate(341deg) brightness(94%) contrast(94%) !important;
	}
	.vm-mobile-actions { display: flex !important; align-items: center; gap: 15px; }
	.vm-cart-icon {
		position: relative;
	}
	.vm-cart-badge {
		position: absolute; top: -8px; right: -10px;
		background: var(--red); color: #fff;
		font-size: 10px; padding: 2px 5px; border-radius: 10px; line-height: 1;
		font-weight: 700;
	}

	.vm-cart-badge.is-updating {
		animation: vm-badge-pop 0.4s ease-out;
	}
	/* Скрываем нижнюю (десктопную) мини-корзину на мобильных устройствах */
	.widget_shopping_cart_content {
		display: none !important;
	}
}








/**
 * ФИНАЛЬНАЯ МОБИЛЬНАЯ НАВИГАЦИЯ (Voltmag 2.0)
 * С учетом всех CSS шаблона
 */


.vm-mobile-actions {
	display: flex;
	align-items: center;
	gap: 15px;
}



/* Настройка выезда стандартного меню Webflow */
.nav-menu.w--open {
	top: 60px !important; /* Чтобы меню открывалось ПОД новой шапкой */
	height: calc(100vh - 60px) !important;
	z-index: 9998;
	background-color: #fff !important;
}



/* ---- СТИЛИ ДЛЯ ПОЛНОЦЕННОГО МОБИЛЬНОГО МЕНЮ ---- */


.nav-menu {
	display: none;
	visibility: hidden;
	transform: translateY(-100%); 
	transition: transform 0.4s ease, opacity 0.3s ease;
}
.vm-mobile-catalog-header {
	font-size: 18px;
	font-weight: 700;
	color: rgba(255,255,255,0.5);
	padding: 30px 10px 10px;
	border-bottom: 1px solid rgba(255,255,255,0.1);
	text-transform: uppercase;
}

/* Сбрасываем десктопное абсолютное позиционирование */
.vm-mobile-catalog-tree .w-dropdown-list {
	position: static !important;
	width: 100% !important;
	box-shadow: none !important;
	/*background: rgba(0, 0, 0, 0.15) !important; */ /* Легкое затемнение вложенного уровня */
	background: inherit;
	margin: 0 !important;
	min-width: 0 !important;
	min-height: 0 !important;
	max-height: none !important;
	padding-left: 15px !important;
	border-left: none !important;
	display: none; /* Скрыто по умолчанию для JS */
}

/* Структура пунктов */
.vm-mobile-catalog-tree .w-dropdown-toggle {
	display: flex !important;
	justify-content: space-between !important;
	align-items: center !important;
	padding: 0 !important;
	border-bottom: 1px solid rgba(255, 255, 255, 0.05);
	background-color: var(--red);
}

.vm-mobile-catalog-tree .w-dropdown-toggle > div {
	flex-grow: 1;
}

.vm-mobile-catalog-tree .w-dropdown-toggle a {
	color: #fff !important;
	text-decoration: none !important;
	padding: 12px 10px !important;
	display: block;
	font-size: 15px !important;
	font-weight: 500 !important;
	border: none !important;
}

.vm-mobile-catalog-tree .drpo-cat-link-2 {
	color: rgba(255,255,255,0.8) !important;
	font-weight: 400 !important;
	padding: 10px !important;
	border-bottom: 1px solid rgba(255, 255, 255, 0.02) !important;
}

/* Стрелочка раскрытия */
.vm-toggle-arrow {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 45px;
	height: 45px;
	font-size: 16px;
	color: #fff;
	/*background: rgba(255, 255, 255, 0.05);*/
	cursor: pointer;
	transition: transform 0.3s ease, background 0.3s;
}

.vm-toggle-arrow:active {
	background: rgba(255, 255, 255, 0.2);
}

.vm-toggle-arrow.w--open {
	transform: rotate(180deg);
}

/* Прячем лишние иконки от десктопа */
.vm-mobile-catalog-tree .menu-icn,
.vm-mobile-catalog-tree .w-icon-dropdown-toggle {
	display: none !important;
}


/* Видимо на удаление !? */
/* Сбрасываем "фиксированность" для внутреннего меню (Обычные страницы) */
/*.vm-mobile-pages .nav-menu {
	position: static !important;
	display: block !important;
	visibility: visible !important;
	transform: none !important;
	height: auto !important;
	padding: 0 !important;
	background: transparent !important;
	overflow: visible !important;
}*/

/* На всякий случай скрываем десктопные дропдауны у обычных страниц, если они есть */
/*.vm-mobile-pages .w-dropdown-list {
	position: static !important;
}*/
/* Видимо на удаление !? END */
@media screen and (max-width: 991px) {


	/* 1. ПРИНУДИТЕЛЬНОЕ СКРЫТИЕ СТАРЫХ ЭЛЕМЕНТОВ */
	.topsec, .top-topdiv, .cat-big-btn, .logo-mobile, .desctop-header-wrap {
		display: none !important;
	}

	/* 2. КОРРЕКЦИЯ BODY */
	body {
		padding-top: var(--m-header-height) !important;
		padding-bottom: var(--m-bottom-height) !important;
		overflow-x: hidden;
	}

	/* 3. КОМПАКТНАЯ ШАПКА */
	.vm-mobile-header {
		position: fixed !important;
		top: 0; left: 0; width: 100%;
		height: var(--m-header-height);
		background: #ffffff !important;
		z-index: 10001 !important;
		box-shadow: 0 2px 10px rgba(0,0,0,0.1);
		display: block !important;
	}

	.vm-mobile-container {
		display: flex !important;
		flex-direction: row !important;
		justify-content: space-between;
		align-items: center;
		height: 100%;
		padding: 0 15px;
	}

	.vm-mobile-logo img {
		height: 28px !important;
		width: auto !important;
	}

	/* 4. ВЫЕЗЖАЮЩЕЕ МЕНЮ (Исправление "всегда открыто" и "скрытого 1-го пункта") */
	.nav-menu.w--open {
		display: flex !important;
		visibility: visible !important;
		transform: translateY(0) !important;
		flex-direction: column !important;
		position: fixed !important;
		top: var(--m-header-height) !important;
		left: 0 !important;
		width: 100% !important;
		height: calc(100vh - var(--m-header-height) - var(--m-bottom-height)) !important;
		background-color: var(--red) !important;
		z-index: 10000 !important;
		padding: 25px 20px 60px 20px !important; /* Увеличили верхний отступ для 1-го пункта */
		overflow-y: auto !important;
	}

	/* Ссылки внутри меню */
	.nav-menu.w--open .mob-nav-link,
	.nav-menu.w--open .navlink,
	.nav-menu.w--open a {
		color: #ffffff !important;
		padding: 16px 10px !important;
		border-bottom: 1px solid rgba(255,255,255,0.1) !important;
		font-size: 17px !important;
		display: block !important;
	}
	body.menu-open { overflow: hidden; }
}