.cpap__product-gallery {
  .cpap__product-gallery__container {
    padding: 80px 0 193px;
  }

  .cpap__product-gallery__header-container {
    margin-bottom: 40px;
  }

  .cpap__product-gallery__carousel {
    &.swiper {
      overflow: visible !important;
    }

    .swiper-slide-active {
      .cpap__product-gallery__media-padding-outer {
        background: linear-gradient(
          90deg,
          var(--cpap-gradient-warm-1) 30%,
          var(--cpap-gradient-warm-2) 70%
        );
        padding: 1px;
        border-radius: 6px;
        display: flex;
        align-items: center;

        &:before {
          display: none;
        }
      }

      .cpap__product-gallery__media-padding-inner {
        border-radius: unset;
        height: 100%;
        display: flex;
        align-items: center;
        background: var(--cpap-primary-white);
        border-radius: 6px;
        overflow: hidden;

        span {
          svg {
            width: 50px;
            height: 50px;
          }
        }
      }
    }
  }

  .cpap__product-gallery__media {
    height: 100%;
    width: 100%;
    border-radius: 16px;
    padding: 20px 8px;
  }

  .cpap__product-gallery__media-padding-inner {
    box-shadow: 0px -4px 66px 0px var(--cpap-overlay-box-multicolumn-shadow2);

    span {
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
    }

    img {
      height: fit-content;
    }
  }

  .cpap-product-gallery-bottom-background {
    background: var(--cpap-gradients-warm-gradient);
    filter: blur(100px);
    height: 198px;
    width: 100%;
    position: absolute;
    bottom: -161px;
    left: 0;
    z-index: -1;
  }

  .swiper-button-next,
  .swiper-button-prev {
    position: absolute;
    top: -45px;
    left: unset !important;
    right: 8px !important;
    width: 50px;
    height: 50px;
    background: transparent;
    border: 1px solid var(--cpap-primary-orange);

    @media screen and (min-width: 992px) {
      top: 13px;
      right: 54px !important;
    }

    &:before {
      font-size: 14px;
    }
  }

  .swiper-button-prev {
    right: 74px !important;

    @media screen and (min-width: 992px) {
      right: 120px !important;
    }
  }

  .cpap__product-gallery__modal {
    background: var(--cpap-modal-background);

    .cpap__product-gallery__modal-content {
      @media screen and (max-width: 767px) {
        max-width: 90%;
        margin: 0 auto;
      }
    }

    .cpap__product-gallery__modal-close-button {
      z-index: 1;
      top: -15px;
      right: -15px;
      width: 30px;
      height: 30px;
      border-radius: 50%;
    }
  }

  .cpap__product-gallery__media-padding-outer {
    cursor: pointer;
    position: relative;
    border-radius: 16px;

    &:hover {
      &:before {
        background: linear-gradient(
          90deg,
          var(--cpap-gradient-warm-1) 30%,
          var(--cpap-gradient-warm-2) 70%
        );
      }
    }

    &:before {
      content: '';
      position: absolute;
      z-index: -1;
      top: -2px;
      right: -2px;
      bottom: -2px;
      left: -2px;
      border-radius: 16px;
    }
  }

  .cpap__product-gallery__modal-media {
    video {
      width: 100%;
    }
  }

  @media screen and (min-width: 992px) {
    .cpap__product-gallery__carousel {
      max-height: 414px;

      .swiper-slide {
        width: 200px;

        &:not(.cpap__product-gallery__highlighted-media) {
          transform: translateX(-3px);
        }
      }
    }

    .cpap__product-gallery__highlighted-media {
      height: 414px !important;
      transform: scale(2.15) translateX(47px);

      .cpap__product-gallery__media-padding-inner {
        min-height: 182px;
      }

      img {
        max-height: 207px !important;
        object-fit: contain !important;
        height: fit-content !important;
      }

      & ~ .swiper-slide {
        transform: translateX(207px) !important;
      }
    }

    .cpap__product-gallery__media-padding-inner {
      border-radius: 16px;
      overflow: hidden;
    }

    .cpap__product-gallery__media {
      img {
        height: 140px;
        object-fit: cover;
      }
    }
  }

  @media screen and (max-width: 991px) {
    .cpap__product-gallery__container {
      padding: 48px 0 60px;
    }

    .cpap__product-gallery__carousel {
      padding: 0 20px 22px 20px;
    }

    .cpap__product-gallery__header-container {
      margin-bottom: 20px;
    }

    .cpap__product-gallery__media {
      padding: 0px;
    }

    .cpap__product-gallery__carousel
      .swiper-slide-active
      .cpap__product-gallery__media-padding-inner {
      min-height: 331px;
    }

    .cpap__product-gallery__carousel-navigation {
      overflow: visible !important;
      max-height: 120px;

      .swiper-slide {
        max-width: 128px;
      }

      .swiper-slide-thumb-active {
        .cpap__product-gallery__media-padding-outer {
          overflow: visible !important;

          &:before {
            background: linear-gradient(
              90deg,
              var(--cpap-gradient-warm-1) 30%,
              var(--cpap-gradient-warm-2) 70%
            );
          }
        }
      }

      .cpap__product-gallery__media-padding-outer {
        padding: 0px 7px;
        max-height: 120px;
        max-width: 128px;
      }

      .cpap__product-gallery__media-padding-inner {
        background: var(--cpap-primary-white);
        border-radius: 6px;
        box-shadow: var(--cpap-popup-box-shadow);
      }

      .cpap__product-gallery__media {
        img {
          height: 120px;
          object-fit: cover;
        }
      }
    }
  }

  .cpap__product-gallery__modal-header {
    button {
      padding: 8px;

      @media (max-width: 767px) {
        padding: 4px;
        width: 30px;
        height: 30px;
        display: flex !important;
        justify-content: center;
        align-items: center;
      }

      span {
        display: block;
        line-height: 10px;

        @media (max-width: 767px) {
          font-size: 26px;
          line-height: normal;
        }
      }
    }
  }
}
