/* Basic styles for the Quick View modal and overlay */
/* Use CSS variables for button colors (set by inline styles) */

:root {
	--wcqv-button-bg: #000;
	--wcqv-button-color: #fff;
}

/* Quick View button overlay on product image */
.wcqv-overlay {
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%) scale(0.8);
	opacity: 0 !important; /* Force hidden by default */
	transition: all .3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
	pointer-events: none !important; /* Force non-interactive by default */
	z-index: 10;
	width: auto;
	text-align: center;
}

/* JavaScript-controlled overlay visibility - ONLY when class is added */
.wcqv-overlay.wcqv-show {
	opacity: 1 !important;
	pointer-events: auto !important;
	transform: translate(-50%, -50%) scale(1) !important;
}

.wcqv-force-show .wcqv-overlay {
	opacity: 1 !important;
	pointer-events: auto !important;
	transform: translate(-50%, -50%) scale(1) !important;
}

/* Style the button itself - Modern design with transparency */
.wcqv-button {
	background: linear-gradient(135deg, var(--wcqv-button-bg), rgba(0,0,0,0.8));
	color: var(--wcqv-button-color);
	border: none;
	padding: 12px 24px;
	font-size: 13px;
	font-weight: 700;
	border-radius: 30px;
	cursor: pointer;
	box-shadow: 0 8px 25px rgba(0,0,0,0.3);
	transition: all .3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
	text-transform: uppercase;
	letter-spacing: 1px;
	position: relative;
	overflow: hidden;
	backdrop-filter: blur(10px);
	border: 2px solid rgba(255,255,255,0.2);
	min-width: 120px;
	/* Add transparency to see product behind */
	opacity: 0.85;
}

.wcqv-button::before {
	content: '';
	position: absolute;
	top: 0;
	left: -100%;
	width: 100%;
	height: 100%;
	background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
	transition: left 0.6s ease;
	z-index: 1;
	pointer-events: none;
}

.wcqv-button:hover::before {
	left: 100%;
}

.wcqv-button:hover {
	transform: translateY(-2px) scale(1.05);
	box-shadow: 0 12px 35px rgba(0,0,0,0.4);
	background: linear-gradient(135deg, rgba(0,0,0,0.9), var(--wcqv-button-bg));
	/* Increase opacity slightly on hover for better visibility */
	opacity: 0.95;
}

.wcqv-button:active {
	transform: translateY(0) scale(0.98);
	transition: all .1s ease;
}

/* Make sure the product container has a position for the overlay to sit in */
.product,
ul.products li.product,
.woocommerce ul.products li.product,
.related ul.products li.product,
.cross-sells ul.products li.product,
.upsells ul.products li.product,
.wc-block-grid__product,
li[class*="product"],
div[class*="product"],
/* Additional selectors for various theme structures */
.woocommerce .products .product,
.woocommerce-page .products .product,
section.related .products .product,
section.cross-sells .products .product,
section.upsells .products .product,
.related-products .product,
.cross-sell-products .product,
.upsell-products .product,
article.product {
	position: relative;
	overflow: visible;
}

/* Target the product image container more specifically */
.product .woocommerce-LoopProduct-link,
.product .product-image,
.product .wp-post-image,
ul.products li.product .woocommerce-LoopProduct-link,
ul.products li.product .product-image,
ul.products li.product .wp-post-image,
.woocommerce ul.products li.product .woocommerce-LoopProduct-link,
.woocommerce ul.products li.product .product-image,
.woocommerce ul.products li.product .wp-post-image,
.related ul.products li.product .woocommerce-LoopProduct-link,
.related ul.products li.product .product-image,
.related ul.products li.product .wp-post-image,
.cross-sells ul.products li.product .woocommerce-LoopProduct-link,
.cross-sells ul.products li.product .product-image,
.cross-sells ul.products li.product .wp-post-image,
.upsells ul.products li.product .woocommerce-LoopProduct-link,
.upsells ul.products li.product .product-image,
.upsells ul.products li.product .wp-post-image {
	position: relative;
	display: block;
}

/* Modal base - Enhanced */
.wcqv-modal {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 99999;
	animation: wcqv-fade-in 0.3s ease-out;
}

.wcqv-modal[aria-hidden="false"] {
	display: block;
}

@keyframes wcqv-fade-in {
	from { opacity: 0; }
	to { opacity: 1; }
}

