/**
 * Gift wishlist — product quick-view popup.
 * Mobile-first: full-width bottom sheet on phones, centered card on wider screens.
 * Layout stacks the image carousel on top, then name / SKU / price / description,
 * with a sticky add-to-cart at the bottom for easy thumb reach.
 */

/* ------------------------------------------------------------------ Triggers */
.nmgr-items-view .item .thumbnail,
.nmgr-items-view .item a.nmgr-product-name {
	cursor: pointer;
}

/* -------------------------------------------------------------- Scroll lock */
body.nmgr-qv-open {
	overflow: hidden;
}

/* ------------------------------------------------------------------ Overlay */
.nmgr-qv-overlay {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	padding: 0;
	background: rgba(0, 0, 0, 0.55);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.25s ease, visibility 0.25s ease;
	-webkit-overflow-scrolling: touch;
}

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

/* -------------------------------------------------------------------- Modal */
.nmgr-qv-modal {
	position: relative;
	display: flex;
	flex-direction: column;
	width: 100%;
	max-width: 100%;
	max-height: 92vh;
	background: #fff;
	border-radius: 18px 18px 0 0;
	overflow: hidden;
	box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.25);
	transform: translateY(100%);
	transition: transform 0.28s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.nmgr-qv-overlay.is-open .nmgr-qv-modal {
	transform: translateY(0);
}

/* -------------------------------------------------------------- Close button */
.nmgr-qv-close {
    background-color: white !important;
	position: absolute;
	top: 0px;
	inset-inline-end: 10px;
	z-index: 3;
	width: 34px;
	height: 34px;
	padding: 0;
	margin: 0;
	line-height: 32px;
	font-size: 24px;
	color: #333;
	text-align: center;
	background: white;
	border: none;
	border-radius: 50%;
	box-shadow: 0 1px 6px rgba(0, 0, 0, 0.18);
	cursor: pointer;
}

.nmgr-qv-close:hover {
	background: #fff;
}

/* --------------------------------------------------------------------- Body */
.nmgr-qv-body {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	min-height: 0;
	overflow: hidden;
}

/* --------------------------------------------------------- Loading / errors */
.nmgr-qv-loading {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 320px;
}

.nmgr-qv-spinner {
	width: 34px;
	height: 34px;
	border: 3px solid rgba(0, 0, 0, 0.12);
	border-top-color: rgba(0, 0, 0, 0.55);
	border-radius: 50%;
	animation: nmgr-qv-spin 0.8s linear infinite;
}

@keyframes nmgr-qv-spin {
	to { transform: rotate(360deg); }
}

.nmgr-qv-error {
	padding: 40px 24px;
	text-align: center;
	color: #777;
}

/* ------------------------------------------------------------------ Gallery */
.nmgr-qv-gallery {
	position: relative;
	flex: 0 0 auto;
	width: 100%;
	background: #f5f5f5;
}

.nmgr-qv-track {
	display: flex;
	overflow-x: auto;
	overflow-y: hidden;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	/* Keep image order left-to-right regardless of page RTL for simple dot math. */
	direction: ltr;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
}

.nmgr-qv-track::-webkit-scrollbar {
	display: none;
}

.nmgr-qv-slide {
	flex: 0 0 100%;
	scroll-snap-align: center;
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 1 / 1;
}

.nmgr-qv-slide img,
.nmgr-qv-img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: block;
}

/* Pagination dots */
.nmgr-qv-dots {
	position: absolute;
	inset-inline: 0;
	bottom: 10px;
	display: flex;
	gap: 7px;
	align-items: center;
	justify-content: center;
	pointer-events: auto;
}

.nmgr-qv-gallery.is-single .nmgr-qv-dots {
	display: none;
}

.nmgr-qv-dot {
	width: 7px;
	height: 7px;
	padding: 0;
	border: none;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.28);
	box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.5);
	cursor: pointer;
	transition: background 0.2s ease, width 0.2s ease;
}

.nmgr-qv-dot.is-active {
	width: 20px;
	border-radius: 4px;
	background: #111;
}

/* ------------------------------------------------------------------ Summary */
.nmgr-qv-summary {
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	padding: 18px 20px 8px;
}

.nmgr-qv-name {
	margin: 0 0 6px;
	font-size: 1.2rem;
	font-weight: 600;
	line-height: 1.35;
}

.nmgr-qv-sku {
	margin: 0 0 10px;
	font-size: 0.8rem;
	color: #888;
}

.nmgr-qv-sku strong {
	font-weight: 600;
	color: #666;
}

.nmgr-qv-price {
	margin: 0 0 14px;
	font-size: 1.3rem;
	font-weight: 700;
	line-height: 1.2;
}

.nmgr-qv-price del {
	margin-inline-end: 8px;
	font-size: 1rem;
	font-weight: 400;
	color: #aaa;
}

.nmgr-qv-price ins {
	text-decoration: none;
}

.nmgr-qv-variations {
	margin: 0 0 14px;
	padding: 0;
	list-style: none;
	font-size: 0.85rem;
	color: #555;
}

.nmgr-qv-variations li {
	margin-bottom: 2px;
}

.nmgr-qv-desc {
	font-size: 0.9rem;
	line-height: 1.65;
	color: #555;
}

.nmgr-qv-desc p:last-child {
	margin-bottom: 0;
}

/* ------------------------------------------------------------------ Actions */
.nmgr-qv-actions {
	position: sticky;
	bottom: 0;
	flex: 0 0 auto;
	padding: 14px 20px calc(14px + env(safe-area-inset-bottom, 0px));
	background: #fff;
	border-top: 1px solid #eee;
	box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.05);
}

.nmgr-qv-actions .nmgr-add-to-cart-form {
	display: flex;
	align-items: stretch;
	gap: 10px;
	margin: 0;
	float: none;
}

.nmgr-qv-actions .nmgr-add-to-cart-form::before,
.nmgr-qv-actions .nmgr-add-to-cart-form::after {
	content: none;
}

.nmgr-qv-actions .quantity {
	float: none;
	margin: 0;
	flex: 0 0 auto;
}

.nmgr-qv-actions .quantity input.qty {
	width: 64px;
	height: 100%;
	min-height: 48px;
	text-align: center;
}

.nmgr-qv-actions .nmgr_add_to_cart_button.button {
	flex: 1 1 auto;
	min-height: 48px;
	margin: 0;
	font-weight: 600;
}

/* Status message (out of stock / fulfilled) mirrored from the row. */
.nmgr-qv-actions > div > div[class] > span {
	display: block;
	text-align: center;
	color: #999;
	padding: 12px;
}

/* ---------------------------------------------------- Larger screens / desktop */
@media screen and (min-width: 600px) {
	.nmgr-qv-overlay {
		align-items: center;
		padding: 24px;
	}

	.nmgr-qv-modal {
		max-width: 460px;
		max-height: 88vh;
		border-radius: 16px;
		transform: translateY(24px) scale(0.98);
		box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
	}

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

	.nmgr-qv-slide {
		aspect-ratio: 4 / 5;
	}
}
