.collection {
  padding: 80px 0;
}

@media screen and (max-width: 989px) {
  .collection .slider.slider--tablet {
    margin-bottom: 1.5rem;
  }
}

.collection .loading-overlay {
  position: absolute;
  z-index: 1;
  width: 1.8rem;
}

@media screen and (max-width: 767px) {
  .collection .loading-overlay {
    top: 0;
    right: 0;
  }
}

@media screen and (min-width: 768px) {
  .collection .loading-overlay {
    left: 0;
  }
}

.collection .loading-overlay {
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: none;
  width: 100%;
  padding: 0 1.5rem;
  opacity: 0.7;
}

@media screen and (min-width: 768px) {
  .collection .loading-overlay {
    padding-left: 5rem;
    padding-right: 5rem;
  }
}

.collection.loading .loading-overlay {
  display: block;
}

.collection--empty .title-wrapper {
  margin-top: 10rem;
  margin-bottom: 15rem;
}

@media screen and (max-width: 989px) {
  .collection .slider--tablet.product-grid {
    scroll-padding-left: 1.5rem;
  }
}

.collection__description>* {
  margin: 0;
  margin-top: 16px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0.02em;
}

.collection__view-all a:not(.link) {
  margin-top: 40px;

  @media screen and (max-width: 767px) {
    margin-top: 24px;
  }
}

.collection .collection-title-with-description .title {
  margin-bottom: 20px;
 
  @media screen and (max-width: 1279px) {
    margin-bottom: 12px;
  }
}

.collection .collection__title.title-wrapper {
  margin: 0 80px 40px;
  padding: 0;

  @media screen and (max-width: 1279px) {
    margin: 0 40px 24px;
  }

  @media screen and (max-width: 767px) {
    margin: 0 24px 24px;
  }

  .title {
    color: rgb(var(--color-title));
  }
}

.collection slider-component:not(.slider-component-desktop) {
  padding: 0 80px;

  @media screen and (max-width: 1279px) {
    padding: 0 40px;
  }

  @media screen and (max-width: 767px) {
    padding: 0 24px;
  }
}

.collection slider-component:not(.slider-component-desktop) .grid {
  --grid-desktop-horizontal-spacing: 24px;
  --grid-mobile-horizontal-spacing: 24px;
  gap: var(--grid-desktop-horizontal-spacing);
  padding: 0;

  .card__heading,
  .price {
    font-weight: 500;
    font-size: 16px;
    line-height: 24px;
    letter-spacing: .02em;
    text-align: center;
    color: #333;
  }
}

@media screen and (max-width: 767px) {
  .collection .slider--tablet.product-grid {
    scroll-padding-left: 24px;
  }
}

@media screen and (min-width: 768px) and (max-width: 989px) {
  .collection .slider--tablet.product-grid {
    scroll-padding-left: 40px;
  }
}

.collection .contains-card--product.slider {
  padding: 0 80px;
  scroll-padding-left: 80px;
  gap: 24px;

  @media screen and (max-width: 1279px) {
    padding: 0 40px;
    scroll-padding-left: 40px;
  }

  @media screen and (max-width: 767px) {
    padding: 0 24px;
    scroll-padding-left: 24px;
    gap: 16px;
  }
}

.collection .slider.slider--desktop.contains-card--standard.grid--4-col-desktop .grid__item {
  width: calc((100vw - 256px) / 5);
  max-width: unset;

  @media screen and (max-width: 1440px) {
    width: calc((100vw - 232px) / 4);
  }

  @media screen and (max-width: 1279px) {
    width: calc((100vw - 128px) / 3);
  }

  @media screen and (max-width: 767px) {
    width: calc((100vw - 64px) / 2);
  }
}

.collection .slider.slider--desktop.contains-card--standard.grid--2-col-desktop .grid__item {
  width: calc((100vw - 208px) / 3);
  max-width: unset;

  @media screen and (max-width: 1440px) {
    width: calc((100vw - 184px) / 2);
  }

  @media screen and (max-width: 1279px) {
    width: calc((100vw - 104px) / 2);
  }

  @media screen and (max-width: 767px) {
    width: 100%;
  }
}

.collection .slider-buttons {
  margin-bottom: 0;
}

