/**
 * el-power · Mobile Stage 1 (#35) — header / checkout / menu polish
 */

/* Плавающие мессенджеры — убрать со всех страниц (перенесены в контакты шапки и футер) */
#ab-sidebar,
.ab-sidebar,
.telegramim_button,
.telegramim_shadow,
a.telegramim_button {
	display: none !important;
	visibility: hidden !important;
	pointer-events: none !important;
}

/* Список: mobile-кнопка «Добавить в корзину» скрыта на desktop */
.product .ep-list-addcart {
	display: none !important;
}

/* ——— Sticky header ——— */
@media (max-width: 1024px) {
	#subHeader5 .toolsContainer .topWishlist,
	#subHeader5 .toolsContainer .topCompare,
	#subHeader5 .toolsContainer .cart {
		display: none !important;
	}

	/* Дублирующий блок лого/телефонов и красная плашка «Каталог» — убираем с mobile */
	#subHeader5 {
		display: none !important;
	}

	#headerLine2 {
		display: none !important;
	}

	/* Меню каталога в колонке #left — скрываем только там.
	   НЕ трогать #leftMenu внутри #rm_sidebar_catalog (бургер → Каталог товаров):
	   у обоих один id, глобальный #leftMenu{display:none} опустошал бургер. */
	#left #leftMenu,
	#left #catalogMenuHeading,
	#left a#catalogMenuHeading {
		display: none !important;
	}

	#left {
		display: block !important;
		width: 0 !important;
		height: 0 !important;
		min-height: 0 !important;
		margin: 0 !important;
		padding: 0 !important;
		overflow: visible !important;
		border: none !important;
		float: none !important;
	}

	#left > *:not(#smartFilter) {
		display: none !important;
	}

	/* Каталог в бургере должен быть виден и кликабелен */
	#rm_sidebar_catalog #leftMenu,
	#rm_sidebar_catalog .rm_catalog_categories #leftMenu {
		display: block !important;
		visibility: visible !important;
		height: auto !important;
		width: 100% !important;
		overflow: visible !important;
	}

	/* Оверлей фильтра поверх контента (fixed — иначе marginTop от JS уводит за экран) */
	#main #smartFilter.opened {
		position: fixed !important;
		top: 64px !important;
		left: 12px !important;
		right: auto !important;
		margin: 0 !important;
		max-height: calc(100vh - 80px) !important;
		overflow-x: hidden !important;
		overflow-y: auto !important;
		width: min(320px, calc(100vw - 24px)) !important;
		visibility: visible !important;
		opacity: 1 !important;
		pointer-events: auto !important;
		z-index: 10050 !important;
		box-shadow: 0 8px 28px rgba(0, 0, 0, 0.22) !important;
	}

	/* Нижняя полоса корзина/избранное — дубль sticky */
	#footerLine {
		display: none !important;
	}

	/* Плавающие мессенджеры (telegramim + abudagov sidebar MAX/TG) */
	.telegramim_button,
	.telegramim_shadow,
	a.telegramim_button,
	#ab-sidebar,
	.ab-sidebar {
		display: none !important;
		visibility: hidden !important;
		pointer-events: none !important;
	}

	/* На mobile прячем блок «Онлайн консультация» из шапки/адреса — дублирует контакты в бургере */
	.online {
		display: none !important;
	}

	#headerLine2 #geoPosition {
		display: none !important;
	}

	#headerLineMobile {
		/* HTML шапки в конце foundation — без fixed уезжает вниз страницы */
		position: fixed !important;
		top: 0 !important;
		left: 0 !important;
		right: 0 !important;
		width: 100% !important;
		z-index: 10000 !important;
		display: block !important;
		box-shadow: 1px 1px 12px rgba(0, 0, 0, 0.25);
		background: #fff !important;
	}

	#headerLineMobile.ep-search-open {
		box-shadow: none;
	}

	#headerLineMobile .header-line-content {
		align-items: center;
		padding: 0 6px;
		gap: 0;
		justify-content: flex-start;
	}

	/* Не расталкивать шапку margin-right:auto у бургера */
	#headerLineMobile .header-line-item:first-child {
		margin-right: 0 !important;
	}

	/* ——— Бургер: как иконки (чёрные полоски на белой шапке), без hover-сдвига ——— */
	#headerLineMobile .rm_mobile_sidebar_toggle,
	#headerLineMobile .header-line-item.rm_mobile_sidebar_toggle {
		max-width: 48px !important;
		min-width: 48px !important;
		width: 48px !important;
		flex: 0 0 48px !important;
		height: 55px !important;
		margin: 0 2px 0 0 !important;
		padding: 0 !important;
		border-radius: 0 !important;
		background: transparent !important;
		background-color: transparent !important;
		color: #111 !important;
		border: 0 !important;
		border-left: none !important;
		box-shadow: none !important;
		overflow: visible !important;
		transition: none !important;
		transform: none !important;
	}

	#headerLineMobile .header-line-item.rm_mobile_sidebar_toggle:before,
	#headerLineMobile .header-line-item.rm_mobile_sidebar_toggle:hover:before,
	#headerLineMobile .header-line-item.rm_mobile_sidebar_toggle:active:before,
	#headerLineMobile .header-line-item.rm_mobile_sidebar_toggle:focus:before {
		content: none !important;
		display: none !important;
		width: 0 !important;
		height: 0 !important;
		transform: none !important;
	}

	#headerLineMobile .rm_mobile_sidebar_toggle:hover,
	#headerLineMobile .rm_mobile_sidebar_toggle:active,
	#headerLineMobile .rm_mobile_sidebar_toggle:focus {
		background: transparent !important;
		transform: none !important;
		margin: 0 2px 0 0 !important;
		padding: 0 !important;
	}

	#headerLineMobile .rm_mobile_sidebar_toggle .rm-btn-icon {
		width: 22px;
		height: 16px;
	}

	#headerLineMobile .rm_mobile_sidebar_toggle .rm-btn-icon span {
		width: 22px;
		height: 2px;
		background: #111 !important;
		border-radius: 1px;
	}

	#headerLineMobile .rm_mobile_sidebar_toggle .rm-btn-icon span + span {
		margin-top: 5px;
	}

	#headerLineMobile .header-mobile-logo {
		display: flex;
		align-items: center;
		max-height: 55px;
		margin-right: auto;
		margin-left: 6px;
		padding-right: 8px;
		padding-left: 6px;
	}

	#headerLineMobile .header-mobile-logo a {
		display: flex;
		align-items: center;
		line-height: 0;
	}

	#headerLineMobile .header-mobile-logo img {
		height: 42px;
		width: auto;
		max-width: 150px;
		object-fit: contain;
	}

	#headerLineMobile .ep-mobile-cart,
	#headerLineMobile a.header-line-item {
		flex: 0 0 48px !important;
		min-width: 48px !important;
		max-width: 48px !important;
		width: 48px !important;
	}

	#headerLineMobile .ep-mobile-search-btn {
		display: flex;
		align-items: center;
		justify-content: center;
		background: transparent;
		border: 0;
		cursor: pointer;
		padding: 0;
		color: #111;
		flex: 0 0 48px !important;
		min-width: 48px !important;
		max-width: 48px !important;
		width: 48px !important;
		margin: 0 !important;
	}

	#headerLineMobile .ep-mobile-search-btn .ep-search-icon-close {
		display: none;
	}

	#headerLineMobile.ep-search-open .ep-mobile-search-btn .ep-search-icon-search {
		display: none;
	}

	#headerLineMobile.ep-search-open .ep-mobile-search-btn .ep-search-icon-close {
		display: block;
	}

	#headerLineMobile .ep-mobile-search-btn svg {
		width: 24px;
		height: 24px;
		display: block;
	}

	/* Поиск: белая панель как продолжение шапки, overlay без сдвига контента */
	.ep-mobile-search-panel {
		display: none;
		box-sizing: border-box;
		position: absolute;
		left: 0;
		right: 0;
		top: 100%;
		z-index: 801;
		width: 100%;
		padding: 10px 12px 12px;
		background: #fff;
		border-top: 1px solid #eee;
		box-shadow: 0 10px 18px rgba(0, 0, 0, 0.18);
	}

	#headerLineMobile.ep-search-open .ep-mobile-search-panel {
		display: block;
	}

	.ep-mobile-search-panel[hidden] {
		display: none !important;
	}

	#headerLineMobile.ep-search-open .ep-mobile-search-panel[hidden] {
		display: block !important;
	}

	.ep-mobile-search-panel form {
		display: flex;
		gap: 8px;
		align-items: center;
	}

	.ep-mobile-search-input {
		flex: 1;
		box-sizing: border-box;
		height: 40px;
		border: 1px solid #e5e5e5;
		border-radius: 6px;
		padding: 0 12px;
		margin: 0;
		font-size: 16px;
		line-height: 38px;
		background: #fff;
		color: #111;
		outline: none;
		vertical-align: middle;
	}

	.ep-mobile-search-input:focus {
		border-color: #bbb;
	}

	.ep-mobile-search-submit {
		flex: 0 0 40px;
		box-sizing: border-box;
		width: 40px;
		height: 40px;
		padding: 0;
		margin: 0;
		border: 1px solid transparent;
		border-radius: 6px;
		background: #f3f3f3;
		color: #111;
		cursor: pointer;
		display: inline-flex;
		align-items: center;
		justify-content: center;
		align-self: center;
		line-height: 0;
	}

	/* Список товаров: кнопка «Добавить в корзину» вместо «Подробнее» */
	.product .ep-list-more {
		display: none !important;
	}

	/* Одна строка: − qty + | иконка корзины */
	.product .ep-list-actions {
		display: flex !important;
		flex-direction: row !important;
		align-items: center !important;
		justify-content: center !important;
		flex-wrap: nowrap !important;
		gap: 6px;
		width: 100%;
		margin: 6px 0 2px !important;
		box-sizing: border-box;
		min-height: 34px;
	}

	.product .ep-list-actions .addCartContainer.addCartContainerTwo,
	.product .addCartContainer.addCartContainerTwo {
		display: flex !important;
		position: static !important;
		overflow: visible !important;
		flex-direction: row;
		align-items: center;
		justify-content: center;
		gap: 4px;
		margin: 0 !important;
		width: auto !important;
		flex: 0 1 auto;
		min-height: 0 !important;
		height: auto !important;
		box-sizing: border-box;
	}

	/* Старую иконку «в корзину» в контейнере прячем — есть ep-list-addcart */
	.product .addCartContainer.addCartContainerTwo > a.addCart {
		display: none !important;
	}

	.product .addCartContainer .quantityContainer,
	.product .quantityContainer,
	.product .quantityWrapper {
		position: static !important;
		display: flex !important;
		visibility: visible !important;
		opacity: 1 !important;
		top: auto !important;
		transform: none !important;
		align-items: center;
		justify-content: center;
		flex-wrap: nowrap !important;
		gap: 4px;
		margin: 0;
		width: auto;
		min-height: 32px;
		box-sizing: border-box;
	}

	.product .quantityContainer .quantity {
		display: inline-block !important;
		visibility: visible !important;
		flex: 0 0 34px;
		width: 34px !important;
		height: 32px !important;
		line-height: 32px !important;
		text-align: center;
		font-size: 13px !important;
		font-weight: 600;
		border: 1px solid #c8c8c8 !important;
		border-radius: 6px;
		background: #fff !important;
		color: #222 !important;
		box-sizing: border-box;
		padding: 0 !important;
	}

	.product .quantityContainer .minus,
	.product .quantityContainer .plus {
		display: inline-flex !important;
		align-items: center;
		justify-content: center;
		visibility: visible !important;
		flex: 0 0 32px;
		width: 32px !important;
		height: 32px !important;
		min-width: 32px;
		top: auto !important;
		transform: none !important;
		border: 1px solid #c8c8c8 !important;
		border-radius: 6px;
		background: #f3f3f3 !important;
		background-image: none !important;
		box-sizing: border-box;
		text-decoration: none !important;
		font-size: 18px !important;
		font-weight: 700 !important;
		line-height: 1 !important;
		color: #222 !important;
	}

	.product .quantityContainer .minus::before {
		content: "−";
	}

	.product .quantityContainer .plus::before {
		content: "+";
	}

	/* Иконка корзины вместо текстовой плашки */
	.product .ep-list-addcart,
	.product .btn-simple.add-cart.addCart.ep-list-addcart {
		display: inline-flex !important;
		align-items: center;
		justify-content: center;
		flex: 0 0 36px !important;
		width: 36px !important;
		min-width: 36px !important;
		max-width: 36px !important;
		height: 36px !important;
		min-height: 36px !important;
		padding: 0 !important;
		margin: 0 !important;
		box-sizing: border-box;
		border-radius: 8px !important;
		border: none !important;
		background-color: #c81938 !important;
		background-image: none !important;
		font-size: 0 !important;
		line-height: 0 !important;
		color: transparent !important;
		text-indent: -9999px;
		overflow: hidden;
		text-decoration: none !important;
		position: relative;
		-webkit-tap-highlight-color: transparent;
	}

	.product .ep-list-addcart::after,
	.product .btn-simple.add-cart.addCart.ep-list-addcart::after {
		content: "";
		position: absolute;
		left: 50%;
		top: 50%;
		width: 18px;
		height: 18px;
		transform: translate(-50%, -50%);
		background-color: #fff;
		-webkit-mask: url("../images/incart.svg") center / contain no-repeat;
		mask: url("../images/incart.svg") center / contain no-repeat;
		pointer-events: none;
	}

	.product .ep-list-addcart img,
	.product .ep-list-addcart .icon {
		display: none !important;
	}

	/* Деталка: колонка кнопок без наложений; ± без top:50%/translate */
	.mobileButtonsContainer.columnRowWrap,
	.mobileButtonsContainer {
		display: flex !important;
		flex-direction: column !important;
		align-items: stretch !important;
		gap: 10px;
		height: auto !important;
		min-height: 0 !important;
		overflow: visible !important;
	}

	.mobileButtonsContainer .addCartContainer,
	#catalogElement .mainTool .addCartContainer {
		display: flex !important;
		flex-direction: column !important;
		align-items: stretch !important;
		gap: 10px;
		width: 100% !important;
		height: auto !important;
	}

	.mobileButtonsContainer .addCart,
	.mobileButtonsContainer .addCart.added,
	.mobileButtonsContainer .addCart.loading,
	#catalogElement .mainTool .addCart,
	#catalogElement .mainTool .addCart.added {
		display: flex !important;
		align-items: center;
		justify-content: center;
		width: 100% !important;
		max-width: 100% !important;
		box-sizing: border-box !important;
		height: 44px !important;
		min-height: 44px !important;
		line-height: 1.2 !important;
		margin: 0 !important;
		float: none !important;
		position: static !important;
	}

	/* Карточка товара: блок количества (.qtyBlock) — не скрывать на mobile */
	#catalogElement .qtyBlock,
	#catalogElement .mainTool .addCart.added + .qtyBlock,
	#catalogElement .mainTool .addCart.disabled + .qtyBlock,
	#smallElementTools .qtyBlock,
	#smallElementTools .addCart.added + .qtyBlock,
	.mobileButtonsContainer .qtyBlock,
	.addCartContainer .qtyBlock {
		display: block !important;
		visibility: visible !important;
		float: none !important;
		/* qty влияет на addCart (changeQty) — отдельной строкой над кнопкой, рамка по контенту */
		width: auto !important;
		max-width: 100% !important;
		height: auto !important;
		min-height: 36px !important;
		margin: 0 auto 10px !important;
		padding: 0 !important;
		box-sizing: border-box;
		border: none !important;
		order: -1;
	}

	#catalogElement .qtyBlockContainer,
	#smallElementTools .qtyBlockContainer,
	.addCartContainer .qtyBlockContainer,
	.mobileButtonsContainer .qtyBlockContainer {
		display: inline-flex !important;
		align-items: center;
		justify-content: center;
		flex-wrap: nowrap !important;
		gap: 8px;
		position: static !important;
		width: auto !important;
		max-width: 100% !important;
		height: auto !important;
		min-height: 40px !important;
		line-height: normal !important;
		padding: 4px 8px !important;
		border: 1px solid #d0d0d0 !important;
		border-radius: 8px;
		background: #fff;
		box-sizing: border-box;
	}

	#catalogElement .qtyBlockContainer .qty,
	#smallElementTools .qtyBlockContainer .qty,
	.addCartContainer .qtyBlockContainer .qty,
	.mobileButtonsContainer .qtyBlockContainer .qty {
		display: inline-block !important;
		position: static !important;
		top: auto !important;
		transform: none !important;
		flex: 0 0 52px;
		width: 52px !important;
		height: 36px !important;
		line-height: 36px !important;
		font-size: 15px !important;
		font-weight: 600;
		text-align: center;
		border: 1px solid #d0d0d0 !important;
		border-radius: 6px;
		background: #fff !important;
		color: #222 !important;
		box-sizing: border-box;
		padding: 0 !important;
		margin: 0 !important;
	}

	#catalogElement .qtyBlockContainer .minus,
	#catalogElement .qtyBlockContainer .plus,
	#smallElementTools .qtyBlockContainer .minus,
	#smallElementTools .qtyBlockContainer .plus,
	.addCartContainer .qtyBlockContainer .minus,
	.addCartContainer .qtyBlockContainer .plus,
	.mobileButtonsContainer .qtyBlockContainer .minus,
	.mobileButtonsContainer .qtyBlockContainer .plus {
		display: inline-flex !important;
		align-items: center;
		justify-content: center;
		position: static !important;
		top: auto !important;
		left: auto !important;
		transform: none !important;
		flex: 0 0 36px;
		width: 36px !important;
		height: 36px !important;
		min-width: 36px;
		margin: 0 !important;
		border: 1px solid #c8c8c8 !important;
		border-radius: 6px;
		background: #f3f3f3 !important;
		background-image: none !important;
		box-sizing: border-box;
		line-height: 1 !important;
		font-size: 20px !important;
		font-weight: 700 !important;
		color: #222 !important;
		text-decoration: none !important;
	}

	#catalogElement .qtyBlockContainer .minus::before,
	#smallElementTools .qtyBlockContainer .minus::before,
	.addCartContainer .qtyBlockContainer .minus::before,
	.mobileButtonsContainer .qtyBlockContainer .minus::before {
		content: "−";
	}

	#catalogElement .qtyBlockContainer .plus::before,
	#smallElementTools .qtyBlockContainer .plus::before,
	.addCartContainer .qtyBlockContainer .plus::before,
	.mobileButtonsContainer .qtyBlockContainer .plus::before {
		content: "+";
	}

	/* Корзина: убрать фиксированную высоту карточки (пустое поле ~340px) */
	body.ep-focus-cart #basketProductList .product,
	#basketProductList .product {
		height: auto !important;
		min-height: 0 !important;
		padding-bottom: 12px !important;
		overflow: visible !important;
	}

	/* «В наличии» / удалить — в потоке над превью, не поверх картинки */
	body.ep-focus-cart #personalCart .product .topSection,
	#personalCart .product .topSection {
		position: static !important;
		top: auto !important;
		left: auto !important;
		right: auto !important;
		display: flex !important;
		align-items: center;
		justify-content: space-between;
		gap: 8px;
		width: 100% !important;
		margin: 0 0 8px !important;
		padding: 0 !important;
		z-index: auto !important;
		box-sizing: border-box;
	}

	body.ep-focus-cart #personalCart .product .topSection .column,
	#personalCart .product .topSection .column {
		float: none !important;
		width: auto !important;
	}

	body.ep-focus-cart #personalCart .product .inStock,
	#personalCart .product .inStock {
		display: inline-flex !important;
		align-items: center;
		gap: 4px;
		max-width: 100%;
		white-space: nowrap;
	}

	/* Корзина: единый размер превью + сетка (картинки 70–113px прыгали) */
	body.ep-focus-cart #basketProductList .product .productTable,
	#basketProductList .product .productTable {
		display: flex !important;
		align-items: flex-start !important;
		gap: 12px;
		width: 100% !important;
		box-sizing: border-box;
	}

	body.ep-focus-cart #basketProductList .product .productColImage,
	#basketProductList .product .productColImage {
		flex: 0 0 56px !important;
		width: 56px !important;
		max-width: 56px !important;
		margin: 0 !important;
		float: none !important;
	}

	body.ep-focus-cart #basketProductList .product .productColImage .picture,
	#basketProductList .product .productColImage .picture {
		display: flex !important;
		align-items: center;
		justify-content: center;
		width: 56px !important;
		height: 56px !important;
		margin: 0 !important;
		padding: 4px !important;
		overflow: hidden !important;
		background: #f7f7f7;
		border-radius: 6px;
		box-sizing: border-box;
	}

	body.ep-focus-cart #basketProductList .product .productColImage img,
	#basketProductList .product .productColImage img {
		width: 100% !important;
		height: 100% !important;
		max-width: 48px !important;
		max-height: 48px !important;
		object-fit: contain !important;
		object-position: center !important;
	}

	body.ep-focus-cart #basketProductList .product .productColText,
	#basketProductList .product .productColText {
		flex: 1 1 auto !important;
		min-width: 0 !important;
		float: none !important;
		width: auto !important;
	}

	/* запас снизу под sticky «Оформить заказ» */
	body.ep-focus-cart #basketProductList {
		padding-bottom: 88px !important;
	}

	body.ep-focus-cart .basketQty,
	#personalCart .basketQty {
		display: flex !important;
		align-items: center;
		flex-wrap: nowrap !important;
		gap: 6px;
		font-size: 13px !important;
		line-height: 1.2 !important;
		min-width: 0 !important;
		width: auto;
		max-width: 100%;
		margin: 8px 0 !important;
		box-sizing: border-box;
		white-space: nowrap !important;
	}

	body.ep-focus-cart .basketQty .qty,
	#personalCart .basketQty .qty {
		display: inline-block !important;
		flex: 0 0 44px;
		width: 44px !important;
		height: 36px !important;
		line-height: 36px !important;
		font-size: 15px !important;
		font-weight: 600;
		text-align: center;
		border: 1px solid #d0d0d0 !important;
		border-radius: 6px;
		background: #fff !important;
		color: #222 !important;
		box-sizing: border-box;
		vertical-align: middle;
		padding: 0 !important;
		margin: 0 !important;
	}

	/* ± в корзине: текстовые символы (PNG слишком бледные / спрайт ломается) */
	body.ep-focus-cart .basketQty .minus,
	body.ep-focus-cart .basketQty .plus,
	#personalCart .basketQty .minus,
	#personalCart .basketQty .plus,
	#personalCart .minus,
	#personalCart .plus {
		display: inline-flex !important;
		align-items: center;
		justify-content: center;
		flex: 0 0 36px;
		width: 36px !important;
		height: 36px !important;
		min-width: 36px !important;
		margin: 0 !important;
		border: 1px solid #c8c8c8 !important;
		border-radius: 6px;
		background: #f3f3f3 !important;
		background-image: none !important;
		box-sizing: border-box;
		vertical-align: middle;
		top: auto !important;
		transform: none !important;
		font-size: 22px !important;
		font-weight: 700 !important;
		line-height: 1 !important;
		color: #222 !important;
		text-decoration: none !important;
	}

	body.ep-focus-cart .basketQty .minus::before,
	#personalCart .basketQty .minus::before,
	#personalCart .minus::before {
		content: "−";
	}

	body.ep-focus-cart .basketQty .plus::before,
	#personalCart .basketQty .plus::before,
	#personalCart .plus::before {
		content: "+";
	}

	body.ep-focus-cart .basketQty .plus,
	#personalCart .basketQty .plus,
	#personalCart .plus {
		background-image: none !important;
	}

	/* Название в корзине: max 3 строки, цена не наезжает */
	body.ep-focus-cart #personalCart .name,
	body.ep-focus-cart #personalCart .productColText .name,
	body.ep-focus-cart #personalCart .name a,
	body.ep-focus-cart #personalCart .productColText .name a {
		display: -webkit-box !important;
		-webkit-box-orient: vertical !important;
		-webkit-line-clamp: 3;
		line-clamp: 3;
		white-space: normal !important;
		overflow: hidden !important;
		text-overflow: ellipsis !important;
		line-height: 1.35 !important;
		max-height: calc(1.35em * 3) !important;
		word-break: break-word;
		overflow-wrap: anywhere;
	}

	body.ep-focus-cart #basketProductList .product .price,
	body.ep-focus-cart #personalCart .productColPrice,
	body.ep-focus-cart #personalCart .price {
		position: static !important;
		clear: both;
		margin-top: 6px !important;
		line-height: 1.3 !important;
	}

	.product .btn-simple.add-cart.addCart.ep-list-addcart:hover,
	.product .btn-simple.add-cart.addCart.ep-list-addcart:active {
		background-color: #a8142e !important;
		border-color: #a8142e !important;
		color: transparent !important;
	}

	.product .btn-simple.add-cart.addCart.ep-list-addcart.added {
		background-color: #2e7d32 !important;
		border-color: #2e7d32 !important;
	}

	.product .btn-simple.add-cart.addCart.ep-list-addcart.added::after {
		-webkit-mask-image: url("../images/added.svg");
		mask-image: url("../images/added.svg");
		width: 16px;
		height: 16px;
	}

	.product .btn-simple.add-cart.addCart.ep-list-addcart.loading {
		opacity: 0.7;
		pointer-events: none;
	}

	.ep-mobile-search-submit svg {
		width: 20px;
		height: 20px;
		display: block;
	}

	/* Не сдвигать контент при открытии поиска */
	#foundation.ep-search-open {
		padding-top: 55px !important;
	}

	/* ——— Город в бургере ——— */
	#geoPositionMobile {
		padding: 4px 0;
		list-style: none;
		width: 100%;
	}

	#geoPositionMobile ul,
	.ep-mobile-geo-list {
		list-style: none;
		margin: 0;
		padding: 0;
		width: 100%;
	}

	#geoPositionMobile li {
		list-style: none;
		margin: 0;
		padding: 0;
		width: 100%;
	}

	#geoPositionMobile li.null {
		list-style: none !important;
		margin: 0 !important;
		padding: 0 !important;
		border: 0 !important;
		min-height: 0 !important;
		line-height: 0 !important;
		font-size: 0 !important;
	}

	#geoPositionMobile li.null::before,
	#geoPositionMobile li.null::marker {
		content: none !important;
		display: none !important;
	}

	/* Город и часы — те же боковые отступы, что у карточки адреса */
	.rm_mobile_menu_first .ep-mobile-geo,
	.rm_mobile_menu_first .rm_mobile_menu_list-item:has(.header-work) {
		padding: 12px 18px !important;
		box-sizing: border-box;
		width: 100%;
	}

	#geoPositionMobile .user-geo-position {
		display: flex;
		flex-wrap: wrap;
		align-items: baseline;
		justify-content: flex-start;
		gap: 6px;
		width: 100%;
		text-align: left;
	}

	#geoPositionMobile .user-geo-position-label {
		display: inline !important;
		font-size: 14px;
		color: #555;
		margin: 0;
		white-space: nowrap;
	}

	#geoPositionMobile .user-geo-position-value {
		display: inline;
		margin: 0;
	}

	#geoPositionMobile .user-geo-position-value-link,
	#geoPositionMobile a.user-geo-position-value-link,
	#geoPositionMobile .user-geo-position-value-link span {
		color: #111 !important;
		font-size: 14px !important;
		font-weight: 700 !important;
		text-decoration: underline !important;
		text-underline-offset: 2px;
	}

	body.ep-focus-cart .user-geo-position-window,
	body.ep-focus-checkout .user-geo-position-window,
	body.ep-focus-cart .locationConfirm,
	body.ep-focus-checkout .locationConfirm {
		display: none !important;
	}

	/* ——— Адрес / часы: иконки в стиле пунктов меню ——— */
	.rm_mobile_menu_first .header-address.padding-0,
	.rm_mobile_menu_first .header-work.padding-0 {
		align-items: flex-start;
		gap: 12px;
		font-size: 14px;
		line-height: 1.25;
		width: 100%;
	}

	.rm_mobile_menu_first .header-address.padding-0 svg,
	.rm_mobile_menu_first .header-work.padding-0 svg {
		flex: 0 0 22px;
		width: 22px !important;
		height: 22px !important;
		min-width: 22px;
		margin: 1px 0 0 0 !important;
		padding: 0 !important;
		background: transparent !important;
		border-radius: 0 !important;
	}

	.rm_mobile_menu_first .header-work-lines {
		display: flex;
		flex-direction: column;
		gap: 2px;
		line-height: 1.25;
		font-size: 14px;
		color: #272323;
	}

	.rm_mobile_menu_first .header-work-lines span {
		display: block;
	}

	/* Плоское меню в бургере */
	.rm_mobile_menu_first .ep-flat-menu-item {
		display: flex;
		align-items: center;
		gap: 12px;
		padding: 14px 18px;
		color: #272323;
		text-decoration: none;
		border-bottom: 1px solid #eee;
		font-size: 15px;
		line-height: 1.3;
		box-sizing: border-box;
		width: 100%;
	}

	.rm_mobile_menu_first .ep-flat-menu-item svg {
		flex: 0 0 22px;
		width: 22px;
		height: 22px;
	}

	.rm_mobile_menu_first .ep-flat-menu-item:active {
		background: #f5f5f5;
	}

	/* MAX в контактах: тот же визуальный размер, что TG/WA (FA 44px) */
	#rm_sidebar_contacts .rm-messenger-icon {
		width: 44px;
		height: 44px;
		flex: 0 0 44px;
	}

	#rm_sidebar_contacts .rm-messenger-icon.max {
		background: transparent;
		overflow: visible;
		padding: 0;
	}

	#rm_sidebar_contacts .rm-messenger-icon.max img {
		width: 44px !important;
		height: 44px !important;
		max-width: 44px;
		max-height: 44px;
		object-fit: contain;
		display: block;
	}

	#rm_sidebar_contacts .rm-messenger-icon.telegram::before,
	#rm_sidebar_contacts .rm-messenger-icon.whatsapp::before {
		font-size: 44px;
		line-height: 44px;
	}

	.rm-messengers-grid,
	#rm_sidebar_contacts .rm-messengers-grid {
		grid-template-columns: repeat(3, 1fr) !important;
	}

	/* Футер: блок мессенджеров на mobile убираем (TG/WA на светлом фоне нечитаемы → остаётся «одинокий» MAX) */
	.ep-footer-messengers {
		display: none !important;
	}
}

