.crs-wrap { --crs-accent: #e84c9c; --crs-cross: #e04fe0; --crs-size: 56px; }
.crs-wrap select { display: none !important; }

/* Fila de la tabla de variaciones: sin el nombre del atributo a la izquierda */
.crs-row > th,
.crs-row > .label,
.variations tr:has(.crs-wrap:not(.crs-wrap--text)) > th,
.variations tr:has(.crs-wrap:not(.crs-wrap--text)) > .label {
	display: none !important;
}
.crs-row > td,
.crs-row > .value,
.variations tr:has(.crs-wrap:not(.crs-wrap--text)) > td,
.variations tr:has(.crs-wrap:not(.crs-wrap--text)) > .value {
	display: block;
	width: 100%;
	box-sizing: border-box;
	padding: 24px !important;
}

.crs-swatches {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 16px 18px;
	margin: 0;
}

/* El enlace "Limpiar" no ocupa sitio mientras está oculto, así el relleno queda simétrico */
.crs-row .reset_variations[style*="hidden"] { display: none !important; }
.crs-row .reset_variations { display: block; margin-top: 14px; text-align: center; }

/* Muestra sin marco ni fondo (se anulan los estilos de botón del tema) */
.crs-wrap .crs-swatches .crs-swatch {
	display: flex !important;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	min-width: calc(var(--crs-size) + 6px);
	padding: 0 !important;
	margin: 0 !important;
	background: none !important;
	background-color: transparent !important;
	border: 0 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	outline: 0 !important;
	color: inherit !important;
	font: inherit;
	text-decoration: none !important;
	white-space: normal;
	cursor: pointer;
}
.crs-wrap .crs-swatches .crs-swatch:hover,
.crs-wrap .crs-swatches .crs-swatch:focus,
.crs-wrap .crs-swatches .crs-swatch:active {
	background: none !important;
	background-color: transparent !important;
	color: inherit !important;
	border: 0 !important;
	box-shadow: none !important;
	outline: 0 !important;
}

.crs-swatch__circle {
	position: relative;
	display: block;
	width: var(--crs-size);
	height: var(--crs-size);
	border-radius: 50%;
	background: #e5e5e5 center / cover no-repeat;
	box-shadow: 0 4px 14px rgba(0, 0, 0, .18);
	transition: transform .15s ease, box-shadow .15s ease;
}

.crs-swatch__label {
	font-size: 15px;
	font-weight: 700;
	line-height: 1.1;
	color: inherit;
}

.crs-swatch:hover .crs-swatch__circle { transform: scale(1.06); }

/* Sin recuadros: ningún contorno cuadrado alrededor de la muestra ni del círculo.
   Foco de teclado: aro redondo (box-shadow sigue el círculo en todos los navegadores). */
.crs-wrap .crs-swatch,
.crs-wrap .crs-swatch:focus,
.crs-wrap .crs-swatch:focus-visible,
.crs-wrap .crs-swatch .crs-swatch__circle,
.crs-wrap .crs-swatch:focus .crs-swatch__circle {
	outline: 0 !important;
	outline-offset: 0 !important;
	-webkit-tap-highlight-color: transparent;
}
.crs-wrap .crs-swatch:focus-visible .crs-swatch__circle {
	box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--crs-accent) !important;
}

/* Sin stock: difuminada y con una cruz encima, pero se puede pinchar para ver su imagen */
.crs-swatch.is-out-of-stock .crs-swatch__circle::before,
.crs-swatch.is-disabled .crs-swatch__circle::before {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, .65);
}
.crs-swatch.is-out-of-stock .crs-swatch__circle::after,
.crs-swatch.is-disabled .crs-swatch__circle::after {
	content: "";
	position: absolute;
	inset: -3px;
	background:
		linear-gradient(to top right, transparent calc(50% - 1px), var(--crs-cross) calc(50% - 1px), var(--crs-cross) calc(50% + 1px), transparent calc(50% + 1px)),
		linear-gradient(to bottom right, transparent calc(50% - 1px), var(--crs-cross) calc(50% - 1px), var(--crs-cross) calc(50% + 1px), transparent calc(50% + 1px));
}
.crs-swatch.is-out-of-stock .crs-swatch__circle { box-shadow: none; }

/* Combinación que no existe: no se puede elegir */
.crs-swatch.is-disabled { cursor: not-allowed !important; }
.crs-swatch.is-disabled .crs-swatch__circle { box-shadow: none; }
.crs-swatch.is-disabled:hover .crs-swatch__circle { transform: none; }

/* Muestra elegida: tick centrado sobre la imagen */
.crs-wrap .crs-swatch.is-selected .crs-swatch__circle::before {
	content: "" !important;
	display: block !important;
	position: absolute;
	inset: 0;
	z-index: 2;
	border-radius: 50%;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='11' fill='%23e84c9c' stroke='white' stroke-width='1.5'/%3E%3Cpath d='M7 12.5l3.2 3.2L17 8.8' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 46% no-repeat;
}
/* Elegida y sin stock: el tick va sobre el velo blanco */
.crs-swatch.is-selected.is-out-of-stock .crs-swatch__circle::before,
.crs-swatch.is-selected.is-disabled .crs-swatch__circle::before {
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='11' fill='%23e84c9c' stroke='white' stroke-width='1.5'/%3E%3Cpath d='M7 12.5l3.2 3.2L17 8.8' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 46% no-repeat, rgba(255, 255, 255, .65);
}
/* Elegida y sin stock: sin cruz para que el tick se vea limpio (WooCommerce muestra "Agotado") */
.crs-swatch.is-selected.is-out-of-stock .crs-swatch__circle::after { display: none; }

/* Botones de texto (atributos sin imagen ni color, p. ej. medidas) */
.crs-wrap--text .crs-swatches { justify-content: flex-start; gap: 10px; }
.crs-wrap .crs-swatches .crs-swatch.crs-swatch--text {
	min-width: 0;
	padding: 8px 16px !important;
	border: 2px solid #e5e5e5 !important;
	border-radius: 999px !important;
	background: #fff !important;
	flex-direction: row;
	transition: border-color .15s ease, background-color .15s ease, color .15s ease;
}
.crs-wrap .crs-swatches .crs-swatch.crs-swatch--text:hover { border-color: var(--crs-accent) !important; background: #fff !important; }
.crs-wrap .crs-swatches .crs-swatch.crs-swatch--text.is-selected {
	border-color: var(--crs-accent) !important;
	background: var(--crs-accent) !important;
	color: #fff !important;
}
.crs-wrap .crs-swatches .crs-swatch.crs-swatch--text.is-out-of-stock:not(.is-selected),
.crs-wrap .crs-swatches .crs-swatch.crs-swatch--text.is-disabled:not(.is-selected) {
	opacity: .45;
	text-decoration: line-through !important;
}
.crs-wrap .crs-swatches .crs-swatch.crs-swatch--text.is-disabled { cursor: not-allowed !important; }
