/* MarketSV — UX: минимальная сумма заказа + корзина в липкой плашке
   Добавлено 31.07.2026 (СеоПорт). Не входит в поставку темы oct_ultrastore. */

/* ==========================================================================
   1. Корзина в липкой навигационной плашке (.menu-row)
   ========================================================================== */

.menu-row > .container {
	position: relative;
}

#us-sticky-cart {
	display: none;
	position: absolute;
	top: 0;
	right: 15px;
	height: 100%;
	align-items: center;
	padding: 0 4px 0 14px;
	cursor: pointer;
	color: #fff;
	white-space: nowrap;
	z-index: 5;
}

.menu-row.us-stuck #us-sticky-cart {
	display: flex;
}

#us-sticky-cart .us-sticky-cart-btn {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	background: none;
	border: 0;
	padding: 0 12px 0 0;
	min-width: 44px;
	min-height: 44px;
}

#us-sticky-cart .us-sticky-cart-btn img,
#us-sticky-cart .us-sticky-cart-btn svg {
	width: 30px;
	height: 26px;
	filter: brightness(0) invert(1);
}

#us-sticky-cart .header-cart-index {
	position: absolute;
	top: 2px;
	right: 4px;
	min-width: 18px;
	height: 18px;
	padding: 0 4px;
	border-radius: 9px;
	background: #71be00;
	color: #fff;
	font-size: 11px;
	line-height: 18px;
	text-align: center;
	font-weight: 600;
}

#us-sticky-cart .us-sticky-cart-content {
	display: flex;
	flex-direction: column;
	line-height: 1.2;
}

#us-sticky-cart .us-cart-text {
	margin: 0;
	font-size: 14px;
	font-weight: 700;
	color: #fff;
}

#us-sticky-cart .us-sticky-cart-link {
	font-size: 12px;
	color: #a5e05a;
	text-decoration: underline;
}

#us-sticky-cart:hover .us-sticky-cart-link {
	color: #fff;
}

@media (max-width: 991px) {
	#us-sticky-cart,
	.menu-row.us-stuck #us-sticky-cart {
		display: none;
	}
}

/* ==========================================================================
   2. Предупреждение о минимальной сумме заказа
   ========================================================================== */

.us-minorder-alert {
	display: flex;
	align-items: flex-start;
	gap: 14px;
	margin: 0 0 18px;
	padding: 14px 16px;
	border: 1px solid #f1b0b0;
	border-radius: 10px;
	background: #fdeded;
	text-align: left;
}

.us-minorder-alert-icon {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: #f9d6d6;
	color: #d24a43;
	font-size: 18px;
}

.us-minorder-alert-body {
	flex: 1 1 auto;
	min-width: 0;
}

.us-minorder-alert-title {
	margin: 0 0 4px;
	font-size: 16px;
	font-weight: 700;
	color: #2c2c2c;
	line-height: 1.3;
}

.us-minorder-alert-text {
	margin: 0;
	font-size: 13px;
	color: #6b6b6b;
	line-height: 1.4;
}

/* Плашки «сейчас в корзине» / «осталось добрать» */
.us-minorder-progress {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 0 0 18px;
}

.us-minorder-progress-item {
	flex: 1 1 45%;
	min-width: 150px;
	padding: 10px 14px;
	border: 1px solid #e7e7e7;
	border-radius: 10px;
	background: #fafafa;
	text-align: left;
}

.us-minorder-progress-label {
	display: block;
	font-size: 12px;
	color: #6b6b6b;
	line-height: 1.3;
}

.us-minorder-progress-value {
	display: block;
	margin-top: 2px;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.2;
}

.us-minorder-progress-item--current .us-minorder-progress-value {
	color: #2c2c2c;
}

.us-minorder-progress-item--left .us-minorder-progress-value {
	color: #d24a43;
}

/* Неактивная кнопка оформления */
.us-btn-disabled,
a.us-btn-disabled,
button.us-btn-disabled {
	position: relative;
	background-color: #e4e4e4 !important;
	border-color: #e4e4e4 !important;
	color: #9a9a9a !important;
	cursor: not-allowed !important;
	pointer-events: none !important;
	box-shadow: none !important;
	opacity: 1;
}

.us-btn-disabled i {
	margin-right: 6px;
}

/* Подпись под неактивной кнопкой */
.us-minorder-note {
	display: block;
	margin-top: 8px;
	font-size: 13px;
	font-weight: 600;
	color: #d24a43;
	line-height: 1.35;
	text-align: center;
}

/* ==========================================================================
   3. Точечные накладки под конкретные экраны
   ========================================================================== */

/* Попап-корзина */
#us-cart-modal .us-minorder-alert,
#us-cart-modal .us-minorder-progress {
	margin-left: 0;
	margin-right: 0;
}

/* Модалка корзины центрируется по вертикали (.modal-dialog-centered).
   Когда содержимое выше экрана, верх (шапка «Корзина» и предупреждение)
   уезжает за границу экрана и не доступен прокруткой. Прижимаем диалог
   к верху и включаем прокрутку внутри тела модалки. */
#us-cart-modal .modal-dialog,
#us-cart-modal .modal-dialog.modal-dialog-centered {
	align-items: flex-start;
	margin: 0.5rem auto;
	max-height: none;
}

#us-cart-modal .modal-content {
	display: flex;
	flex-direction: column;
	max-height: calc(100vh - 1rem);
}

#us-cart-modal .modal-header {
	flex: 0 0 auto;
}

#us-cart-modal .modal-body {
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}

/* На iOS 100vh больше видимой области из-за адресной строки */
@supports (height: 100dvh) {
	#us-cart-modal .modal-content {
		max-height: calc(100dvh - 1rem);
	}
}

#us-cart-modal .us-minorder-note {
	max-width: 260px;
	margin-left: auto;
	margin-right: auto;
}

/* Страница корзины */
.cart-btn-group .us-minorder-note {
	text-align: right;
}

/* Оформление заказа */
.oct-fastorder-payment .us-minorder-note {
	text-align: left;
}

@media (max-width: 575px) {
	.us-minorder-progress-item {
		flex: 1 1 100%;
	}

	.us-minorder-alert {
		gap: 10px;
		padding: 12px;
	}

	.us-minorder-alert-icon {
		width: 34px;
		height: 34px;
		font-size: 16px;
	}

	.us-minorder-alert-title {
		font-size: 15px;
	}

	.cart-btn-group .us-minorder-note {
		text-align: center;
	}

	/* компактнее, чтобы блок занимал меньше высоты на телефоне */
	.us-minorder-alert,
	.us-minorder-progress {
		margin-bottom: 12px;
	}

	.us-minorder-progress {
		gap: 8px;
	}

	.us-minorder-progress-item {
		padding: 8px 12px;
	}

	.us-minorder-progress-value {
		font-size: 17px;
	}
}
