@import 'variables.scss';

/******************************
PRODUCT PAGE
*******************************/

.product-info {
  overflow: hidden;
  margin-bottom: 20px;
  position: relative;
  width: 100%;

  > div{
    width: 50%;
    float: left;
  }

  //LEFT SIDE
  .left{
    .image {
      padding: 0;
      text-align: left;
      position: relative;
      > a{
        display: table;
        width: 100%;
        img{
          width: 100%;
          height: auto;
          float: left;
        }
      }
    }

    .image-additional {
      clear: both;
      overflow: hidden;
      position: relative;
      text-align: center;
      margin-bottom: -10px;
      a {
        position: relative;
        display: inline-block;
        float: left;
        transition: opacity .2s;
        img {
          width: 100%;
          float: left;
          height: auto;
        }
        &:hover{
          opacity: .8;
        }
      }
      &.image-additional-grid{
        a{
          width: 20%;
        }
      }
      .swiper-container-horizontal{
        a{
          padding:0;
        }
      }
      .swiper{
        margin-bottom:10px;
      }
      .swiper-button-prev,
      .swiper-button-next {
        width: 30px;
        height: 30px;
      }
      .swiper-button-prev{
        left: 0;
      }
      .swiper-button-next{
        right: 0;
      }
    }
    .product-tabs, .journal-custom-tab{
      clear: both;
    }
  }

  .gallery-text{
    text-align: center;
    padding: 5px 0 10px;
    color: $gray;
    cursor: pointer;
    clear: both;
    span{
      display: inline-block;
      position: relative;
    }
  }
  .gallery-text:before{
    margin-right: 5px;
  }

  //RIGHT SIDE
  .product-sold-count.ps-right{
    display: none;
  }

  .right{
     padding-left: 20px;
    .product-options{
      background-color: transparent;
      //overflow: hidden;
    }
      > div > div, > div > ul{
        position: relative;
        //overflow: hidden;
        &.social{
          overflow: visible;
        }
      }
      .description {
        line-height: 1.5;
        .product-views-count{
          float: right;
        }
        span {
          padding-right: 3px;
        }
        .product-sold-count.ps-left{
          padding-right: 1px;
        }
      }
      .price {
        span{
          position: relative;
        }
      }
      .price-old {
        font-size: 18px;
        text-decoration: line-through;
        background: $red;
        color: white;
        padding: 3px 6px;
        top: -3px;
        margin-right: 5px;
      }
      .price-tax {
        font-size: 13px;
        font-weight: normal;
        padding: 4px 0 4px 0;
        display: block;
      }
      .price .reward {
        display: block;
        font-size: 12px;
        margin:5px 0;
        font-weight: normal;
        small{
          font-size:inherit;
        }
      }
      .price .discount {
        font-weight: normal;
        font-size: 11px;
        line-height: 1.4;
        margin-top: 7px;
      }
      .options {
        h3{
          height: 35px;
          line-height: 35px;
          background-color: $f4;
          color: $dark;
          padding-left: 10px;
          margin-bottom: 5px;
        }
        h3 + br{
          display: none;
        }

        &.push-select, &.push-image, &.push-checkbox, &.push-radio{
          .option b + br{
            display: none;
          }
          .option-image {
            li {
              padding: 0;
              span {
                display: block;
                img {
                  margin-right: 0;
                  float: left;
                  transition: all 0.2s;
                  border: 2px solid $light;
                  &:hover{
                    border-color: $quartz;
                  }
                }
              }
              &.selected{
                span img{
                  border-color: $quartz;
                }
              }
            }
          }
        }

        .option {
          position: relative;
          display: inline-block;
          padding-bottom: 0;
          width: 100%;
          label{
            font-weight: normal;
            transition:color .2s;
          }
          .required{
            font-size: 20px;
            font-family: Arial !important;
            float: left;
            height: 0;
          }
          b {
            font-size: 12px;
            display: block;
            padding: 2px 0 1px 0;
            font-weight: normal;
            &:after{
              content:"";
              display: table;
              clear: both;
            }
          }
          b+br{
            display: none;
          }

          span {
            padding: 3px 3px 3px 0;
          }
          input[type='text'],textarea {
            min-width: 100%;
          }
        }
        .option:last-of-type{
          border-bottom: 0;
          padding-bottom: 0;
          margin-bottom: 0;
        }
        span.error {
          position: absolute;
          right: 5px;
          padding: 3px 4px 2px 4px;
        }
      }

      .option-image {
        margin-top: 3px;
        margin-bottom: 10px;
        tbody tr td:first-of-type + td{
          width: 50px;
        }
        label {
          display: block;
          width: 100%;
          height: auto;
          padding-right: 0;
        }
        img {
          margin-right: 5px;
          cursor: pointer;
        }
      }
      .cart {
        //border-bottom: none;
        overflow: hidden;
        div {
          .qty{
            width: 34%;
            display: block;
            float: left;
            height: 40px;
            margin-right: 8px;
            overflow: hidden;
          }
          .text-qty{
            width: 50%;
            font-weight: bold;
            display: none;
            height: 100%;
            line-height: 40px;
            text-align: center;
            float: left;
          }
          .journal-stepper{
            width: 30%;
            color: white;
            background-color: $light;
            text-align: center;
            height: 100%;
            float: left;
            line-height: 37px;
            font-size: 25px;
            font-style: normal;
            font-weight: bold;
            transition: all 0.2s;
            display: inline-block;
          }
          input[name=quantity] {
            float: left;
            width: 40%;
            line-height: 38px;
            height: 100%;
            text-align: center;
            margin: 0;
            border: 0;
          }
          .button{
            position: relative;
            line-height: 40px;
            min-height: 40px;
            font-size: 15px;
            display: inline-block;
            width: 63%;
            float: right;
            &.enquiry-button{
              width: 100% !important;
            }
            .button-cart-text:before{
              margin-right: 8px;
              line-height: 100%;
            }
            .button-cart-text:after{
              line-height: 100%;
              margin-left: 8px;
            }
          }
        }
        .minimum {
          padding-top: 10px;
          font-size: 12px;
          clear: both;
        }
      }

      .wishlist-compare{
        padding: 0;
        //border-bottom: none;
        .links{
          width: 100%;
          clear: both;
          display: block;
          text-align: center;
          padding: 2px 0 4px 0;
          a{
            padding: 0 15px;
            border: none;
            color: $blue;
            font-size: 12px;
            display: inline-block;
            text-align: center;
            line-height: 30px;
            transition: all 0.2s;
          }
          a:before{
            position: relative;
            right: 5px;
            font-size: 15px;
            float: left;
          }

          span{
            line-height: 24px;
            display: none;
          }
        }
      }

      .review {
        img {
          top: 2px;
          position: relative;
          margin-right: 7px;
        }
        a{
          position: relative;
          top: -1px;
        }

        .share {
          display: none;
          overflow: auto;
          line-height: normal;
          a {
            text-decoration: none;
          }
        }
      }
    }

    //Push Select
    .option{
      ul{
        list-style: none;
        padding: 0;
        margin: -5px 0 0 0;
        li{
          background-color: white;
          color: $dark;
          font-weight: bold;
          font-size: 13px;
          display: inline-block;
          padding: 0 7px;
          margin: 4px 6px 0 0;
          line-height: 23px;
          cursor: pointer;
          transition:all .2s;
          span{
            padding: 0 !important;
          }
        }
      }
    }
  .tab-content{
    border-radius: 0;
  }

  &.split-70-30{
    .left{
      width: 70%;
    }
    .right{
      width: 30%;
      .cart div .qty{
        width: 100%;
        margin-bottom: 10px;
      }
      .cart div .button{
        width: 100%;
      }
    }
  }
  &.split-60-40{
    .left{
      width: 60%;
    }
    .right{
      width: 40%;
    }
  }
  &.split-40-60{
    .left{
      width: 40%;
    }
    .right{
      width: 60%;
    }
  }
  &.split-30-70{
    .left{
      width: 30%;
    }
    .right{
      width: 70%;
    }
  }
}

