/* Presentation hooks are inside AJAX fragments so refreshed content keeps its layout. */
.mp-dev .mp-stage2 .mp-favorites {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 280px));
	gap: 20px;
	align-items: stretch;
	margin: 24px 0 40px;
}
.mp-dev .mp-stage2 .mp-favorite-card {
	display: flex;
	flex-direction: column;
	min-width: 0;
	padding: 16px;
	border: 1px solid #e5e8ea;
	border-radius: 4px;
	background: #fff;
}
.mp-dev .mp-stage2 .mp-favorite-image {
	display: grid;
	place-items: center;
	height: 180px;
	background: #f4f5f4;
}
.mp-dev .mp-stage2 .mp-favorite-image img {
	display: block;
	width: 100%;
	height: 180px;
	padding: 12px;
	object-fit: contain;
}
.mp-dev .mp-stage2 .mp-favorite-name {
	margin: 16px 0;
	font:
		400 16px/1.5 Arial,
		sans-serif;
	overflow-wrap: anywhere;
}
.mp-dev .mp-stage2 .mp-favorite-price {
	margin: 0 0 16px;
	font-size: 20px;
	font-weight: 600;
}
.mp-dev .mp-stage2 .mp-favorite-remove {
	display: block;
	margin-top: auto;
	padding: 11px 8px;
	border: 1px solid #bacbdc;
	border-radius: 2px;
	text-align: center;
	color: #102a50;
	font-size: 14px;
	line-height: 1.5;
}
.mp-dev .mp-stage2 .mp-favorite-remove:hover {
	background: #f3f6f8;
}

