/* Quick View Module — Frontend Styles */

/* ─── Quick View Button Wrapper ─── */
.jwp-stk-qv-btn-wrap {
	display: block;
	width: 100%;
}

.jwp-stk-qv-btn-wrap--left {
	text-align: left;
}

.jwp-stk-qv-btn-wrap--center {
	text-align: center;
}

.jwp-stk-qv-btn-wrap--right {
	text-align: right;
}

.jwp-stk-qv-btn-wrap--full .jwp-stk-quick-view-btn {
	width: 100%;
}

/* ─── Quick View Button ─── */
.jwp-stk-quick-view-btn {
	display: inline-block;
	margin: 6px 4px 0;
	font-size: 13px;
	font-weight: 500;
	cursor: pointer;
}

/* Size variants */
.jwp-stk-qv-btn--small {
	font-size: 11px;
	padding: 4px 10px;
}

.jwp-stk-qv-btn--large {
	font-size: 15px;
	padding: 10px 22px;
}

/* Style variants */
.jwp-stk-qv-btn--outline {
	background-color: transparent !important;
	border: 2px solid currentColor;
}

/* Custom style — hover */
.jwp-stk-qv-btn-wrap--custom .jwp-stk-quick-view-btn:hover {
	background-color: var( --jwp-qv-hover-bg, #555555 ) !important;
	color: var( --jwp-qv-hover-text, #ffffff ) !important;
	border-color: var( --jwp-qv-hover-bg, #555555 ) !important;
}

/* ─── Modal Overlay ─── */
.jwp-stk-qv-overlay {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.6);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.25s ease, visibility 0.25s ease;
}

.jwp-stk-qv-overlay.is-visible {
	opacity: 1;
	visibility: visible;
}

/* ─── Modal Container ─── */
.jwp-stk-qv-modal {
	position: relative;
	background: #fff;
	border-radius: 8px;
	max-width: 860px;
	width: 92%;
	max-height: 85vh;
	overflow-y: auto;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
	transform: translateY(20px);
	transition: transform 0.25s ease;
}

.jwp-stk-qv-overlay.is-visible .jwp-stk-qv-modal {
	transform: translateY(0);
}

/* ─── Close Button ─── */
.jwp-stk-qv-close {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 10;
	width: 32px;
	height: 32px;
	border: none;
	background: transparent !important;
	cursor: pointer;
	font-size: 18px;
	line-height: 1;
	color: #333;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.15s;
}

.jwp-stk-qv-close:hover {
	background: #ddd;
}

/* ─── Loading Spinner ─── */
.jwp-stk-qv-loading {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 300px;
}

.jwp-stk-qv-spinner {
	width: 36px;
	height: 36px;
	border: 3px solid #e0e0e0;
	border-top-color: #007cba;
	border-radius: 50%;
	animation: jwp-stk-spin 0.6s linear infinite;
}

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

/* ─── Product Layout ─── */
.jwp-stk-qv-product {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0;
}

@media (max-width: 640px) {
	.jwp-stk-qv-product {
		grid-template-columns: 1fr;
	}
}

/* ─── Gallery ─── */
.jwp-stk-qv-gallery {
	padding: 24px;
	border-right: 1px solid #f0f0f0;
}

@media (max-width: 640px) {
	.jwp-stk-qv-gallery {
		border-right: none;
		border-bottom: 1px solid #f0f0f0;
	}
}

.jwp-stk-qv-main-image img {
	width: 100%;
	height: auto;
	border-radius: 4px;
	object-fit: cover;
}

.jwp-stk-qv-thumbnails {
	display: flex;
	gap: 8px;
	margin-top: 12px;
}

.jwp-stk-qv-thumb {
	width: 56px;
	height: 56px;
	border: 2px solid transparent;
	border-radius: 4px;
	cursor: pointer;
	overflow: hidden;
	padding: 0;
	background: none;
	transition: border-color 0.15s;
}

.jwp-stk-qv-thumb.is-active,
.jwp-stk-qv-thumb:hover {
	border-color: #007cba;
}

.jwp-stk-qv-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* ─── Summary ─── */
.jwp-stk-qv-summary {
	padding: 24px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.jwp-stk-qv-title {
	font-size: 20px;
	font-weight: 600;
	margin: 0;
	line-height: 1.3;
}

.jwp-stk-qv-rating {
	display: flex;
	align-items: center;
	gap: 4px;
}

.jwp-stk-qv-price {
	font-size: 18px;
	font-weight: 600;
	color: #111;
}

.jwp-stk-qv-price del {
	opacity: 0.5;
	font-weight: 400;
}

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

.jwp-stk-qv-excerpt {
	font-size: 14px;
	color: #555;
	line-height: 1.6;
}

.jwp-stk-qv-excerpt p {
	margin: 0 0 8px;
}

.jwp-stk-qv-add-to-cart .button {
	display: inline-block;
}

.jwp-stk-qv-meta {
	font-size: 12px;
	color: #888;
	display: flex;
	flex-direction: column;
	gap: 2px;
	margin-top: 4px;
}

.jwp-stk-qv-view-full {
	font-size: 13px;
	font-weight: 500;
	color: #007cba;
	text-decoration: none;
	margin-top: auto;
}

.jwp-stk-qv-view-full:hover {
	text-decoration: underline;
}
