/* =============================================================
   Minimal Quick View – Frontend Styles
   ============================================================= */

/* ── Trigger button (eye icon on product card) ─────────────── */

ul.products li.product {
	position: relative;
}

.mqv-trigger {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 9;
	width: 36px;
	height: 36px;
	padding: 0;
	border: none;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.92);
	color: #222;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
	opacity: 0;
	transform: translateY(-4px) scale(0.88);
	transition: opacity 0.18s ease, transform 0.18s ease, background 0.15s;
}

ul.products li.product:hover .mqv-trigger {
	opacity: 1;
	transform: translateY(0) scale(1);
}

.mqv-trigger:hover {
	background: #fff;
	color: #000;
}

.mqv-trigger svg {
	width: 16px;
	height: 16px;
	display: block;
	flex-shrink: 0;
}

.mqv-trigger-icon-img {
	width: 18px;
	height: 18px;
	object-fit: contain;
	display: block;
	flex-shrink: 0;
}

/* Always visible on touch devices */
@media (hover: none) {
	.mqv-trigger {
		opacity: 1;
		transform: none;
	}
}

/* ── Modal overlay ─────────────────────────────────────────── */

#mqv-modal {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1.5rem;
	box-sizing: border-box;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.22s ease;
}

#mqv-modal.is-open {
	opacity: 1;
	pointer-events: all;
}

.mqv-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
	backdrop-filter: blur(2px);
}

/* ── Modal panel ───────────────────────────────────────────── */

.mqv-panel {
	position: relative;
	z-index: 1;
	background: #fff;
	border-radius: 14px;
	width: min(920px, 100%);
	max-height: calc(100vh - 3rem);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	box-shadow: 0 24px 64px rgba(0, 0, 0, 0.28);
	transform: translateY(10px) scale(0.97);
	transition: transform 0.22s ease;
}

#mqv-modal.is-open .mqv-panel {
	transform: translateY(0) scale(1);
}

.mqv-close {
	position: absolute;
	top: 14px;
	right: 14px;
	z-index: 10;
	width: 32px;
	height: 32px;
	padding: 0;
	border: none;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.07);
	color: #444;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: background 0.15s;
}

.mqv-close:hover {
	background: rgba(0, 0, 0, 0.14);
	color: #111;
}

.mqv-close svg {
	width: 16px;
	height: 16px;
}

/* ── Modal body ─────────────────────────────────────────────── */

.mqv-body {
	overflow-y: auto;
	padding: 2rem;
	flex: 1;
	min-height: 0;
}

/* ── Loading spinner ────────────────────────────────────────── */

.mqv-loading {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 320px;
}

.mqv-spinner {
	width: 36px;
	height: 36px;
	border: 3px solid #e8e8e8;
	border-top-color: #222;
	border-radius: 50%;
	animation: mqv-spin 0.75s linear infinite;
}

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

/* ── Product layout (two-column) ────────────────────────────── */

.mqv-product {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 2.25rem;
	align-items: start;
}

/* ── Gallery ────────────────────────────────────────────────── */

.mqv-gallery {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.mqv-gallery-stage {
	position: relative;
	border-radius: 10px;
	overflow: hidden;
	aspect-ratio: 1 / 1;
}

.mqv-main-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.mqv-prev,
.mqv-next {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 2;
	width: 34px;
	height: 34px;
	padding: 0;
	border: none;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.88);
	color: #333;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.14);
	transition: background 0.15s;
}

.mqv-prev { left: 10px; }
.mqv-next { right: 10px; }

.mqv-prev:hover,
.mqv-next:hover {
	background: #fff;
}

.mqv-prev svg,
.mqv-next svg {
	width: 16px;
	height: 16px;
}

/* Thumbnails */
.mqv-thumbs {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.mqv-thumb-btn {
	width: 60px;
	height: 60px;
	padding: 0;
	border: 2px solid transparent;
	border-radius: 7px;
	overflow: hidden;
	cursor: pointer;
	background: #f5f5f5;
	transition: border-color 0.15s;
	flex-shrink: 0;
}

.mqv-thumb-btn.is-active,
.mqv-thumb-btn:hover {
	border-color: #222;
}

.mqv-thumb-btn img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* ── Product info ───────────────────────────────────────────── */

.mqv-info {
	display: flex;
	flex-direction: column;
	gap: 0;
}

.mqv-title {
	font-size: 1.35rem;
	font-weight: 700;
	color: #111;
	line-height: 1.3;
	margin: 0 0 0.75rem;
}

.mqv-price {
	font-size: 1.15rem;
	font-weight: 600;
	color: #111;
	margin-bottom: 1.1rem;
}

.mqv-price ins {
	text-decoration: none;
}

.mqv-price del {
	color: #aaa;
	font-weight: 400;
	font-size: 0.95rem;
}

.mqv-desc {
	font-size: 0.9rem;
	color: #555;
	line-height: 1.65;
	margin-bottom: 1rem;
}

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

.mqv-sku {
	font-size: 0.78rem;
	color: #bbb;
	margin: 0 0 1.4rem;
}

/* ── Action buttons ─────────────────────────────────────────── */

.mqv-actions {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-top: auto;
}

.mqv-add-cart,
.mqv-view-link {
	display: block;
	text-align: center;
	padding: 11px 18px;
	border-radius: 7px;
	font-size: 0.9rem;
	font-weight: 600;
	text-decoration: none;
	transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.mqv-add-cart {
	background: #111;
	color: #fff !important;
	border: 1.5px solid #111;
}

.mqv-add-cart:hover {
	background: #000;
	border-color: #000;
	color: #fff !important;
}

.mqv-view-link {
	background: #fff;
	color: #333 !important;
	border: 1.5px solid #ddd;
}

.mqv-view-link:hover {
	border-color: #222;
	color: #111 !important;
}

/* ── Body scroll lock ───────────────────────────────────────── */

html.mqv-html-lock {
	overflow: hidden;
}

/* ── Responsive ─────────────────────────────────────────────── */

@media (max-width: 700px) {
	#mqv-modal {
		padding: 0;
		align-items: flex-end;
	}

	.mqv-panel {
		width: 100%;
		max-height: 92vh;
		border-radius: 16px 16px 0 0;
		transform: translateY(30px);
	}

	#mqv-modal.is-open .mqv-panel {
		transform: translateY(0);
	}

	.mqv-body {
		padding: 1.25rem 1.25rem 2rem;
	}

	.mqv-product {
		grid-template-columns: 1fr;
		gap: 1.5rem;
	}

	.mqv-gallery-stage {
		aspect-ratio: 4 / 3;
	}

	.mqv-title {
		font-size: 1.1rem;
	}
}

/* ── Smart Link: linked product swatches inside modal ──────── */

.mqv-linked-row {
	margin-bottom: 1rem;
}

.mqv-linked-swatches {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.mqv-linked-swatch {
	display: block;
	width: 48px;
	height: 48px;
	border-radius: 6px;
	overflow: hidden;
	border: 2px solid transparent;
	transition: border-color 0.15s, transform 0.15s;
	flex-shrink: 0;
}

.mqv-linked-swatch img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.mqv-linked-swatch:hover {
	border-color: #222;
	transform: translateY(-1px);
}
