/* Quick View Modal Styles */

/* Base Modal Styles */
.softtent-po-quick-view-modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 999999;
}

.softtent-po-modal-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.75);
	opacity: 0;
	transition: opacity 0.3s ease;
}

.softtent-po-quick-view-modal.softtent-po-modal-open .softtent-po-modal-overlay {
	opacity: 1;
}

.softtent-po-modal-wrapper {
	position: relative;
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	overflow-y: auto;
}

.softtent-po-modal-container {
	position: relative;
	width: 100%;
	max-width: 900px;
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
	opacity: 0;
	transform: scale(0.9);
	transition: all 0.3s ease;
}

.softtent-po-quick-view-modal.softtent-po-modal-open .softtent-po-modal-container {
	opacity: 1;
	transform: scale(1);
}

/* Animation Types */
.softtent-po-modal-fade .softtent-po-modal-container {
	transform: none;
}

.softtent-po-modal-scale .softtent-po-modal-container {
	transform: scale(0.7);
}

.softtent-po-modal-scale.softtent-po-modal-open .softtent-po-modal-container {
	transform: scale(1);
}

.softtent-po-modal-slide_up .softtent-po-modal-container {
	transform: translateY(50px);
}

.softtent-po-modal-slide_up.softtent-po-modal-open .softtent-po-modal-container {
	transform: translateY(0);
}

.softtent-po-modal-slide_down .softtent-po-modal-container {
	transform: translateY(-50px);
}

.softtent-po-modal-slide_down.softtent-po-modal-open .softtent-po-modal-container {
	transform: translateY(0);
}

.softtent-po-modal-zoom .softtent-po-modal-container {
	transform: scale(0.5);
}

.softtent-po-modal-zoom.softtent-po-modal-open .softtent-po-modal-container {
	transform: scale(1);
}

.softtent-po-modal-content {
	padding: 30px;
}

/* Close Button */
.softtent-po-modal-close {
	position: absolute;
	top: -15px;
	right: -15px;
	width: 40px;
	height: 40px;
	border: none;
	background: #fff;
	border-radius: 50%;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
	transition: all 0.2s ease;
	z-index: 10;
}

.softtent-po-modal-close:hover {
	background: #f5f5f5;
	transform: scale(1.1);
}

.softtent-po-modal-close svg {
	width: 20px;
	height: 20px;
}

/* Loading Spinner */
.softtent-po-modal-loading {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 200px;
}

.softtent-po-modal-loading .spinner {
	width: 40px;
	height: 40px;
	border: 4px solid #f3f3f3;
	border-top: 4px solid #0055ff;
	border-radius: 50%;
	animation: softtent-po-spin 1s linear infinite;
}

@keyframes softtent-po-spin {
	0% {
		transform: rotate(0deg);
	}

	100% {
		transform: rotate(360deg);
	}
}

/* Product Content */
.softtent-po-quick-view-product {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 30px;
	align-items: start;
}

.softtent-po-quick-view-images {
	position: sticky;
	top: 0;
}

.softtent-po-quick-view-images img {
	width: 100%;
	height: auto;
	border-radius: 6px;
	object-fit: cover;
}