.mp-dev .mp-stage2 .bx_compare .mp-compare-scroll {
	width: 100%;
	max-width: 100%;
	overflow: auto;
	border: 1px solid #e5e8ea;
	border-radius: 4px;
}
.mp-dev .mp-stage2 .bx_compare .mp-compare-table {
	width: max-content;
	min-width: 100%;
	border-collapse: separate;
	border-spacing: 0;
	table-layout: fixed;
	font:
		14px/1.5 Arial,
		sans-serif;
}
.mp-dev .mp-stage2 .bx_compare .mp-compare-table :is(td, th) {
	box-sizing: border-box;
	width: 240px;
	min-width: 240px;
	max-width: 240px;
	padding: 12px 16px !important;
	border: 0;
	border-right: 1px solid #e5e8ea;
	border-bottom: 1px solid #e5e8ea;
	vertical-align: top;
	text-align: left;
	overflow-wrap: anywhere;
	font-weight: 400;
}
.mp-dev .mp-stage2 .bx_compare .mp-compare-table tr > :first-child {
	position: sticky;
	left: 0;
	z-index: 2;
	width: 180px;
	min-width: 180px;
	max-width: 180px;
	background: #edf2f6 !important;
	color: #526071;
	font-weight: 600;
	box-shadow: 1px 0 #d6dfe7;
}
.mp-dev .mp-stage2 .bx_compare .mp-compare-table tbody tr:nth-child(even) td {
	background: #f8fafb;
}
.mp-dev .mp-stage2 .mp-compare-image {
	display: block;
	height: 120px;
	margin-bottom: 12px;
	background: #f6f7f7;
	text-align: center;
}
.mp-dev .mp-stage2 .bx_compare .mp-compare-image img {
	display: inline-block;
	width: 100%;
	max-width: 160px;
	height: 120px;
	padding: 8px;
	object-fit: contain;
}
.mp-dev .mp-stage2 .mp-compare-name {
	display: block;
	min-height: 66px;
	margin-bottom: 12px;
	font-size: 15px;
	line-height: 1.45;
}
.mp-dev .mp-stage2 .mp-compare-price {
	margin: 12px 0;
	font-size: 19px;
	font-weight: 600;
	white-space: nowrap;
}
.mp-dev .mp-stage2 .mp-compare-open {
	display: block;
	margin: 8px 0;
	min-height: 44px;
}
.mp-dev .mp-stage2 .mp-compare-remove {
	display: inline-block;
	padding: 10px 0;
	text-decoration: underline;
	text-underline-offset: 3px;
	color: #67717b;
}
.mp-dev .mp-stage2 .bx_compare .mp-compare-properties {
	padding: 16px;
	background: #f6f8fa;
}
.mp-dev .mp-stage2 .mp-compare-properties-title {
	margin: 0 0 12px;
	font-size: 16px;
	font-weight: 600;
}
.mp-dev .mp-stage2 .mp-compare-properties ul {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 20px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.mp-dev .mp-stage2 .mp-compare-properties li {
	float: none;
	width: auto;
	padding: 0;
	margin: 0;
}
.mp-dev .mp-stage2 .mp-compare-properties label {
	font-size: 14px;
	cursor: pointer;
}

.mp-dev .mp-stage2 .mp-favorite-actions {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 8px;
	margin-top: auto;
}
.mp-dev
	.mp-stage2
	.mp-favorite-actions
	> :is(.mp-favorite-buy, .mp-favorite-remove) {
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 0;
	min-height: 48px;
	margin: 0;
	padding: 10px 6px;
	border: 1px solid #bacbdc;
	border-radius: 2px;
	font:
		13px/1.4 Arial,
		sans-serif;
	text-align: center;
}
.mp-dev .mp-stage2 .mp-favorite-actions > .mp-favorite-buy {
	background: #102a50;
	border-color: #102a50;
	color: #fff;
	cursor: pointer;
}
.mp-dev .mp-stage2 .mp-favorite-actions > .mp-favorite-buy:hover {
	background: #1c3a5c;
}
.mp-dev .mp-stage2 .mp-favorite-actions > .mp-favorite-buy:disabled {
	opacity: 0.65;
	cursor: wait;
}
.mp-dev .mp-stage2 .mp-favorite-basket-status {
	margin: 8px 0 0;
	font-size: 12px;
	line-height: 1.5;
}
.mp-dev .mp-stage2 .mp-favorite-basket-status[hidden] {
	display: none;
}
/* Keep the existing tab nodes for Bitrix; respond to their AJAX visibility. */
@media (min-width: 992px) {
	#basket_form
		.bx_sort_container:not(
			:has(
				#basket_toolbar_button_delayed:not([style*="display:none"]):not(
						[style*="display: none"]
					),
				#basket_toolbar_button_subscribed:not(
						[style*="display:none"]
					):not([style*="display: none"]),
				#basket_toolbar_button_not_available:not(
						[style*="display:none"]
					):not([style*="display: none"])
			)
		) {
		display: none;
	}
	#basket_form
		.bx_ordercart_order_table_container
		> .mp-basket-table
		> tbody
		> tr
		> td.item {
		width: auto;
		min-width: 180px;
		overflow-wrap: anywhere;
	}
	#basket_form
		.bx_ordercart_order_table_container
		> .mp-basket-table
		> tbody
		> tr
		> td.itemphoto {
		width: 96px;
		min-width: 96px;
	}
	#basket_form
		.bx_ordercart_order_table_container
		> .mp-basket-table
		> tbody
		> tr
		> :is(td.price, td.custom) {
		width: 13%;
		min-width: 0;
	}
	#basket_form
		.bx_ordercart_order_table_container
		> .mp-basket-table
		> tbody
		> tr
		> td.control {
		width: 120px;
	}
	#basket_form
		.bx_ordercart_order_table_container
		> .mp-basket-table
		> :is(thead, tbody)
		> tr
		> td {
		padding: 14px 8px;
	}
	#basket_form .mp-basket-table .bx_ordercart_itemart {
		margin: 6px 0 0;
	}
}
#basket_form .bx_ordercart .mp-basket-coupon-entry {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 8px;
	align-items: stretch;
	max-width: 420px;
	white-space: normal;
}
#basket_form .bx_ordercart .mp-basket-coupon-entry > label {
	grid-column: 1 / -1;
	margin: 0;
	font-weight: 400;
}
#basket_form .bx_ordercart .mp-basket-coupon-entry > input {
	width: 100%;
	min-width: 0;
	max-width: none;
	margin: 0;
	box-sizing: border-box;
}
#basket_form .bx_ordercart .mp-basket-coupon-entry > .btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: auto;
	margin: 0;
	padding: 10px 12px;
	white-space: nowrap;
}
#basket_form .bx_ordercart .mp-basket-summary {
	display: grid;
	grid-template-columns: minmax(220px, 1fr) auto;
	gap: 12px 24px;
	align-items: end;
}
#basket_form .mp-basket-summary > .bx_ordercart_order_pay_right {
	grid-column: 1 / -1;
	justify-self: end;
	width: 100%;
	margin: 0;
}
#basket_form .mp-basket-summary > #coupons_block {
	min-width: 0;
	width: 100%;
	margin: 0;
}
#basket_form .mp-basket-summary > #coupons_block:not(:has(input)) {
	display: none;
}
#basket_form .mp-basket-summary > .bx_ordercart_order_pay_center {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	align-items: center;
	gap: 8px;
	width: auto;
	margin: 0;
	padding: 0;
	border: 0;
}
#basket_form .mp-basket-summary > .bx_ordercart_order_pay_center .btn {
	margin: 0;
}
#basket_form .mp-basket-summary > div[style*="clear"],
#basket_form
	.mp-basket-summary
	> .bx_ordercart_order_pay_right
	> div[style*="clear"] {
	display: none;
}
#basket_form .mp-basket-summary .bx_ordercart_order_sum {
	margin: 0;
}
#basket_form .mp-basket-table .mp-basket-properties,
#basket_form .mp-basket-table .mp-basket-article {
	color: #67717b;
	font-size: 12px;
	font-weight: 400;
	line-height: 1.5;
}
@media (max-width: 991px) {
	#basket_form .bx_ordercart .mp-basket-summary {
		grid-template-columns: minmax(0, 1fr);
		gap: 10px;
		padding: 14px;
	}
	#basket_form .mp-basket-summary > .bx_ordercart_order_pay_right {
		width: 100%;
	}
	#basket_form .mp-basket-summary .mp-basket-coupon-entry {
		max-width: none;
		gap: 6px;
	}
	#basket_form .mp-basket-summary > .bx_ordercart_order_pay_center {
		width: 100%;
	}
	#basket_form
		.bx_ordercart_order_table_container
		> .mp-basket-table
		> tbody
		> tr
		> td.item {
		display: block;
		grid-column: 2;
		grid-row: 1;
		align-self: start;
		padding: 0;
		min-height: 0;
	}
	#basket_form .mp-basket-table .bx_ordercart_itemtitle,
	#basket_form .mp-basket-table .bx_ordercart_itemtitle a {
		min-height: 0;
		height: auto;
		margin: 0;
	}
	#basket_form .mp-basket-table .bx_ordercart_itemart {
		min-height: 0;
		margin: 4px 0 0;
		padding: 0;
	}
}
/* Preserve the table, generated column order and every recalculation target ID. */
.mp-dev .mp-stage2 .bx_ordercart .mp-basket-table {
	width: 100%;
	border-collapse: collapse;
	border-spacing: 0;
}
.mp-dev .mp-stage2 .bx_ordercart .mp-basket-table > thead > tr > td {
	padding: 14px 12px;
	background: #edf2f6;
	color: #526071;
	font-size: 13px;
}
.mp-dev .mp-stage2 .bx_ordercart .mp-basket-table > tbody > tr > td {
	padding: 20px 12px;
	background: #fff;
	border-top: 0;
	border-bottom: 1px solid #e5e8ea;
	vertical-align: middle;
}
.mp-dev .mp-stage2 .bx_ordercart .mp-basket-table .itemphoto {
	width: 100px;
	min-width: 100px;
}
.mp-dev
	.mp-stage2
	.bx_ordercart
	.mp-basket-table
	.bx_ordercart_photo_container {
	width: 80px;
	height: 80px;
}
.mp-dev .mp-stage2 .mp-basket-properties {
	margin: 8px 0 0;
	color: #67717b;
	font-size: 12px;
	line-height: 1.6;
}
.mp-dev
	.mp-stage2
	.bx_ordercart
	.mp-basket-table
	:is(.current_price, .old_price, .summa_basket),