/* ——— Focus-mode: корзина / оформление (mobile + desktop) ——— */
/* Chrome (шапка/левое/футер) на этих URL не рендерится в header.php/footer.php
   (EP_FOCUS_*). CSS ниже — страховка, если что-то всё же попало в HTML. */
/* Полностью убираем шапку и футер — логотип в одиночной шапке смотрится лишним */
body.ep-focus-cart #headerLineMobile,
body.ep-focus-checkout #headerLineMobile,
body.ep-focus-cart #headerLine,
body.ep-focus-checkout #headerLine,
body.ep-focus-cart #headerLine2,
body.ep-focus-checkout #headerLine2,
body.ep-focus-cart #headerLine3,
body.ep-focus-checkout #headerLine3,
body.ep-focus-cart #headerLine4,
body.ep-focus-checkout #headerLine4,
body.ep-focus-cart #headerLine5,
body.ep-focus-checkout #headerLine5,
body.ep-focus-cart #subHeader,
body.ep-focus-checkout #subHeader,
body.ep-focus-cart #subHeader2,
body.ep-focus-checkout #subHeader2,
body.ep-focus-cart #subHeader3,
body.ep-focus-checkout #subHeader3,
body.ep-focus-cart #subHeader4,
body.ep-focus-checkout #subHeader4,
body.ep-focus-cart #subHeader5,
body.ep-focus-checkout #subHeader5,
body.ep-focus-cart #headerLayout,
body.ep-focus-checkout #headerLayout,
body.ep-focus-cart #footer,
body.ep-focus-checkout #footer,
body.ep-focus-cart #footerLine,
body.ep-focus-checkout #footerLine,
body.ep-focus-cart #flushFooterCart,
body.ep-focus-checkout #flushFooterCart,
body.ep-focus-cart #rm_sidebar_contacts,
body.ep-focus-checkout #rm_sidebar_contacts,
body.ep-focus-cart .rm_mobile_menu_first,
body.ep-focus-checkout .rm_mobile_menu_first,
body.ep-focus-cart .telegramim_button,
body.ep-focus-checkout .telegramim_button,
body.ep-focus-cart #ab-sidebar,
body.ep-focus-checkout #ab-sidebar,
/* Левая колонка каталога — отвлекает от заказа (не трогаем бургер #rm_sidebar_catalog) */
body.ep-focus-cart #left,
body.ep-focus-checkout #left,
body.ep-focus-cart #left #leftMenu,
body.ep-focus-checkout #left #leftMenu,
body.ep-focus-cart #left #catalogMenuHeading,
body.ep-focus-checkout #left #catalogMenuHeading,
/* «Просмотренные» / рекомендации без CTA «В корзину» — только шум на пути к заказу */
body.ep-focus-cart #footerTabsCaption,
body.ep-focus-checkout #footerTabsCaption,
body.ep-focus-cart #footerTabs,
body.ep-focus-checkout #footerTabs,
body.ep-focus-cart #viewedProduct,
body.ep-focus-checkout #viewedProduct,
body.ep-focus-cart [id^="bigdata_recommended_products"],
body.ep-focus-checkout [id^="bigdata_recommended_products"] {
	display: none !important;
}

