/**
 * Product Loop Loading Styles
 * CSS for the JavaScript-based product renderer
 */

/* Products container */
.woocommerce .products {
	transition: opacity 0.3s ease;
}

.woocommerce.loading .products {
	opacity: 0.5;
	pointer-events: none;
}

/* Loading spinner */
#products-loading {
	display: none;
	text-align: center;
	padding: 40px 20px;
	position: relative;
	min-height: 200px;
}

#products-loading::before {
	content: '';
	display: block;
	width: 40px;
	height: 40px;
	margin: 0 auto 20px;
	border: 4px solid #f3f3f3;
	border-top: 4px solid #333;
	border-radius: 50%;
	animation: spin-loader 1s linear infinite;
}

#products-loading::after {
	content: 'Loading products...';
	display: block;
	color: #999;
	font-style: italic;
}

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

/* Product grid improvements */
.woocommerce ul.products li.product {
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.woocommerce ul.products li.product:hover {
	transform: translateY(-5px);
	box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Skeleton loading */
.product-skeleton {
	background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
	background-size: 200% 100%;
	animation: skeleton-load 1.5s infinite;
	height: 100%;
	border-radius: 4px;
}

@keyframes skeleton-load {
	0% { background-position: 200% 0; }
	100% { background-position: -200% 0; }
}

/* No products found */
.woocommerce-info {
	padding: 20px;
	background-color: #f9f9f9;
	border-left: 4px solid #999;
	color: #666;
	margin: 20px 0;
}

/* Product rating */
.woocommerce-product-rating {
	margin: 10px 0;
	font-size: 12px;
}

.star-rating {
	display: inline-block;
	color: #ffb812;
	font-size: 14px;
	letter-spacing: 2px;
}

.woocommerce-product-rating .rating {
	color: #999;
	margin-left: 5px;
	font-size: 12px;
}

/* Sale badge */
.onsale {
	position: absolute;
	top: 10px;
	right: 10px;
	background-color: #d32f2f;
	color: white;
	padding: 5px 10px;
	border-radius: 3px;
	font-weight: bold;
	font-size: 12px;
	z-index: 10;
}

/* Filter controls container */
#filters-js-container {
	margin-bottom: 20px;
	padding: 15px;
	background-color: #f9f9f9;
	border-radius: 4px;
}

#filters-js-container [data-attribute] {
	margin-bottom: 15px;
	padding-bottom: 15px;
	border-bottom: 1px solid #ddd;
}

#filters-js-container [data-attribute]:last-child {
	border-bottom: none;
	margin-bottom: 0;
	padding-bottom: 0;
}

#filters-js-container label {
	display: block;
	margin: 8px 0;
	cursor: pointer;
	user-select: none;
}

#filters-js-container input[type="checkbox"] {
	margin-right: 8px;
	cursor: pointer;
}

#filters-js-container label:hover {
	color: #333;
}

/* Responsive design */
@media (max-width: 768px) {
	#products-loading {
		min-height: 150px;
	}
}
