@import 'variables.scss';

/******************************
 SECOND IMAGE
*******************************/

.product-grid-item, .product-list-item {
  .image {
    > a {
      background-position: 500px !important;
    }
  }
}

.product-grid-second-image .product-grid-item,
.product-list-second-image .product-list-item {
  .image {
    > a.has-second-image {
      background-size: 100% 100% !important;
    }
  }
  &:hover .image a.has-second-image {
    background-position: 0 !important;
    img {
      opacity: 0 !important;
      transition: opacity .2s ease-out;
    }
  }
}

.section-brand,
.section-category,
.carousel-brand,
.carousel-category {
  .product-grid-item, .product-list-item {
    &:hover .image > a.has-second-image > img {
      opacity: 1;
      transition: opacity 0.2s;
    }
  }
}

/******************************
 NOTIFICATION
*******************************/

@media only screen and (min-width: 760px) {
  .ui-pnotify {
    min-width: 320px;
  }
}

@media only screen and (max-width: 760px) {
  div.ui-pnotify {
    width: calc(100% - 20px) !important;
    left: 10px !important;
    top: 10px !important;
    right: auto !important;
    transform: translate(0, 0);
  }
  div.ui-pnotify-closer {
    margin-top: -2px;
  }
}

.ui-pnotify {
  top: 20px;
  right: 20px;
  position: fixed;
  height: auto;
  z-index: 99999999;
  background-color: $f4;
}

.ui-pnotify-container {
  margin: 10px 10px 0 10px;
}

.ui-pnotify-closer {
  width: 30px;
  height: 30px;
  position: absolute;
  right: 0;
  top: 9px;
  visibility: visible !important;
  transition: all 0.2s;
  opacity: 0;
  &:before {
    content: "\e602";
    color: inherit;
    font-size: 20px;
    position: relative;
  }
}

.ui-pnotify-title {
  background-color: $gray;
  padding: 5px 8px;
  margin-bottom: 10px;
  line-height:1.3;
  width: calc(100% - 15px);
}

.ui-pnotify-text {
  min-height: 60px;
  display: table;
  img {
    float: left;
    max-width: 75px;
    margin: 0 10px 10px 0;
  }
}

.notification-buttons {
  float: left;
  margin-bottom: 10px;
  a {
    display: inline-block;
    margin: 7px 10px 0 0;
  }
}

.tablet, .mobile {
  .ui-pnotify-closer {
    display: block;
    visibility: visible;
    opacity: 1;
  }
}

/******************************
PHOTO GALLERY
*******************************/

html.swipebox {
  overflow: hidden !important;
  overflow-y: scroll !important;
}

#swipebox-overlay {
  background-repeat: no-repeat;
  background-position: center;
  width: 100%;
  height: 100%;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999999 !important;
  overflow: hidden;
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
}

#swipebox-slider {
  height: 100%;
  left: 0;
  top: 0;
  width: 100%;
  white-space: nowrap;
  position: absolute;
  display: none;
}

#swipebox-slider .slide {
  background-repeat: no-repeat;
  background-position: center;
  height: 100%;
  width: 100%;
  line-height: 1px;
  text-align: center;
  display: inline-block;
}

#swipebox-slider .slide:before {
  content: "";
  display: inline-block;
  height: 50%;
  width: 1px;
  margin-right: -1px;
}

#swipebox-slider .slide img,
#swipebox-slider .slide .swipebox-video-container {
  display: inline-block;
  max-height: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
  width: auto;
  height: auto;
  vertical-align: middle;
}

#swipebox-slider .slide .swipebox-video-container {
  background: none;
  max-width: 1140px;
  max-height: 100%;
  width: 100%;
  padding: 5%;
  box-sizing: border-box;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
}

#swipebox-slider .slide .swipebox-video-container .swipebox-video {
  width: 100%;
  height: 0;
  padding-bottom: 56.25%;
  overflow: hidden;
  position: relative;
}

#swipebox-slider .slide .swipebox-video-container .swipebox-video iframe {
  width: 100% !important;
  height: 100% !important;
  position: absolute;
  top: 0;
  left: 0;
}

#swipebox-action, #swipebox-caption {
  position: absolute;
  left: 0;
  z-index: 999;
  height: 50px;
  width: 100%;
}

#swipebox-action {
  bottom: -50px;
}

#swipebox-action.visible-bars {
  bottom: 0;
}

#swipebox-action.force-visible-bars {
  bottom: 0 !important;
}

#swipebox-caption {
  top: -50px;
  text-align: center;
}

#swipebox-caption.visible-bars {
  top: 0;
}

#swipebox-caption.force-visible-bars {
  top: 0 !important;
}

