/*
 * Mr.Volt Industry — cart page (Figma «mr-cart», desktop 1440).
 * Loaded only on the cart page together with catalog.css (title band, features strip).
 */

.mv-cart-page {
	--mvc-text: #333333;
	--mvc-muted: #637381;
	--mvc-subtle: #9ba1ac;
	--mvc-border: #e4e7ec;
	--mvc-surface: #ffffff;
	--mvc-surface-band: #f5f7fa;
	--mvc-accent: #09b1e7;
	--mvc-accent-hover: #0798c7;
}

.site-main.mv-cart-page {
	max-width: none;
	padding: 0;
	background-color: #ffffff;
}

.mv-cart-body {
	padding-block: 48px 64px;
}

.mv-cart-body .woocommerce-notices-wrapper:not(:empty) {
	margin-bottom: 24px;
}

.mv-cart {
	margin: 0;
}

.mv-cart__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 360px;
	align-items: start;
	gap: 40px;
}

/* Items
   ========================================================================== */

.mv-cart__items {
	min-width: 0;
}

.mv-cart__head {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 120px 100px;
	gap: 16px;
	padding-bottom: 16px;
	border-bottom: 1px solid var(--mvc-border);
	font-size: var(--mv-fs-12);
	font-weight: 600;
	line-height: 16px;
	letter-spacing: 0.4px;
	text-transform: uppercase;
	color: var(--mvc-subtle);
}

.mv-cart__head span:nth-child(2) {
	text-align: center;
}

.mv-cart__head span:nth-child(3) {
	text-align: right;
}

.mv-cart__list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.mv-cart-row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 120px 100px;
	align-items: center;
	gap: 16px;
	padding-block: 20px;
	border-bottom: 1px solid var(--mvc-border);
}

.mv-cart-row__product {
	display: flex;
	align-items: center;
	gap: 16px;
	min-width: 0;
}

.mv-cart-row__thumb {
	flex: none;
	width: 64px;
	height: 64px;
	overflow: hidden;
	border: 1px solid var(--mvc-border);
	border-radius: var(--mv-radius-md);
	background-color: #f8f9fb;
}

.mv-cart-row__thumb a {
	display: block;
	height: 100%;
}

.mv-cart-row__thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.mv-cart-row__info {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

.mv-cart-row__info > p {
	margin: 0;
}

.mv-cart-row__name {
	font-size: var(--mv-fs-14);
	font-weight: 700;
	line-height: 18px;
	color: var(--mvc-text);
}

.mv-cart-row__name a {
	color: inherit;
	text-decoration: none;
}

.mv-cart-row__name a:hover {
	color: var(--mvc-accent-hover);
}

.mv-cart-row__meta {
	font-size: var(--mv-fs-12);
	line-height: 16px;
	color: var(--mvc-muted);
}

.mv-cart-row__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 14px;
}

.mv-cart-row__actions .product-remove {
	display: contents;
}

/* Remove link: beats woocommerce-general a.remove (round red ×). */
.woocommerce .mv-cart-row a.remove.mv-cart-row__action,
.mv-cart-row__action.mvwl-button {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	width: auto;
	height: auto;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
	font-family: inherit;
	font-size: var(--mv-fs-12);
	font-weight: 400;
	line-height: 16px;
	text-align: left;
	text-decoration: none;
	color: var(--mvc-muted) !important;
	cursor: pointer;
}

.woocommerce .mv-cart-row a.remove.mv-cart-row__action:hover {
	background: none;
	color: #e02424 !important;
}

.mv-cart-row__action.mvwl-button:hover,
.mv-cart-row__action.mvwl-button.is-active {
	color: #ef4444 !important;
}

.mv-cart-row__action .mv-icon {
	flex: none;
	width: 14px;
	height: 14px;
}

.mv-cart-row__action:hover .mv-icon path {
	stroke: currentColor;
}

.mv-cart-row__wishlist.is-active .mv-icon path {
	fill: #ef4444;
	stroke: #ef4444;
}

/* Quantity pill */
.mv-cart-row__qty {
	display: flex;
	justify-content: center;
}

.mv-qty {
	display: flex;
	align-items: stretch;
	height: 40px;
	overflow: hidden;
	border: 1.5px solid var(--mvc-border);
	border-radius: 10px;
	background-color: #ffffff;
}

.mv-qty__btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	padding: 0;
	border: 0;
	background: none;
	cursor: pointer;
	transition: background-color var(--mv-transition);
}

