/* 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-swatches-list[data-attribute="pa_shape"] .ds-swatch.is-selected {
  border-color: #111 !important;
  background-color: #111 !important;
  color: #fff !important;
  box-shadow: 0 2px 6px rgba(0,0,0,.12) !important;
}
/* For pa_color use ring style (match beige/black chip behavior) */
.ds-swatches-list[data-attribute="pa_color"] .ds-swatch.is-selected {
  background-color: transparent !important;
  border-color: #111 !important;
  border-width: 2px !important;
  box-shadow: 0 2px 6px rgba(0,0,0,.12) !important;
}

/* Disabled (temporarily unavailable given current selections) */
.ds-swatch.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: grayscale(30%);
}
.ds-swatch.is-disabled:hover {
  border-color: #d5d5d5;
  box-shadow: none;
}
/* Permanently unavailable (no in-stock variations for this value) */
.ds-swatch.is-out-of-stock { display: none !important; }

/* 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 !important; /* ensure gap stays visible and fill unaffected */
  border-color: #111 !important;
  border-width: 2px !important;
  box-shadow: 0 2px 6px rgba(0,0,0,.12) !important;
}

/* 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;
}

/* === DS Color Variations (moved from single-product.css) === */
.single-product .ds-color-variations { margin: 20px 0 5px; }
.single-product .ds-color-variations__label { font-family: 'Quicksand'; font-weight: 400; margin-bottom: 6px; font-size: 10px; text-transform: uppercase }
.single-product .ds-color-variations__items { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.single-product .ds-color-variations__item { width: 60px; height: 83px; display: inline-flex; align-items: center; justify-content: center; line-height: 0; border: 1px solid #ddd; border-radius: 4px; overflow: hidden; background: #fff; box-sizing: border-box; transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease; }
.single-product .ds-color-variations__item.is-active { border-color: #111; box-shadow: 0 0 0 2px rgba(0,0,0,.08); cursor: default; }
.single-product .ds-color-variations__item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.single-product .ds-color-variations__item:hover, .single-product .ds-color-variations__item:focus { border-color: #333; }
.single-product .ds-color-variations__name { display: none !important; }

/* DS: Color swatch active/loader interactions */
.single-product .ds-color-variations__item { position: relative; }
.single-product .ds-color-variations__item.is-active { pointer-events: none; cursor: default; }
.single-product .ds-color-variations__item.is-loading { cursor: progress; }
.single-product .ds-color-variations__item.is-loading::after { content: ""; position: absolute; inset: 0; background: rgba(255,255,255,0.45); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); border-radius: inherit; z-index: 1; }
.single-product .ds-color-variations__item.is-loading::before { content: ""; position: absolute; inset: 0; background: url('../img/Eclipse@1x-1.0s-25px-25px.svg') center center / 25px 25px no-repeat; z-index: 2; }
.single-product .ds-color-variations__item.is-loading .ds-color-variations__swatch,
.single-product .ds-color-variations__item.is-loading img { filter: blur(1px); opacity: .6; }


/* === Added support for caramel, cream, and peach circular color swatches === */
/* Base circle styling */
.ds-swatch[data-value="caramel"],
.ds-swatch[data-value="cream"],
.ds-swatch[data-value="peach"] {
  border-radius: 50%;
  width: 42px;
  height: 42px;
  min-width: 42px;
  padding: 0;
  background-color: transparent;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Inner color fill */
.ds-swatch[data-value="caramel"]::before,
.ds-swatch[data-value="cream"]::before,
.ds-swatch[data-value="peach"]::before {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  pointer-events: none;
}
.ds-swatch[data-value="caramel"]::before { background-color: rgb(133, 70, 30); }
.ds-swatch[data-value="cream"]::before { background-color: rgb(255, 253, 208); }
.ds-swatch[data-value="peach"]::before { background-color: rgb(255, 203, 164); }

/* Visually hide the text label but keep it for screen readers */
.ds-swatch[data-value="caramel"] .ds-swatch-label,
.ds-swatch[data-value="cream"] .ds-swatch-label,
.ds-swatch[data-value="peach"] .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;
}

/* Selected state accent border without changing fill */
.ds-swatch[data-value="caramel"].is-selected,
.ds-swatch[data-value="cream"].is-selected,
.ds-swatch[data-value="peach"].is-selected {
  background-color: transparent !important;
  border-color: #111 !important;
  border-width: 2px !important;
  box-shadow: 0 2px 6px rgba(0,0,0,.12) !important;
}

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

/* Small screen sizing */
@media (max-width: 480px) {
  .ds-swatch[data-value="caramel"],
  .ds-swatch[data-value="cream"],
  .ds-swatch[data-value="peach"] {
    width: 38px;
    height: 38px;
    min-width: 38px;
  }
}


/* === DS: Utilities and icon swatches for shape attribute === */
/* Visually hidden utility */
.ds-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Icon swatch presentation for shape values (e.g., blossom, circle) */
.ds-swatch--icon {
  /* Keep default box model, center icon */
  font-size: 18px;
  line-height: 1;
}
.ds-swatch--icon i {
  display: inline-block;
  font-size: 18px;
  color: inherit; /* follow swatch state colors */
  pointer-events: none;
}
@media (max-width: 480px) {
  .ds-swatch--icon,
  .ds-swatch--icon i {
    font-size: 17px;
  }
}
