/* =============================================================================
 * Storzen — Quick View
 * Frontend styles. Scoped under .sz-qv-* — no global bleed.
 * ========================================================================== */

/* ── Trigger Button ─────────────────────────────────────────────────────── */
.sz-qv-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	background: #FF3636;
	color: #fff;
	font-family: inherit;
	font-size: 13px;
	font-weight: 600;
	line-height: 1;
	padding: 9px 16px;
	border: none;
	border-radius: 6px;
	cursor: pointer;
	transition: opacity 0.15s, transform 0.08s, background 0.15s;
	text-decoration: none;
}

.sz-qv-btn:hover  { background: #E62E2E; }
.sz-qv-btn:active { transform: scale(0.97); }

.sz-qv-btn__icon,
.sz-qv-btn i { font-size: 14px; }

/* On-image variant — overlay centered on the product image */
.sz-qv-btn--on-image {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%) scale(0.95);
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.2s, transform 0.2s, background 0.15s;
	z-index: 5;
}

ul.products li.product:hover .sz-qv-btn--on-image,
.products .product:hover     .sz-qv-btn--on-image,
.wc-block-grid__product:hover .sz-qv-btn--on-image {
	opacity: 1;
	transform: translate(-50%, -50%) scale(1);
	pointer-events: auto;
}

/* Make the product card a positioning context for the overlay button */
ul.products li.product,
.products .product,
.wc-block-grid__product {
	position: relative;
}

.sz-qv-btn--after-title,
.sz-qv-btn--after-item {
	display: inline-flex;
	margin-top: 8px;
}

/* Overlay variant — always-visible compact icon button used inside the
 * Storzen card overlay (.social-style-two), alongside cart / wishlist / compare.
 * Styled to match those circular icon buttons; the text label is hidden. */
.sz-qv-btn--overlay {
	position: static;
	width: 38px;
	height: 38px;
	padding: 0;
	gap: 0;
	border-radius: 50%;
	background: transparent;
	border: 1px solid #e5e7eb;
	color: #6b7280;
	opacity: 1;
	pointer-events: auto;
	transform: none;
	vertical-align: middle;
}
.sz-qv-btn--overlay:hover {
	border-color: #FF3636;
	color: #FF3636;
	background: transparent;
	transform: translateY(-1px);
}
.sz-qv-btn--overlay:active { transform: scale(0.95); }
.sz-qv-btn--overlay:focus-visible {
	outline: 2px solid #FF3636;
	outline-offset: 2px;
}
.sz-qv-btn--overlay .sz-qv-btn__icon { font-size: 16px; }
.sz-qv-btn--overlay .sz-qv-btn__label {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

@media (prefers-reduced-motion: reduce) {
	.sz-qv-btn,
	.sz-qv-btn--on-image,
	.sz-qv-btn--overlay { transition: none; }
}

/* ── Modal Shell ────────────────────────────────────────────────────────── */
.sz-qv-modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	overflow-y: auto;
	box-sizing: border-box;
}

.sz-qv-modal[hidden] { display: none; }

.sz-qv-modal__backdrop {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
	animation: sz-qv-fade 0.2s ease;
	cursor: pointer;
}

