/* Compact premium mini-cart modal — single scroll on item list only */

.ec-cart-added-overlay {
	position: fixed;
	inset: 0;
	z-index: 100050;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	box-sizing: border-box;
	visibility: hidden;
	opacity: 0;
	transition: opacity 0.28s ease, visibility 0.28s ease;
}

.ec-cart-added-overlay.is-open {
	visibility: visible;
	opacity: 1;
}

.ec-cart-added-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(8, 8, 12, 0.72);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	cursor: pointer;
}

.ec-cart-added-dialog {
	position: relative;
	z-index: 1;
	width: min(820px, calc(100vw - 48px));
	max-width: calc(100vw - 48px);
	max-height: calc(100vh - 56px);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	background: linear-gradient(155deg, rgba(36, 36, 40, 0.96) 0%, rgba(22, 22, 26, 0.94) 100%);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 12px;
	box-shadow:
		0 20px 48px rgba(0, 0, 0, 0.5),
		0 0 0 1px rgba(255, 255, 255, 0.04) inset;
	backdrop-filter: blur(18px);
	-webkit-backdrop-filter: blur(18px);
	color: #e8e8ea;
	font-family: "Montserrat-Regular", Montserrat, sans-serif;
}

.ec-cart-added-close {
	position: absolute;
	top: 8px;
	right: 8px;
	z-index: 3;
	width: 36px;
	height: 36px;
	padding: 0;
	border: none;
	background: transparent;
	color: rgba(255, 255, 255, 0.45);
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	border-radius: 8px;
	transition: color 0.2s ease, background 0.2s ease;
}

.ec-cart-added-close:hover,
.ec-cart-added-close:focus {
	color: #fff;
	background: rgba(255, 255, 255, 0.08);
	outline: none;
}

/* Inner shell: no vertical scroll (only #ec-cart-scroll scrolls) */
.ec-cart-added-dialog__inner {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	min-height: 0;
	max-height: calc(100vh - 56px);
	overflow: hidden;
	padding: 14px 16px 14px;
	box-sizing: border-box;
}

.ec-cart-dialog__stack {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	min-height: 0;
	overflow: hidden;
}

.ec-cart-dialog__head {
	flex: 0 0 auto;
	padding-right: 32px;
	margin-bottom: 8px;
}

.ec-cart-added-dialog h2 {
	margin: 0;
	font-family: "Montserrat-SemiBold", Montserrat, sans-serif;
	font-size: 16px;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #fff;
}

.ec-cart-dialog__messages {
	flex: 0 0 auto;
}

.ec-cart-modal-msg {
	margin: 0 0 8px;
	padding: 6px 10px;
	border-radius: 6px;
	font-size: 12px;
	line-height: 1.35;
}

.ec-cart-modal-msg--ok {
	background: rgba(46, 160, 67, 0.18);
	border: 1px solid rgba(46, 160, 67, 0.3);
	color: #b6f0c2;
}

.ec-cart-modal-msg--err {
	background: rgba(220, 53, 69, 0.12);
	border: 1px solid rgba(220, 53, 69, 0.3);
	color: #ffb3bd;
}

/* ONLY scrollable region — ~3 compact lines visible */
.ec-cart-scroll {
	flex: 1 1 auto;
	min-height: 300px;
	max-height: min(38vh, 320px);
	overflow-y: auto;
	overflow-x: hidden;
	-webkit-overflow-scrolling: touch;
	margin: 0 -4px 10px 0;
	padding-right: 4px;
}

.ec-cart-items {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.ec-cart-added-empty {
	margin: 12px 0;
	font-size: 13px;
	color: rgba(255, 255, 255, 0.5);
}

/* Compact cart line */
.ec-cart-item {
	display: grid;
	grid-template-columns: 88px minmax(0, 1fr) minmax(112px, 140px);
	gap: 10px;
	align-items: start;
	padding: 8px 10px;
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.04);
	border: 1px solid rgba(255, 255, 255, 0.06);
	box-sizing: border-box;
}