.push-checkbox{
  .checkbox,
  input[type="checkbox"],
  input[type="checkbox"]+ label,
  input[type="checkbox"]+ label + br{
    display: none !important;
  }
}
.push-select{
  select{
    display: none !important;
  }
}
.push-radio {
  .radio,
  input[type="radio"],
  input[type="radio"] + label,
  input[type="radio"] + label + br{
    display: none !important;
  }
}
table.option-image {
  input[type="radio"],
  input[type="radio"] + label,
  input[type="radio"] + label + br {
    display: inherit !important;
  }
}
.push-image{
  .option-image {
    .radio,
    input[type="radio"],
    input[type="radio"] + label,
    input[type="radio"] + label + br {
      display: none !important;
    }
  }
  table.option-image{
    display: none !important;
  }
}

.oc2{
  .product-info .option ul{
    margin: 0;
  }
}

@media only screen and (min-width: 470px){
  .product-info .product-options .cart > div{
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
  }
  .quickview #more-details{
    margin-left:8px;
  }
}

.ie .product-info .right .cart div input[name=quantity]{
  line-height: 100%;
}

.social {
  margin-bottom: 20px;
  padding: 7px 8px 10px 0;
  min-height: 40px;
  background-position: 10px center;
  background-repeat: no-repeat;
  background-size: 18px;
}

