.main {
  padding: 16px;
  max-width: 1280px;
  margin: auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: min-content 1fr;
  column-gap: 32px;
  row-gap: 8px;
}

.carousel {
  position: relative;
  grid-column: 1 / 2;
  grid-row: 1 / 3;
}

.carousel__viewport {
  overflow: hidden;
}

.carousel__track {
  display: flex;
  width: 100%;
  transition: transform 0.4s ease;
  touch-action: pan-y;
}

.carousel__slide {
  min-width: 100%;
}

.carousel__image {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.carousel__control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border: 1px solid #000000;
  background-color: #ffffff;
  color: #000000;
  font-size: 20px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    color 0.2s ease;
}

.carousel__control--prev {
  left: 12px;
}

.carousel__control--next {
  right: 12px;
}

.carousel__control:hover {
  background-color: #000000;
  color: #ffffff;
}

.carousel__dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
}

.carousel__dot {
  width: 10px;
  height: 10px;
  border: 1px solid #000000;
  background-color: transparent;
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    transform 0.2s ease;
}

.carousel__dot.is-active {
  background-color: #000000;
  transform: scale(1.1);
}

.main__header {
  display: inline;
  grid-column: 2 / 3;
  grid-row: 1 / 2;
}

.main__title {
  margin-bottom: 4px;
}

.main__price {
  font-weight: 400;
}

.main__info {
  grid-column: 2 / 3;
  grid-row: 2 / 3;
}

.main__details {
  margin: 16px 0;
}

.details__title {
  margin-bottom: 8px;
}

.details__list {
  list-style-type: "–";
  list-style-position: inside;
}

.details__list--item span {
  padding-left: 4px;
}

.info__button {
  color: #ffffff;
  background: #000000;
  padding: 8px 16px;
  border: 1px solid #000000;
  cursor: pointer;
}

.info__button--secondary {
  background: transparent;
  color: #000000;
}

.product__actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.product__action {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
}

.product__label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-weight: 600;
}

.product__quantity {
  width: 80px;
  padding: 6px 8px;
  border: 1px solid #000000;
}

@media screen and (max-width: 1024px) {
  .main {
    grid-template-columns: 1fr;
    grid-template-rows: max-content 1fr max-content;
  }

  .carousel {
    grid-column: 1 / 2;
    grid-row: 2 / 3;
  }

  .carousel__control {
    width: 36px;
    height: 36px;
    font-size: 18px;
    background-color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.7);
  }

  .carousel__dots {
    margin-top: 8px;
  }

  .main__header {
    grid-column: 1 / 2;
    grid-row: 1 / 2;
  }

  .main__info {
    grid-column: 1 / 2;
    grid-row: 3 / 4;
  }
}