.ec-cart-item__link {
	grid-column: 1 / 3;
	display: flex;
	flex-direction: row;
	align-items: flex-start;
	gap: 10px;
	min-width: 0;
	color: inherit;
	text-decoration: none;
	border-radius: 6px;
	outline: none;
}

.ec-cart-item__link:hover .ec-cart-item__name {
	color: #f0d78c;
}

.ec-cart-item__link:focus-visible {
	box-shadow: 0 0 0 2px rgba(232, 197, 71, 0.45);
}

.ec-cart-item__link--static {
	cursor: default;
	pointer-events: none;
}

.ec-cart-item__link--static:hover .ec-cart-item__name {
	color: #fff;
}

.ec-cart-item__thumb {
	flex-shrink: 0;
	width: 88px;
	height: 88px;
	border-radius: 8px;
	overflow: hidden;
	background: rgba(0, 0, 0, 0.35);
}

.ec-cart-item__img {
	width: 88px;
	height: 88px;
	object-fit: cover;
	display: block;
}

.ec-cart-item__mid {
	min-width: 0;
	flex: 1;
}

.ec-cart-item__name {
	font-family: "Montserrat-SemiBold", Montserrat, sans-serif;
	font-size: 14px;
	line-height: 1.3;
	color: #fff;
	margin: 0 0 4px;
}

