.wtb-elementor-product-image-gallery {
  --slider-height: 300px;
  --thumbnails-width: 100px;
  --layout-gap: 20px;

  &:has(.layout-slider) {

    &.top,
    &.bottom {
      --total-height: calc(var(--slider-height) + var(--thumbnails-width) + var(--layout-gap));
    }

    &.left,
    &.right {
      --total-height: var(--slider-height);
    }

    height: var(--total-height);
  }

  .wtb-elementor-product-image-gallery-slider {
    display: flex;
    width: 100%;
    height: var(--slider-height);
    position: relative;
    background: #fff;
    border-radius: 4px;

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

    .wtb-elementor-product-image-gallery__wrapper {
      display: flex;
      flex-direction: row;
      overflow-y: hidden;
      overflow-x: auto !important;
      scroll-snap-type: x mandatory;
      scrollbar-width: none;
      -ms-overflow-style: none;
      width: 100%;
      position: static;

      &::-webkit-scrollbar {
        display: none;
      }

      .wtb-elementor-product-image-gallery__wrapper-slide {
        display: flex;
        width: 100%;
        height: 100%;
        flex: 0 0 100%;
        justify-content: center;
        position: static;

        scroll-snap-align: center;
        box-sizing: border-box;

        picture,
        img {
          width: 100%;
          height: 100%;

          @media(max-width: 767px) {
            width: auto;
          }
        }

        .wtb-lightbox-item {
          position: absolute;
          top: 9px;
          right: 14px;
          display: none;
        }

        &.slide-active {
          .wtb-lightbox-item {
            display: flex;
          }
        }
      }
    }
  }
}