/* Luniva — cart page. Builds on home.css (tokens, buttons, cards) and stays scoped under .lnv. */

.lnv-cart-main {
	padding-top: clamp(28px, 4vw, 56px);
}

.lnv .lnv-cart {
	padding-bottom: clamp(56px, 7vw, 96px);
	transition: opacity .2s;
}

.lnv .lnv-cart.is-busy {
	opacity: .55;
	pointer-events: none;
}

/* ---- Heading and steps ---- */

.lnv-cart__head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 16px 32px;
	margin-bottom: clamp(22px, 3vw, 36px);
}

.lnv .lnv-cart__count {
	margin-top: 8px;
	color: var(--lnv-muted);
	font-size: 16px;
}

.lnv .lnv-steps {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px 14px;
	color: var(--lnv-muted);
	font-size: 14.5px;
	font-weight: 500;
}

.lnv-steps li {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.lnv-steps li + li::before {
	content: "";
	width: 28px;
	height: 1px;
	margin-inline-end: 6px;
	background: var(--lnv-line);
}

.lnv-steps li span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	border: 1px solid var(--lnv-line);
	border-radius: 50%;
	font-size: 12.5px;
	font-weight: 600;
	line-height: 1;
}

.lnv-steps li.is-current {
	color: var(--lnv-text);
	font-weight: 600;
}

.lnv-steps li.is-current span {
	border-color: var(--lnv-ink);
	background: var(--lnv-ink);
	color: #fff;
}

/* ---- Notices ---- */

.lnv-cart__notices .woocommerce-notices-wrapper:empty {
	display: none;
}

.lnv .lnv-cart__notices .woocommerce-message,
.lnv .lnv-cart__notices .woocommerce-info,
.lnv .lnv-cart__notices .woocommerce-error {
	margin: 0 0 18px;
	padding: 13px 18px;
	border: 1px solid #cfe5d8;
	border-radius: 14px;
	background: #eef6f1;
	color: var(--lnv-text);
	font-size: 15.5px;
	list-style: none;
}

/* The store prints notices with WooCommerce's banner markup ("Item removed. Undo?"). */
.lnv .lnv-cart__notices .wc-block-components-notice-banner {
	margin: 0 0 18px;
	border-radius: 14px;
	font-size: 15.5px;
}

.lnv .lnv-cart__notices [tabindex="-1"]:focus,
.lnv .lnv-cart__notices .wc-block-components-notice-banner:focus {
	outline: none;
	box-shadow: none;
}

.lnv .lnv-cart__notices .woocommerce-error {
	border-color: #f0c9cc;
	background: #fcf0f1;
}

.lnv .lnv-cart__notices a {
	border-bottom: 1px solid currentColor;
	font-weight: 600;
}

/* ---- Layout ---- */

.lnv-cart__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(320px, 400px);
	align-items: start;
	gap: clamp(24px, 4vw, 56px);
}

/* ---- Items ---- */

.lnv-cart__cols,
.lnv .lnv-ci {
	display: grid;
	grid-template-columns: 92px minmax(0, 1fr) 132px 96px 40px;
	align-items: center;
	column-gap: 20px;
}

.lnv-cart__cols {
	padding-bottom: 12px;
	border-bottom: 1px solid var(--lnv-line);
	color: var(--lnv-muted);
	font-size: 13.5px;
	font-weight: 600;
	letter-spacing: .06em;
	text-transform: uppercase;
}

.lnv:lang(ar) .lnv-cart__cols {
	letter-spacing: 0;
	font-size: 14.5px;
}

.lnv-cart__cols span:nth-child(1) {
	grid-column: 1 / span 2;
}

.lnv-cart__cols span:nth-child(2) {
	text-align: center;
}

.lnv-cart__cols span:nth-child(3) {
	text-align: end;
}

.lnv .lnv-ci {
	padding-block: 20px;
	border-bottom: 1px solid var(--lnv-line);
}

.lnv .lnv-ci__media {
	display: block;
	aspect-ratio: 1;
	border-radius: 12px;
	overflow: hidden;
	background: #eeeeec;
}