@keyframes wcqv-scale-in {
	from { 
		transform: translate(-50%, -50%) scale(0.8); 
		opacity: 0;
	}
	to { 
		transform: translate(-50%, -50%) scale(1); 
		opacity: 1;
	}
}

/* Backdrop - Enhanced */
.wcqv-modal-backdrop {
	position: absolute;
	inset: 0;
	background: linear-gradient(135deg, rgba(0,0,0,0.8), rgba(0,0,0,0.6));
	backdrop-filter: blur(5px);
}

/* Dialog - Modern design */
.wcqv-modal-dialog {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	background: #fff;
	width: 90%;
	max-width: 1200px;
	max-height: 90vh;
	overflow: hidden;
	border-radius: 20px;
	box-shadow: 
		0 25px 80px rgba(0,0,0,0.5),
		0 0 0 1px rgba(255,255,255,0.1);
	padding: 0;
	animation: wcqv-scale-in 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Close button - Modern */
.wcqv-modal-close {
	position: absolute;
	right: 20px;
	top: 20px;
	background: rgba(0,0,0,0.1);
	border: none;
	font-size: 24px;
	line-height: 1;
	color: #666;
	cursor: pointer;
	width: 45px;
	height: 45px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 10;
	transition: all .3s ease;
	backdrop-filter: blur(10px);
	border: 1px solid rgba(255,255,255,0.2);
}

.wcqv-modal-close:hover {
	background: rgba(0,0,0,0.2);
	color: #333;
	transform: rotate(90deg) scale(1.1);
}

/* Modal content layout - Enhanced */
.wcqv-modal-content {
	padding: 40px;
	box-sizing: border-box;
	max-height: 90vh;
	overflow-y: auto;
	background: linear-gradient(135deg, #ffffff, #fafafa);
}

.wcqv-inner {
	display: flex;
	flex-wrap: wrap;
	gap: 40px;
	align-items: flex-start;
}

.wcqv-left {
	flex: 1 1 45%;
	min-width: 300px;
	text-align: center;
	position: relative;
}

.wcqv-carousel-wrap { 
	position: relative; 
	background: linear-gradient(135deg, #f8f9fa, #e9ecef);
	border-radius: 15px;
	padding: 25px;
	box-shadow: inset 0 2px 10px rgba(0,0,0,0.05);
}

.wcqv-carousel { display: block; overflow: hidden; }
.wcqv-slide { display: none; text-align: center; }
.wcqv-slide img { 
	max-width: 100%; 
	height: auto; 
	display: inline-block; 
	border: none; 
	padding: 0; 
	background: transparent; 
	border-radius: 10px;
	box-shadow: 0 10px 30px rgba(0,0,0,0.1);
	transition: transform 0.3s ease;
}

.wcqv-slide img:hover {
	transform: scale(1.02);
}

.wcqv-slide.wcqv-active { display: block; }

.wcqv-carousel-prev,
.wcqv-carousel-next {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background: rgba(0,0,0,0.7);
	color: #fff;
	border: none;
	padding: 10px 12px;
	cursor: pointer;
	border-radius: 50%;
	z-index: 5;
	font-size: 16px;
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all .2s ease;
}

.wcqv-carousel-prev:hover,
.wcqv-carousel-next:hover {
	background: rgba(0,0,0,0.9);
}

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

.wcqv-gallery-thumbs {
	margin-top: 15px;
	display: flex;
	gap: 10px;
	justify-content: center;
	flex-wrap: wrap;
}

.wcqv-thumb img {
	width: 60px;
	height: 60px;
	object-fit: cover;
	border: 2px solid #ddd;
	padding: 3px;
	cursor: pointer;
	opacity: .8;
	border-radius: 4px;
	transition: all .2s ease;
}

.wcqv-thumb img:hover {
	opacity: 1;
	border-color: #999;
}

.wcqv-thumb.wcqv-thumb-active img { 
	border-color: var(--wcqv-button-bg); 
	box-shadow: 0 0 0 2px rgba(0,0,0,0.1); 
	opacity: 1;
}

/* Right side - Product details enhanced */
.wcqv-right {
	flex: 1 1 45%;
	min-width: 300px;
	padding: 20px;
	background: rgba(255,255,255,0.8);
	border-radius: 15px;
	backdrop-filter: blur(10px);
	border: 1px solid rgba(255,255,255,0.2);
}

.wcqv-title {
	margin: 0 0 20px;
	font-size: 28px;
	font-weight: 700;
	color: #1a1a1a;
	line-height: 1.3;
	background: linear-gradient(135deg, #333, #666);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
}

.wcqv-price {
	font-size: 24px;
	color: #e74c3c;
	margin-bottom: 25px;
	font-weight: 800;
	background: linear-gradient(135deg, #e74c3c, #c0392b);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
}

.wcqv-excerpt {
	margin-bottom: 30px;
	color: #555;
	line-height: 1.7;
	font-size: 16px;
	background: rgba(255,255,255,0.7);
	padding: 20px;
	border-radius: 10px;
	border-left: 4px solid var(--wcqv-button-bg);
}

.wcqv-actions {
	margin-bottom: 30px;
}

.wcqv-actions .button,
.wcqv-actions button {
	margin-right: 15px;
	margin-bottom: 15px;
	padding: 14px 30px;
	font-size: 15px;
	font-weight: 700;
	border-radius: 30px;
	transition: all .3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
	background: linear-gradient(135deg, var(--wcqv-button-bg), rgba(0,0,0,0.8));
	color: var(--wcqv-button-color);
	border: none;
	box-shadow: 0 8px 25px rgba(0,0,0,0.2);
	text-transform: uppercase;
	letter-spacing: 1px;
	position: relative;
	overflow: hidden;
	isolation: isolate; /* Prevents interference between buttons */
}

.wcqv-actions .button::before,
.wcqv-actions button::before {
	content: '';
	position: absolute;
	top: 0;
	left: -100%;
	width: 100%;
	height: 100%;
	background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
	transition: left 0.6s ease;
	z-index: 1;
	pointer-events: none; /* Prevents interference with button clicks */
}

.wcqv-actions .button:hover::before,
.wcqv-actions button:hover::before {
	left: 100%;
}

.wcqv-actions .button:hover,
.wcqv-actions button:hover {
	transform: translateY(-3px) scale(1.05);
	box-shadow: 0 12px 35px rgba(0,0,0,0.3);
}

/* Specific styling for different button types */
.wcqv-actions .wcqv-add-to-cart {
	background: linear-gradient(135deg, #28a745, #20963d);
}

.wcqv-actions .wcqv-view-product,
.wcqv-actions .wcqv-view-full {
	background: linear-gradient(135deg, #6c757d, #5a6268);
	margin-left: 5px;
}

.wcqv-actions .wcqv-add-to-cart:hover {
	background: linear-gradient(135deg, #20963d, #1e7e34);
}

.wcqv-actions .wcqv-view-product:hover,
.wcqv-actions .wcqv-view-full:hover {
	background: linear-gradient(135deg, #5a6268, #495057);
}

.wcqv-meta {
	font-size: 14px;
	color: #777;
	line-height: 1.8;
	background: rgba(255,255,255,0.5);
	padding: 20px;
	border-radius: 10px;
	border: 1px solid rgba(0,0,0,0.05);
}

.wcqv-meta p {
	margin-bottom: 10px;
	padding: 5px 0;
	border-bottom: 1px solid rgba(0,0,0,0.05);
}

.wcqv-meta p:last-child {
	border-bottom: none;
	margin-bottom: 0;
}

/* Loading and Notice styles */
.wcqv-loading {
	text-align: center;
	padding: 40px;
	font-size: 16px;
	color: #666;
}

.wcqv-notice {
	padding: 10px 15px;
	margin-bottom: 15px;
	border-radius: 4px;
	font-size: 14px;
}

.wcqv-notice.success {
	background: #d4edda;
	color: #155724;
	border: 1px solid #c3e6cb;
}

.wcqv-notice.error {
	background: #f8d7da;
	color: #721c24;
	border: 1px solid #f5c6cb;
}

/* Responsive */
@media (max-width: 768px) {
	.wcqv-modal-dialog {
		width: 95%;
		margin: 20px;
	}
	
	.wcqv-modal-content {
		padding: 20px;
	}
	
	.wcqv-inner {
		flex-direction: column;
		gap: 20px;
	}
	
	.wcqv-left, .wcqv-right {
		min-width: 100%;
	}
	
	.wcqv-title {
		font-size: 20px;
	}
	
	.wcqv-carousel-prev,
	.wcqv-carousel-next {
		display: none;
	}
}