swiper-slider,
swiper-slider-tab {
  display: block;

  @media screen and (width < 400px) {
    &:has(:not(.swiper-initialized)) .swiper-wrapper {
      flex-wrap: nowrap;

      &:where(.grid--1-col)>.grid__item {
        max-width: 100%;
      }
    }
  }

  @media screen and (width >=400px) and (width < 990px) {
    &:where([data-swiper-mobile="true"]) {
      &:has(:not(.swiper-initialized)) .swiper-wrapper {
        flex-wrap: nowrap;

        &:where(.grid--1-col)>.grid__item {
          max-width: 100%;
        }
      }
    }
  }

  @media screen and (width >=990px) {
    &:where([data-swiper-desktop="true"]) {
      &:has(:not(.swiper-initialized)) .swiper-wrapper {
        flex-wrap: nowrap;

        &:where(.grid--1-col)>.grid__item {
          max-width: 100%;
        }
      }
    }
  }

  &:where([data-swiper-peek="true"]) {
    overflow: hidden;

    @media screen and (width < 990px) {
      &:where([data-swiper-mobile="true"]) .swiper {
        overflow: visible;
      }
    }

    @media screen and (width >=990px) {
      &:where([data-swiper-desktop="true"]) .swiper {
        overflow: visible;
      }
    }
  }

  &,
  &>.swiper-container {
    position: relative;
  }

  &:has(.swiper-initialized) {
    --swiper-navigation-size: 3.2rem;
    --swiper-navigation-icon-size: 1.6rem;
    --swiper-theme-color: rgb(var(--color-foreground));
    --swiper-navigation-shadow: 0px 0px 17px -9px rgba(var(--color-foreground), 0.75);

    .swiper-button {
      width: var(--swiper-navigation-size);
      background-color: rgb(var(--color-background));
      box-shadow: var(--swiper-navigation-shadow);
      -webkit-box-shadow: var(--swiper-navigation-shadow);
      -moz-box-shadow: var(--swiper-navigation-shadow);

      &:empty {
        display: flex;
      }

      &::after {
        font-weight: var(--font-weight-700);
        font-size: var(--swiper-navigation-icon-size);
      }

      &:where(.swiper-button-disabled) {
        opacity: 0;
        visibility: hidden;
      }
    }
  }

  .swiper-initialized {
    padding: var(--product-card-border-width);

    .swiper-wrapper {
      --grid-desktop-horizontal-spacing: 0px;
      --grid-mobile-horizontal-spacing: 0px;
      flex-wrap: nowrap;

      @media screen and (width < 440px) {
        &>.grid__item {
          max-width: 100%;
        }
      }
    }

    .swiper-pagination {
      position: static;
      margin-top: 1.5rem;
    }
  }

  .swiper-slide {
    height: auto;

    &>.grid__item-inner {
      height: 100%;
    }
  }
}