/* Контент корзины/оформления на всю ширину после скрытия #left */
body.ep-focus-cart .compliter,
body.ep-focus-checkout .compliter {
	display: block !important;
	width: 100% !important;
}

body.ep-focus-cart #right,
body.ep-focus-checkout #right {
	display: block !important;
	width: 100% !important;
	max-width: 100% !important;
	float: none !important;
}

/* Доставка: «Стоимость» / «Срок доставки» в одну строку, без узких колонок */
body.ep-focus-checkout ul.bx-soa-pp-list,
#bx-soa-delivery ul.bx-soa-pp-list,
ul.bx-soa-pp-list {
	display: flex !important;
	flex-direction: column !important;
	align-items: stretch !important;
	gap: 6px;
	width: 100% !important;
	max-width: 100% !important;
	margin: 8px 0 0 !important;
	padding: 0 !important;
	list-style: none !important;
	grid-template-columns: none !important;
}

body.ep-focus-checkout ul.bx-soa-pp-list > li,
#bx-soa-delivery ul.bx-soa-pp-list > li,
ul.bx-soa-pp-list > li {
	display: flex !important;
	flex-direction: row !important;
	flex-wrap: nowrap !important;
	align-items: baseline !important;
	gap: 8px;
	width: 100% !important;
	max-width: 100% !important;
	margin: 0 !important;
	padding: 0 !important;
	float: none !important;
	box-sizing: border-box;
}

