/* ════════════════ NUANCE CART - MODAL ════════════════ */

.ncart-overlay {
	--ncart-accent: #007083;
	--ncart-accent-dark: #00505e;
	--ncart-ink: #0e1b1e;
	--ncart-ease: cubic-bezier(.2, .85, .25, 1);

	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	background: rgba(8, 24, 27, .45);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
	opacity: 0;
	visibility: hidden;
	transition: opacity .4s var(--ncart-ease), visibility .4s var(--ncart-ease);
	font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
}

.ncart-overlay.is-open {
	opacity: 1;
	visibility: visible;
}

.ncart-overlay * {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

/* Scroll-lock uden layout-shift */
html.ncart-lock,
html.ncart-lock body {
	overflow: hidden;
}

html.ncart-lock body {
	padding-right: var(--ncart-sbw, 0px);
}

.ncart {
	width: 100%;
	max-width: 460px;
	max-height: min(720px, 90dvh);
	display: flex;
	flex-direction: column;
	background: #fff;
	border-radius: 24px;
	box-shadow: 0 24px 80px rgba(7, 42, 48, .28);
	transform: scale(.96) translateY(14px);
	transition: transform .45s var(--ncart-ease);
	overflow: hidden;
}

.ncart-overlay.is-open .ncart {
	transform: scale(1) translateY(0);
}

/* ── Header ── */

.ncart-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 22px 24px 18px;
	flex: none;
}

.ncart-title {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 17px;
	font-weight: 600;
	color: var(--ncart-ink);
	letter-spacing: -.2px;
}

.ncart-title-count {
	min-width: 22px;
	height: 22px;
	padding: 0 7px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 999px;
	background: rgba(0, 112, 131, .1);
	color: var(--ncart-accent);
	font-size: 11.5px;
	font-weight: 600;
}

.ncart-close {
	width: 34px;
	height: 34px;
	flex: none;
	display: flex;
	align-items: center;
	justify-content: center;
	border: none;
	border-radius: 999px;
	background: rgba(14, 27, 30, .05);
	color: var(--ncart-ink);
	cursor: pointer;
	transition: background .3s var(--ncart-ease), transform .3s var(--ncart-ease);
}

.ncart-close svg {
	width: 14px;
	height: 14px;
	stroke: currentColor;
	fill: none;
	stroke-width: 2;
	stroke-linecap: round;
}

/* ── Fejlbanner ── */

.ncart-error {
	display: none;
	margin: 0 24px 4px;
	padding: 10px 14px;
	border-radius: 12px;
	background: rgba(192, 57, 43, .08);
	color: #a93226;
	font-size: 12.5px;
	font-weight: 500;
	line-height: 1.4;
	flex: none;
}

.ncart-error.is-visible {
	display: block;
}

/* ── Body / varer ── */

.ncart-body {
	flex: 1;
	overflow-y: auto;
	padding: 2px 24px;
	overscroll-behavior: contain;
	scrollbar-width: thin;
	scrollbar-color: rgba(14, 27, 30, .15) transparent;
}

.ncart-body::-webkit-scrollbar {
	width: 5px;
}

.ncart-body::-webkit-scrollbar-thumb {
	background: rgba(14, 27, 30, .15);
	border-radius: 999px;
}

.ncart-item {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 16px 0;
	box-shadow: inset 0 1px 0 rgba(14, 27, 30, .06);
	transition: opacity .3s var(--ncart-ease);
}

.ncart-item:first-child {
	box-shadow: none;
}

.ncart-item.is-busy {
	opacity: .45;
	pointer-events: none;
}

.ncart-item-img {
	width: 64px;
	height: 64px;
	flex: none;
	border-radius: 14px;
	background: #f4f7f8;
	object-fit: contain;
}

.ncart-item-info {
	flex: 1;
	min-width: 0;
}