.mv-qty__btn:hover {
	background-color: #f3f4f6;
}

.mv-qty__btn:disabled {
	cursor: default;
	opacity: 0.4;
}

.mv-qty__btn .mv-icon {
	width: 14px;
	height: 14px;
}

.mv-qty .quantity {
	display: flex;
	margin: 0;
	border-inline: 1px solid var(--mvc-border);
}

.mv-qty.is-fixed .quantity {
	border: 0;
}

.woocommerce .mv-qty .quantity .qty,
.mv-qty .qty {
	width: 40px;
	height: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
	font-family: inherit;
	font-size: var(--mv-fs-15);
	font-weight: 700;
	text-align: center;
	color: var(--mvc-text);
	-moz-appearance: textfield;
}

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

.mv-qty .qty:focus-visible {
	outline: 2px solid var(--mv-color-focus);
	outline-offset: -2px;
}

.mv-cart-row__price {
	margin: 0;
	font-size: var(--mv-fs-15);
	font-weight: 700;
	line-height: 20px;
	text-align: right;
	white-space: nowrap;
	color: var(--mvc-text);
}

/* «Оновити кошик» — visible only without JS */
.mv-cart__update {
	padding-top: 16px;
}

.mv-cart.is-enhanced .mv-cart__update {
	padding: 0;
}

.mv-cart.is-enhanced .mv-cart__update-btn {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

.mv-cart__update-btn {
	min-height: 40px;
	padding: 8px 16px;
	border: 1px solid var(--mvc-border);
	border-radius: 10px;
	background-color: #ffffff;
	font-family: inherit;
	font-size: var(--mv-fs-14);
	font-weight: 600;
	color: var(--mvc-text);
	cursor: pointer;
}

/* Summary
   ========================================================================== */

.mv-cart__summary {
	position: sticky;
	top: calc(var(--mv-header-offset) + 24px);
}

.mv-cart-summary {
	display: flex;
	flex-direction: column;
	gap: 18px;
	padding: 23px;
	border: 1px solid var(--mvc-border);
	border-radius: var(--mv-radius-lg);
	background-color: #ffffff;
}

.mv-cart-summary__title {
	margin: 0;
	font-size: 19px;
	font-weight: 800;
	line-height: 25px;
	color: var(--mvc-text);
}

.mv-cart-summary__divider {
	width: 100%;
	height: 1px;
	margin: 0;
	border: 0;
	background-color: var(--mvc-border);
}

.mv-cart-summary__row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	font-size: var(--mv-fs-14);
	line-height: 18px;
	color: var(--mvc-muted);
}

.mv-cart-summary__row strong {
	font-weight: 600;
	text-align: right;
	color: var(--mvc-text);
}

.mv-cart-summary__row .mv-cart-summary__accent {
	color: var(--mvc-accent);
}

.mv-cart-summary__discount a.woocommerce-remove-coupon {
	margin-left: 6px;
	font-weight: 400;
	color: var(--mvc-muted);
}

.mv-cart-summary__total span {
	font-size: var(--mv-fs-16);
	font-weight: 700;
	line-height: 21px;
	color: var(--mvc-text);
}

.mv-cart-summary__total strong,
.mv-cart-summary__total strong .woocommerce-Price-amount {
	font-size: 22px;
	font-weight: 800;
	line-height: 29px;
}

.mv-cart-summary__total strong small {
	display: block;
	font-size: var(--mv-fs-12);
	font-weight: 400;
	color: var(--mvc-muted);
}

.mv-cart-summary .wc-proceed-to-checkout {
	padding: 0;
}

.woocommerce-cart .mv-cart-summary .wc-proceed-to-checkout a.checkout-button,
.mv-cart-summary__checkout {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 50px;
	margin: 0;
	padding: 16px;
	border-radius: var(--mv-radius-md);
	background-color: var(--mvc-accent);
	font-size: var(--mv-fs-14);
	font-weight: 700;
	line-height: 18px;
	letter-spacing: 0.4px;
	text-align: center;
	text-decoration: none;
	text-transform: uppercase;
	color: #ffffff;
	transition: background-color var(--mv-transition);
}

.woocommerce-cart .mv-cart-summary .wc-proceed-to-checkout a.checkout-button:hover,
.mv-cart-summary__checkout:hover {
	background-color: var(--mvc-accent-hover);
	color: #ffffff;
}