body.ep-focus-checkout .bx-soa-pp-list-termin,
body.ep-focus-checkout .bx-soa-pp-list-description,
#bx-soa-delivery .bx-soa-pp-list-termin,
#bx-soa-delivery .bx-soa-pp-list-description,
ul.bx-soa-pp-list .bx-soa-pp-list-termin,
ul.bx-soa-pp-list .bx-soa-pp-list-description {
	display: inline !important;
	float: none !important;
	width: auto !important;
	max-width: none !important;
	white-space: nowrap !important;
	margin: 0 !important;
	padding: 0 !important;
}

@media (max-width: 1024px) {
	body.ep-focus-cart a.goToOrder:not(.hidden) {
		position: fixed;
		left: 12px;
		right: 12px;
		bottom: calc(12px + env(safe-area-inset-bottom, 0px));
		z-index: 850;
		margin: 0 !important;
		display: flex !important;
		align-items: center;
		justify-content: center;
		box-shadow: 0 4px 24px rgba(0, 0, 0, 0.22);
	}

	body.ep-focus-cart #personalCart,
	body.ep-focus-cart #foundation {
		padding-bottom: 88px;
	}
}

@media (max-width: 889px) {
	.bx-soa-cart-total-button-container {
		display: none !important;
	}

	#bx-soa-orderSave {
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 900;
		background: #fff;
		padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
		box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.12);
		margin: 0 !important;
		width: 100%;
		box-sizing: border-box;
	}

	#bx-soa-orderSave .checkbox {
		margin-bottom: 8px !important;
	}

	#bx-soa-orderSave .btn {
		width: 100% !important;
		height: 52px !important;
		margin: 0 !important;
	}

	#bx-soa-total .bx-soa-cart-total {
		position: static !important;
		padding: 16px !important;
		margin-bottom: 12px;
	}

	body.ep-focus-checkout #bx-soa-order,
	body.ep-focus-checkout #foundation {
		padding-bottom: 140px;
	}

	#bx-soa-orderSave .main-user-consent-request {
		font-size: 12px;
		line-height: 1.35;
	}

	#bx-soa-orderSave .main-user-consent-request-announce-link {
		font-size: 12px !important;
		line-height: 1.35 !important;
		text-decoration: underline;
	}
}

