/* =========================================================
   GLOBAL NOTIFICATIONS
   ========================================================= */

.vn-notifications {
	position: fixed;
	inset: 0;
	z-index: 10000;
	pointer-events: none;
}

/* =========================================================
   COMMON TOASTER
   ========================================================= */

.vn-toast-region {
	position: absolute;
	top: 24px;
	left: 50%;
	display: flex;
	flex-direction: column;
	gap: 10px;
	width: min(100% - 32px, 420px);
	transform: translateX(-50%);
	pointer-events: none;
}

.vn-toast {
	position: relative;
	display: grid;
	grid-template-columns: 24px 1fr 28px;
	align-items: start;
	gap: 12px;
	padding: 16px;
	background: #fff;
	border: 1px solid rgba(17, 17, 17, 0.12);
	border-radius: 14px;
	box-shadow: 0 18px 50px rgba(17, 17, 17, 0.12);
	color: #111;
	opacity: 0;
	transform: translateY(-12px);
	transition:
		opacity 0.25s ease,
		transform 0.25s ease;
	pointer-events: auto;
	overflow: hidden;
}

.vn-toast.is-visible {
	opacity: 1;
	transform: translateY(0);
}

.vn-toast.is-leaving {
	opacity: 0;
	transform: translateY(-8px);
}

.vn-toast__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background: #111;
	color: #fff;
}

.vn-toast--error .vn-toast__icon {
	background: #b42318;
}

.vn-toast--warning .vn-toast__icon {
	background: #b26a00;
}

.vn-toast__content {
	min-width: 0;
}

.vn-toast__title {
	margin: 0;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.35;
}

.vn-toast__message {
	margin: 4px 0 0;
	color: #6f6f6f;
	font-size: 13px;
	line-height: 1.45;
}

.vn-toast__close {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	padding: 0;
	background: transparent;
	border: 0;
	color: #111;
	cursor: pointer;
}

.vn-toast__progress {
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	height: 2px;
	background: rgba(17, 17, 17, 0.08);
}

.vn-toast__progress::after {
	content: '';
	display: block;
	width: 100%;
	height: 100%;
	background: #111;
	transform-origin: left;
	animation: vn-toast-progress var(--toast-duration, 4500ms) linear forwards;
}

@keyframes vn-toast-progress {
	from {
		transform: scaleX(1);
	}

	to {
		transform: scaleX(0);
	}
}

/* =========================================================
   CART ADDED MODAL
   ========================================================= */

.vn-cart-added {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding: 120px 24px 24px;
	background: rgba(17, 17, 17, 0.58);
	opacity: 0;
	visibility: hidden;
	transition:
		opacity 0.25s ease,
		visibility 0.25s ease;
	pointer-events: auto;
}

.vn-cart-added.is-open {
	opacity: 1;
	visibility: visible;
}

.vn-cart-added__dialog {
	position: relative;
	width: min(100%, 520px);
	padding: 24px;
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 24px 80px rgba(0, 0, 0, 0.18);
	transform: translateY(-14px);
	transition: transform 0.28s ease;
}

.vn-cart-added.is-open .vn-cart-added__dialog {
	transform: translateY(0);
}

.vn-cart-added__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	margin-bottom: 24px;
}

.vn-cart-added__status {
	display: flex;
	align-items: center;
	gap: 10px;
}

.vn-cart-added__status-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background: #111;
	color: #fff;
	flex-shrink: 0;
}

.vn-cart-added__title {
	margin: 0;
	font-size: 18px;
	font-weight: 500;
	line-height: 1.25;
}

.vn-cart-added__close {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	padding: 0;
	background: transparent;
	border: 0;
	color: #111;
	cursor: pointer;
}

.vn-cart-added__product {
	display: grid;
	grid-template-columns: 112px 1fr;
	gap: 18px;
	align-items: center;
	margin-bottom: 24px;
}

.vn-cart-added__image {
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 1;
	background: #f7f7f7;
	overflow: hidden;
}

