/* Swatches con imagen para el atributo "tipo de prenda" en la página de producto. */

.wvp-swatches-list {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.wvp-swatch {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-start;
	width: 92px;
	padding: 8px 6px;
	border: 2px solid #e2e2e2;
	border-radius: 10px;
	background: #fff;
	cursor: pointer;
	text-align: center;
	transition: border-color .15s ease, box-shadow .15s ease, transform .05s ease;
}

.wvp-swatch:hover {
	border-color: #bcbcbc;
}

.wvp-swatch:focus-visible {
	outline: none;
	border-color: #2271b1;
	box-shadow: 0 0 0 3px rgba( 34, 113, 177, .25 );
}

.wvp-swatch--active {
	border-color: #2271b1;
	box-shadow: 0 0 0 2px rgba( 34, 113, 177, .22 );
}

.wvp-swatch:active {
	transform: scale( .97 );
}

.wvp-swatch-img {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 64px;
	height: 64px;
	margin-bottom: 6px;
	overflow: hidden;
}

.wvp-swatch-img img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: block;
}

.wvp-swatch-img--placeholder {
	background: repeating-linear-gradient( 45deg, #f3f3f3, #f3f3f3 6px, #ececec 6px, #ececec 12px );
	border-radius: 6px;
}

.wvp-swatch-label {
	font-size: 12px;
	line-height: 1.25;
	color: #333;
	word-break: break-word;
}

/* Responsivo: en pantallas pequeñas, swatches algo más compactos. */
@media ( max-width: 480px ) {
	.wvp-swatch {
		width: 78px;
		padding: 6px 4px;
	}
	.wvp-swatch-img {
		width: 52px;
		height: 52px;
	}
}

/* El precio de la variación se muestra arriba (junto al título), no abajo.
   La clase la añade wvp-swatches.js; si el JS no carga, el precio sigue visible. */
body.wvp-precio-arriba .woocommerce-variation-price {
	display: none;
}
