* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  font-family: sans-serif;
  line-height: 1.3;
}

main {
  height: 100dvh;
  overflow-x: hidden;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  overscroll-behavior-y: contain;
  scroll-behavior: auto;
}

.product {
  position: relative;
  height: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  display: flex;
  flex-direction: column;
}

.product__bg {
  z-index: 0;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 50%;
  background-size: cover;
  background-repeat: no-repeat;
}

.product__img {
  z-index: 1;
  position: absolute;
  inset: -50px 0 0 0;
  background-position: center;
  background-size: auto 20dvh;
  background-repeat: no-repeat;
}

.product__form {
  z-index: 10;
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  position: relative;
  padding: 0 16px 16px;
  padding-top: calc(50dvh + 10dvh);
  text-align: center;
}

.product__title {
  margin-bottom: 4px;
}

.product__price {
  margin-bottom: 25px;
}

.product__description {
  text-wrap: pretty;
  margin-bottom: 25px;
  font-size: 0.875rem;
}

.product__vspacer {
  flex: 1 1 0;
}

.product__add-btn {
  border-radius: 24px;
  background: #000;
  color: #fff;
  text-align: center;
  font-weight: 600;
  line-height: 1.18;
  padding: 15px;
  border: none;
  outline: none;
}

@media (min-width: 1280px) {
  /* main {
    scroll-snap-type: none;
  } */

  .product__bg {
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
  }

  .product:nth-child(2n) .product__bg {
    left: auto;
    right: 0;
  }

  .product__img {
    inset: 0 0 0 -70px;
    background-size: 16vw auto;
  }

  .product:nth-child(2n) .product__img {
    inset: 0 -70px 0 0;
  }

  .product {
    align-items: end;
    justify-content: center;
  }

  .product:nth-child(2n) {
    align-items: start;
  }

  .product__form {
    text-align: start;
    padding: 0 10%;
    width: 50%;
    flex: 0 0 auto;
  }

  .product__description {
    font-size: 1.125rem;
  }
}