/* Мобильная версия. Десктоп (>= 980px) не затрагивается. */
.mobile-catalog-toggle {
	display: none;
}

@media (max-width: 979px) {
	html, body {
		overflow-x: hidden;
	}
	body {
		-webkit-text-size-adjust: 100%;
		text-size-adjust: 100%;
	}
	img {
		max-width: 100%;
		height: auto;
	}

	/* telegram-слайдер */
	#info-slider {
		width: auto;
		height: 88px;
	}
	#info-slider .info-slider-inner {
		padding: 0px 10px;
	}
	#info-slider .info-slider-viewport {
		width: 100%;
		max-width: 100%;
	}
	#info-slider .info-slider-message,
	#info-slider .info-slider-message a {
		font-size: 13px;
		line-height: 18px;
	}
	#info-slider .info-slider-controls {
		top: 60px;
		right: auto;
		left: 50%;
		margin-left: -58px;
	}

	/* строка над шапкой */
	#header_top {
		width: auto;
		margin: 0 8px 10px;
		padding: 5px 10px;
		font-size: 12px;
		line-height: 18px;
	}
	#header_top a {
		font-size: 12px !important;
	}

	/* шапка: таблицы -> блоки */
	.header-main,
	.header-main table,
	.header-main tbody,
	.header-main tr,
	.header-main td {
		display: block;
		width: auto !important;
		height: auto !important;
	}
	.header-main > tbody > tr > td:first-child,
	.header-main > tbody > tr > td:last-child,
	.header-main .header-old-info,
	.header-main td[width="26"],
	.header-main td[width="34"] {
		display: none;
	}
	.header-main td[width="208"] {
		text-align: center;
		padding: 5px 0;
	}
	.header-main td.menu1 img {
		display: none;
	}
	.header-main td.menu1 {
		padding: 6px 8px;
		text-align: center;
		line-height: 24px;
		font-size: 12px;
	}
	.header-main td[width="560"] {
		padding: 8px 10px 0 !important;
		text-align: center;
	}
	.header-main td[width="560"] span {
		padding-left: 0 !important;
	}
	.header-main td[width="500"] {
		padding: 10px 10px 0 !important;
	}

	/* поиск (перебивает inline-стили шапки) */
	body #header-search {
		width: auto !important;
		height: auto !important;
	}
	body #header-search input.search-input {
		width: calc(100% - 78px) !important;
		height: 32px !important;
		line-height: 30px !important;
		font-size: 16px !important;
		-webkit-box-sizing: border-box;
		box-sizing: border-box;
	}
	body #header-search .button-search {
		height: 34px !important;
		line-height: 34px !important;
	}
	body #header-search .header-search-info {
		white-space: normal !important;
		text-align: center;
	}
	body .ui-autocomplete {
		left: 8px !important;
		width: calc(100vw - 16px) !important;
		-webkit-box-sizing: border-box;
		box-sizing: border-box;
	}
	body .ui-autocomplete li a {
		padding: 8px 12px !important;
	}
	body .ui-autocomplete .autocomplete-product-info {
		width: auto !important;
		padding-left: 10px !important;
	}
	body .ui-autocomplete .autocomplete-product-price {
		width: auto !important;
		font-size: 13px !important;
	}
	body .ui-autocomplete .autocomplete-all-results {
		padding: 12px 12px 3px !important;
	}

	/* соцсети и кнопки Войти / Избранное / Корзина */
	.header-main td[width="139"] {
		padding: 10px 0 5px;
	}
	.header-actions {
		display: -webkit-flex;
		display: flex;
		-webkit-align-items: center;
		align-items: center;
		-webkit-justify-content: center;
		justify-content: center;
		width: auto;
		height: auto;
		padding-top: 0;
	}
	.header-socials {
		margin: 0 15px 0 0;
	}
	.header-action-links {
		width: auto;
		margin-left: 0;
	}

	/* каркас */
	#container {
		width: auto;
		padding: 0 8px;
	}
	#column-left,
	#column-right,
	#column-right.column-right--account {
		float: none;
		width: auto;
	}
	#column-left + #column-right + #content,
	#column-left + #content,
	#column-right + #content,
	#column-right.column-right--account + #content {
		margin-left: 0;
		margin-right: 0;
	}
	#content {
		overflow-wrap: break-word;
		word-wrap: break-word;
	}

	/* кнопка каталога и левая колонка */
	.mobile-catalog-toggle {
		display: block;
		margin-bottom: 10px;
		padding: 10px 15px;
		background: #79a843;
		background: linear-gradient(to bottom, #b9df62 0%, #79a843 100%);
		color: #ffffff;
		font-family: Tahoma, Arial, Verdana, sans-serif;
		font-size: 14px;
		font-weight: bold;
		text-transform: uppercase;
		border-radius: 9px;
		cursor: pointer;
		-webkit-user-select: none;
		user-select: none;
	}
	.mobile-catalog-toggle:before {
		content: "\2630";
		margin-right: 10px;
	}
	.mobile-catalog-open .mobile-catalog-toggle:before {
		content: "\2715";
	}
	#column-left {
		display: none;
		margin-bottom: 15px;
	}
	.mobile-catalog-open #column-left {
		display: block;
	}
	#column-left > table,
	#column-left > table td {
		width: 100% !important;
		height: auto !important;
	}
	#column-left .box-news {
		width: auto;
	}

	/* верхнее меню категорий — горизонтальная прокрутка */
	#menu {
		height: auto;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}
	#menu > ul {
		display: -webkit-flex;
		display: flex;
	}
	#menu > ul > li {
		float: none;
		-webkit-flex-shrink: 0;
		flex-shrink: 0;
		white-space: nowrap;
	}
	#menu > ul > li > div,
	#menu > ul > li:hover > div {
		display: none;
	}

	/* информационные страницы (О компании, Доставка и т.п.) */
	#content > table[height="100%"],
	#content > table[height="100%"] > tbody,
	#content > table[height="100%"] > tbody > tr,
	#content > table[height="100%"] > tbody > tr > td {
		display: block;
		width: auto;
		height: auto;
	}
	#content > table[height="100%"] {
		text-align: left !important;
	}
	#content iframe {
		max-width: 100%;
	}
	#content img[style*="height"] {
		height: auto !important;
	}
	#content table[style*="width"] {
		display: block;
		width: auto !important;
		max-width: 100%;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}

	/* список статей (/stat.html): картинка над заголовком раздела */
	#content table:has(td[style*="width:190px"]) > tbody,
	#content table:has(td[style*="width:190px"]) > tbody > tr,
	#content table:has(td[style*="width:190px"]) > tbody > tr > td,
	#content table[style*="width: 800px"] > tbody,
	#content table[style*="width: 800px"] > tbody > tr,
	#content table[style*="width: 800px"] > tbody > tr > td {
		display: block;
		width: auto !important;
	}
	/* доставка (/dostavka.html): логотип над описанием */
	#content table[style*="width: 800px"] > tbody > tr > td:first-child {
		text-align: center;
		border-bottom: 0 !important;
	}
	#content table:has(td[style*="width:190px"]) p {
		margin-left: 0 !important;
	}

	/* разделительные полосы под заголовками */
	#content table[height="6"] {
		width: 100%;
	}
	#content table[height="6"] td {
		width: auto;
	}
	#content table[height="6"] td:first-child {
		width: 30%;
	}

	/* главная: плитки категорий */
	.box-product {
		font-size: 0;
	}
	.box-product > div,
	#column-left + #column-right + #content .box-product > div {
		width: 46%;
		margin: 0 2%;
		padding-bottom: 20px;
	}
	.home-banner-slider {
		height: auto;
		min-height: 120px;
	}

	/* категория */
	.category-info .image {
		float: none;
		margin: 0 0 10px;
		text-align: center;
	}
	.category-info img {
		max-width: 100%;
		height: auto !important;
	}
	.category-info p:has(img ~ img) img {
		max-width: 31%;
		vertical-align: top;
	}
	.category-list ul li {
		width: 46%;
		margin-right: 2%;
		margin-left: 0;
		padding: 8px 1%;
		-webkit-box-sizing: border-box;
		box-sizing: border-box;
	}
	.category-list ul li:nth-child(2n+1) {
		clear: left;
	}
	.category-list ul li span {
		height: auto;
		min-height: 30px;
	}
	.product-filter .limit,
	.product-filter .sort {
		float: none;
		margin: 0 0 8px;
	}
	.product-filter .display {
		float: none;
	}

	/* список товаров */
	.product-list > div {
		display: -webkit-flex;
		display: flex;
		-webkit-flex-direction: column-reverse;
		flex-direction: column-reverse;
	}
	.product-list .left {
		overflow: hidden;
	}
	.product-list .right {
		float: none;
		height: auto;
		padding: 10px 0 0;
		border-left: 0;
	}
	.product-list .right br,
	.product-list .price br {
		display: none;
	}
	.product-list .image {
		width: 100px;
	}
	.product-list .price {
		float: none;
		display: block;
		width: auto;
		height: auto;
		margin: 0 0 5px;
		text-align: left;
		font-size: 15px;
	}
	.product-list .description {
		display: block;
		height: auto;
		clear: both;
		padding-top: 5px;
		text-align: left;
	}
	.product-grid > div {
		width: 46%;
		margin-left: 2%;
		margin-right: 2%;
	}

	/* карточка товара */
	.product-info > .left {
		float: none;
		margin-right: 0;
	}
	.product-info > .left + .right {
		margin-left: 0;
	}
	.product-info .image,
	.product-info .image-additional {
		float: none;
		width: auto;
	}
	.osnov,
	.category-info,
	.product-info .description,
	.tab-content {
		text-align: left;
	}
	.htabs {
		height: auto;
		overflow: hidden;
	}
	.tab-content iframe,
	.tab-content video,
	.osnov iframe {
		max-width: 100%;
	}

	/* таблицы корзины, аккаунта и т.п. */
	.tab-content table,
	.osnov table,
	.category-info table,
	table.list,
	.cart-info table,
	.checkout-product table {
		display: block;
		max-width: 100%;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}
	input[type="text"],
	input[type="email"],
	input[type="tel"],
	input[type="password"],
	textarea,
	select {
		max-width: 100%;
	}

	/* оформление заказа */
	.checkout-heading,
	.delivery-methods,
	.checkout-confirm-section table,
	.checkout-confirm-comment {
		width: auto;
	}
	.checkout-confirm-section td:first-child {
		width: 40%;
	}
	.pickup-method-body,
	.russian-delivery-method-body {
		padding-left: 0;
	}
	.pickup-addresses,
	.pickup-map,
	.russian-delivery-address,
	.russian-delivery-map,
	.russian-delivery-map.pek-pvz-map-active,
	.pek-pvz-map-wrap,
	.pek-pvz-map {
		float: none;
		width: auto;
		max-width: 100%;
	}
	.pickup-map,
	.russian-delivery-map {
		margin-top: 10px;
	}
	.pickup-map iframe,
	.russian-delivery-map iframe {
		width: 100%;
	}
	.courier-address input {
		width: 100%;
		-webkit-box-sizing: border-box;
		box-sizing: border-box;
	}

	/* подвал */
	#footer {
		padding: 15px 10px;
	}
	#footer .column,
	#footer .column2,
	#footer .column3 {
		float: none;
		width: auto;
		min-height: 0;
		margin: 0 0 15px !important;
		text-align: left;
	}
	#footer .column3 br {
		display: none;
	}
	#footer .column2 span {
		padding-left: 0 !important;
	}
	#powered {
		width: auto;
	}
}