.social-loaded{
  background-color: inherit;
  display: table;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  min-height: 30px;
  > span  {
    min-height: 30px !important;
    float: left;
    overflow: hidden;
    display: flex;
    align-items: center;
    > span{
      margin-top: 0 !important;
      bottom: auto !important;
      display: flex !important;
      align-items: center;
    }
  }
}

.stButton .stFb, .stButton .stTwbutton, .stButton .stMainServices, .stButton .stButton_gradient{
  min-height: 22px;
}

.st_fblike{
  margin-right:5px;
}

.left .social{
  margin-top: 10px;
  padding: 10px;
}

.product-info .right > div > div.social {
  padding-top: 5px;
  padding-bottom: 5px;
  background-image: none;
}

.attribute {
  border-collapse: collapse;
  width: 100%;
  border-top: 1px solid $e4;
  border-left: 1px solid $e4;
  //margin-bottom: 20px;
  thead td, thead tr td:first-child {
    color: #333745;
    font-size: 14px;
    background: #f4f4f4;
    text-align: left;
  }
  tr td:first-child {
    text-align: center;
    width: 20%;
  }
  td {
    padding: 7px;
    color: $dark;
    text-align: center;
    vertical-align: top;
    border-right: 1px solid $e4;
    border-bottom: 1px solid $e4;
  }
}

body > figure{
  direction: ltr;
}

ul.product-option {
  padding: 0;
}

/******************************
PRODUCT TABS
*******************************/

input[name='captcha'] {
  width: 150px;
  margin-right: 10px;
}

label[for="input-captcha"] + div{
  display: flex;
  align-items: center;
  flex-wrap:wrap;
}

.tab-content{
  img{
    max-width: 100%;
    height: auto;
  }
}

#tab-description div,
#tab-description p:not(:only-of-type) {
  margin-bottom: 10px;
}

#tab-description{
  h1, h2, h3, h4{
    line-height: 1.2;
  }
  h3 {
    padding-left: 0;
    margin-bottom: 3px;
  }
}

#tab-description ul li {
  margin-bottom: 5px;
}

#tabs{
  overflow: hidden;
  list-style: none;
  display: inline-block;
  display: inline-flex;
  vertical-align: middle;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
  position: relative;
  z-index:3;
  li{
    @include at-least(6){
      flex: 1 0 auto;
    }
    border-width:0;
    overflow: hidden;
    float: left;
    &:only-of-type{
      > a{
        cursor: default;
      }
    }
    a{
      width: 100%;
      float: left;
    }
  }
  a, li a{
    padding: 0 15px;
    text-align: center;
    text-decoration: none;
    transition:all .2s;
    box-shadow: inset 0 -3px 6px -2px rgba(0,0,0,.5);
    line-height: 37px;
  }
}

.product-options .text-danger{
  margin-bottom:5px;
}


@media only screen and (max-width: 760px){
  #tabs{
    li {
      min-width: 50%;
      a{
        &:last-of-type{
          border-top-right-radius: 0;
        }
      }
    }
  }
}

#tabs a.selected,
#tabs li.active a{
  background-color: $f4;
  box-shadow: none;
  color: $dark;
}