.collection .slider-component-full-width .slider .grid__item:first-of-type,
.collection .slider .grid__item:last-of-type {
  padding: 0;
  margin: 0;
}

.collection .slider-component-full-width {
  padding: 0;
}

.show_prod_collection {
  .card-collection-img {
    position: absolute;
    left: 0;
    top: 0;
    height: 262px;
    border-radius: var(--text-boxes-radius);
    width: 100%;
    object-fit: cover;

    @media screen and (max-width: 1279px) {
      height: 216px;
    }
  }

  .card-collection-tag {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 1;
    border-radius: 8px;
    padding: 6px 8px;
    background: #333;
    color: #fff;
    font-weight: 500;
    font-size: 12px;
    line-height: 150%;
    letter-spacing: .02em;
    text-align: center;
  }

  .card--media .card__inner {
    width: 240px;
    margin: 80px auto 0;
    border-radius: var(--text-boxes-radius);
    overflow: hidden;

    @media screen and (max-width: 1279px) {
      width: 180px;
    }
  }

  .card__information {
    text-align: center;
    padding: 24px 0;
  }

  .card-information {
    padding: 0 40px;
    text-align: center;
  }

  .card__heading {
    font-weight: 500;
    font-size: 24px;
    line-height: 150%;
    letter-spacing: .02em;
    margin-bottom: 12px;
    max-height: 72px;
    padding: 0 40px;

    @media screen and (max-width: 767px) {
      font-size: 20px;
      line-height: 28px;
      max-height: 56px;
    }
  }

  .card-information>.price,
  .price__container>.price__regular {
    font-weight: 500;
    font-size: 20px;
    line-height: 28px;
    letter-spacing: .02em;
  }

  .price--on-sale .price__sale {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;

    * {
      margin: 0;
    }

    .price-item--regular {
      font-weight: 500;
      font-size: 16px;
      line-height: 24px;
      letter-spacing: .02em;
      opacity: .3;
      color: #333;
    }

    .price-item--sale {
      font-weight: 500;
      font-size: 20px;
      line-height: 28px;
      letter-spacing: .02em;
    }
  }

  .price__regular .price-item--regular {
    font-weight: 500;
    font-size: 20px;
    line-height: 28px;
    letter-spacing: .02em;
  }
}

.product-grid-container .collection {
  padding: 0;

  #product-grid {
    display: grid;
    row-gap: 40px;
    margin-bottom: 40px;

    @media screen and (max-width: 1279px) {
      gap: 24px;
    }

    &.grid--6-col-desktop {
      grid-template-columns: repeat(6, 1fr);

      @media screen and (min-width: 1281px) {
        grid-template-columns: repeat(7, 1fr);
      }

      @media screen and (max-width: 1023px) {
        grid-template-columns: repeat(5, 1fr);
      }
    }

    &.grid--5-col-desktop {
      grid-template-columns: repeat(5, 1fr);

      @media screen and (min-width: 1281px) {
        grid-template-columns: repeat(6, 1fr);
      }

      @media screen and (max-width: 1023px) {
        grid-template-columns: repeat(4, 1fr);
      }
    }

    &.grid--4-col-desktop {
      grid-template-columns: repeat(4, 1fr);

      @media screen and (min-width: 1281px) {
        grid-template-columns: repeat(5, 1fr);
      }

      @media screen and (max-width: 1023px) {
        grid-template-columns: repeat(3, 1fr);
      }
    }

    &.grid--3-col-desktop {
      grid-template-columns: repeat(3, 1fr);

      @media screen and (min-width: 1281px) {
        grid-template-columns: repeat(4, 1fr);
      }

      @media screen and (max-width: 1023px) {
        grid-template-columns: repeat(2, 1fr);
      }
    }

    &.grid--2-col-desktop {
      grid-template-columns: repeat(2, 1fr);

      @media screen and (min-width: 1281px) {
        grid-template-columns: repeat(3, 1fr);
      }
    }

    &.grid--1-col-desktop {
      grid-template-columns: repeat(1, 1fr);

      @media screen and (min-width: 1281px) {
        grid-template-columns: repeat(2, 1fr);
      }
    }

    .grid__item {
      max-width: unset;
      width: 100%;
      text-align: center;
    }
  }
}