/*------------------------------------------------------------
SLIDER
====================================*/

/* Variables Custom */
$slider-arrow-width: 5rem !default;
$slider-arrow-height: 5rem !default;
$slider-arrow-bg: $gray-200 !default;

$slider-arrow-icon-width: 1.6rem !default;
$slider-arrow-icon-height: 1.6rem !default;
$slider-arrow-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='M8,0,6.545,1.455l5.506,5.506H0V9.039H12.052L6.545,14.545,8,16l8-8Z'/%3E%3C/svg%3E%0A") !default;

$slider-dot-size: 1rem !default;
$slider-dot-color: $gray-600 !default;
$slider-dot-active-color: $primary !default;
$slider-dot-hover-color: $primary-hover !default;
/***************************************/

// slide
.slick-slide {
  div {
    display: block !important;
  }
}

// arrow
.slick-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  z-index: 1;
  top: 50%;
  width: $slider-arrow-width;
  height: $slider-arrow-height;
  margin-top: -($slider-arrow-height/2);
  background: $slider-arrow-bg;
  border: 0;
  opacity: 1;
  transition: 0.3s;
  &:before {
    content: '';
    display: block;
    width: $slider-arrow-icon-width;
    height: $slider-arrow-icon-height;
    background: {
      image: $slider-arrow-icon;
      size: contain;
    }
  }

  &:focus {
    outline: 0;
  }

  &:hover {
    opacity: 0.6;
  }
}
.slick-prev {
  left: 1.5rem;
  transform: rotate(180deg);
}
.slick-next {
  right: 1.5rem;
}

// dots
.slick-dots {
  display: flex;
  justify-content: center;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.5rem;
  z-index: 1;
  margin: 0;
  list-style: none;
  button {
    display: block;
    width: $slider-dot-size;
    height: $slider-dot-size;
    padding: 0;
    margin: 0.6rem;
    font-size: 0;
    background: $slider-dot-color;
    border: 0;
    border-radius: 100%;
    &:hover {
      background: $slider-dot-hover-color;
    }
    &:focus {
      outline: 0;
    }
  }

  .slick-active {
    button {
      background: $slider-dot-active-color;
    }
  }
}
.slick-thumbnails-dots {
  .slick-dot {
    cursor: pointer;
    img {
      border: 0.1rem solid transparent;
    }
    &.slick-active img {
      border-color: $slider-dot-active-color;
    }
  }
}

// cross-selling slider
.cross-slider {
  margin: 0 -0.7rem;

  .product-box-container {
    margin-bottom: 0;
    height: 100%;
  }

  &:not(.slick-initialized) {
    display: flex;
    .item:not(:nth-child(-n+2)) {
      display: none;
    }
  }

  .slick-track {
    display: flex;
  }
  .slick-prev {
    left: -6.5rem;
  }
  .slick-next {
    right: -6.5rem;
  }

  /* Hack slick */
  .slick-slide {
    display: flex;
    height: auto;
    & > div, .product-box-container, .product-box-text-wrapper {
      display: flex !important;
    }
    .item {
      display: flex !important;
      height: 100%;
    }
  }
}
.cross-slider-dots {
  margin-top: 1.5rem;
  .slick-dots {
    position: static;
  }
}


/* RESPONSIVE */
/***************************************/
@include media-breakpoint-down(md) {
  // dots
  .slick-dots {
    bottom: 1rem;
  }
}
@include media-breakpoint-up(md) {
  // cross-selling slider
  .cross-slider {
    position: static;
    margin: 0 -1.5rem;

    &.slick-dotted {
      .slick-arrow {
        margin-top: -5rem;
      }
    }

    &:not(.slick-initialized) {
      .item {
        &:not(:nth-child(-n+2)) {
          display: flex;
        }
        &:not(:nth-child(-n+3)) {
          display: none;
        }
      }
    }
  }
  .cross-slider-dots {
    margin-top: 2.5rem;
  }
}
@include media-breakpoint-up(lg) {
  // cross-selling slider
  .cross-slider {
    &:not(.slick-initialized) {
      .item {
        &:not(:nth-child(-n+4)) {
          display: none;
        }
      }
    }
  }
}