/* ——— Попап согласия ПДн: скролл только текста, кнопки в ряд и зафиксированы ——— */
/* Важно: НЕ ставить display:!important на .popup — иначе перебивает display:none и блок «течёт» на все страницы */
.main-user-consent-request-popup {
	position: fixed !important;
	top: 0 !important;
	left: 0 !important;
	right: 0 !important;
	bottom: 0 !important;
	z-index: 10050 !important;
	box-sizing: border-box !important;
	overflow: hidden !important;
	background-color: rgba(0, 0, 0, 0.5) !important;
}

.main-user-consent-request-popup-cont {
	display: flex !important;
	flex-direction: column !important;
	position: absolute !important;
	left: 0 !important;
	right: 0 !important;
	bottom: 0 !important;
	top: auto !important;
	transform: none !important;
	-webkit-transform: none !important;
	width: 100% !important;
	max-width: 100% !important;
	max-height: min(85vh, 640px) !important;
	min-height: 0 !important;
	height: auto !important;
	margin: 0 !important;
	padding: 16px !important;
	box-sizing: border-box !important;
	overflow: hidden !important;
	overflow-y: hidden !important;
	border-radius: 12px 12px 0 0 !important;
	text-align: left !important;
}

@media (max-width: 768px) {
	/* Bitrix по умолчанию height:100% — раздувает попап и даёт пустоту под кнопками */
	.main-user-consent-request-popup-cont {
		height: auto !important;
		min-height: 0 !important;
	}
}

.main-user-consent-request-popup-header {
	flex: 0 0 auto !important;
	max-width: 100% !important;
	margin: 0 0 12px !important;
	padding: 0 !important;
}

.main-user-consent-request-popup-body {
	display: flex !important;
	flex-direction: column !important;
	flex: 1 1 auto !important;
	min-height: 0 !important;
	max-height: none !important;
	overflow: hidden !important;
}

.main-user-consent-request-popup-content {
	display: flex !important;
	flex-direction: column !important;
	flex: 1 1 auto !important;
	min-height: 0 !important;
	overflow: hidden !important;
}

.main-user-consent-request-popup-textarea-block {
	flex: 1 1 auto !important;
	min-height: 0 !important;
	margin: 0 !important;
	overflow: auto !important;
	-webkit-overflow-scrolling: touch;
}