.tab-content {
  padding: 15px;
  background-color: $f4;
  margin-bottom: 20px;
  z-index: 2;
  overflow: auto;
  position: relative;
  p {
    margin-bottom: 0;
  }
}

.journal-custom-tab, .tab-content{
  h3{
    padding-bottom: 4px;
  }
}

.journal-custom-tab > div:only-child{
  float:none;
}

.product-info .left .journal-custom-tab{
  margin-top: 15px;
  overflow: hidden;
}

.tab-related, #tab-related{
  display: none !important;
}

#content {
  .related-products {
    .box-product{
      padding-top: 0;
    }
    .box-heading{
      margin-bottom: $margin;
    }
    .box-content{
      display: flex;
      flex-wrap: wrap;
    }
  }
}

.tab-content ul li,
.cms-blocks ul li,
.journal-custom-tab ul li{
  margin-left: 30px;
}


/******************************
 REVIEW
*******************************/

.review-list {
  background-color: transparent;
  padding: 10px;
  overflow: auto;
  margin-bottom: 20px;
  border: 1px solid $e4;
  .text {
    padding: 10px;
    padding-top: 0;
    line-height: 1.3;
    clear: both;
  }
  .author {
    padding: 5px;
    font-weight: bold;
    border-bottom: 1px solid $e4;
    display: inline-block;
    color: #333;
  }
  .author b {
    font-size: 15px;
    font-weight: bold;
    color: #5C8BA6;
  }
  .rating {
    float: right;
    margin-bottom: 20px;
  }
}

#content #review-title{
  color: white;
  margin-bottom: 15px;
  height: auto;
}

#tab-review {
  padding-bottom: 0;
  .buttons{
    margin-top:-10px;
    margin-bottom: 20px;
    padding: 0 0 20px 0;
    border-width: 0;
    .right, .pull-right{
      float: left;
    }
    .pull-right{
      margin: 10px 0 0 10px;
    }
  }
  &.tab-content ul li{
    margin-left:0;
  }
  .form-group:nth-child(5) label {
    position: relative;
    top: -4px;
  }
}

.oc2{
  #tab-review{
    .form-group label{
      width: auto;
      padding: 0;
    }
    input[name='captcha']{
      display: block;
      clear: both;
      margin-left: 10px;
      margin-bottom: 0;
    }
    .buttons .pull-right{
      margin: 10px 0 0 0;
    }
  }
}

.g-capthca {
  background-image: url('../../../../../image/data/journal2/loader.gif');
  background-repeat: no-repeat;
}

@media only screen and (min-width: 760px) {
  #content .g-capthca {
    margin-left: 25%;
  }
}

@media only screen and (min-width: 470px){
  .quickview .product-info .product-options .cart>div {
    flex-wrap:nowrap;
  }
}
.product-info .product-options .cart > div > div{
  flex-grow:1;
}


/******************************
 TAGS
*******************************/

.tags {
  margin-left: 0;
  color: transparent;
  margin-bottom: 15px;
}

.tags b {
  padding: 2px 6px 3px 6px;
  background-color: $gray;
  color: white;
  margin-right: 5px;
  font-weight: normal;
}

.tags a {
  margin-left: 0;
  padding: 1px 6px 1px 6px;
  background-color: $f4;
  color: $dark;
  display: inline-block;
  margin-bottom: 5px;
  transition: all 0.2s;
}


/******************************
PRODUCT LABELS
*******************************/

.product-grid-item, .product-list-item, .product-info{
  .image{
    > span{
      position: absolute;
      z-index: 99;
      text-align: center;
      display: block;
      transition:opacity .2s;
    }
  }
}

.label-latest{
  color: white;
  background: $blue;
  top: 5px;
  right: 5px;
  padding: 5px 6px;
  b{
    font-weight: inherit;
  }
}

.label-sale{
  top: 5px;
  right: 5px;
  background: $red;
  color: white;
  font-weight: bold;
  padding: 5px 5px 6px 5px;
  b{
    font-weight: inherit;
  }
}

.label-latest + .label-sale{
  top: 26px;
  margin-top: 9px;
}