.lnv .lnv-ci__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.lnv-ci__info {
	min-width: 0;
}

.lnv .lnv-ci__name {
	margin-top: 3px;
	font-family: var(--lnv-body);
	font-size: 17px;
	font-weight: 600;
	line-height: 1.35;
	letter-spacing: .01em;
	color: var(--lnv-text);
}

.lnv .lnv-ci__name a:hover {
	color: var(--lnv-red);
}

.lnv-ci__unit {
	display: block;
	margin-top: 4px;
	color: var(--lnv-muted);
	font-size: 14.5px;
}

.lnv .lnv-ci__info dl.variation {
	margin: 4px 0 0;
	color: var(--lnv-muted);
	font-size: 14px;
}

.lnv-ci__qty {
	display: flex;
	justify-content: center;
}

.lnv .lnv-qty {
	direction: ltr;
	display: inline-flex;
	align-items: center;
	height: 46px;
	padding: 0 4px;
	border: 1px solid var(--lnv-line);
	border-radius: 999px;
	background: #fff;
}

.lnv .lnv-qty input.qty {
	width: 38px;
	height: auto;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
	box-shadow: none;
	color: var(--lnv-text);
	font-family: var(--lnv-body);
	font-size: 16.5px;
	font-weight: 600;
	line-height: 1.2;
	text-align: center;
	-moz-appearance: textfield;
	appearance: textfield;
}

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

.lnv .lnv-qty .lnv-qty__btn {
	appearance: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	min-width: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: none;
	color: var(--lnv-text);
	cursor: pointer;
	box-shadow: none;
	transition: background-color .2s;
}

.lnv .lnv-qty .lnv-qty__btn:hover {
	background: var(--lnv-sand);
	color: var(--lnv-text);
}

.lnv-ci__total {
	font-size: 17.5px;
	font-weight: 600;
	text-align: end;
}

.lnv .lnv-ci__remove {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	color: var(--lnv-muted);
	transition: background-color .2s, color .2s;
}

.lnv .lnv-ci__remove:hover {
	background: #fcf0f1;
	color: var(--lnv-red);
}

.lnv .lnv-ci__remove .lnv-ico {
	width: 20px;
	height: 20px;
}

.lnv-cart__actions {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 14px;
	margin-top: 22px;
}

.lnv .lnv-cart__update {
	min-height: 46px;
	padding: 10px 22px 8px;
	background: transparent;
	font-size: 15px;
}

.lnv-js-cart .lnv-cart__update {
	display: none;
}

/* ---- Summary ---- */

.lnv-sum {
	position: sticky;
	top: 24px;
	padding: clamp(22px, 2.4vw, 30px);
	border: 1px solid var(--lnv-line);
	border-radius: var(--lnv-radius);
	background: #fff;
}

.lnv .lnv-sum__title {
	font-family: var(--lnv-display);
	font-size: 26px;
	font-weight: 600;
	line-height: 1.2;
	color: var(--lnv-text);
}

.lnv .lnv-sum__rows {
	margin: 18px 0 0;
}

.lnv-sum__rows > div {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	padding-block: 9px;
	font-size: 16.5px;
}

.lnv .lnv-sum__rows dt {
	font-weight: 400;
	color: var(--lnv-muted);
}

.lnv .lnv-sum__rows dd {
	margin: 0;
	font-weight: 600;
	white-space: nowrap;
}

.lnv .lnv-sum__rows dd.lnv-sum__muted {
	font-weight: 400;
	color: var(--lnv-muted);
	white-space: normal;
	text-align: end;
}

.lnv .lnv-ship {
	min-width: 0;
	margin: 10px 0 0;
	padding: 16px 0 0;
	border: 0;
	border-top: 1px solid var(--lnv-line);
}

.lnv .lnv-ship legend {
	display: flex;
	align-items: center;
	gap: 8px;
	float: none;
	width: auto;
	margin: 0 0 10px;
	padding: 0;
	border: 0;
	color: var(--lnv-text);
	font-size: 15.5px;
	font-weight: 600;
}