.main-user-consent-request-popup-text,
.main-user-consent-request-popup-link {
	height: auto !important;
	max-height: none !important;
	overflow: visible !important;
	border: 0 !important;
	padding: 0 !important;
	margin: 0 !important;
}

/* Кнопки вне скролла текста, в одну строку */
.main-user-consent-request-popup-buttons {
	display: flex !important;
	flex-direction: row !important;
	flex-wrap: nowrap !important;
	align-items: stretch !important;
	justify-content: stretch !important;
	gap: 8px !important;
	flex: 0 0 auto !important;
	margin: 12px 0 0 !important;
	padding: 0 !important;
	width: 100% !important;
	box-sizing: border-box !important;
}

.main-user-consent-request-popup-button,
.main-user-consent-request-popup-button.btn-simple,
.main-user-consent-request-popup-button.btn-medium {
	flex: 1 1 0 !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: auto !important;
	max-width: none !important;
	min-width: 0 !important;
	height: auto !important;
	min-height: 40px !important;
	margin: 0 !important;
	padding: 8px 10px !important;
	box-sizing: border-box !important;
	font-size: 12px !important;
	line-height: 1.2 !important;
	white-space: nowrap !important;
	text-align: center !important;
}

@media (min-width: 768px) {
	.main-user-consent-request-popup-cont {
		left: 50% !important;
		right: auto !important;
		bottom: auto !important;
		top: 50% !important;
		transform: translate(-50%, -50%) !important;
		-webkit-transform: translate(-50%, -50%) !important;
		max-width: 560px !important;
		width: calc(100% - 32px) !important;
		border-radius: 12px !important;
		max-height: min(80vh, 620px) !important;
	}
}

@media (max-width: 1024px) {
	#breadcrumbs.ep-bc-short ul li.ep-bc-mid,
	#breadcrumbs.ep-bc-short ul li.ep-bc-mid + li.ep-bc-sep {
		display: none !important;
	}
}

/* Крошки: одна строка + домик фиксированного размера (баг: SVG без размера на desktop раздувался) */
#breadcrumbs ul {
	display: flex !important;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	list-style: none !important;
	margin: 0;
	padding: 0;
}

#breadcrumbs ul li {
	display: inline-flex !important;
	align-items: center;
	width: auto !important;
	max-width: none !important;
	float: none !important;
	list-style: none !important;
	margin: 0;
	padding: 0;
	line-height: 1.3;
}

#breadcrumbs ul li .arrow {
	display: inline;
	margin: 0 2px;
}

#breadcrumbs .ep-bc-home-icon {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	vertical-align: middle;
	width: 16px;
	height: 16px;
	flex: 0 0 16px;
	overflow: hidden;
}

#breadcrumbs .ep-bc-home-icon svg {
	width: 16px !important;
	height: 16px !important;
	max-width: 16px !important;
	max-height: 16px !important;
	display: block;
}

#breadcrumbs .ep-bc-home-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* Футер: мессенджеры (desktop + mobile) */
.ep-footer-messengers {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
	padding: 8px 0;
	list-style: none;
	margin: 0;
}

.ep-footer-messengers a {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: inherit;
	text-decoration: none;
	font-size: 13px;
	opacity: 0.95;
}

.ep-footer-messengers a:hover {
	text-decoration: underline;
}

.ep-footer-messengers img {
	width: 28px;
	height: 28px;
	object-fit: contain;
	display: block;
}

.ep-footer-messengers .ep-fm-ico {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 16px;
	color: #fff;
	background: #555;
}

.ep-footer-messengers .ep-fm-ico.tg {
	background: #0088cc;
}

.ep-footer-messengers .ep-fm-ico.wa {
	background: #25d366;
}

/* ——— Корзина / оформление: цвета как логотип + светлое выделение (Мария Ильина) ——— */
:root {
	--ep-brand: #c81938;
	--ep-brand-hover: #a8142e;
	--ep-selected-bg: #f3f3f3;
	--ep-selected-border: #d8d8d8;
}

/* CTA-кнопки → цвет логотипа (вместо #fd3230 / чёрного «Активировать») */
body.ep-focus-cart a.goToOrder:not(.hidden),
body.ep-focus-cart a.goToOrder.btn-simple,
body.ep-focus-cart .couponActivate,
body.ep-focus-cart input.couponActivate,
body.ep-focus-checkout #bx-soa-orderSave .btn,
body.ep-focus-checkout #bx-soa-order-form .btn.btn-default,
body.ep-focus-checkout .bx-soa-cart-total-button-container .btn,
body.ep-focus-checkout .bx-soa-pickup-l-item-btn .btn {
	background-color: var(--ep-brand) !important;
	background: var(--ep-brand) !important;
	border-color: var(--ep-brand) !important;
	color: #fff !important;
}

body.ep-focus-cart a.goToOrder:not(.hidden):hover,
body.ep-focus-cart a.goToOrder:not(.hidden):active,
body.ep-focus-cart .couponActivate:hover,
body.ep-focus-cart input.couponActivate:hover,
body.ep-focus-checkout #bx-soa-orderSave .btn:hover,
body.ep-focus-checkout #bx-soa-order-form .btn.btn-default:hover {
	background-color: var(--ep-brand-hover) !important;
	background: var(--ep-brand-hover) !important;
	border-color: var(--ep-brand-hover) !important;
	color: #fff !important;
}

/* Акценты текста в оформлении → бренд */
body.ep-focus-checkout .bx-soa-pp-delivery-cost,
body.ep-focus-checkout .bx-soa label.btn-person-type:not(.btn-person-type-checked),
body.ep-focus-checkout .paysystem_name,
body.ep-focus-checkout #bx-soa-order-form .bx-soa-info-shower {
	color: var(--ep-brand) !important;
}

/* Выделение (тип плательщика, доставка, оплата) → белый / светло-серый */
body.ep-focus-checkout .bx-soa label.btn-person-type-checked {
	background-color: var(--ep-selected-bg) !important;
	background: var(--ep-selected-bg) !important;
	border-color: var(--ep-brand) !important;
	color: #1e293b !important;
}

body.ep-focus-checkout .bx-soa label.btn-person-type:not(.btn-person-type-checked) {
	background-color: #fff !important;
	background: #fff !important;
	border-color: var(--ep-brand) !important;
	color: var(--ep-brand) !important;
}

body.ep-focus-checkout .bx-soa-pp-company.bx-selected .bx-soa-pp-company-graf-container,
body.ep-focus-checkout .bx-soa-pp-inner-ps.bx-selected .bx-soa-pp-company-graf-container,
body.ep-focus-checkout #bx-soa-paysystem .bx-soa-pp-company.bx-selected,
body.ep-focus-checkout .bx-soa-pickup-list-item.bx-selected {
	background-color: var(--ep-selected-bg) !important;
	background: var(--ep-selected-bg) !important;
	border-color: var(--ep-selected-border) !important;
}

/* Галочка выбора — бренд (акцент), не заливка всего блока */
body.ep-focus-checkout .bx-selected .delivery-check,
body.ep-focus-checkout .bx-soa-pickup-list .bx-soa-pickup-list-item.bx-selected::after,
body.ep-focus-checkout #bx-soa-order .checkbox.checked label::before,
body.ep-focus-checkout #bx-soa-order .radio.checked label::before {
	background-color: var(--ep-brand) !important;
	background: var(--ep-brand) !important;
}

/* ——— Checkout: карта самовывоза + равные отступы блоков ——— */

/* Скрыть сломанную/пустую карту (спиннер Яндекс.Карт) — список складов остаётся */
body.ep-focus-checkout #pickUpMap,
body.ep-focus-checkout .bx_soa_pickup #pickUpMap {
	display: none !important;
	height: 0 !important;
	min-height: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
	overflow: hidden !important;
}

/* Равные отступы между секциями + боковые, чтобы заголовки не «чиркали» края */
body.ep-focus-checkout #bx-soa-order .bx-soa-section.bx-active {
	margin-top: 0 !important;
	margin-bottom: 12px !important;
	padding: 14px 16px !important;
	box-sizing: border-box !important;
}

