.car-detail-carousel.block {
  margin-top: -1px;
}
.fragment-wrapper .car-carousel__container {
  &.dark {
    padding-top: 0;
  }
}
html[data-scroll-comp="car-detail-carousel"]{
  scroll-padding-top: 55px;
  @media (width >=1024px){
    scroll-padding-top: 104px;
  }
}

html.videoFadeAnimate[data-scroll-comp="car-detail-carousel"] {
  scroll-padding-top: 55px;
  @media (width >=1024px){
    scroll-padding-top: 60px;
  }
}

.car-carousel__container {
  padding-top: 40px;
  padding-right: 0;
  position: relative;


  @media (width >= 1024px) {
    padding-top: 62px;
     padding-left: 0;
  }

  .car-carousel-slider {
    position: relative;
  
    @media (width >= 1024px) {
      padding-bottom: 40px;
    }

    ul {
      /* gap: 8px; */
      align-items: stretch;
      display: flex;
      /* overflow-x: scroll; */
      position: relative;
      /* scroll-snap-type: x mandatory;
      scrollbar-width: none;
      width: 94vw; */
      margin-top: 0;

      /* @media (width >= 768px) { */
        /* gap: 24px;
        width: 92vw; */
      /* } */

      li {
        align-items: flex-start;
        display: flex;
        flex-direction: column;
        flex-shrink: 0;
        gap: 16px;
        /* scroll-snap-align: center; */

        &:last-child {
          padding-right: 20px;

          @media (width >= 1024px){
            padding-right: 56px;
          }
        }

        &.g-sm-4 {
          @media(width <=767px){
            width: auto;
          } 
        }

        img, video {
          width: 312px;
          height: 500px;
          object-fit: cover;

          @media (width >= 768px){
            width: 100%;
            height: 100%;
          }

          @media (width >= 1024px){
            height: 293px;
          }

          @media (width >= 1366px){
            height: 432px
          }

          @media (width >= 1920px){
            height: 585px
          }

        }

        .vjs-v8 {
          width: auto;
          height: auto;

          @media (width >= 768px){
            width: 100%;
            line-height: 0;
          }

          /* hide video loader */
          .vjs-loading-spinner {
            display: none;
          }
          .vjs-poster {
            display: none;
          }
        }
        .content {
          width: 281px;
          display: flex;
          flex-direction: column;

          @media (width >= 1024px){
            width: 402px;
          }
        }

        p {
          font-family: var(--body-font-family);
          font-size: var(--body-font-size-xxs);
          line-height: 20px;
          margin: 0;
          color: var(--secondary-main);
          font-weight: var(--fw-400);
          strong{
            color: var(--primary-main);
            font-weight: var(--fw-500);
          }

          @media (width >= 1024px){
            font-size: 20px;
            line-height: normal;
          }
        }

        .bold-text {
          color: var(--primary-main);
          font-weight: var(--fw-500);
        }
      }
    }
  }

  .dot {
    /* cursor: pointer; */
    transition: background 0.3s;
    background-image: url('/icons/carousel_dot_inactiveMobile.svg');
    background-position: center;
    background-size: cover;
    height: 0.25rem;
    width: 0.411rem;

    @media (width >= 1024px){
      width: 8.6px;
      height: 8px;
    }

  }

  .dot.active {
    background-image: url('/icons/carousel_dot_activeMobile.svg');
    filter: invert();
    width: 46.2px;
    height: 4px;

    @media (width >= 1024px){
      width: 48px;
      height: 8px;
    }
  }

  .controls-section {
    position: relative;
    padding: 32px 20px 32px 0;
    top: 50%;

    @media (width >= 1024px){
      padding: 48px 56px 67px 0px;
      padding: 0;
      position: absolute;
      transform: translateY(-50%);
      width: 100%;
    }
    .pagination {
      position: absolute;
      top: 10px;
      width: 100%;
      column-gap: 4px;
      display: flex;
      justify-content: center;
      margin-top: 35px;

      @media (width >=1024px){
        justify-content: left;
        margin-top: 58px;
        column-gap: 8px;
        display: none;
      }
    }
  }

  .controls {
    height: 32px;
    position: relative;

    @media (width >= 1024px){
      height: 48px;
      display: flex;
    }

    button {
      border: none;
      background: none;
      height: 2rem;
      width: 2rem;
      background-repeat: no-repeat;
      background-size: auto;
      background-position: center;
      z-index: 10;
      filter: invert();
      position: absolute;
      cursor: pointer;

      @media (width >=1024px) {
        width: 48px;
        height: 48px;
        position: relative;
        padding: 14.216px 14.216px 14.584px 14.584px;
        background-color: var(--tertiary-white);
        filter: none;
      }

      &:disabled {
        filter: contrast(0.3);
        @media (width >=1024px) {
          filter: none;
        }
      }
    }

    .prev-arrow {
      background-image: url(/icons/carousel_arrow_white_mobile.svg);
      transform: rotate(180deg);
      left: 0;

      @media (width >= 1024px){
      background-image: url(/icons/carousel-black.svg);
       right: 0;
       left: auto;
       
       &:disabled {
        display: none;
       }
       &:hover{
        background-color: var(--tertiary-light-grey)
       }
      }
     
    }

    .next-arrow {
      background-image: url(/icons/carousel_arrow_white_mobile.svg);
      right: 0;

      @media (width >= 1024px){
        background-image: url(/icons/carousel-black.svg);
        margin-left: auto;

        &:disabled {
          display: none;
        }
        &:hover{
          background-color: var(--tertiary-light-grey)
        }
      }
    }
  }


  &.dark {
    background-color: var(--primary-main);

    @media (width >= 1024px){
      background-color: var(--primary-main);
      padding-top: 168px;
    }

    .car-carousel-slider {
      
      @media (width >=1024px) {
          padding-bottom: 77px;
        }
      
      ul {
        background-color: var(--primary-main);
        margin-top: 0;

        @media (width >= 1024px){
          background-color: var(--primary-main);
        }

        li {
          p {
            color: var(--tertiary-white);
            font-weight: var(--fw-300);
          }

          strong {
            color: var(--tertiary-white);
          }
        }
      }
    }

    .controls {
      button {
        filter: none;

        &:disabled {
          filter: contrast(0.3);
        }
      }
    }
  
    .pagination {
      margin-top: 18px;
  
      @media(width>=768px) {
        margin-top: 34px;
      }

      @media(width>=1024px) {
        margin-top: 58px;
      }
    }

  .controls-section {
    padding: 14px 20px 48px 0;

      @media (width >= 768px){
        padding-top: 29px;
        padding-bottom: 64px;
      }

      @media (width >= 1024px){
        padding:0px;
      }
    }

    .dot.active {
      filter: none;
    }
  }

  .splide__track {
    overflow: hidden;
    position: relative;
    z-index: 0;
  }
  .splide__track--draggable {
    user-select: none;
  }
  .splide__list {
    backface-visibility: hidden;
    display: flex;
    height: 100%;
    margin: 0 !important;
    padding: 0 !important;
    @media (width >=1024px) {
        li:first-child.is-active {
          padding-left: 20px;
    
          @media (width>=1024px) {
            padding-left: 56px;
          }
        }
    
        li:not(:first-child).is-active {
          padding-left: 0;
        }
      }
  }
  .splide__slide {
    backface-visibility: hidden;
    box-sizing: border-box;
    -ms-flex-negative: 0;
    flex-shrink: 0;
    list-style-type: none !important;
    margin: 0;
    position: relative;
  }
  .splide__sr{
    clip:rect(0 0 0 0);
    border:0;
    height:1px;
    margin:-1px;
    overflow:hidden;
    padding:0;
    position:absolute;
    width:1px;
  }
}