.ec-cart-item__model {
	font-size: 10px;
	color: rgba(255, 255, 255, 0.4);
	margin: 0 0 4px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.ec-cart-item__opts {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 4px 0;
	font-size: 11px;
	line-height: 1.4;
	color: rgba(255, 255, 255, 0.62);
}

.ec-cart-opt-sep {
	color: rgba(255, 255, 255, 0.28);
	margin: 0 5px;
	font-weight: 600;
}

.ec-cart-opt-chip__k {
	font-weight: 600;
	color: rgba(255, 255, 255, 0.68);
}

.ec-cart-opt-chip__c {
	opacity: 0.5;
	margin: 0 1px;
}

.ec-cart-opt-chip__v {
	color: rgba(255, 255, 255, 0.78);
}

.ec-cart-item__meta {
	font-size: 10px;
	color: rgba(255, 255, 255, 0.5);
	margin: 0;
	line-height: 1.35;
}

.ec-cart-item__right {
	grid-column: 3;
	grid-row: 1;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 5px;
	text-align: right;
}

.ec-cart-stepper {
	display: inline-flex;
	align-items: center;
	border-radius: 6px;
	overflow: hidden;
	border: 1px solid rgba(255, 255, 255, 0.12);
	background: rgba(0, 0, 0, 0.35);
}

.ec-cart-qty-dec,
.ec-cart-qty-inc {
	width: 28px;
	height: 28px;
	padding: 0;
	border: none;
	background: rgba(255, 255, 255, 0.06);
	color: #fff;
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
}

.ec-cart-qty-dec:hover,
.ec-cart-qty-inc:hover {
	background: rgba(255, 255, 255, 0.12);
}

.ec-cart-item .ec-cart-qty {
	width: 36px;
	height: 28px;
	padding: 0 2px;
	border: none;
	border-left: 1px solid rgba(255, 255, 255, 0.1);
	border-right: 1px solid rgba(255, 255, 255, 0.1);
	background: transparent;
	color: #fff;
	font-size: 13px;
	text-align: center;
	-moz-appearance: textfield;
}

.ec-cart-item .ec-cart-qty::-webkit-outer-spin-button,
.ec-cart-item .ec-cart-qty::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.ec-cart-remove {
	width: 30px;
	height: 30px;
	padding: 0;
	border: none;
	border-radius: 6px;
	background: rgba(255, 255, 255, 0.06);
	color: rgba(255, 255, 255, 0.55);
	cursor: pointer;
	line-height: 1;
}

.ec-cart-remove:hover {
	color: #ff6b6b;
	background: rgba(255, 80, 80, 0.12);
}

.ec-cart-voucher-badge {
	font-size: 12px;
	color: rgba(255, 255, 255, 0.45);
}

.ec-cart-item__unit {
	font-size: 10px;
	color: rgba(255, 255, 255, 0.45);
}

.ec-cart-item__sub {
	font-size: 12px;
	font-family: "Montserrat-SemiBold", Montserrat, sans-serif;
	color: #fff;
}

/* Footer: coupon, totals, CTA, related — no scroll */
.ec-cart-dialog__footer {
	flex: 0 0 auto;
	overflow: visible;
}

.ec-cart-dialog__footer-compact {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(148px, 34%);
	gap: 12px 16px;
	align-items: start;
	margin-bottom: 10px;
}

.ec-cart-dialog__footer-compact--single {
	grid-template-columns: 1fr;
}

.ec-cart-dialog__footer-left {
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.ec-cart-dialog__footer-right {
	min-width: 0;
	padding-top: 2px;
}

.ec-cart-added-coupon {
	margin: 0;
	padding: 0;
	border: none;
	background: transparent;
}

.ec-cart-added-credit {
	margin: 0;
	padding: 0;
	border: none;
	background: transparent;
}

.ec-cart-added-credit__hint {
	margin: 0 0 4px;
	font-size: 11px;
	line-height: 1.35;
	color: rgba(255, 255, 255, 0.55);
}

.ec-cart-added-coupon__row {
	display: flex;
	flex-wrap: nowrap;
	gap: 0;
	align-items: stretch;
	border-radius: 8px;
	overflow: hidden;
	border: 1px solid rgba(255, 255, 255, 0.12);
	background: rgba(0, 0, 0, 0.28);
}

.ec-cart-added-credit__row {
	margin-top: 0;
}

.ec-cart-coupon-input,
.ec-cart-credit-input {
	flex: 1 1 auto;
	min-width: 0;
	min-height: 36px;
	height: 36px;
	padding: 6px 12px;
	font-size: 13px;
	background: transparent;
	border: none;
	border-radius: 0;
	color: #fff;
	box-shadow: none;
}

.ec-cart-coupon-input:focus,
.ec-cart-credit-input:focus {
	outline: none;
	box-shadow: inset 0 0 0 1px rgba(232, 197, 71, 0.35);
}

.ec-cart-added-coupon__row .ec-cart-coupon-apply,
.ec-cart-added-coupon__row .ec-cart-credit-apply {
	flex: 0 0 auto;
	min-width: 88px;
	min-height: 36px;
	height: 36px;
	padding: 0 16px;
	font-size: 11px;
	font-family: "Montserrat-SemiBold", Montserrat, sans-serif;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	border-radius: 0;
	border: none;
	border-left: 1px solid rgba(255, 255, 255, 0.12);
	background: linear-gradient(180deg, rgba(212, 175, 55, 0.22) 0%, rgba(180, 145, 40, 0.18) 100%);
	color: #fff;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	line-height: 1.2;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
	transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.ec-cart-added-coupon__row .ec-cart-coupon-apply:hover,
.ec-cart-added-coupon__row .ec-cart-credit-apply:hover {
	background: linear-gradient(180deg, rgba(232, 197, 71, 0.35) 0%, rgba(200, 165, 50, 0.28) 100%);
	color: #fff;
}

.ec-cart-added-coupon__row .ec-cart-coupon-apply:focus,
.ec-cart-added-coupon__row .ec-cart-credit-apply:focus {
	outline: none;
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, 0.12),
		0 0 0 2px rgba(232, 197, 71, 0.45);
}

.ec-cart-added-totals {
	margin: 0;
	padding: 6px 10px;
	list-style: none;
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 8px;
	background: rgba(0, 0, 0, 0.2);
}

.ec-cart-added-totals li {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 10px;
	padding: 2px 0;
	font-size: 12px;
	line-height: 1.25;
	border-bottom: none;
}

.ec-cart-added-totals li + li {
	margin-top: 1px;
}

.ec-cart-added-totals__grand {
	font-family: "Montserrat-SemiBold", Montserrat, sans-serif;
	font-size: 13px;
	padding-top: 4px;
	margin-top: 4px;
	border-top: 1px solid rgba(255, 255, 255, 0.08);
	color: #fff;
}

.ec-cart-added-totals__label {
	color: rgba(255, 255, 255, 0.52);
}

.ec-cart-added-totals__value {
	color: #fff;
	text-align: right;
	white-space: nowrap;
	margin-left: 10px;
}

.ec-cart-added-totals__cashback-val {
	color: #e8c547;
	font-family: "Montserrat-SemiBold", Montserrat, sans-serif;
}

.ec-cart-added-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 6px;
	align-items: stretch;
}

.ec-cart-added-actions .btn {
	flex: 1 1 160px;
	min-height: 40px;
	max-height: 40px;
	padding: 0 14px;
	border-radius: 8px;
	font-family: "Montserrat-SemiBold", Montserrat, sans-serif;
	text-transform: uppercase;
	font-size: 11px;
	letter-spacing: 0.06em;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	line-height: 1.2;
	box-sizing: border-box;
}

.ec-cart-added-actions .ec-cart-btn-ghost {
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid rgba(255, 255, 255, 0.14);
	color: #fff;
}

.ec-cart-added-actions .ec-cart-btn-ghost:hover {
	background: rgba(255, 255, 255, 0.12);
	color: #fff;
}

.ec-cart-added-related {
	margin-top: 4px;
	padding-top: 10px;
	border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.ec-cart-added-related h3 {
	margin: 0 0 10px;
	font-family: "Montserrat-SemiBold", Montserrat, sans-serif;
	font-size: 11px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.5);
}

.ec-cart-added-related__grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 10px;
}

