/* A-S: мобильная шапка, быстрый поиск и нижняя навигация копии сайта. */
.mobile-inline-search {
	display: none;
}

.mobile-contact-sheet,
.mobile-contact-sheet[hidden] {
	display: none;
}

@media (max-width: 991px) {
	.body {
		padding-bottom: calc(66px + env(safe-area-inset-bottom, 0px));
	}

	/* A-S: нижний блок футера остается полностью видимым над фиксированной навигацией. */
	#footer.page-footer {
		padding-bottom: calc(66px + env(safe-area-inset-bottom, 0px));
	}

	/* A-S: на карточке футер учитывает также фиксированную панель товара высотой 120px. */
	body.mobile-product-fixed-active #footer.page-footer {
		padding-bottom: calc(186px + env(safe-area-inset-bottom, 0px));
	}

	/* A-S: верхний ряд без дублирующих избранного, корзины и кнопки поиска. */
	.headers-container {
		transition: transform 220ms ease;
	}

	.headers-container.mobile-navigation--hidden {
		transform: translateY(-100%);
	}

	.headers-container.mobile-navigation--menu-open {
		transform: none !important;
		transition: none !important;
	}

	#mobileheader,
	#mobileheader .mobileheader__inner {
		position: relative;
	}

	/* A-S: убираем штатную серую линию под верхней мобильной шапкой. */
	#mobileheader .mobileheader--color-grey,
	#mobileheader .mobileheader--color-white {
		border-bottom: 0 !important;
		box-shadow: none !important;
	}

	#mobileheader .mobileheader__inner {
		justify-content: center !important;
		min-height: 58px;
	}

	#mobileheader .mobileheader__left {
		align-items: center;
		display: flex;
		height: 58px;
		left: 0;
		position: absolute;
		top: 0;
		width: 58px;
	}

	/* A-S: верхний бургер - три полоски без окантовки; обе иконки имеют серый цвет нижней панели. */
	#mobileheader .mobileheader__burger,
	#mobileheader .mobileheader__left .burger {
		align-items: center;
		background: transparent !important;
		border: 0 !important;
		border-radius: 0 !important;
		box-shadow: none !important;
		color: #888 !important;
		display: flex;
		height: 58px;
		justify-content: center;
		margin: 0 !important;
		padding: 0 !important;
		width: 58px;
	}

	#mobileheader .mobileheader__left .burger .svg {
		display: block;
		height: 21px;
		position: relative;
		width: 22px;
	}

	#mobileheader .mobileheader__left .burger svg {
		display: block;
		height: 21px;
		opacity: 0;
		width: 22px;
	}

	/* A-S: полосы верхнего бургера сгруппированы плотнее без изменения ширины и толщины. */
	#mobileheader .mobileheader__left .burger .svg::before {
		background: #888;
		border-radius: 1px;
		box-shadow: 0 -7px 0 #888, 0 7px 0 #888;
		content: "";
		height: 2px;
		left: 0;
		position: absolute;
		top: 9.5px;
		width: 22px;
	}

	#main #mobileheader .mobileheader__left .burger svg,
	#main #mobileheader .mobileheader__left .burger svg *,
	#main #mobileheader .mobileheader__direct-phone svg,
	#main #mobileheader .mobileheader__direct-phone svg * {
		fill: #888 !important;
	}

	#mobileheader .mobileheader__left .mobileheader__top-item,
	#mobileheader .mobileheader__right {
		display: none !important;
	}

	#mobileheader .mobileheader__logo {
		margin: 0 auto !important;
	}

	.mobileheader__direct-phone {
		align-items: center;
		appearance: none;
		background: transparent;
		border: 0;
		color: #888;
		cursor: pointer;
		display: flex;
		height: 58px;
		justify-content: center;
		margin: 0;
		padding: 0;
		position: absolute;
		right: 11px;
		top: 0;
		width: 44px;
		z-index: 2;
	}

	.mobileheader__direct-phone .svg {
		display: block;
		height: 22px;
		position: relative;
		width: 22px;
	}

	.mobileheader__direct-phone svg {
		display: block;
		height: 22px;
		opacity: 0;
		width: 22px;
	}

	/* A-S: возвращен согласованный размер телефонной иконки 22px. */
	.mobileheader__direct-phone .svg::before {
		background: #888;
		content: "";
		inset: 0;
		-webkit-mask: url("../images/svg/phone.svg") center / contain no-repeat;
		mask: url("../images/svg/phone.svg") center / contain no-repeat;
		position: absolute;
	}

	/* A-S: боковое меню и затемнение открываются и закрываются мягче штатного перехода. */
	body.mmenu_leftside #mobilemenu {
		left: 0 !important;
		opacity: 0.96;
		transform: translate3d(-100%, 0, 0);
		transition: transform 440ms cubic-bezier(0.4, 0, 0.2, 1), opacity 320ms ease, visibility 0s linear 440ms;
		visibility: hidden;
		will-change: transform, opacity;
	}

	body.mmenu_leftside #mobilemenu.show {
		opacity: 1;
		transform: translate3d(0, 0, 0);
		transition: transform 520ms cubic-bezier(0.22, 1, 0.36, 1), opacity 360ms ease, visibility 0s;
		visibility: visible;
	}

	body.mmenu_leftside .mobilemenu__overlay {
		opacity: 0 !important;
		transition: opacity 400ms ease !important;
	}

	body.mmenu_leftside.jqm-initied .mobilemenu__overlay {
		opacity: 0.7 !important;
	}

	#mobilemenu.mobilemenu--content-transition .mobilemenu__catalog-list {
		animation: as-mobile-menu-content-in 320ms cubic-bezier(0.22, 1, 0.36, 1);
	}

	@keyframes as-mobile-menu-content-in {
		from {
			opacity: 0.35;
			transform: translate3d(12px, 0, 0);
		}
		to {
			opacity: 1;
			transform: translate3d(0, 0, 0);
		}
	}

	/* A-S: мобильная панель контактов открывается нижним листом поверх страницы. */
	body.mobile-contact-sheet-open {
		overflow: hidden !important;
	}

	body.mobile-contact-sheet-open #ag-chatpanel-wrap,
	body.mobile-contact-sheet-open .mobile-bottom-nav,
	body.mobile-contact-sheet-open #catalogDetailFixed {
		opacity: 0 !important;
		pointer-events: none !important;
		visibility: hidden !important;
	}

	.mobile-contact-sheet {
		align-items: flex-end;
		display: flex;
		inset: 0;
		justify-content: center;
		opacity: 0;
		pointer-events: none;
		position: fixed;
		transition: opacity 360ms ease, visibility 360ms ease;
		visibility: hidden;
		z-index: 6000;
	}

	.mobile-contact-sheet[hidden] {
		display: none;
	}

	.mobile-contact-sheet.is-open {
		opacity: 1;
		pointer-events: auto;
		visibility: visible;
	}

	.mobile-contact-sheet__backdrop {
		appearance: none;
		background: rgba(24, 24, 24, 0.5);
		border: 0;
		cursor: pointer;
		inset: 0;
		margin: 0;
		padding: 0;
		position: absolute;
		width: 100%;
	}

	.mobile-contact-sheet__panel {
		background: #fff;
		border-radius: 8px 8px 0 0;
		display: flex;
		flex-direction: column;
		max-height: calc(100vh - 16px);
		max-height: calc(100dvh - 16px);
		max-width: 520px;
		outline: 0;
		padding-bottom: env(safe-area-inset-bottom, 0px);
		position: relative;
		transform: translateY(100%);
		transition: transform 420ms cubic-bezier(0.22, 1, 0.36, 1);
		width: 100%;
	}

	.mobile-contact-sheet.is-open .mobile-contact-sheet__panel {
		transform: translateY(0);
	}

	.mobile-contact-sheet__handle {
		background: #d9d9d9;
		border-radius: 2px;
		height: 4px;
		margin: 9px auto 3px;
		width: 48px;
	}

	.mobile-contact-sheet__header {
		align-items: center;
		display: flex;
		flex: 0 0 auto;
		justify-content: space-between;
		min-height: 54px;
		padding: 4px 16px 6px;
	}

	.mobile-contact-sheet__title {
		color: #222;
		font-size: 20px;
		font-weight: 600;
		letter-spacing: 0;
		line-height: 28px;
		margin: 0;
	}

	.mobile-contact-sheet__heading {
		display: flex;
		flex-direction: column;
		min-width: 0;
	}

	/* A-S: график работы показан ненавязчивой подписью непосредственно под заголовком. */
	.mobile-contact-sheet__schedule {
		color: #aaa;
		font-size: 13px;
		font-weight: 400;
		letter-spacing: 0;
		line-height: 18px;
		margin: 1px 0 0;
	}

	.mobile-contact-sheet__close {
		align-items: center;
		appearance: none;
		background: transparent;
		border: 0;
		color: #555;
		cursor: pointer;
		display: flex;
		height: 40px;
		justify-content: center;
		margin: 0 -8px 0 8px;
		padding: 0;
		width: 40px;
	}

	.mobile-contact-sheet__close .svg,
	.mobile-contact-sheet__close svg {
		display: block;
		height: 16px;
		width: 16px;
	}

	.mobile-contact-sheet__close svg,
	.mobile-contact-sheet__close use {
		fill: currentColor;
	}

	.mobile-contact-sheet__content {
		display: flex;
		flex-direction: column;
		gap: 10px;
		overflow-x: hidden;
		overflow-y: auto;
		overscroll-behavior: contain;
		padding: 4px 16px 16px;
		-webkit-overflow-scrolling: touch;
	}

	.mobile-contact-sheet__row {
		align-items: center;
		background: #f6f6f6;
		border: 1px solid #ededed;
		border-radius: 8px;
		color: #222;
		display: flex;
		gap: 12px;
		min-height: 64px;
		padding: 10px 14px 10px 10px;
		text-decoration: none;
	}

	.mobile-contact-sheet__row:hover,
	.mobile-contact-sheet__row:focus,
	.mobile-contact-sheet__row:active {
		color: #222;
		text-decoration: none;
	}

	.mobile-contact-sheet__row--static {
		cursor: default;
	}

	.mobile-contact-sheet__row--livechat {
		appearance: none;
		cursor: pointer;
		font-family: inherit;
		text-align: left;
		width: 100%;
	}

	.mobile-contact-sheet__service-icon {
		align-items: center;
		background: #fff;
		border-radius: 50%;
		display: flex;
		flex: 0 0 42px;
		height: 42px;
		justify-content: center;
		width: 42px;
	}

	.mobile-contact-sheet__service-icon .svg,
	.mobile-contact-sheet__service-icon svg,
	.mobile-contact-sheet__service-icon img {
		display: block;
		margin: 0;
	}

	.mobile-contact-sheet__service-icon--phone svg,
	.mobile-contact-sheet__service-icon--phone use {
		fill: #c79200;
	}

	/* A-S: иконка строки Живочата собрана из штатного значка комментариев Аспро. */
	.mobile-contact-sheet__service-icon--livechat {
		background: #079ce0;
	}

	.mobile-contact-sheet__livechat-glyph {
		background: #fff;
		display: block;
		height: 22px;
		-webkit-mask: url("../images/svg/social/comments.svg") center / contain no-repeat;
		mask: url("../images/svg/social/comments.svg") center / contain no-repeat;
		width: 22px;
	}

	.mobile-contact-sheet__service-icon .ag_chatpanel_panel_item_link_icon {
		background-position: center;
		background-repeat: no-repeat;
		background-size: 28px auto;
		display: block;
		height: 30px;
		width: 30px;
	}

	.mobile-contact-sheet__row-text {
		display: flex;
		flex: 1 1 auto;
		flex-direction: column;
		min-width: 0;
	}

	.mobile-contact-sheet__row-text strong {
		font-size: 16px;
		font-weight: 500;
		letter-spacing: 0;
		line-height: 22px;
	}

	.mobile-contact-sheet__row-text small {
		color: #888;
		font-size: 13px;
		letter-spacing: 0;
		line-height: 18px;
		margin-top: 1px;
	}

	.mobile-contact-sheet__arrow {
		border-right: 1px solid #999;
		border-top: 1px solid #999;
		flex: 0 0 8px;
		height: 8px;
		margin-right: 2px;
		transform: rotate(45deg);
		width: 8px;
	}

	.mobile-contact-sheet__callback {
		appearance: none;
		background: #c79200;
		border: 1px solid #c79200;
		border-radius: 8px;
		color: #fff;
		cursor: pointer;
		font-family: inherit;
		font-size: 15px;
		font-weight: 600;
		height: 50px;
		letter-spacing: 0;
		line-height: 20px;
		margin: 2px 0 0;
		padding: 0 16px;
		width: 100%;
	}

	.mobile-contact-sheet__callback:hover,
	.mobile-contact-sheet__callback:focus,
	.mobile-contact-sheet__callback:active {
		background: #b88400;
		border-color: #b88400;
		color: #fff;
	}

	.mobile-inline-search {
		--mobile-ai-button-width: 73px;
		--mobile-ai-space: 81px;
		background: #fff;
		border-bottom: 0;
		display: block;
		padding: 10px 16px 12px;
		position: relative;
		z-index: 3;
	}

	.mobile-inline-search[data-mobile-search-home="Y"]:not(.mobile-inline-search--home) {
		display: none;
	}

	.mobile-inline-search.mobile-inline-search--home {
		align-items: center;
		border-top: 0;
		display: grid;
		gap: 8px;
		grid-template-columns: 44px minmax(0, 1fr);
		order: 2;
		position: sticky;
		top: 0;
		width: 100%;
		z-index: 992;
	}

	.mobile-inline-search__menu {
		align-items: center;
		appearance: none;
		background: #f4f4f4;
		border: 1px solid #e7e7e7;
		border-radius: 8px;
		color: #888;
		cursor: pointer;
		display: none;
		height: 44px;
		justify-content: center;
		margin: 0;
		padding: 0;
		width: 44px;
	}

	.mobile-inline-search--home .mobile-inline-search__menu {
		display: flex;
	}

	.mobile-inline-search__menu .svg,
	.mobile-inline-search__menu svg {
		display: block;
		height: 16px;
		width: 18px;
	}

	.mobile-inline-search__menu svg,
	.mobile-inline-search__menu svg * {
		fill: currentColor !important;
	}

	.mobile-inline-search__inner,
	.mobile-inline-search__inner > div,
	.mobile-inline-search form.search {
		position: relative;
		width: 100%;
	}

	.mobile-inline-search form.search {
		display: block;
		margin: 0;
		padding: 0 !important;
	}

	.mobile-inline-search.has-ai-search form.search {
		width: calc(100% - var(--mobile-ai-space));
	}

	.mobile-inline-search .search-input-close {
		display: none !important;
	}

	.mobile-inline-search .header__search-field {
		background: #f4f4f4 !important;
		border: 1px solid #e7e7e7 !important;
		border-radius: 8px !important;
		box-shadow: none !important;
		color: #343434 !important;
		font-family: inherit !important;
		font-size: 14px !important;
		height: 44px !important;
		line-height: 44px !important;
		margin: 0 !important;
		padding: 0 44px 0 14px !important;
		width: 100% !important;
	}

	.mobile-inline-search.has-value .header__search-field {
		padding-right: 76px !important;
	}

	.mobile-inline-search .header__search-field::placeholder {
		color: #8b8b8b !important;
		opacity: 1;
	}

	.mobile-inline-search .header__search-field:focus {
		background: #fff !important;
		border-color: #acacac !important;
	}

	.mobile-inline-search .header__search-btn {
		height: 44px !important;
		right: 0 !important;
		top: 0 !important;
		width: 44px !important;
	}

	.mobile-inline-search .mobile-inline-search__ai {
		height: 44px !important;
		min-width: 0 !important;
		position: absolute !important;
		right: 0 !important;
		top: 0 !important;
		width: var(--mobile-ai-button-width) !important;
	}

	.mobile-inline-search__clear {
		background: transparent;
		border: 0;
		cursor: pointer;
		display: none;
		height: 44px;
		padding: 0;
		position: absolute;
		right: 44px;
		top: 0;
		width: 36px;
		z-index: 2;
	}

	.mobile-inline-search.has-value .mobile-inline-search__clear {
		display: block;
	}

	.mobile-inline-search__clear::before,
	.mobile-inline-search__clear::after {
		background: #8b8b8b;
		content: "";
		height: 1px;
		left: 12px;
		position: absolute;
		top: 21px;
		width: 12px;
	}

	.mobile-inline-search__clear::before {
		transform: rotate(45deg);
	}

	.mobile-inline-search__clear::after {
		transform: rotate(-45deg);
	}

	.mobile-inline-search-overlay {
		background: rgba(0, 0, 0, 0.55);
		display: none;
		inset: 0;
		position: fixed;
		z-index: 2990;
	}

	body.mobile-inline-search-active .mobile-inline-search-overlay {
		display: block;
	}

	body.mobile-inline-search-active .headers-container {
		position: relative !important;
		z-index: 2991 !important;
	}

	body.mobile-inline-search-active #mobileheader {
		position: relative !important;
		z-index: 2992 !important;
	}

	body.mobile-inline-search-active .mobile-inline-search {
		z-index: 2992 !important;
	}

	/* A-S: штатный экран поиска закрывает нижнюю панель и строку страницы. */
	body.header--mobile-search-active .mobile-bottom-nav,
	body.header--mobile-search-active .mobile-inline-search {
		display: none !important;
	}

	/* A-S: ИИ-поиск запускается отдельной кнопкой в строке страницы и не перекрывает штатную лупу. */
	body.header--mobile-search-active [data-ajax-block="HEADER"] .header__search-ai-btn {
		display: none !important;
	}

	div.title-search-result.title-search-input_mobile {
		background: #fff;
		border-radius: 0 0 8px 8px !important;
		box-shadow: 0 16px 24px rgba(0, 0, 0, 0.18) !important;
		display: none !important;
		flex-direction: column;
		height: auto !important;
		left: var(--mobile-search-result-left, 16px) !important;
		margin: 0 !important;
		max-height: calc(100vh - var(--mobile-search-result-viewport-top, 120px) - 16px);
		min-width: 0 !important;
		overflow: hidden !important;
		padding: 0 !important;
		position: absolute !important;
		top: var(--mobile-search-result-top, 120px) !important;
		width: var(--mobile-search-result-width, calc(100vw - 32px)) !important;
		z-index: 2993 !important;
	}

	div.title-search-result.title-search-input_mobile.mobile-inline-search-result--visible {
		display: flex !important;
	}

	/* A-S: на главной мобильные подсказки раскрываются вверх, над клавиатурой. */
	div.title-search-result.title-search-input_mobile.mobile-inline-search-result--home {
		border-radius: 8px 8px 0 0 !important;
		box-shadow: 0 -12px 24px rgba(0, 0, 0, 0.18) !important;
		max-height: var(--mobile-search-result-home-max-height, 280px) !important;
		transform: translateY(-100%);
	}

	.title-search-input_mobile .searche-result {
		flex: 0 1 auto !important;
		margin: 0 !important;
		max-height: calc(100vh - var(--mobile-search-result-viewport-top, 120px) - 78px) !important;
		overflow-y: auto !important;
		padding: 10px 8px 4px !important;
	}

	.title-search-input_mobile.mobile-inline-search-result--home .searche-result {
		max-height: calc(var(--mobile-search-result-home-max-height, 280px) - 58px) !important;
	}

	.title-search-input_mobile .searche-result__all {
		flex: 0 0 auto !important;
		margin: 0 !important;
		padding: 8px !important;
	}

	.title-search-input_mobile .searche-result__item {
		margin-top: 12px !important;
		padding: 6px 4px !important;
	}

	.title-search-input_mobile .searche-result__item:first-of-type {
		margin-top: 0 !important;
	}

	/* A-S: постоянная нижняя панель использует те же ссылки и счетчики, что шапка. */
	.mobile-bottom-nav {
		align-items: stretch;
		background: #fff;
		border-top: 1px solid #e6e6e6;
		bottom: 0;
		box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
		display: grid !important;
		grid-template-columns: repeat(5, minmax(0, 1fr));
		left: 0;
		min-height: calc(66px + env(safe-area-inset-bottom, 0px));
		padding: 4px 4px env(safe-area-inset-bottom, 0px);
		position: fixed;
		right: 0;
		z-index: 2500;
	}

	/* A-S: фиксированная панель карточки товара располагается над нижней навигацией. */
	#catalogDetailFixed.catalog-detail__fixed.open {
		bottom: calc(66px + env(safe-area-inset-bottom, 0px)) !important;
	}

	body.header--mobile-search-active #catalogDetailFixed.catalog-detail__fixed {
		display: none !important;
	}

	body.mobile-product-fixed-active #ag-chatpanel-wrap {
		bottom: calc(198px + env(safe-area-inset-bottom, 0px)) !important;
		transition: bottom 200ms ease;
	}

	/* A-S: скрываем все варианты штатной кнопки вверх, включая дубли без стандартного ID. */
	.scroll-to-top {
		display: none !important;
	}

	.headers-container.mobile-navigation--menu-open ~ .mobile-bottom-nav {
		opacity: 0;
		pointer-events: none;
		visibility: hidden;
	}

	.mobile-bottom-nav__item {
		align-items: center;
		appearance: none;
		background: transparent;
		border: 0;
		border-radius: 0;
		color: #888;
		cursor: pointer;
		display: flex;
		flex-direction: column;
		font-family: inherit;
		font-size: 11px;
		font-weight: 400;
		gap: 3px;
		justify-content: center;
		letter-spacing: 0;
		line-height: 14px;
		margin: 0;
		min-width: 0;
		padding: 4px 1px 3px;
		text-align: center;
		text-decoration: none;
	}

	.mobile-bottom-nav__item:hover,
	.mobile-bottom-nav__item:focus,
	.mobile-bottom-nav__item:active {
		color: #888;
		text-decoration: none;
	}

	.mobile-bottom-nav__item.is-active {
		color: #b88400;
	}

	.mobile-bottom-nav__icon {
		align-items: center;
		display: flex;
		height: 24px;
		justify-content: center;
		position: relative;
		width: 28px;
	}

	.mobile-bottom-nav__icon img,
	.mobile-bottom-nav__icon .svg,
	.mobile-bottom-nav__icon svg {
		display: block;
		flex: 0 0 auto;
		margin: 0;
		max-height: 24px;
		max-width: 24px;
	}

	.mobile-bottom-nav__icon svg,
	.mobile-bottom-nav__icon use {
		fill: currentColor;
	}

	.mobile-bottom-nav__label {
		display: block;
		overflow: hidden;
		text-overflow: clip;
		white-space: nowrap;
		width: 100%;
	}

	.mobile-bottom-nav__count {
		align-items: center;
		background: #c79200;
		border: 1px solid #fff;
		border-radius: 8px;
		color: #fff;
		display: flex;
		font-size: 9px;
		font-weight: 600;
		height: 15px;
		justify-content: center;
		line-height: 13px;
		min-width: 15px;
		padding: 0 3px;
		position: absolute;
		right: -2px;
		top: -4px;
	}

	.mobile-bottom-nav__count[hidden] {
		display: none;
	}
}

@media (max-width: 991px) and (prefers-reduced-motion: reduce) {
	body.mmenu_leftside #mobilemenu,
	body.mmenu_leftside #mobilemenu.show,
	body.mmenu_leftside .mobilemenu__overlay,
	.mobile-contact-sheet,
	.mobile-contact-sheet__panel {
		transition-duration: 1ms !important;
	}

	#mobilemenu.mobilemenu--content-transition .mobilemenu__catalog-list {
		animation-duration: 1ms !important;
	}
}

@media (max-width: 374px) {
	.mobile-inline-search {
		padding-left: 12px;
		padding-right: 12px;
	}

	.mobile-inline-search .header__search-field {
		font-size: 12px !important;
	}

	.mobile-bottom-nav__item {
		font-size: 10px;
	}
}

@media (min-width: 601px) and (max-width: 991px) {
	.mobile-inline-search {
		--mobile-ai-button-width: 78px;
		--mobile-ai-space: 86px;
	}
}