.vn-cart-added__image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.vn-cart-added__brand {
	margin: 0 0 6px;
	color: #777;
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.vn-cart-added__name {
	margin: 0;
	font-size: 16px;
	font-weight: 500;
	line-height: 1.35;
}

.vn-cart-added__variant {
	margin: 8px 0 0;
	color: #777;
	font-size: 13px;
	line-height: 1.4;
}

.vn-cart-added__price {
	margin: 12px 0 0;
	font-size: 15px;
	font-weight: 500;
}

.vn-cart-added__actions {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
}

.vn-cart-added__button {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 12px 20px;
	border: 1px solid #111;
	border-radius: 999px;
	font-size: 14px;
	font-weight: 500;
	text-align: center;
	cursor: pointer;
	transition:
		background-color 0.2s ease,
		color 0.2s ease;
}

.vn-cart-added__button--primary {
	background: #111;
	color: #fff;
}

.vn-cart-added__button--secondary {
	background: #fff;
	color: #111;
}

.vn-cart-added__button--primary:hover {
	background: #292929;
}

.vn-cart-added__button--secondary:hover {
	background: #f5f5f5;
}

body.vn-notification-lock {
	overflow: hidden;
}

/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 767px) {
	.vn-toast-region {
		top: auto;
		bottom: 18px;
	}

	.vn-toast {
		border-radius: 16px;
		transform: translateY(12px);
	}

	.vn-toast.is-visible {
		transform: translateY(0);
	}

	.vn-cart-added {
		align-items: flex-end;
		padding: 0;
	}

	.vn-cart-added__dialog {
		width: 100%;
		max-width: none;
		padding: 20px 20px max(20px, env(safe-area-inset-bottom));
		border-radius: 24px 24px 0 0;
		transform: translateY(100%);
	}

	.vn-cart-added.is-open .vn-cart-added__dialog {
		transform: translateY(0);
	}

	.vn-cart-added__dialog::before {
		content: '';
		display: block;
		width: 42px;
		height: 4px;
		margin: -8px auto 22px;
		background: #b8b8b8;
		border-radius: 999px;
	}

	.vn-cart-added__head {
		margin-bottom: 20px;
	}

	.vn-cart-added__title {
		font-size: 17px;
	}

	.vn-cart-added__product {
		grid-template-columns: 108px 1fr;
		gap: 16px;
	}

	.vn-cart-added__actions {
		grid-template-columns: 1fr;
	}

	.vn-cart-added__button {
		min-height: 52px;
	}
}
/* =========================================================
   REMOVE PRODUCT MODAL
   ========================================================= */

.vn-remove-modal {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	background: rgba(17, 17, 17, 0.6);
	opacity: 0;
	visibility: hidden;
	transition:
		opacity 0.25s ease,
		visibility 0.25s ease;
	pointer-events: auto;
}

.vn-remove-modal.is-open {
	opacity: 1;
	visibility: visible;
}

.vn-remove-modal__dialog {
	position: relative;
	width: min(100%, 600px);
	padding: 40px;
	background: #fff;
	border-radius: 14px;
	box-shadow: 0 30px 90px rgba(0, 0, 0, 0.2);
	transform: translateY(14px);
	transition: transform 0.25s ease;
}

.vn-remove-modal.is-open .vn-remove-modal__dialog {
	transform: translateY(0);
}

.vn-remove-modal__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	margin-bottom: 28px;
}

.vn-remove-modal__title {
	margin: 0;
	font-size: 22px;
	font-weight: 500;
	line-height: 1.3;
}

.vn-remove-modal__close {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	padding: 0;
	background: transparent;
	border: 0;
	color: #111;
	cursor: pointer;
}

.vn-remove-modal__question {
	margin: 0 0 28px;
	color: #333;
	font-size: 15px;
	line-height: 1.55;
}

.vn-remove-modal__product {
	display: grid;
	grid-template-columns: 116px 1fr;
	gap: 18px;
	align-items: center;
	margin-bottom: 32px;
}

.vn-remove-modal__image {
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 1;
	background: #f7f7f7;
	overflow: hidden;
}

.vn-remove-modal__image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.vn-remove-modal__name {
	margin: 0;
	font-size: 16px;
	font-weight: 500;
	line-height: 1.4;
}

.vn-remove-modal__variant {
	margin: 7px 0 0;
	color: #777;
	font-size: 13px;
	line-height: 1.4;
}

.vn-remove-modal__price {
	margin: 8px 0 0;
	font-size: 15px;
	font-weight: 400;
}

.vn-remove-modal__actions {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
}

.vn-remove-modal__button {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 50px;
	padding: 12px 20px;
	border: 1px solid #111;
	border-radius: 999px;
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
}

.vn-remove-modal__button--primary {
	background: #111;
	color: #fff;
}

.vn-remove-modal__button--secondary {
	background: #fff;
	color: #111;
}

.vn-remove-modal__button--primary:hover {
	background: #292929;
}

.vn-remove-modal__button--secondary:hover {
	background: #f5f5f5;
}

@media (max-width: 767px) {
	.vn-remove-modal {
		align-items: flex-end;
		padding: 0;
	}

	.vn-remove-modal__dialog {
		width: 100%;
		max-width: none;
		padding: 24px 20px max(20px, env(safe-area-inset-bottom));
		border-radius: 24px 24px 0 0;
		transform: translateY(100%);
	}

	.vn-remove-modal.is-open .vn-remove-modal__dialog {
		transform: translateY(0);
	}

	.vn-remove-modal__product {
		grid-template-columns: 96px 1fr;
	}

	.vn-remove-modal__actions {
		grid-template-columns: 1fr;
	}
}
