/**
 * Wovenery Custom Variations — storefront styles.
 * Compact, swatch-style Sleeve / Neck choosers (small thumbnails that wrap),
 * with the selected option's name shown once beside the heading.
 */

.wovenery-cv-choosers {
	--wcv-accent: #7a0c2e;      /* Wovenery deep maroon */
	--wcv-border: #dcd7d2;
	--wcv-text: #2b2b2b;
	--wcv-muted: #7a7a7a;
	--wcv-swatch: 54px;         /* swatch size — tweak to taste */
	margin: 1.5em 0;
}

.wovenery-cv-chooser {
	margin-bottom: 1.35em;
}

/* Heading row: "CHOOSE SLEEVE *      Cap Sleeve" ------------------------- */
.wovenery-cv-chooser-title {
	display: flex;
	align-items: baseline;
	flex-wrap: wrap;
	gap: 4px 8px;
	font-size: 0.8rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--wcv-text);
	margin: 0 0 0.6em;
	font-weight: 600;
}

.wovenery-cv-required {
	color: var(--wcv-accent);
	margin-left: 2px;
}

/* Selected/hovered option name (like "Color: Deep Red"). */
.wovenery-cv-selected-name {
	font-weight: 400;
	text-transform: none;
	letter-spacing: normal;
	color: var(--wcv-muted);
	font-size: 0.85rem;
}
.wovenery-cv-selected-name:not(:empty)::before {
	content: "— ";
	color: var(--wcv-border);
}

/* Swatch row ------------------------------------------------------------ */
.wovenery-cv-swatches {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.wovenery-cv-swatch {
	margin: 0;
	padding: 0;
}

/* Hide the native radio but keep it accessible/focusable. */
.wovenery-cv-swatch-input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
	margin: 0;
	pointer-events: none;
}

.wovenery-cv-swatch-label {
	position: relative;
	display: block;
	width: var(--wcv-swatch);
	height: var(--wcv-swatch);
	border: 1px solid var(--wcv-border);
	border-radius: 8px;
	overflow: hidden;
	cursor: pointer;
	background: #faf7f4;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.wovenery-cv-swatch-label img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.wovenery-cv-swatch-label:hover {
	border-color: var(--wcv-accent);
}

/* Selected state -------------------------------------------------------- */
.wovenery-cv-swatch-check {
	position: absolute;
	top: 2px;
	right: 2px;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: var(--wcv-accent);
	color: #fff;
	font-size: 9px;
	line-height: 16px;
	text-align: center;
	opacity: 0;
	transform: scale(0.5);
	transition: opacity 0.15s ease, transform 0.15s ease;
}

.wovenery-cv-swatch.is-selected .wovenery-cv-swatch-check {
	opacity: 1;
	transform: scale(1);
}

.wovenery-cv-swatch.is-selected .wovenery-cv-swatch-label {
	border-color: var(--wcv-accent);
	box-shadow: 0 0 0 2px var(--wcv-accent);
}

/* Keyboard focus visibility. */
.wovenery-cv-swatch-input:focus-visible + .wovenery-cv-swatch-label {
	outline: 2px solid var(--wcv-accent);
	outline-offset: 2px;
}
