.woo-attr-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  position: relative;
  margin: 0.5rem 0;
}
.woo-attr-group-label {
  width: 100%;
  font-weight: 600;
  font-size: 13px;
  margin: 4px 0 2px;
}
.woo-attr-swatch {
  position: relative;
  border-radius: 4px;
  border: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 15px;
  background: #fff;
  cursor: pointer;
  /* transition: opacity 0.15s ease, box-shadow 0.15s ease; */
  outline: none;
}

.woo-attr-swatch.type-image {
  position: relative;
  padding: 0;
}
.woo-attr-swatch.type-color,
.woo-attr-swatch.type-image,
.woo-attr-swatch.type-image:before,
.woo-attr-swatch.type-image img.main-img {
  width: 60px;
  height: 60px;
}
.woo-attr-swatch.type-color .swatch-inner,
.woo-attr-swatch.type-image:before,
.woo-attr-swatch.type-image img,
.woo-attr-swatch .hover-image {
  border-radius: 20px 20px 20px 0;
}

.woo-attr-swatch.type-image:before {
  content: "";
  position: absolute;
}

.woo-attr-swatch.type-image.is-selected:before {
  background-color: rgba(255, 255, 255, 0.5);
  background-image: url(../img/checkbox.svg);
  background-position: center center;
  background-repeat: no-repeat;
  background-size: 14px auto;
}

.woo-attr-swatch.type-color {
  padding: 0;
  background: transparent;
}
.woo-attr-swatch.type-color .swatch-inner {
  display: block;
  width: 100%;
  height: 100%;
}
.woo-attr-swatch.type-image img {
  display: block;
  object-fit: cover;
}
.woo-attr-swatch .swatch-label {
  font-size: 12px;
  white-space: nowrap;
}
/* Konfliktinės – rodom, bet pilkinam */
.woo-attr-swatch.is-conflict {
  opacity: 0.7;
}
/* „Hidden“ – slepiam netinkamus Size */
.woo-attr-swatch.is-hidden {
  display: none;
}
/* Net jei tema bando blokuoti: */
.woo-attr-swatch.is-disabled {
  opacity: 0.4;
  pointer-events: auto;
  cursor: pointer;
}
/*.woo-attr-swatch[title]:hover::after */
.woo-attr-swatch.type-color[title]:hover::after,
.woo-attr-swatch.type-image[title]:hover::after {
  content: attr(title);
  position: absolute;
  display: none;
  bottom: -50%; /* show above */
  left: 50%;
  transform: translateX(-50%);

  font-family: Cambria, Georgia, serif;
  color: #545454;
  letter-spacing: 1px;
  font-size: 14px;
  background-color: #fff;
  border-radius: 4px;
  -webkit-box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.4) !important;
  -moz-box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.4) !important;
  box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.4) !important;
  padding: 4px 10px;
  white-space: nowrap;
  z-index: 99;
}

/* default: hidden per button */
.woo-attr-swatch .hover-image {
  position: absolute;
  bottom: 37%;
  left: 42%;
  height: 260px;
  width: 270px;
  border: 14px solid #fff;
  overflow: hidden;
  -webkit-box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.4) !important;
  -moz-box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.4) !important;
  box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.4) !important;
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
  opacity: 0;
  visibility: hidden;
  pointer-events: none; /* prevents flicker when hovering the preview */
  z-index: 999; /* make sure it floats above */
}

/* show only the hovered button's preview */
.woo-attr-swatch:hover > .hover-image,
.woo-attr-swatch:focus-visible > .hover-image {
  opacity: 1;
  visibility: visible;
}

/* IMPORTANT: remove this rule (it shows all previews at once) */
/* .woo-attr-swatches:hover .hover-image { ... } */

.woo-attr-swatches .hover-image img {
  height: 100%;
  width: 100%;
  border-radius: 5px;
  opacity: 1 !important;
}

/* Label swatch */
.woo-attr-swatch.type-label {
  min-width: 36px;
  height: 36px;
  padding: 6px 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: #FFF;
  box-shadow: 0 0 36px 0 rgba(0, 0, 0, 0.10);
  cursor: pointer;
  transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease;
}
.woo-attr-swatch.type-label .swatch-label {
  color: #303030;
  text-align: center;
  font-size: 16px;
  font-style: normal;
  font-weight: 400;
  line-height: 24px;
  letter-spacing: 0.8px;
}
.woo-attr-swatch.type-label.is-selected .swatch-label {
  color: #FFF;
}
.woo-attr-swatch.type-label.is-selected {
  background: var(--original-green, #00875A);
}
.woo-attr-swatch.type-label.is-disabled {
  opacity: .45;
  cursor: not-allowed;
  text-decoration: line-through;
}

@media screen and (max-width: 1360px) {
  .woo-attr-swatch.type-color,
  .woo-attr-swatch.type-image,
  .woo-attr-swatch.type-image:before,
  .woo-attr-swatch.type-image img.main-img {
    width: 45px;
    height: 45px;
  }
  .woo-attr-swatch.type-color .swatch-inner,
  .woo-attr-swatch.type-image:before,
  .woo-attr-swatch.type-image img,
  .woo-attr-swatch .hover-image {
    border-radius: 12px 12px 12px 0;
  }
  .woo-attr-swatch .hover-image {
    height: 130px;
    width: 150px;
    border: 5px solid #fff;
  }
}
@media screen and (max-width: 600px) {
  .woo-attr-swatch.type-color,
  .woo-attr-swatch.type-image,
  .woo-attr-swatch.type-image:before,
  .woo-attr-swatch.type-image img.main-img {
    width: 40px;
    height: 40px;
  }
  .woo-attr-swatch.type-color .swatch-inner,
  .woo-attr-swatch.type-image:before,
  .woo-attr-swatch.type-image img,
  .woo-attr-swatch .hover-image {
    border-radius: 12px 12px 12px 0;
  }
  .woo-attr-swatch .hover-image {
    height: 93px;
    width: 100px;
    border: 5px solid #fff;
  }
  .woo-attr-swatches {
    gap: 10px;
  }
}