/* Summary Section */
.softtent-po-quick-view-summary {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.softtent-po-quick-view-summary .product-title {
	margin: 0;
	font-size: 26px;
	font-weight: 600;
	line-height: 1.3;
	letter-spacing: -0.02em;
	color: #1a1a1a;
}

.softtent-po-quick-view-summary .product-title a {
	color: inherit;
	text-decoration: none;
	transition: color 0.2s ease;
}

.softtent-po-quick-view-summary .product-title a:hover {
	color: #0055ff;
}

/* Price Styles */
.softtent-po-quick-view-summary .price {
	font-size: 24px;
	font-weight: 700;
	margin: 4px 0;
	color: #1a1a1a;
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}

.softtent-po-quick-view-summary .price del {
	font-size: 18px;
	font-weight: 400;
	color: #999;
	text-decoration: line-through;
}

.softtent-po-quick-view-summary .price ins {
	text-decoration: none;
	color: #e53935;
}

.softtent-po-quick-view-summary .price .woocommerce-Price-currencySymbol {
	font-size: 0.75em;
	vertical-align: super;
}

/* Rating Styles */
.softtent-po-quick-view-summary .woocommerce-product-rating {
	margin: 0;
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	color: #666;
}

.softtent-po-quick-view-summary .woocommerce-product-rating .star-rating {
	font-size: 14px;
}

/* Short Description */
.softtent-po-quick-view-summary .product-short-description {
	margin: 8px 0;
	color: #555;
	font-size: 15px;
	line-height: 1.7;
}

.softtent-po-quick-view-summary .product-short-description p {
	margin: 0 0 10px;
}

.softtent-po-quick-view-summary .product-short-description p:last-child {
	margin-bottom: 0;
}

/* Stock Status */
.softtent-po-quick-view-summary .stock-status {
	margin: 4px 0;
	font-size: 14px;
	font-weight: 500;
}

.softtent-po-quick-view-summary .stock-status .in-stock,
.softtent-po-quick-view-summary .stock-status .stock.in-stock {
	color: #2e7d32;
}

.softtent-po-quick-view-summary .stock-status .out-of-stock,
.softtent-po-quick-view-summary .stock-status .stock.out-of-stock {
	color: #c62828;
}

/* SKU */
.softtent-po-quick-view-summary .product-sku {
	margin: 4px 0;
	font-size: 13px;
	color: #777;
	display: flex;
	align-items: center;
	gap: 6px;
}

.softtent-po-quick-view-summary .product-sku .sku-label {
	font-weight: 600;
	color: #555;
	text-transform: uppercase;
	font-size: 12px;
	letter-spacing: 0.5px;
}

/* Categories */
.softtent-po-quick-view-summary .product-categories {
	margin: 4px 0;
	font-size: 13px;
	color: #777;
}

.softtent-po-quick-view-summary .product-categories a {
	color: #0055ff;
	text-decoration: none;
	transition: color 0.2s ease;
}

.softtent-po-quick-view-summary .product-categories a:hover {
	color: #003399;
	text-decoration: underline;
}

/* Product Meta (Tags) */
.softtent-po-quick-view-summary .product-meta {
	margin: 4px 0;
	font-size: 13px;
	color: #777;
}

.softtent-po-quick-view-summary .product-meta a {
	color: #0055ff;
	text-decoration: none;
	transition: color 0.2s ease;
}

.softtent-po-quick-view-summary .product-meta a:hover {
	color: #003399;
}

/* Action Buttons */
.softtent-po-quick-view-actions {
	margin-top: 16px;
	padding-top: 16px;
	border-top: 1px solid #eee;
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
}

.softtent-po-quick-view-actions .button {
	flex: 1;
	min-width: 140px;
	text-align: center;
	padding: 14px 24px;
	border-radius: 6px;
	text-decoration: none;
	font-size: 15px;
	font-weight: 600;
	letter-spacing: 0.3px;
	transition: all 0.25s ease;
	border: none;
	cursor: pointer;
}

.softtent-po-quick-view-actions .add-to-cart {
	background: #0055ff;
	color: #fff;
	box-shadow: 0 2px 8px rgba(0, 85, 255, 0.25);
}

.softtent-po-quick-view-actions .add-to-cart:hover {
	background: #0044cc;
	box-shadow: 0 4px 12px rgba(0, 85, 255, 0.35);
	transform: translateY(-1px);
}

.softtent-po-quick-view-actions .view-details {
	background: #f5f5f5;
	color: #333;
	border: 1px solid #e0e0e0;
}

.softtent-po-quick-view-actions .view-details:hover {
	background: #eaeaea;
	border-color: #ccc;
}

.softtent-po-quick-view-actions .add-to-cart:disabled {
	opacity: 0.7;
	cursor: not-allowed;
	transform: none;
}

.softtent-po-quick-view-actions .add-to-cart.loading {
	position: relative;
}

/* Cart Message */
.softtent-po-cart-message {
	padding: 12px 16px;
	border-radius: 6px;
	font-size: 14px;
	font-weight: 500;
	margin-bottom: 12px;
}

.softtent-po-cart-message-success {
	background: #e8f5e9;
	color: #2e7d32;
	border: 1px solid #a5d6a7;
}

.softtent-po-cart-message-error {
	background: #ffebee;
	color: #c62828;
	border: 1px solid #ef9a9a;
}

/* Gallery */
.softtent-po-quick-view-gallery .gallery-main {
	margin-bottom: 12px;
	border-radius: 6px;
	overflow: hidden;
}

.softtent-po-quick-view-gallery .gallery-main img {
	width: 100%;
	height: auto;
	border-radius: 6px;
	display: block;
}

.softtent-po-quick-view-gallery .gallery-thumbs {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
	gap: 8px;
}

.softtent-po-quick-view-gallery .gallery-thumb {
	cursor: pointer;
	border: 2px solid transparent;
	border-radius: 6px;
	overflow: hidden;
	transition: all 0.2s ease;
	opacity: 0.7;
}

.softtent-po-quick-view-gallery .gallery-thumb:hover {
	opacity: 1;
	border-color: #ddd;
}

.softtent-po-quick-view-gallery .gallery-thumb.active {
	opacity: 1;
	border-color: #0055ff;
}

.softtent-po-quick-view-gallery .gallery-thumb img {
	width: 100%;
	height: auto;
	display: block;
	aspect-ratio: 1;
	object-fit: cover;
}

/* WooCommerce Product Rating */
.woocommerce-product-rating {
	margin: 10px 0;
}

/* Responsive - Tablet */
@media (max-width: 768px) {
	.softtent-po-quick-view-product {
		grid-template-columns: 1fr;
		gap: 24px;
	}

	.softtent-po-quick-view-images {
		position: static;
	}

	.softtent-po-quick-view-images img {
		max-height: 400px;
		object-fit: contain;
	}

	.softtent-po-quick-view-gallery .gallery-main img {
		max-height: 400px;
		object-fit: contain;
	}

	/* Move close button inside modal on tablet */
	.softtent-po-modal-close {
		top: 10px !important;
		right: 10px !important;
	}

	.softtent-po-modal-content {
		padding: 20px;
	}

	.softtent-po-modal-container {
		max-width: 600px;
	}

	.softtent-po-quick-view-summary .product-title {
		font-size: 22px;
	}

	.softtent-po-quick-view-summary .price {
		font-size: 20px;
	}
}

/* Responsive - Mobile */
@media (max-width: 480px) {
	.softtent-po-modal-wrapper {
		padding: 10px;
	}

	.softtent-po-modal-container {
		max-width: 100%;
	}

	.softtent-po-quick-view-images img {
		max-height: 300px;
		object-fit: contain;
	}

	.softtent-po-quick-view-gallery .gallery-main img {
		max-height: 300px;
		object-fit: contain;
	}

	/* Move close button inside modal on mobile and make it smaller */
	.softtent-po-modal-close {
		top: 8px !important;
		right: 8px !important;
		width: 32px !important;
		height: 32px !important;
	}

	.softtent-po-modal-close svg {
		width: 16px !important;
		height: 16px !important;
	}

	.softtent-po-modal-content {
		padding: 15px;
	}

	.softtent-po-quick-view-summary .product-title {
		font-size: 20px;
	}

	.softtent-po-quick-view-summary .price {
		font-size: 18px;
	}

	.softtent-po-quick-view-summary .price del {
		font-size: 14px;
	}

	.softtent-po-quick-view-actions {
		flex-direction: column;
	}

	.softtent-po-quick-view-actions .button {
		width: 100%;
	}

	.softtent-po-quick-view-gallery .gallery-thumbs {
		grid-template-columns: repeat(4, 1fr);
	}
}

/* Button Show On Hover - Hide by default, show on product hover */
.softtent-po-quick-view-overlay.softtent-po-quick-view-show-on-hover {
	opacity: 0 !important;
	visibility: hidden !important;
	transition: opacity 0.3s ease, visibility 0.3s ease !important;
}

/* Classic Theme - Show on hover */
.woocommerce ul.products li.product:hover .softtent-po-quick-view-overlay.softtent-po-quick-view-show-on-hover,
.products .product:hover .softtent-po-quick-view-overlay.softtent-po-quick-view-show-on-hover {
	opacity: 1 !important;
	visibility: visible !important;
}

/* Block Theme - Show on hover */
.wc-block-grid__product:hover .softtent-po-quick-view-overlay.softtent-po-quick-view-show-on-hover,
.wc-block-product:hover .softtent-po-quick-view-overlay.softtent-po-quick-view-show-on-hover {
	opacity: 1 !important;
	visibility: visible !important;
}

/* Error Message */
.softtent-po-modal-error {
	padding: 20px;
	text-align: center;
	color: #c00;
	font-size: 16px;
}

