.goto-variant-selector {
  margin: 0 0 24px;
}

.goto-variant-selector__row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: flex-start;
}

.goto-variant-selector__option {
  display: block;
  cursor: pointer;
  flex: 0 0 auto;
}

.goto-variant-selector__input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.goto-variant-selector__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 132px;
  padding: 10px;
  border: 2px solid transparent;
  border-radius: 18px;
  background: #fff;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.goto-variant-selector__option.is-selected .goto-variant-selector__card {
  border-color: #592926;
  box-shadow: 0 10px 24px rgba(89, 41, 38, 0.12);
  transform: translateY(-1px);
}

.goto-variant-selector__image-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  overflow: hidden;
  background: #f5f0eb;
  display: flex;
  align-items: center;
  justify-content: center;
}

.goto-variant-selector__image,
.goto-variant-selector__image-placeholder {
  width: 100%;
  height: 100%;
  display: block;
}

.goto-variant-selector__image {
  object-fit: cover;
}

.goto-variant-selector__image-placeholder {
  background: linear-gradient(180deg, #f3eee8 0%, #ebe2d8 100%);
}

.goto-variant-selector__image--hover {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

.goto-variant-selector__input:focus-visible + .goto-variant-selector__card {
  outline: 2px solid #592926;
  outline-offset: 3px;
}

.goto-variant-selector__input:focus-visible + .goto-variant-selector__card .has-hover-image > :first-child {
  opacity: 0;
}

.goto-variant-selector__input:focus-visible + .goto-variant-selector__card .goto-variant-selector__image--hover {
  opacity: 1;
}

@media (hover: hover) {
  .goto-variant-selector__option:hover .has-hover-image > :first-child {
    opacity: 0;
  }

  .goto-variant-selector__option:hover .goto-variant-selector__image--hover {
    opacity: 1;
  }
}

.goto-variant-selector__name {
  font-size: 14px;
  line-height: 1.35;
  font-weight: 700;
  color: #261615;
  text-align: center;
}

.goto-variant-selector__meta {
  font-size: 12px;
  line-height: 1.3;
  color: #7a6d65;
  text-align: center;
}

@media (max-width: 640px) {
  .goto-variant-selector__row {
    gap: 10px;
  }

  .goto-variant-selector__card {
    width: 108px;
    padding: 8px;
  }
}
