.products {
  display: grid;
  gap: 1rem;
}

.product {
  display: flex;
  flex-direction: column;
  justify-content: space-between;

  width: 100%;

  overflow: hidden;
}

.product__name {
  font-size: clamp(1rem, 2.5vh, 1.25rem);
  font-weight: 600;
}

.product__name,
.product__sku {
  margin: 0;
}

.product__sku {
  font-size: 0.8rem;
}

.product__sku::before {
  content: "SKU: ";
}

.product__showcase {
  display: flex;
  align-content: center;

  margin: 1rem 0;
  height: 20rem;

  overflow-x: auto;
  overflow-y: hidden;

  scroll-snap-type: x mandatory;

  background-color: white;
}

.product__image {
  width: 100%;
  height: 100%;

  flex-shrink: 0;

  scroll-snap-align: center;
  object-fit: contain;

  cursor: pointer;

  --transition-rate: 500ms;
  transition: background-color var(--transition-rate), backdrop-filter var(--transition-rate);
}

.product__image:active {
  position: fixed;
  inset: 0;
  z-index: 100;

  object-fit: contain;

  background-color: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(10px);
}

.product__identifiers {
  display: flex;
  flex-wrap: wrap;
}

.product__identifiers>* {
  flex-basis: 100%;
}

.product__details {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;

  row-gap: 0.5rem;
}

.product__details--bottom {
  align-items: end;
}

.product__details-group {
  display: flex;
  align-items: center;

  gap: 0.5rem;
}

.product__price {
  margin: 0;

  font-weight: bolder;
  font-size: clamp(1.5rem, 2.5vw, 1.75rem);
}

.product__buy {
  height: fit-content;
  transition: scale ease-out 500ms;

  text-wrap: nowrap;
}

.product:hover .product__buy {
  scale: 1.05;
}

.product__rating {
  display: flex;
}

.product__rating i {
  height: min-content;
}

.product__rating p {
  margin: 0;
  padding-left: 0.25rem;
  text-wrap: nowrap;
}

@media (min-width: 40em) {
  .product__showcase {
    height: clamp(20rem, 33vw, 30rem);
  }

  .product__image:active {
    object-fit: none;
  }
}

@media (min-width: 48em) {
  .products {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 80em) {
  .products {
    grid-template-columns: repeat(3, 1fr);
  }
}
