.collection-v47 {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  column-gap: var(--gap);
  padding: 20rem 0 13rem;
}
@media (max-width: 767px) {
  .collection-v47 {
    padding: 0;
    flex-direction: column;
    align-items: flex-start;
  }
}

.collection-v47__item {
  position: relative;
  cursor: pointer;
  z-index: 2;
}

.collection-v47__item:hover ~ .collection-v47__img .xo-image {
  opacity: 1;
}
.collection-v47__item:hover .collection-v47__item-title ~ .collection-v47__item-count {
  opacity: 1;
}
.collection-v47__item:hover .collection-v47__item-title::before {
  transform: scaleX(1);
}

.collection-v47__item-title {
  font-family: var(--font-custom-family);
  position: relative;
  -webkit-text-stroke: 1px rgb(var(--color-foreground));
  color: transparent;
  font-size: clamp(4rem, calc(1.875vw + 3.25rem), 5.5rem);
  line-height: calc(1 + 0.2 / var(--font-heading-scale));
  margin-bottom: 0.8rem;
  text-transform: capitalize;
}

.collection-v47__item-title::before {
  content: "";
  position: absolute;
  bottom: 0;
  transition: transform 0.3s cubic-bezier(0.77, 0, 0.175, 1);
  transform-origin: left;
  width: 100%;
  height: 2px;
  background: rgb(var(--color-foreground));
  transform: scaleX(0);
  margin-right: 0.15em;
}

.collection-v47__item-count {
  display: block;
  opacity: 0;
  color: rgb(var(--color-foreground));
  text-align: center;
  text-transform: uppercase;
  transition: opacity 0.3s ease-in-out;
  font-size: calc(var(--font-body-scale) * 1.2rem);
  line-height: calc(1 + 0.2 / var(--font-body-scale));
}

.collection-v47__img {
  position: absolute;
  top: -100%;
  transform: translateY(-10%);
  transition: all 0.3s ease-in-out;
}
.collection-v47__img .xo-image {
  transition: all 0.5s ease-in-out;
  opacity: 0;
  height: 40rem;
  width: 30rem;
}