.swatch {
	cursor: pointer;
	border: 1px solid #fff;
	outline: 2px solid #fff;
	transition: outline 0.2s ease-in-out;
    border-radius: 50px;
	position: relative;
}

/* Unavailable for the current partial selection (WooCommerce removes the matching <option>) */
.swatch.swatch-unavailable {
	display: none !important;
}

/* Out-of-stock options should stay visible but disabled */
.swatch.swatch-disabled {
	cursor: not-allowed;
	opacity: 0.45;
	filter: grayscale(0.25);
}

/* A sold-out colour can still be picked to see its photos */
.swatch.swatch-disabled.swatch-pickable {
	cursor: pointer;
}

.swatch.swatch-disabled::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 140%;
	height: 2px;
	background: rgba(0, 0, 0, 0.65);
	transform: translate(-50%, -50%) rotate(-45deg);
	transform-origin: center;
	pointer-events: none;
	z-index: 2;
}

.swatches-container {
	display: flex;
	flex-wrap: wrap;
	gap: 12px 8px;
	align-items: flex-start;
	margin: 6px 0;
}

/* Circle/image + name stacked vertically */
.swatch-item {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	min-width: 48px;
}

.swatch-name {
	font-size: 11px;
	line-height: 1.25;
	letter-spacing: 0.01em;
	color: #555;
	text-align: center;
	max-width: 64px;
	word-break: break-word;
}

/* Keep the label in sync with its swatch: hide it when the swatch is hidden */
.swatch-item:has(.swatch-unavailable) {
	display: none !important;
}

.swatch-item:has(.swatch-disabled) .swatch-name {
	opacity: 0.45;
}

.swatch-item:has(.swatch.selected) .swatch-name {
	color: #111;
	font-weight: 600;
}

.swatches-wrapper {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.attribute-label-selected {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 16px;
    margin-top: 10px;

}

.attribute-name {
	
	color: #333;
	margin: 0;
}

.selected-value {
	font-weight: 500;
	color: #666;

}

/* Hide the original WooCommerce label */
.variations th.label,
.variations td.label {
	display: none !important;
}

.variations .value {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.variations, .variations tbody, .variations tr {
    display: flex;
    align-items: start;
    justify-content: center;
    gap: 10px;
    flex-direction: column;
    margin: 0;
    width: 100%;
}

.swatch.selected {
	outline: 2px solid #222;
	outline-offset: 1px;
	box-shadow: none !important;
}

.swatch-color {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    aspect-ratio: 1;
    border: 2px solid white;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1);
}

/* Special styling for white/light colors */
.swatch-color:not(.swatch-disabled):not(.swatch-unavailable):hover {
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2);
}

.swatch-light {
    border-color: #ccc !important;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15) !important;
}

.swatch-light.selected {
    border-color: #999 !important;
    box-shadow: none !important;
}

span.swatch.swatch-image {
    width: 64px;
    aspect-ratio: 1;
    border-radius: 5px;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;   
    border: 3px solid white;
}

.swatch-image img { width:100%; height:100%; object-fit:cover; border-radius:5px; }

.swatch-var-img {
    height: 80px;
    width: auto;
    overflow: hidden;
}

.swatch-var-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    border-radius: 5px;
    transform-origin: center center;
    transform:  scale(1.9);
}

.swatch-var-img-fallback {
    background: #f5f5f5;
}

.swatch-fallback-text {
    font-size: 11px;
    font-weight: 500;
    color: #555;
    text-align: center;
    line-height: 1.2;
    padding: 4px;
    word-break: break-word;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.swatch-text {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    aspect-ratio: auto;
    width: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.single-product div.product .entry-summary {
    display: flex;
    flex-direction: column;
    color: black
}

.single_variation_wrap {order: 10}


/* Native (non-swatch) attribute dropdown — follow theme font, radius, and form controls */
.variations tr:has(> .value > select) {
  align-items: stretch;
}

.variations tr:has(> .value > select) > .label {
  display: block !important;
  width: 100%;
  padding: 0;
  text-align: start;
  font-family: inherit;
  font-size: 16px;
  font-weight: 400;
  color: inherit;
}

.variations tr:has(> .value > select) > .label label {
  font: inherit;
  color: inherit;
  margin: 0;
}

.variations td.value {
  position: relative;
}

.variations td.value:has(> select) {
  width: 100%;
  align-self: stretch;
}

.variations td.value > select,
.variations td.value > select option {
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
  line-height: inherit;
}

.variations td.value > select {
  width: 100%;
  min-height: 40px;
  padding: 10px 16px;
  padding-inline-end: 40px;
  border: 1px solid #ccc;
  border-radius: var(--border-radius, 12px);
  background-color: #fff;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: none;
  box-sizing: border-box;
  cursor: pointer;
}

.variations td.value > select:focus {
  outline: none;
  border-color: var(--color__primary);
}

/* Chevron on the inline-end so RTL (arrow on the left) and LTR both work */
.variations td.value:has(> select)::after {
  content: '';
  position: absolute;
  inset-inline-end: 16px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-65%) rotate(45deg);
  color: inherit;
  opacity: 0.55;
  pointer-events: none;
}
