@charset "utf-8";

/* Product gallery like palace.us*/
$cursor-zoom-in-svg    : "//cdn.shopify.com/s/files/1/2678/7890/t/178/assets/cursor-zoom-in.svg?31989";
$cursor-zoom-in-2x-svg : "//cdn.shopify.com/s/files/1/2678/7890/t/178/assets/cursor-zoom-in-2x.svg?31989";

$phone:            "screen and (max-width: 640px)";
$tablet:           "screen and (min-width: 641px) and (max-width: 1007px)";
$tablet-and-up:    "screen and (min-width: 641px)";
$pocket:           "screen and (max-width: 1007px)";
$lap:              "screen and (min-width: 1008px) and (max-width: 1239px)";
$lap-and-up:       "screen and (min-width: 1008px)";
$desk:             "screen and (min-width: 1240px)";
$widescreen:       "screen and (min-width: 1500px)";

@mixin av-mq($alias) {
  @if $alias == "phone" {
    @media #{$phone} {
      @content;
    }
  } @else if $alias == "tablet" {
    @media #{$tablet} {
      @content;
    }
  } @else if $alias == "tablet-and-up" {
    @media #{$tablet-and-up} {
      @content;
    }
  } @else if $alias == "pocket" {
    @media #{$pocket} {
      @content;
    }
  } @else if $alias == "lap" {
    @media #{$lap} {
      @content;
    }
  } @else if $alias == "lap-and-up" {
    @media #{$lap-and-up} {
      @content;
    }
  } @else if $alias == "desk" {
    @media #{$desk} {
      @content;
    }
  } @else if $alias == "widescreen" {
    @media #{$widescreen} {
      @content;
    }
  }
}
.Product__Gallery {
  position: relative;
  margin-bottom: 28px;
}

.Product__Slideshow::after {
  content: 'flickity';
  display: none;
}

.Product__SlideItem {
  position: relative;
}

.Product__SlideItem--video {
  cursor: pointer;

  .Video__PlayButton {
    position: absolute;
    top: 50%;
    left: 50%;
    -webkit-transform: translate(-50%, -50%);
    transform: translate(-50%, -50%);
    color: #ffffff;
  }

  .Video__PlayButton svg {
    -webkit-transition: -webkit-transform 0.2s ease-in-out;
    transition: -webkit-transform 0.2s ease-in-out;
    transition: transform 0.2s ease-in-out;
    transition: transform 0.2s ease-in-out, -webkit-transform 0.2s ease-in-out;
  }

  &:hover .Video__PlayButton svg {
    -webkit-transform: scale(1.1);
    transform: scale(1.1);
  }
}

.Product__Video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000000;
}

.Product__SlideshowNav {
  display: none;
}

@include av-mq('tablet-and-up') {
  .Product__Gallery {
    margin-bottom: 65px;
  }
}

