/* csb-product-grid.css */
:root {
	--csb-primary-color: #127d6b;
	--csb-accent-color: #e74c3c;
}

.csb-products-grid {
	display: grid;
	gap: 20px;
}

.csb-grid-desktop-4 .csb-products-grid,
.csb-grid-4-col {
	grid-template-columns: repeat(4, 1fr);
}

.csb-grid-desktop-3 .csb-products-grid { grid-template-columns: repeat(3, 1fr); }
.csb-grid-desktop-2 .csb-products-grid { grid-template-columns: repeat(2, 1fr); }
.csb-grid-desktop-5 .csb-products-grid { grid-template-columns: repeat(5, 1fr); }

@media (max-width: 1024px) {
	.csb-grid-tablet-2 .csb-products-grid,
	.csb-grid-4-col {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 767px) {
	.csb-grid-mobile-1 .csb-products-grid,
	.csb-grid-4-col {
		grid-template-columns: 1fr;
	}
}

.csb-product-card {
	background: #fff;
	border-radius: 8px;
	padding: 15px;
	box-shadow: 0 2px 10px rgba(0,0,0,0.05);
	transition: transform 0.3s ease, box-shadow 0.3s ease;
	position: relative;
	display: flex;
	flex-direction: column;
	height: 100%;
	box-sizing: border-box;
}

.csb-product-card:hover {
	transform: translateY(-5px);
	box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.csb-product-card-content {
	display: flex;
	flex-direction: column;
	flex: 1;
}

.csb-product-card-image {
	position: relative;
	margin-bottom: 15px;
	overflow: hidden;
	border-radius: 4px;
	aspect-ratio: 1 / 1;
	background-color: var(--csb-bg-light, #f7f7f7);
	display: flex;
	align-items: center;
	justify-content: center;
}

.csb-product-card-image img {
	width: auto !important;
	max-width: 100% !important;
	height: auto !important;
	max-height: 100% !important;
	margin: 0 auto;
	display: block;
	object-fit: contain !important;
	transition: all 0.4s ease;
}

.csb-product-card-image img.csb-hover-image {
	position: absolute;
	top: 0;
	left: 0;
	width: 100% !important;
	height: 100% !important;
	opacity: 0;
	z-index: 2;
}

.csb-product-card:hover .csb-product-card-image img.csb-hover-image {
	opacity: 1;
}

.csb-product-card:hover .csb-product-card-image img.csb-main-image {
	opacity: 0;
}

.csb-sale-badge {
	position: absolute;
	top: 10px;
	left: 10px;
	background: var(--csb-primary-color);
	color: #fff;
	padding: 4px 8px;
	font-size: 11px;
	font-weight: bold;
	border-radius: var(--csb-radius-base);
	z-index: 10;
}

.csb-product-eyebrow {
	display: block;
	font-size: 11px;
	color: var(--csb-primary-color);
	text-transform: uppercase;
	margin-bottom: 5px;
}

.csb-product-title {
	font-size: 16px;
	margin: 0 0 10px;
}

.csb-product-title a {
	color: #333;
	text-decoration: none;
}

.csb-product-rating {
	font-size: 12px;
	color: #f39c12;
	margin-bottom: 10px;
	display: flex;
	align-items: center;
	gap: 5px;
}

.csb-product-price {
	font-weight: bold;
	font-size: 16px;
	margin-bottom: 15px;
	flex-grow: 1;
}

.csb-product-price del {
	color: #999;
	font-weight: normal;
	font-size: 14px;
	margin-right: 5px;
}

.csb-product-price ins {
	text-decoration: none;
	color: var(--csb-accent-color);
}

.csb-product-actions {
	margin-top: auto;
}

.csb-product-actions .csb-btn {
	display: block;
	width: 100%;
	text-align: center;
	padding: 10px;
	background: var(--csb-btn-card-bg);
	color: var(--csb-btn-card-text);
	text-decoration: none;
	border-radius: var(--csb-btn-card-radius);
	font-weight: bold;
	transition: opacity 0.2s, background 0.2s, color 0.2s;
	box-sizing: border-box;
}

.csb-product-actions .csb-btn:hover {
	background: var(--csb-btn-card-hover-bg);
	color: var(--csb-btn-card-hover-text);
}

.csb-pagination-wrapper {
	text-align: center;
	margin-top: 30px;
}

.csb-spinner {
	width: 30px;
	height: 30px;
	border: 3px solid rgba(0,0,0,0.1);
	border-radius: 50%;
	border-top-color: var(--csb-primary-color);
	animation: csb-spin 1s ease-in-out infinite;
	margin: 0 auto;
}

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