.mp-dev .mp-stage2 .bx_ordercart .mp-basket-totals td:last-child {
	white-space: nowrap !important;
	overflow-wrap: normal;
	word-break: normal;
}
.mp-dev
	.mp-stage2
	.bx_ordercart
	.mp-basket-table
	:is(.current_price, .summa_basket) {
	font-size: 17px;
}
.mp-dev .mp-stage2 .bx_ordercart .mp-basket-table .mp-basket-price {
	min-width: 130px;
}
.mp-dev
	.mp-stage2
	.bx_ordercart
	.mp-basket-table
	.mp-basket-value[data-column="SUM"] {
	min-width: 130px;
}
.mp-dev
	.mp-stage2
	.bx_ordercart
	.mp-basket-table
	.mp-basket-value:not([data-column="QUANTITY"]):not([data-column="SUM"])
	> span {
	display: block;
	color: #67717b;
	font-size: 12px;
}
.mp-dev .mp-stage2 .bx_ordercart .mp-basket-totals {
	border-collapse: collapse;
}
.mp-dev .mp-stage2 .bx_ordercart .mp-basket-totals tr:last-child td {
	border-top: 1px solid #d6dfe7;
	padding-top: 18px;
}
@media (max-width: 991px) {
	.mp-dev
		.mp-stage2
		.bx_ordercart
		.bx_ordercart_order_table_container
		> .mp-basket-table
		> tbody
		> tr
		> td.itemphoto {
		position: static;
		align-self: start;
		padding: 0;
	}
	.mp-dev
		.mp-stage2
		.bx_ordercart
		.bx_ordercart_order_table_container
		> .mp-basket-table
		> tbody
		> tr
		> td.item {
		padding: 0;
		align-self: start;
		min-height: 0;
	}
	.mp-dev
		.mp-stage2
		.bx_ordercart
		.mp-basket-table
		.bx_ordercart_photo_container {
		padding: 0;
		margin: 0;
	}
	.mp-dev .mp-stage2 .bx_ordercart .mp-basket-table .bx_ordercart_photo {
		position: absolute;
		inset: 0;
		width: 100%;
		height: 100%;
	}
	.mp-dev .mp-stage2 .bx_ordercart .mp-basket-table .bx_ordercart_itemtitle {
		min-height: 0;
		margin: 0 0 6px;
	}
	.mp-dev .mp-stage2 .bx_ordercart .mp-basket-table .bx_ordercart_itemart {
		min-height: 0;
		margin: 0;
	}
	.mp-dev .mp-stage2 .bx_ordercart .bx_ordercart_order_pay {
		gap: 12px;
		align-items: flex-start;
	}
	.mp-dev
		.mp-stage2
		.bx_ordercart
		.bx_ordercart_order_pay
		> div[style*="clear"],
	.mp-dev
		.mp-stage2
		.bx_ordercart
		.bx_ordercart_order_pay_right
		> div[style*="clear"] {
		display: none;
	}
	.mp-dev .mp-stage2 .bx_ordercart .bx_ordercart_order_sum {
		margin: 0;
	}
	.mp-dev .mp-stage2 .bx_ordercart .bx_ordercart_order_pay_center {
		margin: 0;
		padding-top: 12px;
	}
	.mp-dev .mp-stage2 .bx_ordercart .mp-basket-table > tbody > tr {
		grid-template-columns: 88px minmax(0, 1fr);
		background: #fff;
	}
	.mp-dev .mp-stage2 .bx_ordercart .mp-basket-table > tbody > tr > td {
		padding: 8px 0;
		border: 0;
		min-width: 0;
	}
	.mp-dev
		.mp-stage2
		.bx_ordercart
		.mp-basket-table
		> tbody
		> tr
		> td.itemphoto {
		width: 88px;
	}
	.mp-dev
		.mp-stage2
		.bx_ordercart
		.mp-basket-table
		> tbody
		> tr
		> td.mp-basket-price {
		grid-column: 1 / -1;
	}
	.mp-dev .mp-stage2 .bx_ordercart .mp-basket-table .mp-basket-value > span {
		display: block;
		color: #67717b;
		font-size: 12px;
	}
}
@media (max-width: 999px) {
	body.mp-dev.mp-cart-page .lb-widget-panel.lb-widget-panel--position-right {
		bottom: calc(76px + env(safe-area-inset-bottom)) !important;
	}
}
@media (max-width: 600px) {
	.mp-dev .mp-stage2 .mp-favorites {
		grid-template-columns: minmax(0, 340px);
		justify-content: center;
	}
	.mp-dev .mp-stage2 .bx_compare .mp-compare-table :is(td, th) {
		width: 200px;
		min-width: 200px;
		max-width: 200px;
		padding: 10px 12px !important;
	}
	.mp-dev .mp-stage2 .bx_compare .mp-compare-table tr > :first-child {
		width: 112px;
		min-width: 112px;
		max-width: 112px;
		font-size: 12px;
	}
	.mp-dev .mp-stage2 .bx_ordercart .mp-basket-totals .fwb {
		font-size: 20px;
	}
}

