.product-template {
  display: flex;
  flex-direction: column;
  align-items: center;

  font-size: 18px;

  &>section:first-child {
    padding-top: 64px;
  }

  section {
    width: 100vw;
    background-color: #383838;

    display: flex;
    flex-direction: column;
    align-items: center;

    gap: 24px;
    padding: 24px 8px;

    @media screen and (min-width: 650px) {
      gap: 64px;
      padding: 64px;
    }

    .back-icon-container {
      position: absolute;

      display: flex;
      flex-direction: row;
      height: 0;
      width: 100%;
      max-width: 1600px;
      padding: 0 30px;


      .back-icon {
        position: relative;
        /* simulate placing it square in the corner */
        top: -36px;

        div {
          img {
            position: absolute;
            top: 0;
            left: 0;
            width: 24px;
            height: 24px;

            &.hover-image {
              z-index: 1;
              opacity: 0;

              &:hover {
                opacity: 1;
              }
            }

            &:hover {
              cursor: pointer;
            }
          }
        }
      }
    }

    h1 {
      font-size: 30px;
      text-align: center;
    }

    h2 {
      font-size: 18px;
      margin: 0;
    }

    p {
      font-size: 18px;
    }

    .main-image-frame {
      width: fit-content;

      border: solid 4px #b1b1b1;
      border-radius: 4px;

      background-color: black;

      height: 400px;

      /* Height has to be defined explicitly - otherwise the page content bounces around when hovering over other images that are different sizes  */
      @media screen and (min-width: 650px) {
        height: 500px;
      }

      img {
        width: 100%;
        height: 100%;
        object-fit: scale-down;
      }
    }

    .all-images {
      width: min(628px, calc(100% - 16px));

      &>div {
        width: 100%;

        display: flex;
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;

        img {
          height: 100px;

          background-color: black;
          margin: 8px;

          border: solid 2px #383838;

          &:hover {
            cursor: pointer;
            border: solid 2px #0073ff;
          }
        }
      }
    }

    &.last-section {
      padding: 24px 8px;

      @media screen and (min-width: 650px) {
        padding: 64px;
      }
    }

    &.with-dark-background {
      background-color: #1e1e1e;
    }
  }

  .details {
    display: flex;
    flex-direction: column;
    align-items: center;

    &>div>section {
      width: 100vw;

      &:nth-child(2n) {
        background-color: #383838;
      }

      &:nth-child(2n + 1) {
        background-color: #1e1e1e;
      }
    }
  }
}