#swipebox-action #swipebox-prev.disabled,
#swipebox-action #swipebox-next.disabled {
  filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=30);
  opacity: 0.3;
}

#swipebox-slider.rightSpring {
  -moz-animation: rightSpring 0.3s;
  -webkit-animation: rightSpring 0.3s;
}

#swipebox-slider.leftSpring {
  -moz-animation: leftSpring 0.3s;
  -webkit-animation: leftSpring 0.3s;
}

@-moz-keyframes rightSpring {
  0% {
    margin-left: 0px;
  }

  50% {
    margin-left: -30px;
  }

  100% {
    margin-left: 0px;
  }
}

@-moz-keyframes leftSpring {
  0% {
    margin-left: 0px;
  }

  50% {
    margin-left: 30px;
  }

  100% {
    margin-left: 0px;
  }
}

@-webkit-keyframes rightSpring {
  0% {
    margin-left: 0px;
  }

  50% {
    margin-left: -30px;
  }

  100% {
    margin-left: 0px;
  }
}

@-webkit-keyframes leftSpring {
  0% {
    margin-left: 0px;
  }

  50% {
    margin-left: 30px;
  }

  100% {
    margin-left: 0px;
  }
}

/* Skin
--------------------------*/
#swipebox-overlay {
  background: rgba(0, 0, 0, .6);
}

#swipebox-action, #swipebox-caption {
  text-transform: uppercase;
  background-color: $dark;
}

#swipebox-caption {
  font-size: 18px;
  line-height: 50px;
  -webkit-font-smoothing: antialiased;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

#swipebox-prev, #swipebox-next, #swipebox-close {
  border: none !important;
  text-decoration: none !important;
  text-align: center;
  color: white;
  cursor: pointer;
  position: absolute;
  padding: 0 5px;
  line-height: 50px;
}

#swipebox-close {
  right: 10px;
  z-index: 999999;
  &:before {
    color: inherit;
    content: "\e601";
    font-size: 32px;
  }
}

#swipebox-prev {
  left: 50%;
  margin-left: -30px;
  &:before {
    color: inherit;
    content: "\e093";
    font-size: 32px;
    padding: 0 3px;
  }
}

#swipebox-next {
  left: 50%;
  margin-left: 5px;
  &:before {
    color: inherit;
    content: "\e094";
    font-size: 32px;
    padding: 0 3px;
  }
}

#swipebox-overlay-next,
#swipebox-overlay-prev {
  display: block;
  position: fixed;
  width: 30%;
  height: 100%;
  overflow: hidden;
  top: 0;
  z-index: 9999;
}

html[dir="ltr"] {
  #swipebox-overlay-prev {
    left: 0;
  }
  #swipebox-overlay-next {
    right: 0;
  }
}

.tablet, .mobile {
  #swipebox-overlay-next,
  #swipebox-overlay-prev {
    display: none;
  }
}

@media only screen and (min-width: 1024px) {
  #swipebox-close {
    right: 20px;
  }
}

html[dir="rtl"] {
  #swipebox-prev {
    margin-left: 5px;
    &:before {
      transform: scaleX(-1);
    }
  }

  #swipebox-next {
    margin-left: -30px;
    &:before {
      transform: scaleX(-1);
    }
  }

  #swipebox-overlay-prev {
    right: 0;
  }
  #swipebox-overlay-next {
    left: 0;
  }
}

/******************************
SIDE BLOCKS
*******************************/

.side-block-left,
.side-block-right {
  position: fixed;
  top: 0;
  z-index: 999999;
}

.side-block-icon {
  width: 50px;
  height: 50px;
  background-position: center;
  background-repeat: no-repeat;
  line-height: 50px;
  text-align: center;
  transition: background-color 0.2s;
  i {
    margin-right: 0 !important;
  }
}

.side-block-content p {
  margin: 0;
  a {
    transition: all 0.2s;
  }
}

.side-block-content {
  min-height: 50px;
  box-sizing: border-box;
  > div {
    position: relative;
    width: 100%;
    height: 100%;
  }
}

.side-block-left .side-block-icon {
  position: absolute;
  top: 0;
  right: -50px;
}

.side-block-right .side-block-icon {
  position: absolute;
  top: 0;
  left: -50px;
}

.side-block-content hr {
  margin-bottom: 7px;
}

.side-block-content img {
  margin: 5px 0;
  max-width: 100%;
}

.side-block-content a {
  display: inline-block;
  margin: 10px 0;
}

/******************************
SCROLL TOP
*******************************/

.scroll-top {
  display: none;
  position: fixed;
  z-index: 9999;
  right: 5px;
  bottom: 0;
  padding: 8px;
  cursor: pointer;
  &:before {
    transition: color .2s;
    content: "\e021";
    font-size: 45px;
  }
}