/* Final basket column layout: scoped IDs also isolate legacy touch rules. */
#basket_form .bx_sort_container > span {
	display: none;
}
#basket_form
	.bx_sort_container:not(
		:has(
			#basket_toolbar_button_delayed:not([style*="display:none"]):not(
					[style*="display: none"]
				),
			#basket_toolbar_button_subscribed:not([style*="display:none"]):not(
					[style*="display: none"]
				),
			#basket_toolbar_button_not_available:not(
					[style*="display:none"]
				):not([style*="display: none"])
		)
	) {
	display: none;
}
#basket_form #basket_items .counter {
	display: table;
	width: auto;
	border-collapse: collapse;
}
#basket_form #basket_items .counter tbody {
	display: table-row-group;
}
#basket_form #basket_items .counter tr {
	display: table-row;
	margin: 0;
	padding: 0;
	border: 0;
}
#basket_form #basket_items .counter td {
	display: flex;
	align-items: center;
	gap: 0;
	width: auto;
	padding: 0;
	border: 0;
}
#basket_form #basket_items .counter :is(.minus, .plus) {
	display: inline-flex !important;
	position: static;
	align-items: center;
	justify-content: center;
	flex: 0 0 32px;
	width: 32px;
	height: 40px;
	margin: 0 !important;
	padding: 0;
	background: #102a50;
	color: #fff;
	text-indent: 0;
	font: 20px/1 Arial;
	visibility: visible;
}
#basket_form #basket_items .counter :is(.minus, .plus) span {
	display: inline !important;
	color: inherit;
}
#basket_form #basket_items .counter input {
	display: block;
	width: 44px;
	min-width: 0;
	height: 40px;
	margin: 0;
	padding: 0 2px;
	text-align: center;
	box-sizing: border-box;
}
#basket_form
	.mp-basket-summary
	.bx_ordercart_order_pay_center
	a[onclick="checkOut();"] {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	visibility: visible;
	min-height: 48px;
}
@media (min-width: 992px) {
	#basket_form #basket_items {
		display: table;
		table-layout: fixed;
		width: 100%;
	}
	#basket_form #basket_items > thead {
		display: table-header-group;
	}
	#basket_form #basket_items > :is(thead, tbody) > tr > td {
		width: auto;
		min-width: 0;
		padding: 14px 8px;
		text-align: left;
		vertical-align: middle;
		overflow-wrap: anywhere;
	}
	#basket_form
		#basket_items
		> tbody
		> tr
		> :is(.custom, .mp-basket-article)
		> span {
		display: none;
	}
	#basket_form #basket_items .mp-basket-article {
		font-size: 17px;
		font-weight: 600;
		color: #102a50;
	}
	#basket_form #basket_items .bx_ordercart_photo_container {
		width: 100%;
		max-width: 80px;
		height: 80px;
	}
	#basket_form #basket_items .centered {
		margin: 0;
		text-align: left;
	}
}
@media (max-width: 991px) {
	#basket_form #basket_items > :is(thead, colgroup) {
		display: none !important;
	}
	#basket_form #basket_items > tbody > tr {
		display: grid;
		grid-template-columns: repeat(4, minmax(0, 1fr));
		gap: 10px 8px;
		padding: 12px;
	}
	#basket_form #basket_items > tbody > tr > td {
		display: block;
		position: static;
		grid-column: span 2;
		grid-row: auto;
		order: 0;
		width: auto;
		min-width: 0;
		margin: 0;
		padding: 0;
		text-align: left;
	}
	#basket_form #basket_items > tbody > tr > td.margin {
		display: none;
	}
	#basket_form #basket_items > tbody > tr > td.itemphoto {
		grid-column: 1;
		grid-row: 1;
		width: auto;
	}
	#basket_form #basket_items > tbody > tr > td.item {
		grid-column: 2 / -1;
		grid-row: 1;
	}
	#basket_form #basket_items > tbody > tr > td.control {
		grid-column: 1 / -1;
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 10px;
	}
	#basket_form #basket_items > tbody > tr > td.control > a {
		display: flex;
		align-items: center;
		justify-content: center;
		gap: 5px;
		width: 100%;
		min-width: 0;
		min-height: 44px;
		margin: 0;
		padding: 10px 6px;
		box-sizing: border-box;
	}
	#basket_form #basket_items > tbody > tr > td.control > a:only-of-type {
		grid-column: 1 / -1;
	}
	#basket_form #basket_items > tbody > tr > td.control > br {
		display: none;
	}
	#basket_form #basket_items .bx_ordercart_photo_container {
		width: 100%;
		max-width: 72px;
		height: 72px;
	}
	#basket_form #basket_items .bx_ordercart_itemtitle {
		margin: 0;
		min-height: 0;
	}
	#basket_form #basket_items .bx_ordercart_itemart:empty {
		display: none;
	}
	#basket_form #basket_items > tbody > tr > td.custom > span {
		display: block;
		margin: 0 0 4px;
		color: #67717b;
		font-size: 12px;
	}
	#basket_form #basket_items .mp-basket-article > div {
		font-size: 17px;
		color: #102a50;
	}
	#basket_form #basket_items .centered {
		margin: 0;
	}
	#basket_form .mp-basket-summary {
		min-width: 0;
	}
	#basket_form .mp-basket-summary .bx_ordercart_order_pay_center {
		display: flex;
		min-width: 0;
	}
	#basket_form .mp-basket-summary .bx_ordercart_order_pay_center .btn {
		display: flex;
		width: 100%;
		margin: 0;
	}
}
