.musco-product-variants {
  margin: 8px 0 12px;
}

.musco-product-variants__title {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 400;
  line-height: 20px;
}

.musco-product-variants__rail {
  position: relative;
}

.musco-product-variants__scroller {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 1px;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  -ms-overflow-style: none;
  touch-action: pan-x pan-y;
  -webkit-overflow-scrolling: touch;
}

.musco-product-variants__scroller::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.musco-product-variant {
  position: relative;
  display: flex;
  flex: 0 0 126px;
  flex-direction: column;
  width: 126px;
  min-width: 126px;
  padding: 2px;
  border: 1px solid transparent;
  border-radius: 2px;
  background: transparent;
  color: #333;
  text-align: center;
  text-decoration: none;
  scroll-snap-align: start;
  -webkit-user-select: none;
  user-select: none;
}

a.musco-product-variant {
  cursor: pointer;
}

a.musco-product-variant:active {
  border-color: #aaa;
  background: rgba(255, 255, 255, .28);
  color: #333;
  text-decoration: none;
}

a.musco-product-variant:focus-visible {
  border-color: #aaa;
  background: rgba(255, 255, 255, .28);
  color: #333;
  text-decoration: none;
}

.musco-product-variant--current {
  border-color: #888;
  background: rgba(255, 255, 255, .2);
  cursor: default;
}

.musco-product-variant__image {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 120px;
  height: 80px;
  margin: 0 auto;
  overflow: hidden;
}

.musco-product-variant__image img {
  display: block;
  width: 120px;
  height: 80px;
  object-fit: contain;
}

.musco-product-variant--out-of-stock .musco-product-variant__image img {
  -webkit-filter: grayscale(100%);
  filter: grayscale(100%);
  opacity: .6;
}

.musco-product-variant__label {
  display: block;
  min-height: 35px;
  padding: 6px 2px 0;
  font-size: 13px;
  line-height: 16px;
  overflow-wrap: anywhere;
}

.musco-product-variant__visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.musco-product-variants--compact .musco-product-variants__scroller {
  padding-bottom: 1px;
}

.musco-product-variants--compact .musco-product-variant--current {
  padding: 1px;
  border-width: 2px;
  border-color: #666;
}

.musco-product-variants__selection {
  margin: 5px 2px 0;
  color: #555;
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  overflow-wrap: anywhere;
}

.musco-product-variants__arrow {
  position: absolute;
  z-index: 2;
  top: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .78);
  color: #555;
  opacity: .70;
  cursor: pointer;
  box-shadow: 0 1px 5px rgba(0, 0, 0, .28);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
  transform: translateY(-50%);
  transition: opacity .16s ease, background-color .16s ease, color .16s ease, box-shadow .16s ease;
  -webkit-appearance: none;
  appearance: none;
}

.musco-product-variants__arrow svg {
  display: block;
  flex: 0 0 auto;
  width: 10px;
  height: 16px;
}

.musco-product-variants__arrow--previous svg {
  transform: translateX(-1px);
}

.musco-product-variants__arrow--next svg {
  transform: translateX(1px);
}

.musco-product-variants__arrow--previous {
  left: 2px;
}

.musco-product-variants__arrow--next {
  right: 2px;
}

.musco-product-variants__arrow:hover,
.musco-product-variants__arrow:focus-visible {
  background: rgba(255, 255, 255, .82);
  color: #333;
  opacity: .84;
  box-shadow: 0 1px 6px rgba(0, 0, 0, .32);
}

.musco-product-variants__arrow:focus {
  outline: none;
}

.musco-product-variants__arrow:focus-visible {
  outline: 1px solid rgba(0, 0, 0, .3);
  outline-offset: 2px;
}

.musco-product-variants__arrow:disabled {
  opacity: 0;
  pointer-events: none;
}

.musco-product-variants__arrow[hidden] {
  display: none;
}

@media (hover: hover) and (pointer: fine) {
  a.musco-product-variant:hover {
    border-color: #aaa;
    background: rgba(255, 255, 255, .28);
    color: #333;
    text-decoration: none;
  }

  .musco-product-variants__scroller.is-dragging,
  .musco-product-variants__scroller.is-dragging .musco-product-variant {
    cursor: grabbing;
  }

  .musco-product-variants__scroller.is-dragging {
    scroll-snap-type: none;
    user-select: none;
  }

  .musco-product-variants__scroller.is-scrollable img {
    user-select: none;
    -webkit-user-drag: none;
  }
}

@media (max-width: 767px) {
  .musco-product-variants {
    margin-bottom: 15px;
  }

  .musco-product-variants__scroller {
    gap: 8px;
  }

  .musco-product-variant {
    flex-basis: 114px;
    width: 114px;
    min-width: 114px;
  }

  .musco-product-variant__image,
  .musco-product-variant__image img {
    width: 108px;
    height: 72px;
  }

  .musco-product-variant__label {
    word-break: normal;
    overflow-wrap: break-word;
    -webkit-hyphens: none;
    hyphens: none;
  }

}

@media (max-width: 379px) {
  .musco-product-variant__label {
    padding-top: 4px;
    font-size: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .musco-product-variants__scroller {
    scroll-behavior: auto;
  }

  .musco-product-variants__arrow {
    transition: none;
  }
}