.ec-cart-added-related__card {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	text-decoration: none;
	color: inherit;
	border-radius: 10px;
	padding: 10px 6px 8px;
	background: rgba(0, 0, 0, 0.22);
	border: 1px solid rgba(255, 255, 255, 0.07);
	transition: border-color 0.2s ease, background 0.2s ease;
	min-height: 0;
}

.ec-cart-added-related__card:hover {
	border-color: rgba(255, 255, 255, 0.16);
	background: rgba(255, 255, 255, 0.04);
	color: inherit;
	text-decoration: none;
}

.ec-cart-added-related__card img {
	width: 80px;
	height: 80px;
	object-fit: cover;
	border-radius: 8px;
	display: block;
}

.ec-cart-added-related__cap {
	padding: 8px 2px 0;
	width: 100%;
	min-width: 0;
}

.ec-cart-related__name {
	font-size: 11px;
	line-height: 1.3;
	margin: 0 0 4px;
	max-height: 3.9em;
	overflow: hidden;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	color: rgba(255, 255, 255, 0.92);
	font-family: "Montserrat-SemiBold", Montserrat, sans-serif;
}

.ec-cart-added-related__price {
	font-size: 11px;
	margin: 0;
	color: rgba(255, 255, 255, 0.7);
}

.ec-cart-added-related__price .price-new {
	color: #d4af37;
}

.ec-cart-added-related__price .price-old {
	text-decoration: line-through;
	opacity: 0.45;
	font-size: 10px;
	margin-left: 4px;
}

body.ec-cart-added-modal-open {
	overflow: hidden;
}

@media (max-width: 600px) {
	.ec-cart-item {
		grid-template-columns: 72px minmax(0, 1fr) 100px;
		gap: 8px;
		padding: 8px;
	}

	.ec-cart-item__thumb,
	.ec-cart-item__img {
		width: 72px;
		height: 72px;
	}

	.ec-cart-item__name {
		font-size: 13px;
	}

	.ec-cart-dialog__footer-compact {
		grid-template-columns: 1fr;
	}

	.ec-cart-dialog__footer-right {
		padding-top: 0;
	}

	.ec-cart-added-related__grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.ec-cart-added-related__card img {
		width: 72px;
		height: 72px;
	}

	.ec-cart-scroll {
		min-height: 260px;
		max-height: min(42vh, 300px);
	}
}
