.threedh-native-select-wrap {
  position: relative;
}

.threedh-native-select-wrap select {
  appearance: none !important;
  background: none !important;
  border: 0 !important;
  box-shadow: none !important;
  clip: rect(0, 0, 0, 0) !important;
  clip-path: inset(50%) !important;
  height: 1px !important;
  max-height: 1px !important;
  max-width: 1px !important;
  min-height: 0 !important;
  min-width: 0 !important;
  opacity: 0 !important;
  overflow: hidden !important;
  padding: 0 !important;
  pointer-events: none !important;
  position: absolute !important;
  white-space: nowrap !important;
  width: 1px !important;
}

.threedh-swatches {
  display: grid;
  gap: .42rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: .35rem 0 .65rem;
}

.threedh-swatch {
  appearance: none;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, .22);
  color: #201914;
  cursor: pointer;
  display: inline-flex !important;
  align-items: center !important;
  flex-direction: row !important;
  gap: .34rem;
  justify-content: flex-start;
  min-height: 40px !important;
  padding: .28rem .42rem !important;
  position: relative;
  text-align: left;
  width: 100%;
  transition: border-color .15s ease, box-shadow .15s ease, opacity .15s ease, transform .15s ease;
}

/* Divi/Woo button/icon presets can inject pseudo-elements into nested spans.
   Swatch internals are purely image/text, so suppress inherited icon artifacts. */
.threedh-swatch::before,
.threedh-swatch::after,
.threedh-swatch *::before,
.threedh-swatch *::after {
  background: none !important;
  border: 0 !important;
  content: none !important;
  display: none !important;
}

.threedh-swatch:hover,
.threedh-swatch.is-selected {
  border-color: #e65a22;
  box-shadow: 0 0 0 3px rgba(230, 90, 34, .22);
  transform: translateY(-1px);
}

.threedh-swatch.is-selected {
  background: #fff7f2;
  border-width: 2px;
}

.threedh-swatch.is-selected::after {
  align-items: center !important;
  background: #e65a22 !important;
  border: 0 !important;
  border-radius: 999px !important;
  color: #fff !important;
  content: "✓" !important;
  display: flex !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  height: 20px !important;
  justify-content: center !important;
  line-height: 1 !important;
  position: absolute !important;
  right: -7px !important;
  top: -7px !important;
  width: 20px !important;
}

.threedh-swatch.is-disabled {
  cursor: not-allowed;
  opacity: .35;
}

.threedh-swatches--rounded .threedh-swatch,
.threedh-swatches--rounded .threedh-swatch__visual,
.threedh-swatches--rounded .threedh-swatch__color {
  border-radius: 12px;
}

.threedh-swatches--circle .threedh-swatch__visual,
.threedh-swatches--circle .threedh-swatch__color {
  border-radius: 999px;
}

.threedh-swatch__visual {
  align-items: center !important;
  display: inline-flex !important;
  flex: 0 0 34px !important;
  justify-content: center !important;
  min-width: 34px !important;
  min-height: 34px !important;
  overflow: hidden;
}

.threedh-swatch__visual img {
  display: block !important;
  width: 34px !important;
  height: 34px !important;
  object-fit: cover;
}

.threedh-swatch__color {
  background: var(--threedh-swatch-color, #ddd);
  border: 1px solid rgba(0, 0, 0, .15);
  display: inline-block;
  width: 38px;
  height: 38px;
}

.threedh-swatch__label,
.threedh-swatch__text {
  color: #201914;
  font-size: .78rem;
  font-weight: 700;
  line-height: 1.15;
}

.reset_variations {
  margin-left: .5rem;
}

.threedh-archive-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  justify-content: center;
  margin: 8px 0 2px;
}

.threedh-archive-swatch {
  align-items: center;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, .18);
  display: inline-flex;
  height: 32px;
  justify-content: center;
  overflow: hidden;
  text-decoration: none;
  width: 32px;
}

.threedh-archive-swatch:hover,
.threedh-archive-swatch--more:hover {
  border-color: #e65a22;
}

.threedh-archive-swatch--more {
  color: #201914;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

.threedh-archive-swatches--rounded .threedh-archive-swatch {
  border-radius: 8px;
}

.threedh-archive-swatches--circle .threedh-archive-swatch {
  border-radius: 999px;
}

.threedh-archive-swatches--labels {
  gap: 7px;
}

.threedh-archive-swatches--labels .threedh-archive-swatch {
  flex-direction: column;
  gap: 3px;
  height: auto;
  min-height: 46px;
  padding: 3px;
  width: 42px;
}

.threedh-archive-swatch img {
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.threedh-archive-swatches--labels .threedh-archive-swatch img,
.threedh-archive-swatches--labels .threedh-archive-swatch__color {
  flex: 0 0 28px;
  height: 28px;
  width: 28px;
}

.threedh-archive-swatch__caption {
  color: #2b211d;
  display: block;
  font-size: 9px;
  font-weight: 750;
  line-height: 1.05;
  max-width: 38px;
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.threedh-archive-swatch__color {
  background: var(--threedh-swatch-color, #ddd);
  display: block;
  height: 100%;
  width: 100%;
}

.threedh-archive-swatch__text {
  color: #201914;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  padding: 2px;
}

.threedh-copy-variation-link {
  appearance: none;
  background: transparent;
  border: 1px solid rgba(230, 90, 34, .55);
  border-radius: 999px;
  color: #e65a22;
  cursor: pointer;
  display: inline-flex;
  font-size: .86rem;
  font-weight: 700;
  margin: 0 0 1rem;
  padding: .42rem .85rem;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}

.threedh-copy-variation-link:hover:not(:disabled) {
  background: rgba(230, 90, 34, .08);
  border-color: #e65a22;
}

.threedh-copy-variation-link:disabled {
  cursor: not-allowed;
  opacity: .5;
}

.wc-block-product .threedh-archive-swatches,
.wc-block-grid__product .threedh-archive-swatches {
  clear: both;
  margin-bottom: 10px;
}

.wc-block-product .threedh-archive-swatch::before,
.wc-block-product .threedh-archive-swatch::after,
.wc-block-product .threedh-archive-swatch *::before,
.wc-block-product .threedh-archive-swatch *::after {
  content: none !important;
  display: none !important;
}