body.ep-focus-checkout #bx-soa-order .bx-soa-section.bx-active .bx-soa-section-title-container {
	padding: 0 0 10px 0 !important;
	margin: 0 !important;
	background: transparent !important;
}

body.ep-focus-checkout #bx-soa-order .bx-soa-section.bx-active .bx-soa-section-title {
	padding: 0 !important;
	margin: 0 !important;
	overflow-wrap: anywhere;
	word-break: break-word;
}

body.ep-focus-checkout #bx-soa-order .bx-soa-section.bx-active .bx-soa-section-content {
	padding-top: 8px !important;
	padding-bottom: 8px !important;
	padding-left: 12px !important;
	padding-right: 12px !important;
	box-sizing: border-box !important;
}

/* Доставка / оплата / промокод / самовывоз — одна ширина контента */
body.ep-focus-checkout #bx-soa-delivery .bx-soa-pp-item-container,
body.ep-focus-checkout #bx-soa-paysystem .bx-soa-pp-item-container,
body.ep-focus-checkout #bx-soa-delivery .bx-soa-coupon,
body.ep-focus-checkout #bx-soa-paysystem .bx-soa-coupon,
body.ep-focus-checkout #bx-soa-pickup .bx-soa-section-content,
body.ep-focus-checkout #bx-soa-pickup .pickup-container,
body.ep-focus-checkout #bx-soa-pickup .bx-soa-pickup-list {
	width: 100% !important;
	max-width: 100% !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
	box-sizing: border-box !important;
}

body.ep-focus-checkout .bx-soa-coupon,
body.ep-focus-checkout #bx-soa-delivery .bx-soa-coupon,
body.ep-focus-checkout #bx-soa-paysystem .bx-soa-coupon {
	padding-left: 0 !important;
	padding-right: 0 !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
	width: 100% !important;
	box-sizing: border-box !important;
}

body.ep-focus-checkout .bx-soa-coupon-block,
body.ep-focus-checkout .bx-soa-coupon-input,
body.ep-focus-checkout .bx-soa-coupon-item {
	width: 100% !important;
	max-width: 100% !important;
	box-sizing: border-box !important;
}

/* Доставка / оплата: карточки с внутренним отступом от краёв подложки */
body.ep-focus-checkout #bx-soa-delivery .bx-soa-pp-company,
body.ep-focus-checkout #bx-soa-paysystem .bx-soa-pp-company {
	padding: 12px 28px 12px 12px !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
	width: 100% !important;
	max-width: 100% !important;
	box-sizing: border-box !important;
	overflow: visible !important;
	position: relative !important;
}

body.ep-focus-checkout #bx-soa-delivery .bx-soa-pp-company-graf-container,
body.ep-focus-checkout #bx-soa-paysystem .bx-soa-pp-company-graf-container {
	right: 10px !important;
	margin-right: 0 !important;
	box-sizing: border-box !important;
}

body.ep-focus-checkout #bx-soa-delivery .bx-soa-pp-company-smalltitle,
body.ep-focus-checkout #bx-soa-paysystem .bx-soa-pp-company-smalltitle {
	box-sizing: border-box !important;
	padding-right: 8px !important;
}

/* Чекбокс/радио выбора не чиркает правый край выбранной карточки */
body.ep-focus-checkout #bx-soa-paysystem .bx-soa-pp-company.bx-selected,
body.ep-focus-checkout #bx-soa-delivery .bx-soa-pp-company.bx-selected {
	padding-right: 32px !important;
}

/* Индикатор выбора (.delivery-check) — отступ от правого края карточки */
body.ep-focus-checkout .delivery-check,
body.ep-focus-checkout #bx-soa-delivery .delivery-check,
body.ep-focus-checkout #bx-soa-paysystem .delivery-check {
	right: 16px !important;
}

/* Пункт самовывоза: индикатор не упирается в рамку */
body.ep-focus-checkout #bx-soa-pickup .bx-soa-pickup-list-item {
	padding: 12px 28px 12px 14px !important;
	box-sizing: border-box !important;
	position: relative !important;
}

body.ep-focus-checkout #bx-soa-pickup .bx-soa-pickup-list-item.bx-selected::after,
body.ep-focus-checkout #bx-soa-pickup .bx-soa-pickup-list .bx-soa-pickup-list-item.bx-selected::after {
	right: 10px !important;
}

body.ep-focus-checkout #bx-soa-order .bx-soa-section.bx-active + .bx-soa-section.bx-active {
	margin-top: 0 !important;
}

/* Убрать лишний воздух у пункта самовывоза */
body.ep-focus-checkout #bx-soa-pickup .bx-soa-pickup-list {
	margin-bottom: 0 !important;
}

body.ep-focus-checkout #bx-soa-pickup .bx-soa-pickup-list-item {
	margin-bottom: 0 !important;
	padding: 10px 12px !important;
}

body.ep-focus-checkout #bx-soa-pickup .pickup-container {
	margin: 0 !important;
	padding: 0 !important;
}

/* Картинка склада на мобилке занимает место без пользы */
body.ep-focus-checkout #bx-soa-pickup .bx-soa-pickup-l-item-img {
	display: none !important;
}

body.ep-focus-checkout #bx-soa-pickup .bx-soa-pickup-l-item-detail {
	min-height: 0 !important;
	padding-top: 8px !important;
	margin: 0 !important;
}

body.ep-focus-checkout #bx-soa-pickup .bx-soa-pickup-l-item-btn {
	margin-top: 8px !important;
}

/* Дубли промокода внутри секций — компактнее */
body.ep-focus-checkout .bx-soa-coupon {
	margin-top: 8px !important;
	padding-top: 8px !important;
}

