/* ==========================================================================
   NDH Selector de Color
   ========================================================================== */
.ndhsc {
	--ndhsc-swatch: 28px;
	--ndhsc-ring: #14162B;
	--ndhsc-ratio: 3/2;
	width: 100%;
	max-width: 760px;
	margin: 0 auto;
	text-align: center;
}

/* Área de imagen: todas las imágenes apiladas, solo la activa visible */
.ndhsc__stage {
	position: relative;
	width: 100%;
	aspect-ratio: var(--ndhsc-ratio);
	margin-bottom: 18px;
}
.ndhsc__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: contain;
	opacity: 0;
	visibility: hidden;
	transition: opacity .35s ease;
	pointer-events: none;
}
.ndhsc__img.is-active {
	opacity: 1;
	visibility: visible;
}

/* Label "Color: Rojo" */
.ndhsc__label {
	font-size: 16px;
	color: #2B2B2B;
	margin-bottom: 16px;
}
.ndhsc__color-name {
	font-weight: 600;
}

/* Fila de swatches */
.ndhsc__swatches {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 14px;
}

/* Swatch: botón circular */
.ndhsc__swatch {
	width: var(--ndhsc-swatch);
	height: var(--ndhsc-swatch);
	padding: 0;
	border: 0;
	background: transparent;
	border-radius: 50%;
	cursor: pointer;
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: transform .15s ease;
}
.ndhsc__swatch-inner {
	width: 100%;
	height: 100%;
	border-radius: 50%;
	background: var(--ndhsc-color);
	display: block;
	box-sizing: border-box;
}
/* Swatch bicolor: partido al medio en horizontal (arriba / abajo) */
.ndhsc__swatch.is-split .ndhsc__swatch-inner {
	background: linear-gradient(
		to bottom,
		var(--ndhsc-color) 0%,
		var(--ndhsc-color) 50%,
		var(--ndhsc-color2) 50%,
		var(--ndhsc-color2) 100%
	);
}

/* Colores claros (ej. blanco): borde sutil para que se distingan */
.ndhsc__swatch.is-light .ndhsc__swatch-inner {
	border: 1px solid #d0d0d0;
}

.ndhsc__swatch:hover {
	transform: scale(1.08);
}

/* Anillo del swatch activo */
.ndhsc__swatch.is-active::after {
	content: "";
	position: absolute;
	inset: -5px;
	border-radius: 50%;
	border: 2px solid var(--ndhsc-ring);
}

.ndhsc__swatch:focus-visible {
	outline: 2px solid var(--ndhsc-ring);
	outline-offset: 3px;
}

/* Aviso de error (solo editores) */
.ndhsc-error {
	background: #fff3f0;
	border: 1px solid #F54830;
	color: #7a2414;
	padding: 10px 14px;
	border-radius: 6px;
	font-size: 14px;
	text-align: left;
}

@media (max-width: 480px) {
	.ndhsc__swatches { gap: 11px; }
}
