/* Hide original select safely */
.ds-hidden-original-select {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

/* Container */
.ds-attribute-field {
  margin: 12px 0 0;
}
.ds-attribute-field + .ds-attribute-field {
  margin-top: 16px;
}

/* Swatches list */
.ds-swatches-list {
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Swatch item: square boxes */
.ds-swatch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 3px 8px;
  border: 1px solid #d5d5d5;
  background: #fff;
  color: #222;
  font-size: 14px;
  font-weight: 400;
  cursor: pointer;
  user-select: none;
  transition: border-color .15s ease, background-color .15s ease, color .15s ease, box-shadow .15s ease;
  outline: none;
}
.ds-swatch .ds-swatch-label {
  text-align: center;
  line-height: 1.1;
}

/* Hover effect */
.ds-swatch:hover {
  border-color: #333;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}

/* Selected (clicked) effect */
.ds-swatch.is-selected {
  border-color: #111;
  background-color: #111;
  color: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,.12);
}

/* Disabled (unavailable) state */
.ds-swatch.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: grayscale(30%);
}
.ds-swatch.is-disabled:hover {
  border-color: #d5d5d5;
  box-shadow: none;
}

/* Focus-visible for keyboard users */
.ds-swatch:focus-visible {
  outline: 3px solid #3b82f6; /* blue focus ring */
  outline-offset: 2px;
}

/* Tighten layout on small screens */
@media (max-width: 480px) {
  .ds-swatch {
    min-width: 38px;
    height: 38px;
    font-size: 13px;
    padding: 4px 8px;
  }
}


/* Ensure swatches remain clickable above any overlays from table stackers or theme styles */
.woocommerce div.product form.cart table.variations .ds-attribute-swatches,
.woocommerce div.product form.cart table.variations .ds-swatches-list,
.woocommerce div.product form.cart table.variations .ds-swatch {
  position: relative;
  z-index: 10;
  pointer-events: auto;
}

/* Safety: keep value cell interactive */
.woocommerce div.product form.cart table.variations td.value {
  pointer-events: auto;
}

/* Color circle swatches for specific values */
.ds-swatch[data-value="beige"],
.ds-swatch[data-value="black"] {
  /* make circular */
  border-radius: 50%;
  width: 42px;
  height: 42px;
  min-width: 42px;
  padding: 0;
  /* make the parent transparent and position context for inner dot */
  background-color: transparent;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden; /* ensure inner dot stays inside circle */
}

/* inner color fill (creates gap between fill and outline) */
.ds-swatch[data-value="beige"]::before,
.ds-swatch[data-value="black"]::before {
  content: "";
  position: absolute;
  inset: 4px; /* gap between color and outline */
  border-radius: 50%;
  pointer-events: none;
}
.ds-swatch[data-value="beige"]::before {
  background-color: rgb(240, 218, 194);
}
.ds-swatch[data-value="black"]::before {
  background-color: rgb(0, 0, 0);
}

/* hide text label visually but keep for screen readers */
.ds-swatch[data-value="beige"] .ds-swatch-label,
.ds-swatch[data-value="black"] .ds-swatch-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* keep color on selected; accent border for selection without changing fill */
.ds-swatch[data-value="beige"].is-selected,
.ds-swatch[data-value="black"].is-selected {
  background-color: transparent; /* ensure gap stays visible and fill unaffected */
  border-color: #111;
  border-width: 2px;
  box-shadow: 0 2px 6px rgba(0,0,0,.12);
}

/* hover accent without changing color */
.ds-swatch[data-value="beige"]:hover,
.ds-swatch[data-value="black"]:hover {
  border-color: #333;
  box-shadow: 0 1px 3px rgba(0,0,0,.12);
}

@media (max-width: 480px) {
  .ds-swatch[data-value="beige"],
  .ds-swatch[data-value="black"] {
    width: 38px;
    height: 38px;
    min-width: 38px;
  }
}

a.reset_variations {
    display: none;
}

.variations > tbody {
    border-bottom: 0 solid #ddd;
}

.variations th.label {
line-height: 0 !important;
padding: 30px 0 0;
font-size: 10px;
text-transform: uppercase;
}

.variations th.label > label {
font-weight: 400 !important;
}