/* Variant axes selectors — color swatches, size buttons, image swatches, etc.
   Used by site product page (default/site/products/variant-axes.html) */

.variant-axes {
	margin-bottom: 1rem;
}

.variant-axis {
	margin-bottom: 1rem;
}

.variant-axis-current {
	font-style: italic;
}

/* ── Color swatches ────────────────────────────────────── */
.variant-swatch {
	border: 2px solid transparent;
	border-radius: 999px;
	width: 36px;
	height: 36px;
	padding: 0;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
	position: relative;
}

.variant-swatch-color {
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.15);
}

.variant-swatch:hover:not(.is-disabled) {
	transform: scale(1.1);
}

.variant-swatch.is-active {
	border-color: var(--bs-primary, #0d6efd);
	box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.25);
}

.variant-swatch.is-disabled,
.variant-button.is-disabled {
	opacity: 0.4;
	cursor: not-allowed;
	position: relative;
}

.variant-swatch.is-disabled::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 110%;
	height: 2px;
	background: rgba(220, 38, 38, 0.7);
	transform: translate(-50%, -50%) rotate(-45deg);
	pointer-events: none;
}

.variant-swatch.is-out-of-stock {
	opacity: 0.6;
}

.variant-swatch.is-out-of-stock::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 110%;
	height: 2px;
	background: rgba(148, 163, 184, 0.7);
	transform: translate(-50%, -50%) rotate(-45deg);
	pointer-events: none;
}

/* ── Image swatches ────────────────────────────────────── */
.variant-swatch-image {
	width: 56px;
	height: 56px;
	border-radius: 6px;
	overflow: hidden;
}

.variant-swatch-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* ── Icon swatches ────────────────────────────────────── */
.variant-swatch-icon {
	background: var(--bs-body-bg, #fff);
	border-color: var(--bs-border-color, #dee2e6);
	font-size: 1.1rem;
}

/* ── Size / radio buttons ──────────────────────────────── */
.variant-button {
	min-width: 50px;
	transition: background-color 0.15s, border-color 0.15s;
}

.variant-button.is-active {
	background-color: var(--bs-primary, #0d6efd);
	border-color: var(--bs-primary, #0d6efd);
	color: #fff;
}

.variant-button.is-disabled {
	text-decoration: line-through;
}

/* ── Dropdown ────────────────────────────────────────── */
.variant-dropdown {
	max-width: 300px;
}

.variant-dropdown option:disabled {
	color: var(--bs-secondary, #6c757d);
}

/* ── Dark mode adjustments ─────────────────────────────── */
[data-bs-theme="dark"] .variant-swatch-color {
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}