@include av-mq('lap-and-up') {
  .Product__Gallery {
    margin-left: 50px;
  }

  .Product__SlideshowNav--dots {
    display: block;
  }

  .Product--fill .Product__Gallery--withDots {
    margin-left: 0;
  }

  .Product__Slideshow::after {
    content: ''; /* Disable Flickity */
  }

  .Product__SlideItem {
    display: block !important;
    margin-bottom: 30px;

    &:last-child {
      margin-bottom: 0;
    }
  }

  .Product__Slideshow--zoomable .Product__SlideItem--image {
    cursor: url($cursor-zoom-in-svg) 18 18, -webkit-zoom-in;
    cursor: url($cursor-zoom-in-svg) 18 18, zoom-in;
    cursor: -webkit-image-set(url($cursor-zoom-in-svg) 1x, url($cursor-zoom-in-2x-svg) 2x), -webkit-zoom-in;
    cursor: -webkit-image-set(url($cursor-zoom-in-svg) 1x, url($cursor-zoom-in-2x-svg) 2x), zoom-in;
  }

  /* On desktop we use a different apparition effect than fade in */
  .Product__Slideshow .Image--fadeIn {
    -webkit-transform: translateY(50px);
    transform: translateY(50px);
    opacity: 0;
    -webkit-transition: opacity 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94), -webkit-transform 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transition: opacity 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94), -webkit-transform 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transition: transform 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transition: transform 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94), -webkit-transform 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  }

  .Product__Slideshow .Image--lazyLoaded.Image--fadeIn {
    -webkit-transform: translateY(0);
    transform: translateY(0);
    opacity: 1;
  }

  .Product__SlideItem--video {
    .Video__PlayButton {
      -webkit-transform: translate(-50%, calc(-50% + 50px));
      transform: translate(-50%, calc(-50% + 50px));
      opacity: 0;
      -webkit-transition: opacity 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94), -webkit-transform 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
      transition: opacity 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94), -webkit-transform 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
      transition: transform 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
      transition: transform 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94), -webkit-transform 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }

    .Image--lazyLoaded ~ .Video__PlayButton {
      -webkit-transform: translate(-50%, -50%);
      transform: translate(-50%, -50%);
      opacity: 1;
    }
  }

  .Product__SlideshowNav {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    z-index: 1;
  }

  /* Dots */

  .Product__SlideshowNav--dots {
    left: -30px;
  }

  .Product--fill .Product__SlideshowNav--dots {
    left: 20px;
  }

  .Product__SlideshowNav--dots .Product__SlideshowNavScroller {
    position: -webkit-sticky;
    position: sticky;
    top: 50%;
    -webkit-transform: translateY(-50%);
    transform: translateY(-50%);

    @supports (--css: variables) {
      top: calc(50% + (var(--header-height) / 2));
    }
  }

  .Product__SlideshowNavDot {
    display: block;
    height: 10px;
    width: 10px;
    border-radius: 100%;
    border: 2px solid $border-color;
    background: transparent;
    -webkit-transition: all 0.2s ease-in-out;
    transition: all 0.2s ease-in-out;

    &:not(:last-child) {
      margin-bottom: 12px;
    }
  }

  .Product__SlideshowNavDot.is-selected {
    border-color: $heading-color;
    background: $heading-color;
  }

  /* Thumbnails */

  .Product__SlideshowNav--thumbnails {
    position: -webkit-sticky;
    position: sticky;
    padding: 50px 0;
    top: $header-base-height;
    margin-bottom: -50px;
    width: 70px;

    @supports (--css: variables) {
      top: var(--header-height);
    }
  }

  .Product__SlideshowNavImage {
    display: block;
    border: 1px solid transparent;
    -webkit-transition: all 0.2s ease-in-out;
    transition: all 0.2s ease-in-out;

    &:not(:last-child) {
      margin-bottom: 18px;
    }
  }

  .Product__SlideshowNavImage.is-selected {
    border-color: $heading-color;
  }

  .Product__SlideshowNavPlay {
    position: absolute;
    left: 50%;
    top: 50%;
    -webkit-transform: translate(-50%, -50%);
    transform: translate(-50%, -50%);
    color: #ffffff;
    -webkit-filter: drop-shadow(0 2px 2px rgba(#000000, 0.2));
    filter: drop-shadow(0 2px 2px rgba(#000000, 0.2));

    svg {
      width: 30px;
      height: 30px;
      -webkit-transition: -webkit-transform 0.2s ease-in-out;
      transition: -webkit-transform 0.2s ease-in-out;
      transition: transform 0.2s ease-in-out;
      transition: transform 0.2s ease-in-out, -webkit-transform 0.2s ease-in-out;
    }
  }

  .Product__SlideshowNavImage--video:hover svg {
    -webkit-transform: scale(1.1);
    transform: scale(1.1);
  }
}

@include av-mq('desk') {
  .Product__Gallery {
    margin-bottom: 80px;
  }

  .Product__Gallery--withThumbnails {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;

    .Product__Slideshow,
    .Product__SlideshowNav {
      -webkit-box-flex: 1;
      -ms-flex: 1 0 auto;
      flex: 1 0 auto;
    }

    .Product__SlideshowNav {
      -webkit-box-flex: 0;
      -ms-flex-positive: 0;
      flex-grow: 0;
    }

    .Product__SlideshowNav--thumbnails {
      display: none;
    }

    .Product__Slideshow {
      padding-top: 50px;
      margin-left: 50px;
    }

    .Product__SlideshowNav--dots {
      display: none;
    }

    .Product__SlideshowNav--thumbnails {
      display: block;
    }
  }
}

@include av-mq('widescreen') {
  .Product--fill .Product__Gallery--withThumbnails {
    margin-left: 100px;
  }
}