/* Goya Child – native AliExpress-style product variants */
/* The native swatches replace WooCommerce's visible reset link. The link remains
   in the DOM so WooCommerce can keep its own variation state logic intact. */
.et-product-detail .summary form.variations_form .reset_variations {
	display: none !important;
}

.et-product-detail .summary .goya-native-variation-row > th.label {
	display: none !important;
}

.et-product-detail .summary .goya-native-variation-row > td.value,
.et-product-detail.et-variation-style-table .summary .goya-native-variation-row > td.value,
.et-product-detail.et-variation-style-vertical .summary .goya-native-variation-row > td.value {
	display: block;
	width: 100%;
	padding: .65rem 0 .85rem;
	border-bottom: 0;
}

.goya-native-source-select {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
	opacity: 0 !important;
	pointer-events: none !important;
}

.goya-native-thirdparty-hidden {
	display: none !important;
}

.goya-native-swatch-wrap {
	width: 100%;
	margin: 0;
}

.goya-native-swatch-heading {
	display: flex;
	align-items: baseline;
	gap: 4px;
	min-height: 24px;
	margin: 0 0 8px;
	font-size: 13px;
	line-height: 1.35;
	color: inherit;
}

.goya-native-attribute-label {
	font-weight: 500;
}

.goya-native-selected-value {
	font-weight: 600;
	color: #111;
}

.goya-native-swatch-all {
	margin-left: auto;
	padding: 0;
	border: 0;
	background: transparent;
	box-shadow: none;
	font: inherit;
	font-weight: 500;
	color: inherit;
	text-decoration: none;
	cursor: pointer;
	display: none;
}

.goya-native-swatches.variable-items-wrapper {
	display: flex;
	flex-wrap: wrap;
	align-items: stretch;
	gap: var(--goya-var-gap, 8px);
	margin: 0 !important;
	padding: 0 !important;
	list-style: none;
}

.goya-native-swatches .goya-native-swatch.variable-item {
	box-sizing: border-box;
	margin: 0 !important;
	padding: 0 !important;
	border: 1px solid var(--goya-var-border, #d7d7d7) !important;
	border-radius: var(--goya-var-radius, 2px) !important;
	background: #fff !important;
	box-shadow: none !important;
	color: #242424;
	cursor: pointer;
	position: relative;
	transition: border-color .16s ease, opacity .16s ease, transform .16s ease;
	overflow: hidden;
}

.goya-native-swatches .goya-native-swatch.variable-item:hover,
.goya-native-swatches .goya-native-swatch.variable-item:focus-visible {
	border-color: #777 !important;
	outline: none;
}

.goya-native-swatches .goya-native-swatch.variable-item.selected,
.goya-native-swatches .goya-native-swatch.variable-item.selected:hover {
	border: 2px solid var(--goya-var-selected, #111) !important;
	color: var(--goya-var-selected, #111);
}

.goya-native-swatches .goya-native-swatch.variable-item.goya-native-conflict {
	opacity: .68;
	cursor: pointer;
}

.goya-native-swatches .goya-native-swatch.variable-item.goya-native-conflict:hover,
.goya-native-swatches .goya-native-swatch.variable-item.goya-native-conflict:focus-visible {
	opacity: 1;
}

.goya-native-swatches .goya-native-swatch.variable-item.disabled {
	opacity: .32;
	cursor: not-allowed;
}

.goya-native-swatches .goya-native-swatch.variable-item.disabled::after {
	content: '';
	position: absolute;
	left: -8%;
	top: 50%;
	width: 116%;
	height: 1px;
	background: rgba(0,0,0,.36);
	transform: rotate(-25deg);
	pointer-events: none;
}

.goya-native-swatches--image .goya-native-swatch.image-variable-item {
	width: var(--goya-var-img-desktop, 56px) !important;
	height: var(--goya-var-img-desktop, 56px) !important;
	flex: 0 0 var(--goya-var-img-desktop, 56px) !important;
}

.goya-native-image-contents,
.goya-native-image-contents img {
	display: block;
	width: 100%;
	height: 100%;
}

.goya-native-image-contents img {
	object-fit: var(--goya-var-fit, cover);
	object-position: center;
}

.goya-native-swatches--text .goya-native-swatch.button-variable-item {
	min-width: var(--goya-var-text-min, 72px) !important;
	height: var(--goya-var-text-height, 42px) !important;
	padding: 0 12px !important;
	overflow: visible;
}

.goya-native-text-contents {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	font-size: 12px;
	line-height: 1.2;
	white-space: nowrap;
}

@media (max-width: 767px) {
	.et-product-detail .summary .goya-native-variation-row > td.value,
	.et-product-detail.et-variation-style-table .summary .goya-native-variation-row > td.value,
	.et-product-detail.et-variation-style-vertical .summary .goya-native-variation-row > td.value {
		padding-top: .55rem;
		padding-bottom: .7rem;
	}

	.goya-native-swatch-heading {
		font-size: 13px;
		margin-bottom: 7px;
	}

	.goya-native-swatch-all {
		display: inline-block;
	}

	.goya-native-swatches.variable-items-wrapper:not(.goya-native-no-mobile-carousel) {
		flex-wrap: nowrap;
		overflow-x: auto;
		overflow-y: hidden;
		-webkit-overflow-scrolling: touch;
		scroll-snap-type: x proximity;
		scrollbar-width: none;
		padding-bottom: 2px !important;
	}

	.goya-native-swatches.variable-items-wrapper:not(.goya-native-no-mobile-carousel)::-webkit-scrollbar {
		display: none;
	}

	.goya-native-swatches.variable-items-wrapper:not(.goya-native-no-mobile-carousel).is-expanded {
		flex-wrap: wrap;
		overflow: visible;
		scroll-snap-type: none;
	}

	.goya-native-swatches .goya-native-swatch.variable-item {
		scroll-snap-align: start;
	}

	.goya-native-swatches--image .goya-native-swatch.image-variable-item {
		width: var(--goya-var-img-mobile, 68px) !important;
		height: var(--goya-var-img-mobile, 68px) !important;
		flex: 0 0 var(--goya-var-img-mobile, 68px) !important;
	}

	.goya-native-swatches--text .goya-native-swatch.button-variable-item {
		flex: 0 0 auto !important;
	}
}