/******************************
BUTTON ICONS
*******************************/

.button-left-icon:before {
  float: left;
}

.button-right-icon:before {
  float: right;
}

.button-cart-text {
  position: relative;
}

/******************************
TOOLTIPS
*******************************/

[data-hint]:before {
  border: 7px solid transparent;
  display: none;
  transform-style: preserve-3d;
}

.hint--top, .hint--left, .hint--right {
  transform-style: preserve-3d;
}

.hint--top:before {
  left: 50%;
  margin-left: -7px;
  border-top-color: $dark;
  margin-bottom: -13px;
}

.hint--right:before {
  margin-top: -6px;
  border-right-color: $dark;
}

.hint--left:before {
  border-left-color: $dark;
}

.ie9, .ie8 {
  .hint--top:after {
    left: -50%;
  }
}

.hint--top:after,
.hint--top:focus:after {
  margin: 0;
  transform: translate3d(0, 0, 0) translateX(-50%);
}

[data-hint]:after {
  text-shadow: none;
  color: white;
  font-family: $sans;
  text-transform: none;
  background-color: $dark;
  box-shadow: none;
  line-height: 100%;
  padding: 8px 10px;
  display: none;
}

.hint--top:hover:after,
.hint--top:focus:after {
  transform: translate3d(0, 0, 0) translateY(-8px) translateX(-50%);
}

.quickview {
  .cart .hint--top:after {
    transform: translate3d(0, 0, 0) translateY(0) translateX(0);
  }
}

.quickview {
  .cart .hint--top:hover:after,
  .cart .hint--top:focus:after {
    transform: translate3d(0, 0, 0) translateY(-8px) translateX(0);
  }
}

.journal-carousel {
  .product-grid-item .image .wishlist a:hover:after,
  .product-grid-item .image .compare a:hover:after {
    transform: translate3d(0, 0, 0) translateY(-8px) translateX(0);
  }
}

.option li.hint--top:before,
.option li.hint--top:after {
  display: block;
}

.option ul .hint--top:first-of-type:after {
  transform-style: preserve-3d;
  left: 0;
  transform: translate3d(0, 0, 0) translateX(0%)
}

.option ul .hint--top:first-of-type:hover:after {
  transform: translateY(-8px);
}

/******************************
 Countdown
*******************************/

.countdown {
  position: absolute;
  background-color: rgba(0, 0, 0, .4);
  transition: all 0.2s;
  visibility: hidden;
  opacity: 0;
  bottom: 0;
  z-index: 10;
  width: 100%;
  display: table;
  padding: 3px 0;
  span {
    display: table-cell;
    vertical-align: middle;
    position: relative;
    font-size: 14px;
    font-weight: bold;
    border-width: 0;
    border-right-width:1px;
    border-color: white;
    border-style: solid;
    width: 25%;
    color: white;
    text-align: center;
    &:last-of-type {
      border-right-width: 0;
    }
    div {
      display: block;
      font-size: 10px;
      font-weight: normal;
      border: 0;
      text-align: center;
      width: 100%;
      overflow: hidden;
      padding: 0 3px;
    }
  }
}

@media only screen and (max-width: 760px) {
  .countdown {
    visibility: visible;
    opacity: 1;
  }
}

.ipad .countdown,
.safari .countdown {
  padding: 0;
  min-height: 35px;
}

.countdown-on {
  .countdown {
    visibility: visible;
    opacity: 1;
  }
  &.product-grid-item {
    .countdown {
      display: table;
    }
  }
}

.product-info .right > div .countdown {
  position: relative;
  background-color: rgba(0, 0, 0, .4);
  width: 100%;
  visibility: visible;
  opacity: 1;
  display: table;
  padding: 5px 0;
  border-bottom-left-radius: inherit;
  border-bottom-right-radius: inherit;
  span {
    display: table-cell;
    vertical-align: middle;
    padding: 0 5px;
    position: relative;
    font-size: 19px;
    font-weight: bold;
    border-right: 1px solid $f4;
    color: white;
    text-align: center;
    &:last-of-type {
      border-right: 0;
    }
    div {
      display: block;
      font-size: 11px;
      font-weight: normal;
      border: 0;
      text-align: center;
      width: 100%;
      overflow: hidden;
      padding: 0 3px;
    }
  }
}

/******************************
 BRAND LOGO
*******************************/

.brand-logo {
  display: table;
  a {
    display: block;
    vertical-align: middle;
    padding-right: 5px;
  }
  &:after {
    content: "";
    display: table;
    width: 100%;
    clear: both;
  }
}