/* Promo code */
.mv-cart-promo {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.mv-cart-promo__toggle {
	display: inline-flex;
	align-items: center;
	align-self: flex-start;
	gap: 6px;
	padding: 0;
	border: 0;
	background: none;
	font-family: inherit;
	font-size: var(--mv-fs-14);
	font-weight: 600;
	line-height: 18px;
	color: var(--mvc-accent);
	cursor: pointer;
}

.mv-cart-promo__toggle:hover {
	color: var(--mvc-accent-hover);
}

.mv-cart-promo__toggle .mv-icon {
	width: 14px;
	height: 14px;
	transition: transform var(--mv-transition);
}

.mv-cart-promo__toggle[aria-expanded="true"] .mv-icon {
	transform: rotate(90deg);
}

.mv-cart-promo__field {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.mv-cart-promo__field[hidden] {
	display: none;
}

.woocommerce .mv-cart-promo__input,
.mv-cart-promo__input {
	flex: 1 1 140px;
	min-width: 0;
	height: 40px;
	padding: 0 12px;
	border: 1px solid var(--mvc-border);
	border-radius: 10px;
	font-family: inherit;
	font-size: var(--mv-fs-14);
	color: var(--mvc-text);
}

.mv-cart-promo__input:focus {
	border-color: var(--mvc-accent);
	outline: none;
	box-shadow: 0 0 0 3px rgba(9, 177, 231, 0.18);
}

.mv-cart-promo__apply {
	height: 40px;
	padding: 0 16px;
	border: 0;
	border-radius: 10px;
	background-color: var(--mvc-text);
	font-family: inherit;
	font-size: var(--mv-fs-14);
	font-weight: 700;
	color: #ffffff;
	cursor: pointer;
}

.mv-cart-promo__apply:hover {
	background-color: #14161b;
}

.mv-cart-promo .coupon-error-notice {
	flex-basis: 100%;
	margin: 0;
	font-size: var(--mv-fs-12);
	color: #e02424;
}

/* Empty cart
   ========================================================================== */

.mv-cart-empty {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	padding: 48px 24px;
	border: 1px dashed var(--mvc-border);
	border-radius: var(--mv-radius-xl);
	text-align: center;
}

.mv-cart-empty > * {
	margin: 0;
}

.mv-cart-empty__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 64px;
	height: 64px;
	border-radius: 50%;
	background-color: var(--mvc-accent);
}

.mv-cart-empty__icon .mv-icon {
	width: 28px;
	height: 28px;
}

.mv-cart-empty__title {
	font-size: var(--mv-fs-24);
	font-weight: 800;
	line-height: 1.3;
	color: var(--mvc-text);
}

.mv-cart-empty__text {
	max-width: 440px;
	font-size: var(--mv-fs-15);
	line-height: 1.6;
	color: var(--mvc-muted);
}

.mv-cart-empty__btn {
	margin-top: 8px;
}

/* Responsive
   ========================================================================== */

@media (max-width: 1279.98px) {
	.mv-cart__grid {
		grid-template-columns: minmax(0, 1fr) 320px;
		gap: 32px;
	}
}

@media (max-width: 1023.98px) {
	.mv-cart-body {
		padding-block: 32px 48px;
	}

	.mv-cart__grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.mv-cart__summary {
		position: static;
	}

	.mv-cart-features .mv-catalog-features__list {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 767.98px) {
	.mv-cart__head {
		display: none;
	}

	.mv-cart__list {
		border-top: 1px solid var(--mvc-border);
	}

	.mv-cart-row {
		grid-template-columns: minmax(0, 1fr) auto;
		gap: 14px 12px;
		padding-block: 16px;
	}

	.mv-cart-row__product {
		grid-column: 1 / -1;
		align-items: flex-start;
		gap: 12px;
	}

	.mv-cart-row__qty {
		justify-content: flex-start;
		padding-left: 76px;
	}

	.mv-cart-row__price {
		font-size: var(--mv-fs-16);
	}

	.mv-qty {
		height: 44px;
	}

	.mv-qty__btn {
		width: 44px;
	}

	.mv-cart-row__actions {
		gap: 8px 16px;
	}

	.mv-cart-row__action.mvwl-button,
	.woocommerce .mv-cart-row a.remove.mv-cart-row__action {
		min-height: 32px;
	}

	.mv-cart-features .mv-catalog-features__list {
		grid-template-columns: minmax(0, 1fr);
		gap: 24px;
	}
}

@media (max-width: 379.98px) {
	.mv-cart-row__qty {
		padding-left: 0;
	}
}
