/**
 * Elementor WooCommerce Products Fix - Styles
 * Combines styles for Template Mela compatibility and AJAX pagination
 * 
 * @version 1.0.0
 */

/* Loading state styles */
.ewpf-loading {
	position: relative;
}

.ewpf-loading::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 20px;
	height: 20px;
	margin: -10px 0 0 -10px;
	border: 2px solid #f3f3f3;
	border-top: 2px solid #007cba;
	border-radius: 50%;
	animation: ewpf-spin 1s linear infinite;
	z-index: 1000;
}

@keyframes ewpf-spin {
	0% { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}

/* Smooth transitions for pagination updates */
.elementor-widget-woocommerce-products .products,
.elementor-widget-wc-products .products {
	transition: opacity 0.3s ease;
}

/* Ensure pagination links are clickable */
.elementor-widget-woocommerce-products .woocommerce-pagination a.page-numbers,
.elementor-widget-wc-products .woocommerce-pagination a.page-numbers {
	cursor: pointer;
	transition: all 0.2s ease;
}

.elementor-widget-woocommerce-products .woocommerce-pagination a.page-numbers:hover,
.elementor-widget-wc-products .woocommerce-pagination a.page-numbers:hover {
	opacity: 0.8;
}

/* Template Mela compatibility styles */
.products.woo-archive-loop {
	/* Ensure proper styling for Template Mela compatibility */
	position: relative;
}

.categories-wrap.woo-archive-loop {
	/* Ensure proper styling for Template Mela compatibility */
	position: relative;
}

/* Debug mode styles */
.ewpf-debug {
	border: 1px solid #ff6b6b;
	background: #ffe0e0;
	padding: 10px;
	margin: 10px 0;
	border-radius: 4px;
	font-family: monospace;
	font-size: 12px;
}

.ewpf-debug::before {
	content: '[EWP Fix Debug] ';
	font-weight: bold;
	color: #ff6b6b;
}

/* Additional compatibility styles */
.elementor-widget-woocommerce-products .woo-archive-loop,
.elementor-widget-wc-products .woo-archive-loop,
.elementor-widget-tmcore-product-categories-carousel .woo-archive-loop {
	/* Ensure Template Mela compatibility */
	min-height: 1px;
}

/* Loading overlay for better UX */
.ewpf-loading::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(255, 255, 255, 0.8);
	z-index: 999;
}
