.arablady-variation-swatches {
	margin: 0.25rem 0 0.75rem;
}

.arablady-variation-swatches .visually-hidden,
.arablady-variation-swatches__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;
}

.arablady-variation-swatches__select select {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	opacity: 0 !important;
	pointer-events: none !important;
	clip: rect(0, 0, 0, 0) !important;
}

.arablady-variation-swatches__grid {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
}

.arablady-swatch {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.2rem;
	min-width: 3.1rem;
	max-width: 4.8rem;
	padding: 0.3rem 0.35rem 0.35rem;
	border: 1.5px solid rgba(168, 0, 119, 0.16);
	border-radius: 8px;
	background: #fff;
	cursor: pointer;
	transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
	font: inherit;
	color: #374151;
}

.arablady-swatch:hover:not(.is-disabled) {
	border-color: rgba(168, 0, 119, 0.45);
	box-shadow: 0 2px 8px rgba(168, 0, 119, 0.1);
	transform: translateY(-1px);
}

.arablady-swatch.is-selected {
	border-color: #a80077;
	box-shadow: 0 0 0 1px rgba(168, 0, 119, 0.18);
	background: #fff8fc;
}

.arablady-swatch.is-disabled {
	opacity: 0.38;
	cursor: not-allowed;
}

.arablady-swatch__color {
	display: block;
	width: 1.35rem;
	height: 1.35rem;
	border-radius: 999px;
	background: var(--swatch-color, #d1d5db);
	border: 1.5px solid rgba(17, 24, 39, 0.12);
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.arablady-swatch--color .arablady-swatch__color[style*="ffffff"],
.arablady-swatch--color .arablady-swatch__color[style*="#fff"] {
	border-color: rgba(168, 0, 119, 0.25);
}

.arablady-swatch__size {
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 1.75rem;
	min-height: 1.75rem;
	padding: 0.1rem 0.35rem;
	border-radius: 6px;
	background: linear-gradient(180deg, #fff 0%, #fdf2f8 100%);
	font-size: 0.82rem;
	font-weight: 800;
	color: #9d174d;
	line-height: 1;
}

.arablady-swatch__label {
	display: block;
	font-size: 0.62rem;
	font-weight: 600;
	line-height: 1.25;
	text-align: center;
	color: #4b5563;
	max-width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.arablady-swatch.is-selected .arablady-swatch__label {
	color: #831843;
}

.arablady-variation-swatches__grid--size .arablady-swatch {
	min-width: 2.4rem;
	max-width: 2.85rem;
	padding: 0.3rem 0.25rem;
}

.arablady-variation-swatches__grid--size .arablady-swatch__label {
	display: none;
}

table.variations td.label label {
	font-weight: 700;
	color: #9d174d;
	font-size: 0.92rem;
}

.woocommerce div.product form.cart .variations {
	margin-bottom: 0.5rem;
}

.woocommerce div.product form.cart .variations td {
	padding: 0.25rem 0;
	vertical-align: top;
}

.woocommerce div.product form.cart .reset_variations {
	margin-top: 0.25rem;
	font-size: 0.8rem;
}

@media (max-width: 640px) {
	.arablady-variation-swatches__grid {
		gap: 0.3rem;
	}

	.arablady-swatch {
		min-width: 2.85rem;
		max-width: 4.2rem;
	}
}

/* ---------- القيمة المختارة بجانب اسم الخيار ---------- */
.arablady-selected-value {
	color: #9d174d;
	font-weight: 700;
}

.arablady-selected-value:not(:empty)::before {
	content: ":\00a0";
	color: #3d2c35;
}

/* ---------- بطاقات الألوان بصور المتغيرات ---------- */
.arablady-variation-swatches__grid--color:has(.arablady-swatch--img) {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
	gap: 8px;
}

.arablady-swatch--img {
	position: relative;
	max-width: none;
	min-width: 0;
	padding: 6px 6px 7px;
	border-radius: 12px;
	gap: 5px;
}

.arablady-swatch__img {
	display: block;
	width: 100%;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	border-radius: 8px;
	background: #fdf2f8;
}

.arablady-swatch__img img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.arablady-swatch--img .arablady-swatch__label {
	font-size: .78rem;
	font-weight: 700;
	white-space: normal;
}

.arablady-swatch--img.is-selected::after {
	content: "";
	position: absolute;
	top: -7px;
	inset-inline-end: -7px;
	width: 20px;
	height: 20px;
	border: 2px solid #fff;
	border-radius: 50%;
	background: #a80077 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center / 12px no-repeat;
	box-shadow: 0 2px 6px rgba(168, 0, 119, .3);
}

/* ---------- قياسات المقاس المختار ---------- */
.arablady-size-fit {
	margin: 10px 0 4px;
	padding: 12px 14px;
	border: 1px solid #f1dbe5;
	border-radius: 14px;
	background: linear-gradient(135deg, #fff, #fdf2f6);
}

.arablady-size-fit__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-bottom: 8px;
}

.arablady-size-fit__title {
	color: #3d2c35;
	font-size: .95rem;
}

.arablady-size-fit__units {
	display: inline-flex;
	overflow: hidden;
	border: 1px solid #f1dbe5;
	border-radius: 999px;
	background: #fff;
}

.arablady-size-fit__units button {
	padding: 4px 12px;
	border: 0;
	background: transparent;
	color: #7a6570;
	font: inherit;
	font-size: .8rem;
	font-weight: 700;
	cursor: pointer;
}

.arablady-size-fit__units button.is-active {
	background: #a80077;
	color: #fff;
}

.arablady-size-fit__list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
	gap: 8px;
	margin: 0;
}

.arablady-size-fit__list > div {
	padding: 8px 10px;
	border-radius: 10px;
	background: #fff;
	box-shadow: inset 0 0 0 1px #f6e3ec;
}

.arablady-size-fit__list dt {
	margin: 0;
	padding: 0;
	line-height: 1.4;
	color: #7a6570;
	font-size: .78rem;
	font-weight: 600;
}

.arablady-size-fit__list dd {
	margin: 2px 0 0;
	padding: 0;
	line-height: 1.4;
	color: #850060;
	font-size: 1rem;
	font-weight: 800;
	direction: rtl;
	unicode-bidi: plaintext;
}

.arablady-size-fit__hint {
	margin: 0;
	color: #7a6570;
	font-size: .88rem;
}

.arablady-size-fit__toggle {
	margin-top: 10px;
	padding: 0;
	border: 0;
	background: none;
	color: #a80077;
	font: inherit;
	font-size: .85rem;
	font-weight: 700;
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}

.arablady-size-fit__table {
	margin-top: 8px;
	overflow-x: auto;
}

.arablady-size-fit__table table {
	width: 100%;
	border-collapse: collapse;
	font-size: .82rem;
	text-align: center;
	white-space: nowrap;
}

.arablady-size-fit__table th,
.arablady-size-fit__table td {
	padding: 7px 8px;
	border: 1px solid #f1dbe5;
}

.arablady-size-fit__table thead th {
	background: #fce4ec;
	color: #850060;
}

.arablady-size-fit__table tr.is-current th,
.arablady-size-fit__table tr.is-current td {
	background: #a80077;
	color: #fff;
}

.arablady-size-fit__note {
	margin: 8px 0 0;
	color: #7a6570;
	font-size: .78rem;
	line-height: 1.6;
}