.label-outofstock {
  pointer-events: none;
  top: 0;
  min-width:200px;
  transform: translate(-28%, 100%) rotate(-45deg);
  transform-origin: 53%;
  font-size: 15px;
  padding-top:.3em;
  padding-bottom:.4em;
  padding-left:4em;
  padding-right:4em;
  white-space: nowrap;
  background: $red;
  color: white;
  line-height: 1;
  b{
    font-weight:inherit;
  }
}

.ie9 .label-sale b{
  display:inline-block;
  width:110%;
}

.hide-cart{
  .cart.outofstock{
    .button:not(.compare-remove) {
      opacity: .4;
      pointer-events: none;
      cursor: default;
    }
    .button.enquiry-button,
    #more-details{
      opacity: 1 !important;
      cursor: auto !important;
      pointer-events: auto !important;
    }
  }
  td.outofstock > .btn-primary, td img.outofstock{
    opacity: .4;
    pointer-events: none;
    cursor: default;
  }
}

.ie.hide-cart{
  .cart.outofstock {
    .button:not(.compare-remove),
    .button:not(.enquiry-button){
      opacity: .4;
      pointer-events: none;
      cursor: default;
    }
    &::before {
      content: "";
      position: absolute;
      width: 100%;
      height: 100%;
      z-index: 1;
    }
    .button.compare-remove {
      position: relative;
      z-index: 2;
    }
  }
  .product-info .cart.outofstock {
    &::before {
      display: none;
    }
    > div{
      &::before{
        content:"";
        position:absolute;
        width:100%;
        height:100%;
        z-index:1;
      }
      .qty{
        z-index:2;
        position: relative;
      }
    }
  }
}

.product-grid-item .enquiry-button .button i{
  margin-right: 0 !important;
}

.enquiry-button > i{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  &::before{
    font-size: 1.2em;
    transition: all 0.15s ease-out;
  }
}

#product{
  .option label {
    display: flex;
    align-items: center;
    img{
      margin: 0 5px 0 2px;
    }
  }
  .option-radio{
    div > label{
      margin-bottom:5px;
    }
  }
}

/******************************
 QUICKVIEW
*******************************/

.quickview-button{
  position: absolute;
  z-index: 999;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s;
  a{
      display: flex;
      justify-content: center;
  }
}

.quickview-button{
  -webkit-backface-visibility: hidden;
}

.product-wrapper, .product-list-item{
  &:hover{
    .quickview-button{
      opacity: 1;
      visibility: visible;
    }
  }
}

.quickview {
  body{
    background-color: transparent;
    background-image: none;
  }
  .mfp-iframe{
    background-color: white;
  }

  #container{
    min-height: 100%;
    background-color:white;
    margin-bottom:0;
    margin-top:0;
    box-shadow: none;
  }
  #content{
    padding: 15px 15px 5px 15px !important;
    &:after{
      content: "";
      display: none;
    }
  }

  .heading-title{
    margin-bottom: 15px;
  }
  .mfp-iframe-holder .mfp-content {
    max-width: 800px;
    height: 530px;
  }

  .tab-content{
    background-color: transparent;
  }

  .product-info {
    margin-bottom: 15px;
    .right{
      padding-left: 15px;
      .cart{
        display: table;
        overflow: visible;
        width: 100%;
      }
    }
    .left {
      .image-additional{
        margin-bottom: 5px;
        margin-top:10px;
      }
      .tab-content{
        margin-top: 15px;
        margin-bottom: 0;
      }
    }
  }

  #button-cart{
    width: 50%;
    float: left;
  }
  #more-details{
    width: 40px;
    height: 40px;
    float: right;
  }

  .cart [data-hint]:before{
    display: block;
    margin-left: -6px;
  }
  .cart [data-hint]:after{
    display: block;
    left: auto;
    right: 0;
    text-shadow: none;
    box-shadow:none;
    line-height: 100%;
  }

  //open/close animation
  .mfp-iframe, .journal-popup {
    opacity: 0;
    transition: all 0.2s ease-in-out;
    -webkit-transform: scale(.7);
    -moz-transform: scale(.7);
    -ms-transform: scale(.7);
    transform: scale(.7);
  }

  &.mfp-bg {
    opacity: 0.01;
    transition: all 0.2s ease-out;
  }

  /* animate in */
  &.mfp-ready {
    .mfp-iframe, .journal-popup {
      opacity: 1;
      -webkit-transform: scale(1);
      -moz-transform: scale(1);
      -ms-transform: scale(1);
      transform: scale(1);
    }
    &.mfp-bg {
      opacity: 0.75;
    }
  }

  /* animate out */
  &.mfp-removing {
    .mfp-iframe, .journal-popup {
      -webkit-transform: scale(.7);
      -moz-transform: scale(.7);
      -ms-transform: scale(.7);
      transform: scale(.7);
      opacity: 0;
    }
    &.mfp-bg {
      opacity: 0;
    }
  }
  .zm-viewer, .zm-handler{
    cursor: default;
  }
}

