/**
 * WG Virtual Catalogs - Frontend Styles
 *
 * Minimal, theme-friendly styles for the catalog grid.
 *
 * @package WG\VirtualCatalogs
 */

/* ==========================================================================
   Grid Layout
   ========================================================================== */

.wgvc-catalog-grid {
	display: grid;
	gap: 24px;
	margin: 24px 0;
}

/* Column variations */
.wgvc-columns-1 {
	grid-template-columns: 1fr;
}

.wgvc-columns-2 {
	grid-template-columns: repeat(2, 1fr);
}

.wgvc-columns-3 {
	grid-template-columns: repeat(3, 1fr);
}

.wgvc-columns-4 {
	grid-template-columns: repeat(4, 1fr);
}

.wgvc-columns-5 {
	grid-template-columns: repeat(5, 1fr);
}

.wgvc-columns-6 {
	grid-template-columns: repeat(6, 1fr);
}

/* ==========================================================================
   Catalog Item
   ========================================================================== */

.wgvc-catalog-item {
	position: relative;
	overflow: hidden;
	border-radius: 8px;
	background: #f5f5f5;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.wgvc-catalog-item:hover {
	transform: translateY(-4px);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* ==========================================================================
   Catalog Link
   ========================================================================== */

.wgvc-catalog-link {
	display: block;
	text-decoration: none;
	color: inherit;
}

.wgvc-catalog-link:hover,
.wgvc-catalog-link:focus {
	text-decoration: none;
}

.wgvc-catalog-no-link {
	display: block;
}

/* ==========================================================================
   Cover Image
   ========================================================================== */

.wgvc-catalog-cover {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 3 / 4;
	object-fit: contain;
}

/* Placeholder for missing images */
.wgvc-catalog-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 3 / 4;
	background: linear-gradient(135deg, #e0e0e0 0%, #f5f5f5 100%);
	color: #999;
}

.wgvc-catalog-placeholder .dashicons {
	font-size: 48px;
	width: 48px;
	height: 48px;
}

/* ==========================================================================
   Catalog Title
   ========================================================================== */

.wgvc-catalog-title {
	display: block;
	padding: 12px 16px;
	font-size: 1rem;
	font-weight: 600;
	text-align: center;
	background: #fff;
	color: #333;
}

.wgvc-catalog-link:hover .wgvc-catalog-title {
	color: #0073aa;
}

/* ==========================================================================
   Empty State
   ========================================================================== */

.wgvc-empty-state {
	padding: 40px;
	text-align: center;
	background: #f9f9f9;
	border: 1px dashed #ccc;
	border-radius: 8px;
	color: #666;
}

.wgvc-empty-state a {
	font-weight: 600;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */

@media screen and (max-width: 1024px) {
	.wgvc-columns-5,
	.wgvc-columns-6 {
		grid-template-columns: repeat(4, 1fr);
	}
}

@media screen and (max-width: 768px) {
	.wgvc-columns-3,
	.wgvc-columns-4,
	.wgvc-columns-5,
	.wgvc-columns-6 {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media screen and (max-width: 480px) {
	.wgvc-catalog-grid {
		gap: 16px;
	}

	.wgvc-columns-2,
	.wgvc-columns-3,
	.wgvc-columns-4,
	.wgvc-columns-5,
	.wgvc-columns-6 {
		grid-template-columns: 1fr;
	}

	.wgvc-catalog-title {
		padding: 10px 12px;
		font-size: 0.9rem;
	}
}