.lnv .lnv-ship legend .lnv-ico {
	width: 22px;
	height: 22px;
	color: var(--lnv-gold);
}

.lnv .lnv-ship__opt {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0 0 8px;
	padding: 12px 14px;
	border: 1px solid var(--lnv-line);
	border-radius: 12px;
	font-size: 16px;
	font-weight: 500;
	cursor: pointer;
	transition: border-color .2s, background-color .2s;
}

.lnv .lnv-ship__opt:hover {
	border-color: var(--lnv-gold);
}

.lnv .lnv-ship__opt:has(input:checked) {
	border-color: var(--lnv-ink);
	background: var(--lnv-cream);
}

.lnv .lnv-ship__opt input {
	flex: none;
	width: 18px;
	height: 18px;
	margin: 0;
	accent-color: var(--lnv-ink);
}

.lnv-ship__name {
	flex: 1;
}

.lnv-ship__price {
	font-weight: 600;
	white-space: nowrap;
}

.lnv-sum__total {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	margin-top: 14px;
	padding-top: 18px;
	border-top: 1px solid var(--lnv-line);
	font-size: 17px;
	font-weight: 600;
}

.lnv-sum__total strong {
	font-size: 28px;
	font-weight: 600;
	line-height: 1.1;
}

.lnv .lnv-sum__checkout {
	width: 100%;
	margin-top: 20px;
	min-height: 58px;
	font-size: 17px;
}

.lnv .lnv-sum__note {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin-top: 14px;
	color: var(--lnv-muted);
	font-size: 14.5px;
}

.lnv .lnv-sum__note .lnv-ico {
	width: 22px;
	height: 22px;
	color: var(--lnv-gold);
}

/* ---- Empty cart ---- */

.lnv-cart__empty {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: clamp(40px, 6vw, 80px) 20px;
	border: 1px solid var(--lnv-line);
	border-radius: var(--lnv-radius);
	background: #fff;
	text-align: center;
}

.lnv-cart__empty > .lnv-ico {
	width: 56px;
	height: 56px;
	color: var(--lnv-gold);
}

.lnv .lnv-cart__empty h2 {
	margin-top: 18px;
	font-family: var(--lnv-display);
	font-size: clamp(26px, 3vw, 36px);
	font-weight: 600;
	line-height: 1.2;
	color: var(--lnv-text);
}

.lnv .lnv-cart__empty p {
	margin-top: 8px;
	color: var(--lnv-muted);
}

.lnv .lnv-cart__empty .lnv-btn {
	margin-top: 26px;
	width: auto;
}

/* ---- Responsive ---- */

@media (max-width: 1000px) {
	.lnv-cart__grid {
		grid-template-columns: 1fr;
	}

	.lnv-sum {
		position: static;
	}
}

@media (max-width: 640px) {
	.lnv .lnv-steps {
		display: none;
	}

	.lnv-cart__cols {
		display: none;
	}

	.lnv-cart__items {
		border-top: 1px solid var(--lnv-line);
	}

	.lnv .lnv-ci {
		grid-template-columns: 84px minmax(0, 1fr) auto;
		grid-template-areas:
			"media info remove"
			"media qty total";
		align-items: start;
		column-gap: 14px;
		row-gap: 12px;
		padding-block: 16px;
	}

	.lnv .lnv-ci__media {
		grid-area: media;
	}

	.lnv-ci__info {
		grid-area: info;
	}

	.lnv-ci__qty {
		grid-area: qty;
		justify-content: flex-start;
	}

	.lnv-ci__total {
		grid-area: total;
		align-self: center;
	}

	.lnv .lnv-ci__remove {
		grid-area: remove;
		margin-top: -6px;
		margin-inline-end: -8px;
	}

	.lnv .lnv-ci__name {
		font-size: 15.5px;
	}

	.lnv .lnv-qty {
		height: 42px;
	}

	.lnv .lnv-qty .lnv-qty__btn {
		width: 32px;
		height: 32px;
	}

	.lnv .lnv-qty input.qty {
		width: 32px;
	}

	.lnv-cart__actions {
		justify-content: center;
	}
}
