.product-variants li.input-container {
  position: relative;
}

.product-variants .texture-hover-preview {
  display: none;
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  z-index: 9999;
  transform: translateX(-50%);
  padding: 8px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, .18);
  border-radius: 3px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
  line-height: 0;
  pointer-events: none;
}

.product-variants .texture-hover-preview img {
  display: block;
  width: 200px;
  height: 200px;
  object-fit: cover;
}

.product-variants .texture-hover-preview-label {
  display: block;
  width: 200px;
  box-sizing: border-box;
  margin-top: 8px;
  padding: 7px 8px;
  color: #222;
  background: rgba(255, 255, 255, .96);
  border-top: 1px solid rgba(0, 0, 0, .08);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  white-space: normal;
}

.product-variants .texture-hover-preview-text-only {
  min-width: 160px;
  width: auto;
  padding: 0;
  line-height: 1.25;
}

.product-variants .texture-hover-preview-text-only .texture-hover-preview-label {
  width: auto;
  min-width: 160px;
  max-width: 220px;
  margin-top: 0;
  border-top: 0;
  border-radius: 3px;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .16);
}

.product-variants li.input-container:hover .texture-hover-preview,
.product-variants li.input-container:focus-within .texture-hover-preview {
  display: block;
}
