.tpg_collection_list {
  position: relative;
  overflow: visible;

  .swiper-horizontal {
    /* Variables are for calculating the image/slides properly. 
    so they allign with the inner container width */
    --tpg-gap: 12px;
    --tpg-slide-size: calc((100% - (var(--tpg-gap) * (var(--tpg-slides-per-row) - 1))) / var(--tpg-slides-per-row));
    position: relative;

    &:not(.swiper-initialized) .swiper-wrapper {
      gap: var(--tpg-gap);
    }
  }

  .section_title {
    font-family: var(--font-body-family);
    font-weight: 300;
    font-size: 26px;
    line-height: 1.2;
    letter-spacing: 0.01em;
    margin: 0;
    padding-bottom: 16px;

    @media screen and (max-width: 749px) {
      display: none;
    }
  }

  .collection_item {
    position: relative;

    &.swiper-slide {
      width: 85px;

      @media (min-width: 750px) {
        width: 210px;
      }
    }

    .collection_image {
      width: 100%;
      aspect-ratio: 1 / 1;
      overflow: hidden;
    }

    .collection_image > img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }

    .collection_title {
      position: absolute;
      top: 35%;
      left: 50%;
      font-size: clamp(12px, 2vw, 26px);
      line-height: 1.2;
      letter-spacing: 0.01em;
      font-weight: 300;
      font-family: var(--font-body-family);
      color: rgba(255, 255, 255, 1);
      transform: translate(-50%, -50%);
      text-shadow: 4px 4px 8px rgba(0, 0, 0, 0.5);
      text-align: center;
    }

    a {
      position: absolute;
      width: 100%;
      height: 100%;
      top: 0;
      display: block;
    }
  }

  .swiper-wrapper-wrapper {
    position: relative;
  }

  .swiper-wrapper {
    position: unset;
  }

  .swiper-button-prev,
  .swiper-button-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    aspect-ratio: 1;
    width: 44px;
    height: 44px;
    margin: unset;

    &::after {
      display: none;
    }

    @media screen and (max-width: 749px) {
      width: 40px;
      height: 40px;
    }

    svg {
      position: absolute;
      width: 44px;
      height: 44px;

      @media screen and (max-width: 749px) {
        width: 40px;
        height: 40px;
      }
    }
  }

  .swiper-button-disabled {
    display: none;
  }

  .swiper-button-prev {
    transform: translateY(-50%) rotate(-180deg);
    left: 0;
  }

  .swiper-button-next {
    right: 0;
  }
}

@media only screen and (max-width: 749px) {
  .tpg_collection_list {
  .collection_item .collection_title {
      position: relative;
      top: 0;
      left: 0;
      transform: none;
      color: #1d1d1d;
      text-shadow: none;
      letter-spacing: 0.02em;
      width: 100%;
      text-align: center;
    }

    .swiper-button-prev,
    .swiper-button-next {
      /* Calculation refers to the title that is subtracted */
      top: calc(50% - 23px);

      @media screen and (max-width: 749px) {
        top: calc(50% - 20px);
      }
    }
  }
}
