/**
 * Nuven Cart – "Added to your cart" pop-up.
 *
 * Desktop: centred card. Phones: bottom sheet.
 * The "You might also like" cards reuse the styles in side-cart.css.
 */

.nce-popup {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: none;
	font-family: "Manrope", sans-serif;
	color: var(--nce-ink, #11100f);
}

.nce-popup.is-open {
	display: block;
}

html.nce-popup-lock,
html.nce-popup-lock body {
	overflow: hidden !important;
}

/* The side cart stays out of the way while the pop-up is up. */
html.nce-popup-lock .elementor-menu-cart__container {
	visibility: hidden !important;
}

.nce-popup-source[hidden] {
	display: none !important;
}

.nce-popup__overlay {
	position: absolute;
	inset: 0;
	background: rgba(17, 16, 15, 0.45);
	-webkit-backdrop-filter: blur(2px);
	backdrop-filter: blur(2px);
	animation: nce-popup-fade 0.3s ease both;
	cursor: pointer;
}

.nce-popup__panel {
	position: absolute;
	top: 50%;
	left: 50%;
	box-sizing: border-box;
	width: min(600px, calc(100vw - 32px));
	max-height: calc(100vh - 48px);
	max-height: calc(100dvh - 48px);
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: 28px 32px 26px;
	border-radius: 22px;
	background: var(--nce-cream, #faf8f3);
	box-shadow: 0 30px 80px rgba(17, 16, 15, 0.28);
	transform: translate(-50%, -50%);
	animation: nce-popup-in 0.45s var(--nce-ease, cubic-bezier(0.22, 1, 0.36, 1)) both;
	outline: none;
	scrollbar-width: thin;
}

.nce-popup__panel *,
.nce-popup__panel *::before,
.nce-popup__panel *::after {
	box-sizing: border-box;
}

.nce-popup.is-closing .nce-popup__overlay {
	animation: nce-popup-fade 0.25s ease reverse both;
}

.nce-popup.is-closing .nce-popup__panel {
	animation: nce-popup-out 0.25s ease both;
}

@keyframes nce-popup-fade {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

@keyframes nce-popup-in {
	from {
		opacity: 0;
		transform: translate(-50%, -46%) scale(0.98);
	}
	to {
		opacity: 1;
		transform: translate(-50%, -50%);
	}
}

@keyframes nce-popup-out {
	to {
		opacity: 0;
		transform: translate(-50%, -47%) scale(0.98);
	}
}

/* ---------- Close ---------- */

.nce-popup .nce-popup__close {
	position: absolute;
	top: 16px;
	right: 16px;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px !important;
	height: 40px !important;
	min-width: 0 !important;
	min-height: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 50% !important;
	background: transparent !important;
	box-shadow: none !important;
	color: var(--nce-brand, #641f2a) !important;
	cursor: pointer;
	transition: background-color 0.2s ease;
}

.nce-popup .nce-popup__close:hover,
.nce-popup .nce-popup__close:focus-visible {
	background: var(--nce-sand, #f3efe7) !important;
}

.nce-popup .nce-popup__close svg {
	display: block;
}

/* ---------- Heading ---------- */

.nce-popup__head {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0 48px 18px 0;
}

.nce-popup__tick {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 26px;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	background: var(--nce-brand, #641f2a);
	color: #fff;
	animation: nce-popup-pop 0.4s ease 0.15s both;
}

@keyframes nce-popup-pop {
	0% {
		transform: scale(0.4);
		opacity: 0;
	}
	70% {
		transform: scale(1.12);
		opacity: 1;
	}
	100% {
		transform: scale(1);
	}
}

.nce-popup .nce-popup__title {
	margin: 0;
	padding: 0;
	font-family: "Fraunces", serif;
	font-size: 26px;
	font-weight: 300;
	line-height: 1.15;
	letter-spacing: -0.8px;
	color: var(--nce-ink, #11100f);
}

/* ---------- The product just added ---------- */

.nce-popup__item {
	display: grid;
	grid-template-columns: 72px minmax(0, 1fr) auto;
	align-items: center;
	gap: 16px;
	padding: 16px 0;
	border-top: 1px solid var(--nce-line, rgba(17, 16, 15, 0.1));
	border-bottom: 1px solid var(--nce-line, rgba(17, 16, 15, 0.1));
}

.nce-popup__media img,
.nce-popup .nce-popup__img {
	display: block;
	width: 72px !important;
	height: 72px !important;
	max-width: none;
	object-fit: cover;
	border-radius: 12px !important;
	background: var(--nce-sand, #f3efe7);
}

.nce-popup__info {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

.nce-popup .nce-popup__name {
	font-family: "Fraunces", serif;
	font-size: 18px;
	font-weight: 400;
	line-height: 1.25;
	letter-spacing: -0.3px;
	text-decoration: none;
	color: var(--nce-ink, #11100f) !important;
}

.nce-popup a.nce-popup__name:hover {
	color: var(--nce-brand, #641f2a) !important;
}

.nce-popup__meta {
	font-size: 12px;
	line-height: 1.5;
	color: var(--nce-muted, rgba(17, 16, 15, 0.58));
}

.nce-popup__price {
	font-size: 15px;
	font-weight: 600;
	white-space: nowrap;
	color: var(--nce-ink, #11100f);
}

/* ---------- Free-shipping bar (copied in from the side cart) ---------- */

.nce-popup__shipping:empty {
	display: none;
}

.nce-popup__shipping {
	padding: 16px 0 0;
}

.nce-popup__shipping .nfsb-bar {
	margin: 0;
	padding: 0;
	border: 0;
}

/* ---------- You might also like ---------- */

.nce-popup .nce-upsells--popup {
	margin: 0;
	padding: 22px 0 0;
	border: 0;
}

.nce-popup .nce-upsells--popup .nce-upsells__title {
	margin-bottom: 14px;
	font-size: 20px;
}

.nce-popup .nce-upsells--popup .nce-upsells__track {
	grid-auto-columns: calc((100% - 28px) / 3);
	gap: 14px;
}

.nce-popup .nce-upsells--popup .nce-upsell {
	padding: 10px 10px 12px;
	background: var(--nce-sand, #f3efe7);
	animation: nce-rise 0.5s var(--nce-ease, cubic-bezier(0.22, 1, 0.36, 1)) both;
}

.nce-popup .nce-upsells--popup .nce-upsell:nth-child(1) { animation-delay: 0.18s; }
.nce-popup .nce-upsells--popup .nce-upsell:nth-child(2) { animation-delay: 0.25s; }
.nce-popup .nce-upsells--popup .nce-upsell:nth-child(3) { animation-delay: 0.32s; }
.nce-popup .nce-upsells--popup .nce-upsell:nth-child(n+4) { animation-delay: 0.39s; }

.nce-popup .nce-upsells--popup .nce-upsell__name {
	font-size: 11px;
}

.nce-popup .nce-upsells--popup .nce-upsell__add {
	height: 36px;
}

/* ---------- Subtotal and buttons ---------- */

.nce-popup__foot {
	margin-top: 22px;
	padding-top: 18px;
	border-top: 1px solid var(--nce-line, rgba(17, 16, 15, 0.1));
}

.nce-popup .nce-popup__subtotal {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	margin: 0 0 16px;
	padding: 0;
}

.nce-popup__subtotal span {
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: var(--nce-muted, rgba(17, 16, 15, 0.58));
}

.nce-popup__subtotal strong,
.nce-popup__subtotal strong .amount {
	font-family: "Fraunces", serif;
	font-size: 24px;
	font-weight: 400;
	letter-spacing: -0.5px;
	color: var(--nce-ink, #11100f);
}

.nce-popup__buttons {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
}

.nce-popup .nce-popup__btn {
	display: flex !important;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 52px !important;
	min-height: 0 !important;
	margin: 0 !important;
	padding: 0 16px !important;
	border: 1px solid var(--nce-brand, #641f2a) !important;
	border-radius: 999px !important;
	box-shadow: none !important;
	font-family: "Manrope", sans-serif !important;
	font-size: 12px !important;
	font-weight: 600 !important;
	line-height: 1 !important;
	letter-spacing: 1.3px !important;
	text-transform: uppercase !important;
	text-decoration: none !important;
	white-space: nowrap;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.nce-popup .nce-popup__btn--ghost {
	background: transparent !important;
	color: var(--nce-brand, #641f2a) !important;
}

.nce-popup .nce-popup__btn--ghost:hover,
.nce-popup .nce-popup__btn--ghost:focus-visible {
	background: var(--nce-brand, #641f2a) !important;
	color: #fff !important;
}

.nce-popup .nce-popup__btn--solid {
	background: var(--nce-brand, #641f2a) !important;
	color: #fff !important;
}

.nce-popup .nce-popup__btn--solid:hover,
.nce-popup .nce-popup__btn--solid:focus-visible {
	border-color: var(--nce-brand-dark, #4c1720) !important;
	background: var(--nce-brand-dark, #4c1720) !important;
	color: #fff !important;
}

.nce-popup .nce-popup__btn:focus-visible,
.nce-popup .nce-popup__checkout:focus-visible {
	outline: 2px solid var(--nce-brand, #641f2a);
	outline-offset: 3px;
}

.nce-popup .nce-popup__checkout {
	display: block;
	width: fit-content;
	margin: 14px auto 0;
	padding-bottom: 2px;
	border-bottom: 1px solid currentColor;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.8px;
	text-transform: uppercase;
	text-decoration: none;
	color: var(--nce-ink, #11100f) !important;
	transition: color 0.2s ease;
}

.nce-popup .nce-popup__checkout:hover {
	color: var(--nce-brand, #641f2a) !important;
}

/* ---------- Phones: bottom sheet ---------- */

@media (max-width: 767px) {
	.nce-popup__panel {
		top: auto;
		bottom: 0;
		left: 0;
		width: 100%;
		max-height: 90vh;
		max-height: 90dvh;
		padding: 26px 20px calc(20px + env(safe-area-inset-bottom));
		border-radius: 22px 22px 0 0;
		transform: none;
		animation-name: nce-sheet-in;
	}

	.nce-popup__panel::before {
		content: "";
		position: absolute;
		top: 9px;
		left: 50%;
		width: 40px;
		height: 4px;
		margin-left: -20px;
		border-radius: 4px;
		background: rgba(17, 16, 15, 0.15);
	}

	.nce-popup.is-closing .nce-popup__panel {
		animation-name: nce-sheet-out;
	}

	.nce-popup .nce-popup__close {
		top: 14px;
		right: 12px;
	}

	.nce-popup .nce-popup__title {
		font-size: 22px;
	}

	.nce-popup__item {
		grid-template-columns: 60px minmax(0, 1fr) auto;
		gap: 12px;
		padding: 14px 0;
	}

	.nce-popup__media img,
	.nce-popup .nce-popup__img {
		width: 60px !important;
		height: 60px !important;
		border-radius: 10px !important;
	}

	.nce-popup .nce-popup__name {
		font-size: 16px;
	}

	.nce-popup .nce-upsells--popup .nce-upsells__track {
		grid-auto-columns: calc((100% - 14px) / 2.25);
	}

	.nce-popup .nce-popup__btn {
		height: 48px !important;
		padding: 0 10px !important;
		font-size: 11px !important;
		letter-spacing: 1px !important;
	}
}

@keyframes nce-sheet-in {
	from {
		transform: translateY(100%);
	}
	to {
		transform: none;
	}
}

@keyframes nce-sheet-out {
	to {
		transform: translateY(100%);
	}
}

@media (prefers-reduced-motion: reduce) {
	.nce-popup__overlay,
	.nce-popup__panel,
	.nce-popup__tick,
	.nce-popup .nce-upsell {
		animation: none !important;
	}
}