.sz-qv-modal__wrap {
	position: relative;
	background: #ffffff;
	border-radius: 12px;
	width: 100%;
	max-width: 900px;
	max-height: calc(100vh - 40px);
	overflow-y: auto;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
	animation: sz-qv-slide-up 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.sz-qv-modal__close {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 32px;
	height: 32px;
	background: rgba(0, 0, 0, 0.05);
	color: #1d2327;
	border: none;
	border-radius: 50%;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 10;
	transition: background 0.15s;
}

.sz-qv-modal__close:hover { background: rgba(0, 0, 0, 0.12); }

.sz-qv-modal__content {
	padding: 32px;
	min-height: 300px;
}

.sz-qv-modal__loading {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 300px;
}

.sz-qv-spinner {
	width: 32px;
	height: 32px;
	border: 3px solid rgba(124, 58, 237, 0.2);
	border-top-color: #FF3636;
	border-radius: 50%;
	animation: sz-qv-spin 0.8s linear infinite;
}

@keyframes sz-qv-spin { to { transform: rotate(360deg); } }
@keyframes sz-qv-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes sz-qv-slide-up {
	from { transform: translateY(20px); opacity: 0; }
	to   { transform: translateY(0);    opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
	.sz-qv-modal__backdrop,
	.sz-qv-modal__wrap,
	.sz-qv-spinner { animation: none; }
}

/* ── Product Content ────────────────────────────────────────────────────── */
.sz-qv-product {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 32px;
}

.sz-qv-product__title {
	font-size: 24px;
	font-weight: 600;
	color: #1d2327;
	margin: 0 0 12px;
	line-height: 1.25;
}

.sz-qv-product__price {
	font-size: 22px;
	font-weight: 600;
	color: #FF3636;
	margin-bottom: 14px;
}

.sz-qv-product__price del { color: #9ca3af; font-weight: 400; font-size: 0.8em; margin-right: 6px; }
.sz-qv-product__price ins { text-decoration: none; background: transparent; }

.sz-qv-product__rating {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	color: #6b7280;
	margin-bottom: 14px;
}

.sz-qv-product__short-desc {
	font-size: 14px;
	line-height: 1.6;
	color: #4b5563;
	margin-bottom: 20px;
}

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

.sz-qv-product__meta {
	margin-top: 20px;
	padding-top: 16px;
	border-top: 1px solid #e5e7eb;
	font-size: 12px;
	color: #6b7280;
}

.sz-qv-product__meta-item { margin-bottom: 6px; }

.sz-qv-product__meta-label {
	font-weight: 600;
	color: #1d2327;
	margin-right: 6px;
}

.sz-qv-product__meta-item a {
	color: #FF3636;
	text-decoration: none;
}

.sz-qv-product__view-full {
	display: inline-block;
	margin-top: 14px;
	font-size: 13px;
	color: #FF3636;
	font-weight: 500;
	text-decoration: none;
}

.sz-qv-product__view-full:hover { text-decoration: underline; }

.sz-qv-product__unavailable {
	padding: 12px 14px;
	background: #fef2f2;
	color: #991b1b;
	border-radius: 6px;
	border-left: 3px solid #dc2626;
	font-size: 13px;
}

/* ── Gallery ────────────────────────────────────────────────────────────── */
.sz-qv-gallery__main {
	background: #f9fafb;
	border-radius: 8px;
	overflow: hidden;
	margin-bottom: 12px;
	aspect-ratio: 1 / 1;
	display: flex;
	align-items: center;
	justify-content: center;
}

.sz-qv-gallery__main-img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: block;
}

.sz-qv-gallery__thumbs {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

.sz-qv-gallery__thumb {
	width: 64px;
	height: 64px;
	border: 2px solid transparent;
	border-radius: 6px;
	cursor: pointer;
	overflow: hidden;
	padding: 0;
	background: #f9fafb;
	transition: border-color 0.15s;
}

.sz-qv-gallery__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.sz-qv-gallery__thumb.is-active { border-color: #FF3636; }
.sz-qv-gallery__thumb:hover     { border-color: #a78bfa; }

.sz-qv-gallery__placeholder {
	background: #f9fafb;
	aspect-ratio: 1 / 1;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #9ca3af;
	border-radius: 8px;
}

/* ── Add-to-cart Form ───────────────────────────────────────────────────── */
.sz-qv-cart-form {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: stretch;
	margin-top: 4px;
}

.sz-qv-attribute {
	display: flex;
	flex-direction: column;
	gap: 4px;
	width: 100%;
	margin-bottom: 8px;
}

.sz-qv-attribute label {
	font-size: 12px;
	font-weight: 600;
	color: #1d2327;
}

.sz-qv-attribute__select {
	width: 100%;
	padding: 8px 12px;
	border: 1px solid #d1d5db;
	border-radius: 6px;
	background: #fff;
	font-size: 13px;
	color: #1d2327;
	cursor: pointer;
}

.sz-qv-attribute__select:focus {
	outline: none;
	border-color: #FF3636;
	box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.15);
}

.sz-qv-qty__input {
	width: 70px;
	padding: 10px 12px;
	border: 1px solid #d1d5db;
	border-radius: 6px;
	font-size: 14px;
	text-align: center;
}

.sz-qv-add-btn {
	flex: 1;
	min-width: 140px;
	padding: 12px 22px;
	background: #FF3636;
	color: #fff;
	border: none;
	border-radius: 6px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.15s, transform 0.08s;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.sz-qv-add-btn:hover:not(:disabled)  { background: #E62E2E; }
.sz-qv-add-btn:active:not(:disabled) { transform: scale(0.98); }

.sz-qv-add-btn:disabled {
	background: #9ca3af;
	cursor: not-allowed;
	opacity: 0.7;
}

.sz-qv-add-btn.is-loading { opacity: 0.7; pointer-events: none; }
.sz-qv-add-btn.is-success { background: #16a34a; }

.sz-qv-variation-info {
	width: 100%;
	padding: 10px 12px;
	background: #f3f4f6;
	border-radius: 6px;
	font-size: 13px;
	margin: 4px 0;
}

.sz-qv-variation-info[hidden] { display: none; }

.sz-qv-variation-price {
	font-weight: 600;
	color: #FF3636;
	margin-right: 8px;
}

.sz-qv-variation-stock { color: #6b7280; }

.sz-qv-form-error {
	width: 100%;
	padding: 8px 12px;
	background: #fef2f2;
	color: #991b1b;
	border: 1px solid #fecaca;
	border-radius: 6px;
	font-size: 13px;
	margin-top: 4px;
}

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
	.sz-qv-modal           { padding: 10px; }
	.sz-qv-modal__content  { padding: 20px; }
	.sz-qv-product {
		grid-template-columns: 1fr;
		gap: 20px;
	}
	.sz-qv-product__title  { font-size: 20px; }
	.sz-qv-gallery__main   { aspect-ratio: 4 / 3; }
}
