/**
 * NOVO Swatch Grid — Estilos del Widget de Elementor
 *
 * Reproduce fielmente la interfaz visual de la imagen de referencia:
 * cuadrícula de 3 columnas con imágenes cuadradas de texturas/acabados
 * y nombres centrados debajo de cada celda.
 *
 * Se conecta con:
 *   - class-novo-swatch-grid-elementor-widget.php → estructura HTML
 *   - class-novo-filters-elementor.php → registro y carga condicional
 *
 * Convención BEM: .novo-swatch-grid / .novo-swatch-grid__item / etc.
 *
 * @package Novo_Woo_Filters
 * @since   1.0.0
 */

/* ==========================================================================
   1. GRID CONTAINER
   ========================================================================== */

.novo-swatch-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	column-gap: 20px;
	row-gap: 30px;
	width: 100%;
	margin: 0;
	padding: 0;
	list-style: none;
	box-sizing: border-box;
}

/* ==========================================================================
   2. GRID ITEM
   ========================================================================== */

.novo-swatch-grid__item {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	position: relative;
	box-sizing: border-box;
}

/* ==========================================================================
   3. LINK (cuando enlaza a tienda)
   ========================================================================== */

.novo-swatch-grid__link {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-decoration: none;
	color: inherit;
	width: 100%;
}

.novo-swatch-grid__link:hover,
.novo-swatch-grid__link:focus {
	text-decoration: none;
	color: inherit;
	outline: none;
}

/* ==========================================================================
   4. IMAGE CONTAINER
   ========================================================================== */

.novo-swatch-grid__image {
	width: 100%;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	position: relative;
	background-color: #f5f5f5;
	transition: all 300ms ease;
}

.novo-swatch-grid__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition:
		transform 300ms ease,
		opacity 300ms ease;
}

/* ==========================================================================
   5. PLACEHOLDER (sin imagen — usa color del term_meta)
   ========================================================================== */

.novo-swatch-grid__placeholder {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* ==========================================================================
   6. LABEL / NOMBRE DEL SWATCH
   ========================================================================== */

.novo-swatch-grid__label {
	display: block;
	margin-top: 12px;
	font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
	font-size: 14px;
	font-weight: 400;
	line-height: 1.4;
	color: #666666;
	letter-spacing: 0.02em;
	transition: color 300ms ease;
}

/* ==========================================================================
   7. HOVER STATES
   ========================================================================== */

.novo-swatch-grid__item:hover .novo-swatch-grid__image {
	opacity: 0.85;
}

.novo-swatch-grid__item:hover .novo-swatch-grid__label {
	color: #000000;
}

/* ==========================================================================
   8. EDITOR NOTICE (panel de Elementor)
   ========================================================================== */

.novo-swatch-grid__notice {
	display: flex;
	justify-content: center;
	align-items: center;
	padding: 40px 20px;
	background-color: #f9f9f9;
	border: 2px dashed #ddd;
	text-align: center;
	width: 100%;
	box-sizing: border-box;
}

.novo-swatch-grid__notice p {
	margin: 0;
	font-size: 14px;
	color: #888;
}

/* ==========================================================================
   9. RESPONSIVE
   ========================================================================== */

/* Tablet: 2 columnas por defecto (Elementor maneja esto vía controles responsive,
   pero mantenemos fallback CSS) */
@media (max-width: 1024px) {
	.novo-swatch-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

/* Móvil: 2 columnas en móvil (como la imagen de referencia sugiere) */
@media (max-width: 767px) {
	.novo-swatch-grid {
		grid-template-columns: repeat(2, 1fr);
		column-gap: 12px;
		row-gap: 20px;
	}

	.novo-swatch-grid__label {
		font-size: 12px;
		margin-top: 8px;
	}
}

/* Móvil muy pequeño: 1 columna */
@media (max-width: 480px) {
	.novo-swatch-grid {
		grid-template-columns: 1fr;
		column-gap: 0;
		row-gap: 20px;
	}
}
