/**
 * Erteks — WooCommerce varyant seçimi görsel bileşenleri.
 * Renk (pa_renk) -> yuvarlak swatch, diğer öznitelikler (pa_beden vb.) -> buton grubu.
 * Marka paleti: yeşil #2F5D50, gold #B98D4F / #C8A46A, ketenimsi krem tonlar.
 */

.variations_form .erteks-visually-hidden-select {
	display: none !important;
}

.variations_form .erteks-variation-group {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	margin: 6px 0 4px;
}

/* ---------- Ortak buton/swatch sıfırlama ---------- */
.variations_form .erteks-variation-group button {
	appearance: none;
	-webkit-appearance: none;
	font-family: "Inter", system-ui, sans-serif;
	box-sizing: border-box;
	position: relative;
	min-width: 44px;
	min-height: 44px;
	margin: 0;
	cursor: pointer;
	transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}

.variations_form .erteks-variation-group button:focus {
	outline: none;
}

.variations_form .erteks-variation-group button:focus-visible {
	outline: 3px solid var(--gold, #b98d4f);
	outline-offset: 2px;
}

/* ---------- Renk swatch'ları ---------- */
.variations_form .erteks-swatch {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	padding: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background-color: var(--erteks-swatch-color, #e3dfd2);
	border: 2px solid var(--paper, #fbf8f1);
	box-shadow: 0 0 0 1px var(--line, #e3daca);
}

.variations_form .erteks-swatch:hover:not(:disabled) {
	transform: translateY(-1px);
	box-shadow: 0 0 0 1px var(--gold-soft, #c8a46a), 0 3px 8px rgba(32, 48, 42, 0.18);
}

.variations_form .erteks-swatch.is-active {
	border-color: var(--paper, #fbf8f1);
	box-shadow: 0 0 0 2px var(--paper, #fbf8f1), 0 0 0 4px var(--gold-soft, #c8a46a), 0 3px 10px rgba(32, 48, 42, 0.22);
}

.variations_form .erteks-swatch.is-active::after {
	content: "\2713";
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 16px;
	font-weight: 700;
	line-height: 1;
	color: #fff;
	text-shadow: 0 0 3px rgba(0, 0, 0, 0.7), 0 1px 2px rgba(0, 0, 0, 0.55);
	pointer-events: none;
}

.variations_form .erteks-swatch--unknown {
	background-color: var(--sand-200, #efe6d6);
	box-shadow: 0 0 0 1px var(--line, #e3daca), inset 0 0 0 1px rgba(32, 48, 42, 0.06);
}

.variations_form .erteks-swatch__badge {
	font-size: 14px;
	font-weight: 700;
	color: var(--ink, #20302a);
	line-height: 1;
	pointer-events: none;
}

/* Stokta yok / mevcut seçimle uyumsuz: soluk + tıklanamaz + çapraz çizgi */
.variations_form .erteks-swatch:disabled,
.variations_form .erteks-swatch.is-unavailable {
	cursor: not-allowed;
	opacity: 0.4;
	filter: grayscale(0.25);
	transform: none;
}

.variations_form .erteks-swatch:disabled::before,
.variations_form .erteks-swatch.is-unavailable::before {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 50%;
	background: linear-gradient(45deg, transparent 46%, rgba(178, 58, 58, 0.6) 48%, rgba(178, 58, 58, 0.6) 52%, transparent 54%);
	pointer-events: none;
}

/* ---------- Beden / diğer öznitelikler: buton grubu ---------- */
.variations_form .erteks-optbtn {
	min-width: 48px;
	padding: 0 16px;
	border-radius: var(--radius, 14px);
	border: 1.5px solid var(--line, #e3daca);
	background: var(--paper, #fbf8f1);
	color: var(--ink, #20302a);
	font-size: 0.92rem;
	font-weight: 600;
	letter-spacing: 0.01em;
}

.variations_form .erteks-optbtn:hover:not(:disabled) {
	border-color: var(--gold-soft, #c8a46a);
	color: var(--ink, #20302a);
	transform: translateY(-1px);
}

.variations_form .erteks-optbtn.is-active {
	background: var(--green, #2f5d50);
	border-color: var(--gold-soft, #c8a46a);
	color: #fff;
	box-shadow: 0 0 0 1px var(--gold-soft, #c8a46a);
}

.variations_form .erteks-optbtn:disabled,
.variations_form .erteks-optbtn.is-unavailable {
	cursor: not-allowed;
	opacity: 0.4;
	filter: grayscale(0.2);
	transform: none;
	text-decoration: line-through;
}

/* ---------- Hareket azaltma tercihine saygı ---------- */
@media (prefers-reduced-motion: reduce) {
	.variations_form .erteks-variation-group button {
		transition: none !important;
		transform: none !important;
	}
}