.mfp-bg {
  z-index: 9999999;
}
.mfp-wrap{
  z-index: 99999999;
}

#product-gallery .swiper-button-prev,
#product-gallery .swiper-button-next{
  margin-top:0;
}

/******************************
 CLOUD ZOOM
*******************************/

.zm-viewer{
  position:absolute;
  display:none;
  overflow:hidden;
  background:url("../lib/image-zoom/loading.gif")  no-repeat center center ;
  cursor:pointer;
  z-index:999;
}
.zm-handler{
  position:absolute !important;
  display:none;
  overflow:hidden ;
  cursor:pointer;
  border:none !important;
}
.zm-handlerarea{
  background:url("../lib/image-zoom/lens.png");
  opacity:.9;
  position:relative;
}
.zm-description{
  position:absolute;
  bottom:6px;
  left:6px;
  right:6px;
  background-color:#eee;
  background-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 0 3px rgba(0, 0, 0, 0.3);
  color: rgba(0,0,0,.6);
  font-size: 13px;
  text-align: center;
  text-shadow: 1px 1px 0 rgba(255,255,255,.3);
  padding:4px;
}

.followViewer, .standardViewer {
  border:4px solid rgba(255, 255, 255, .2);
  box-shadow: 0 0 3px rgba(0, 0, 0, .2);
}

/******************************
 FULL SIZE ZOOM
*******************************/


/******************************
OC2
*******************************/

.oc2{
  .list-unstyled{
    margin-top: 0;
    padding: 0;
    list-style: none;
    border: 0;
  }
  .product-info{
    .right{
      .price-old{
        float: left;
      }
      .price-new{
        position: relative;
        top:-5px;
      }
      .options .option {
        div label:before {
          display: none;
        }
        .input-group-btn{
          padding: 0;
        }
        label{
          display: block;
        }
      }
    }
  }
  .rating{
    .fa-stack{
      width:auto;
      height: auto;
      line-height: 100%;
      padding: 0 8px;
      display: inline;
    }
    .fa-star{
      color: $yel;
    }
    .fa-star + .fa-star-o{
      color: $yel;
    }
    .fa-star-o{
      color: $gray;
    }
    a{
      position: relative;
      top: -1px;
      &:first-of-type{
        margin-left: 10px;
      }
    }
  }
  .tab-content{
    display: none;
    &.active{
      display: block;
    }
    #captcha{
      margin-left: 10px;
    }
  }
  &.quickview .tab-content{
    display: block;
  }
  .product-info .left .tabs-content .journal-custom-tab{
    border-radius: inherit;
    border-top-width: inherit;
    margin-top: 0;
  }
  #tab-review{
    .form-group{
      font-size: 12px;
    }
    input[type='radio'],
    input[type='checkbox']{
      margin: 4px 0 0;
    }
    form{
      table td{
        > p{
          margin: 10px 0;
        }
        &:first-of-type{
          width: 100px !important;
          padding-right: 10px;
        }
      }
    }
    .fa-stack-1x, .fa-stack-2x{
      width: auto;
    }
    .fa-stack{
      width:auto;
      height: auto;
      line-height: 100%;
      padding: 0 8px;
      display: inline-block;
      margin-bottom: 20px;
    }
    .fa-star{
      color: $yel;
    }
    .fa-star + .fa-star-o{
      color: $yel;
    }
    .fa-star-o{
      color: $gray;
    }
    a{
      position: relative;
      top: -1px;
    }
  }
  .attribute strong{
    font-weight: inherit;
  }
}