.ncart-item-name {
	display: block;
	font-size: 13.5px;
	font-weight: 500;
	color: var(--ncart-ink);
	line-height: 1.35;
	letter-spacing: -.1px;
	text-decoration: none;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ncart-item-variation {
	display: block;
	margin-top: 2px;
	font-size: 11.5px;
	font-weight: 400;
	color: rgba(14, 27, 30, .45);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ncart-qty {
	display: inline-flex;
	align-items: center;
	gap: 2px;
	border-radius: 999px;
	background: rgba(14, 27, 30, .05);
	padding: 3px;
	margin-top: 8px;
}

.ncart-qty button {
	width: 24px;
	height: 24px;
	border: none;
	border-radius: 999px;
	background: transparent;
	color: var(--ncart-ink);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background .25s var(--ncart-ease), color .25s var(--ncart-ease);
}

.ncart-qty button:disabled {
	opacity: .35;
	cursor: default;
}

.ncart-qty button svg {
	width: 11px;
	height: 11px;
	stroke: currentColor;
	fill: none;
	stroke-width: 2.2;
	stroke-linecap: round;
}

.ncart-qty span {
	min-width: 24px;
	text-align: center;
	font-size: 12.5px;
	font-weight: 600;
	color: var(--ncart-ink);
}

.ncart-item-right {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 8px;
	flex: none;
}

.ncart-item-total {
	font-size: 13.5px;
	font-weight: 600;
	color: var(--ncart-ink);
	letter-spacing: -.1px;
}

.ncart-item-remove {
	border: none;
	background: transparent;
	cursor: pointer;
	font-family: inherit;
	font-size: 11.5px;
	font-weight: 400;
	color: rgba(14, 27, 30, .4);
	text-decoration: underline;
	text-underline-offset: 2px;
	transition: color .25s var(--ncart-ease);
}

/* ── Tom kurv ── */

.ncart-empty {
	display: none;
	flex-direction: column;
	align-items: center;
	text-align: center;
	padding: 48px 24px 56px;
}

.ncart-empty.is-visible {
	display: flex;
}

.ncart-empty-ico {
	width: 64px;
	height: 64px;
	margin-bottom: 18px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 999px;
	background: rgba(0, 112, 131, .08);
}

.ncart-empty-ico svg {
	width: 26px;
	height: 26px;
	stroke: var(--ncart-accent);
	fill: none;
	stroke-width: 1.7;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.ncart-empty h3 {
	font-size: 15.5px;
	font-weight: 600;
	color: var(--ncart-ink);
	margin-bottom: 6px;
}

.ncart-empty p {
	font-size: 13px;
	font-weight: 400;
	color: rgba(14, 27, 30, .5);
	margin-bottom: 22px;
}

/* ── Skeleton ── */

.ncart-skel {
	display: none;
	padding: 16px 0;
}

.ncart-skel.is-visible {
	display: block;
}

.ncart-skel-row {
	display: flex;
	gap: 14px;
	padding: 12px 0;
}

.ncart-skel-row div {
	border-radius: 12px;
	background: linear-gradient(90deg, rgba(14, 27, 30, .05) 25%, rgba(14, 27, 30, .09) 50%, rgba(14, 27, 30, .05) 75%);
	background-size: 200% 100%;
	animation: ncartShimmer 1.4s infinite;
}

.ncart-skel-img {
	width: 64px;
	height: 64px;
	flex: none;
}

.ncart-skel-lines {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 10px;
	justify-content: center;
}

.ncart-skel-lines div {
	height: 12px;
}

.ncart-skel-lines div:first-child {
	width: 70%;
}

.ncart-skel-lines div:last-child {
	width: 40%;
}

@keyframes ncartShimmer {
	0% { background-position: 200% 0; }
	100% { background-position: -200% 0; }
}

/* ── Footer ── */

.ncart-foot {
	padding: 18px 24px 24px;
	box-shadow: inset 0 1px 0 rgba(14, 27, 30, .06);
	flex: none;
}

.ncart-subtotal {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	margin-bottom: 4px;
}

.ncart-subtotal span {
	font-size: 13px;
	font-weight: 400;
	color: rgba(14, 27, 30, .55);
}

.ncart-subtotal strong {
	font-size: 17px;
	font-weight: 600;
	color: var(--ncart-ink);
	letter-spacing: -.2px;
}

.ncart-note {
	font-size: 11.5px;
	font-weight: 400;
	color: rgba(14, 27, 30, .4);
	margin-bottom: 16px;
}

.ncart-checkout {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 9px;
	width: 100%;
	padding: 14px 20px;
	border-radius: 999px;
	background: var(--ncart-accent);
	color: #fff;
	font-size: 14px;
	font-weight: 500;
	letter-spacing: -.1px;
	text-decoration: none;
	transition: background .35s var(--ncart-ease), transform .35s var(--ncart-ease);
}

.ncart-checkout--compact {
	width: auto;
	padding: 12px 24px;
}

.ncart-checkout .ncart-arrow {
	width: 15px;
	height: 15px;
	flex: none;
	stroke: currentColor;
	fill: none;
	stroke-width: 1.9;
	stroke-linecap: round;
	stroke-linejoin: round;
	transition: transform .35s var(--ncart-ease);
}

.ncart-viewcart {
	display: block;
	margin-top: 12px;
	text-align: center;
	font-size: 12.5px;
	font-weight: 400;
	color: rgba(14, 27, 30, .5);
	text-decoration: underline;
	text-underline-offset: 3px;
	transition: color .25s var(--ncart-ease);
}

/* ── Fokus ── */

.ncart-overlay :focus-visible {
	outline: 2px solid var(--ncart-accent);
	outline-offset: 2px;
	border-radius: 6px;
}

.ncart-close:focus-visible,
.ncart-qty button:focus-visible,
.ncart-checkout:focus-visible {
	border-radius: 999px;
}

/* ── Hover ── */

@media (hover: hover) {
	.ncart-close:hover {
		background: rgba(14, 27, 30, .1);
		transform: rotate(90deg);
	}

	.ncart-qty button:not(:disabled):hover {
		background: #fff;
		color: var(--ncart-accent);
	}

	.ncart-item-remove:hover {
		color: #c0392b;
	}

	.ncart-checkout:hover {
		background: var(--ncart-accent-dark);
		transform: translateY(-1px);
	}

	.ncart-checkout:hover .ncart-arrow {
		transform: translateX(3px);
	}

	.ncart-viewcart:hover {
		color: var(--ncart-ink);
	}
}

/* ── Reduceret bevægelse ── */

@media (prefers-reduced-motion: reduce) {
	.ncart-overlay,
	.ncart,
	.ncart-close,
	.ncart-checkout,
	.ncart-checkout .ncart-arrow {
		transition: none;
	}

	.ncart-skel-row div {
		animation: none;
	}
}

/* ── Mobil ── */

@media (max-width: 480px) {
	.ncart-overlay {
		padding: 14px;
	}

	.ncart {
		max-height: 86dvh;
		border-radius: 20px;
	}
}