/* На mobile SOA прячет #bx-soa-basket (.hidden) — показываем компактный список */
body.ep-focus-checkout #bx-soa-basket.bx-soa-section,
body.ep-focus-checkout #bx-soa-basket.hidden {
	display: block !important;
	visibility: visible !important;
	height: auto !important;
	overflow: visible !important;
}
@media (max-width: 1024px) {
	body.ep-focus-checkout #bx-soa-basket .bx-soa-table-fade,
	body.ep-focus-checkout #bx-soa-basket .bx-soa-table-fade > div {
		overflow: visible !important;
		min-width: 0 !important;
		width: 100% !important;
	}

	body.ep-focus-checkout #bx-soa-basket .bx-soa-item-table {
		display: block !important;
		width: 100% !important;
		min-width: 0 !important;
	}

	body.ep-focus-checkout #bx-soa-basket .bx-soa-item-tr.bx-soa-basket-info {
		display: flex !important;
		flex-direction: column !important;
		align-items: stretch !important;
		gap: 8px;
		width: 100% !important;
		min-width: 0 !important;
		padding: 14px 0 !important;
		margin: 0 !important;
		border-top: none !important;
		border-bottom: 1px solid #e8e8e8 !important;
		box-sizing: border-box;
	}

	body.ep-focus-checkout #bx-soa-basket .bx-soa-item-tr.bx-soa-basket-info > .bx-soa-item-td {
		display: block !important;
		width: 100% !important;
		max-width: 100% !important;
		min-width: 0 !important;
		padding: 0 !important;
		float: none !important;
	}

	/* qty/sum колонки прячем — переносим в .ep-soa-meta через JS */
	body.ep-focus-checkout #bx-soa-basket .bx-soa-item-tr.bx-soa-basket-info > .bx-soa-item-td:nth-child(2),
	body.ep-focus-checkout #bx-soa-basket .bx-soa-item-tr.bx-soa-basket-info > .bx-soa-item-td:nth-child(3) {
		display: none !important;
	}

	body.ep-focus-checkout #bx-soa-basket .bx-soa-item-block {
		display: flex !important;
		align-items: flex-start;
		gap: 10px;
		width: 100%;
		min-width: 0;
	}

	body.ep-focus-checkout #bx-soa-basket .bx-soa-item-img-block {
		flex: 0 0 56px;
		width: 56px !important;
		height: 56px !important;
		margin: 0 !important;
		overflow: hidden !important;
		border-radius: 6px;
		background: #f7f7f7;
	}

	body.ep-focus-checkout #bx-soa-basket .bx-soa-item-imgcontainer {
		width: 56px !important;
		height: 56px !important;
		max-width: 56px !important;
		max-height: 56px !important;
		background-size: contain !important;
		background-position: center !important;
		background-repeat: no-repeat !important;
		overflow: hidden !important;
	}

	body.ep-focus-checkout #bx-soa-basket .bx-soa-item-img-block img,
	body.ep-focus-checkout #bx-soa-basket .bx-soa-item-imgcontainer img {
		width: 56px !important;
		height: 56px !important;
		max-width: 56px !important;
		max-height: 56px !important;
		object-fit: contain !important;
		object-position: center !important;
		display: block !important;
	}

	body.ep-focus-checkout #bx-soa-basket .bx-soa-item-content {
		flex: 1 1 auto;
		min-width: 0;
		padding: 0 !important;
		display: flex;
		flex-direction: column;
		gap: 4px;
	}

	body.ep-focus-checkout #bx-soa-basket .bx-soa-item-title {
		margin: 0 !important;
		line-height: 1.35 !important;
		order: 1;
	}

	body.ep-focus-checkout #bx-soa-basket .bx-soa-item-title a {
		display: -webkit-box !important;
		-webkit-box-orient: vertical !important;
		-webkit-line-clamp: 3;
		line-clamp: 3;
		overflow: hidden;
		font-size: 14px !important;
		line-height: 1.35 !important;
		white-space: normal !important;
		overflow-wrap: anywhere;
		word-break: break-word;
		max-height: calc(1.35em * 3);
	}

	body.ep-focus-checkout #bx-soa-basket .ep-soa-article {
		order: 2;
		margin: 0;
		font-size: 12px;
		line-height: 1.35;
		color: #555;
		overflow-wrap: anywhere;
	}

	body.ep-focus-checkout #bx-soa-basket .ep-soa-article-val {
		font-weight: 700;
		color: #222;
	}

	body.ep-focus-checkout #bx-soa-basket .ep-soa-unit-price {
		order: 3;
		margin: 0;
		font-size: 13px;
		line-height: 1.3;
		font-weight: 600;
		color: #222;
	}

	body.ep-focus-checkout #bx-soa-basket .ep-soa-meta {
		display: flex !important;
		align-items: baseline;
		justify-content: space-between;
		gap: 12px;
		width: 100%;
		box-sizing: border-box;
		padding-left: 66px;
		font-size: 13px;
		line-height: 1.3;
	}

	body.ep-focus-checkout #bx-soa-basket .ep-soa-meta-qty,
	body.ep-focus-checkout #bx-soa-basket .ep-soa-meta-sum {
		white-space: nowrap;
	}

	body.ep-focus-checkout #bx-soa-basket .ep-soa-meta-sum {
		font-weight: 700;
		margin-left: auto;
		text-align: right;
	}

	body.ep-focus-checkout #bx-soa-basket .bx-soa-item-td-text {
		font-size: 13px !important;
		line-height: 1.3 !important;
	}

	body.ep-focus-checkout #bx-soa-basket .bx-price.all {
		font-size: 13px !important;
		white-space: nowrap;
	}
}

/* ——— EP-26: модалки «1 клик» / запрос цены / корзина-окно ———
   На prod в template_styles.css нет базовых правил (#appFastBuy{display:none;position:fixed}),
   они остались только в template_styles_basic.css (не подключается Bitrix).
   Без этого HTML модалок из footer вылезает в поток страницы (футер/корзина).
   ?v=mtime на ep-mobile-stage1.css гарантирует обновление кэша. */
#appFastBuy,
#requestPrice,
#appBasket {
	display: none;
	position: fixed;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	z-index: 10050;
	background: rgba(0, 0, 0, 0.45);
	box-sizing: border-box;
	-webkit-overflow-scrolling: touch;
}

#appFastBuyContainer,
#requestPriceContainer,
#appBasketContainer {
	position: absolute;
	left: 50%;
	top: 50%;
	width: 700px;
	max-width: 94vw;
	max-height: 90vh;
	margin-left: -350px;
	margin-top: -215px;
	background: #fff;
	box-shadow: 1px 1px 12px rgba(60, 60, 60, 0.3);
	overflow: auto;
	box-sizing: border-box;
}

#appBasketContainer {
	margin-top: -200px;
	height: auto;
	min-height: 320px;
}

#appFastBuy .close,
#appFastBuy .closeWindow,
#requestPrice .close,
#requestPrice .closeWindow,
#appBasket .close,
#appBasket .closeWindow {
	position: absolute;
	right: 16px;
	top: 18px;
	width: 24px;
	height: 24px;
	display: block;
	z-index: 2;
	cursor: pointer;
}

#appFastBuyContainer .heading,
#requestPrice .requestPriceHeading,
#appBasket .heading {
	position: relative;
	text-align: center;
	line-height: 56px;
	font-size: 17px;
	padding: 0 40px;
}

#appFastBuyContainer .column {
	box-sizing: border-box;
	float: left;
	width: 380px;
	margin-top: 16px;
	padding: 0 20px 20px;
}

#appFastBuyContainer .column:first-child {
	width: 320px;
	text-align: center;
}

#appFastBuyContainer input[type="text"],
#appFastBuyContainer input:not([type]),
#appFastBuyContainer textarea,
#requestPrice input[type="text"],
#requestPrice input:not([type]),
#requestPrice textarea {
	box-sizing: border-box;
	width: 100%;
	max-width: 354px;
	border: 1px solid #ddd;
	padding: 12px;
	font-size: 15px;
	background: #f7f7f7;
}

#appFastBuyContainer textarea,
#requestPrice textarea {
	min-height: 70px;
	resize: vertical;
}

#appFastBuyContainer #fastBuyFormSubmit,
#requestPrice #requestPriceSubmit {
	display: inline-block;
	box-sizing: border-box;
	text-align: center;
	text-decoration: none;
	color: #fff !important;
	background: #c81938;
	padding: 12px 18px;
	min-height: 44px;
	line-height: 20px;
	border-radius: 2px;
}

#appFastBuyContainer #fastBuyFormSubmit img,
#requestPrice #requestPriceSubmit img {
	vertical-align: middle;
	margin-right: 6px;
	filter: brightness(0) invert(1);
}

#fastBuyResultClose,
#requestPriceResultClose {
	display: inline-block;
	margin: 12px 0 20px;
	color: #c81938;
}

/* Focus-mode: модалки не должны появляться даже при ошибочном include */
body.ep-focus-cart #appFastBuy,
body.ep-focus-checkout #appFastBuy,
body.ep-focus-cart #requestPrice,
body.ep-focus-checkout #requestPrice,
body.ep-focus-cart #appBasket,
body.ep-focus-checkout #appBasket {
	display: none !important;
}

@media all and (max-width: 750px) {
	#appFastBuyContainer,
	#requestPriceContainer,
	#appBasketContainer {
		left: 3%;
		right: 3%;
		top: 4%;
		width: auto;
		max-width: none;
		margin: 0;
		max-height: 92vh;
		transform: none;
	}

	#appFastBuyContainer .column,
	#appFastBuyContainer .column:first-child {
		float: none;
		width: 100%;
		padding: 0 16px 12px;
	}

	#appFastBuyContainer .column:first-child {
		display: none; /* на mobile достаточно формы */
	}

	#appFastBuyContainer input[type="text"],
	#appFastBuyContainer input:not([type]),
	#appFastBuyContainer textarea,
	#requestPrice input[type="text"],
	#requestPrice input:not([type]),
	#requestPrice textarea,
	#appFastBuyContainer #fastBuyFormSubmit,
	#requestPrice #requestPriceSubmit {
		max-width: none;
		width: 100%;
	}

	#requestPrice .productColumn {
		display: none;
	}

	#requestPrice .formColumn {
		width: 100%;
		padding: 0 16px 16px;
		box-sizing: border-box;
	}
}
