@import 'variables.scss';

/******************************
SIDE COLUMN
*******************************/

$side: 220px;

#column-right {
  padding: 20px 20px 20px 0;
  width: $side;
  float: right;
}

#column-left {
  padding: 20px 0 20px 20px;
  width: $side;
  float: left;
}

#column-right + #content {
  margin-right: $side;
}

#column-left + #content {
  margin-left: $side;
}

#column-left + #column-right + #content {
  margin-left: $side;
  margin-right: $side;
}

#column-left + span + #content {
  margin-left: $side;
}

#column-right + span + #content {
  margin-right: $side;
}

#column-left + #column-right + span + #content {
  margin-left: $side;
  margin-right: $side;
}

//Columns
.side-column {
  position: relative;
  z-index: 2;

  .heading-title, .box-heading {
    max-height: 100%;
    height: auto;
  }

  ul, li {
    margin: 0;
    padding: 0;
  }
  li {
    list-style: none;
    position: relative;
  }
  .box {
    margin-bottom: 20px;
  }
  > .box:last-of-type {
    margin-bottom: 0;
  }
  .box-content > div:not(.swiper),
  .box-category {
    overflow: hidden;
  }
  //Box Content
  .box-content {
    p {
      padding: 10px;
      text-align: left;
      line-height: 1.4;
      margin-bottom: 0;
    }
    p + select {
      margin-bottom: 15px;
    }
  }
  //Box Category
  .box-content, .box-category {
    li a {
      transition: background-color .2s, color .2s;
      border-bottom-width: 1px;
      border-bottom-color: $f4;
      border-bottom-style: solid;
      position: relative;
      display: block;
      display: flex;
      align-items: center;
    }
    li a.active {
      //font-weight: normal;
      color: $red;
    }
    ul > li > ul {
      display: none;
      margin-bottom: 0;
    }
    li a.active + ul {
      display: block;
    }
    li a:before {
      position: relative;
      float: left;
      margin-right: 5px;
    }
  }
  .box-content > ul > li, .box-category > ul > li {
    &:last-of-type > a {
      border-bottom: 0 !important;
    }
  }

  /******************************
   SIDE CATEGORY
  *******************************/

  .side-category {
    i {
      text-align: center;
      position: absolute;
      transition: background-color 0.2s, color 0.2s;
      display: table;
      line-height: 100%;
      right: 0;
      top: 50%;
      transform: translateY(-50%);
      span {
        position: relative;
        display: table-cell;
      }
    }
  }

  //Accordion
  .side-category-accordion {
    .box-category li ul li a:before {
      float: none;
      content: "";
    }
  }

  .product-grid-item .image .outofstock {
    display: none !important;
  }

  //Opencart modules
  .oc-module {
    overflow: hidden;
    display: block;
    .product-wrapper {
      margin: 0;
      padding: 0;
      border-radius: 0;
      box-shadow: none;
      border: none;
      transition: all 0.2s;
      display: block;
      .p-over {
        display: none;
      }
    }
    .product-wrapper:hover {
      padding: 0;
      margin: 0;
      border-radius: 0;
      box-shadow: none;
      border: none;
    }

    .product-details {
      background-color: transparent;
      padding-bottom: 0;
      max-width: 150px;
    }
    .product-details:before {
      display: none;
    }

    .product-grid-item {
      .quickview-button {
        display: none;
      }

      width: 100%;
      display: inline-block;
      border-bottom: 1px solid $e4;
      margin-bottom: 0;
      text-align: left;

      .image {
        display: block;
        float: left;
        position: relative;
        width: auto;
        margin-right: 5px;
        span {
          display: none !important;
        }
        a {
          background: transparent !important;
          margin-right: 5px;
          line-height: 100%;
          border-radius: 0;
          border: none;
        }
        img {
          border: 0;
          display: block;
          padding: 0;
          max-width: 100%;
          height: auto;
          width: auto;
          opacity: 1 !important;
        }
      }
      .name {
        position: relative;
        display: block;
        margin-top: 2px;
        a {
          white-space: normal;
          font-size: 12px;
          text-decoration: none;
          display: block;
          text-align: left;
          padding: 0 0 2px 0;
        }
      }
      .price {
        display: inline-block;
        font-size: 12px;
        padding: 0;
        text-align: left;
        border: none;
        margin-bottom: 4px;
        background-color: transparent;
        border-radius: 0;
      }
      .price-old {
        font-weight: normal;
        color: $red;
        padding-right: 2px;
        text-decoration: line-through;
        font-size: 12px;
      }
      .price-new {
        font-size: 13px;
      }
      .rating {
        position: relative;
        margin: 0;
        left: 0;
        top: 0;
        padding: 0;
      }
      .cart, .description, .sale, .wishlist, .compare {
        display: none !important;
      }
      .cart input {
        color: white;
        text-transform: none;
        font-weight: bold;
      }
    }
    .product-grid-item:last-of-type {
      border-bottom: none;
    }
  }

  /******************************
   CAROUSEL MODULE
  *******************************/

  .journal-carousel {
    .product-wrapper:hover {
      box-shadow: none;
    }
    .htabs {
      a {
        width: 100%;
        text-align: left;
        border-bottom: 1px solid $gray;
        border-right: 0;
      }
      a:last-of-type {
        border-bottom: none;
      }
    }
    .htabs.single-tab {
      a, a.selected, a:hover {
        border-bottom: none;
      }
    }
  }

  /******************************
   TEXT ROTATOR
  *******************************/

  .quote {
    padding-bottom: 30px;
    overflow: hidden;
  }

  .rotator-image {
    float: none !important;
    margin: 10px auto 0 auto !important;
    height: auto;
  }

  .quovolve-nav {
    bottom: 10px !important;
    left: 0;
    width: 100%;
    text-align: center;
    ul, ol {
      margin: 0;
      padding: 0;
      display: inline-block;
    }
  }

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

  .journal-gallery {
    overflow: hidden;
    .box-heading {
      margin-bottom: 10px;
    }
    .box-content {
      margin-right: -10px;
      margin-bottom: -10px;
      .gallery-thumb {
        padding-right: 10px;
        margin-bottom: 10px;
      }
    }
  }

  .gallery-thumb a:before {
    font-size: 20px;
  }

  /******************************
   CMS BLOCKS
  *******************************/

  .cms-block, .static-banner {
    margin-bottom: 20px;
    &:last-of-type {
      margin-bottom: 0;
    }
  }
  .box.cms-blocks {
    background-color: transparent;
    .cms-block {
      margin-bottom: 0;
      &:last-of-type {
        margin-bottom: 0;
      }
    }
    .box-heading {
      margin-bottom: 0;
    }
    .block-content {
      height: auto !important;
      background-color: transparent;
    }
  }
  .static-banners.box {
    background-color: transparent;
  }
  .block-content p {
    padding-bottom: 0;
  }
  .editor-content {
    img {
      max-width: 200px !important;
      height: auto;
    }
    h1, h2, h3 {
      padding-bottom: 0;
    }
  }
}

.extended-layout {
  #column-right, #column-left {
    .journal-gallery .box-content {
      padding: 10px;
      padding-top: 0;
    }
    .box {
      &:last-of-type {
        margin-bottom: 20px;
      }
    }
  }
}

.side-column {
  .oc-module .inline-button br {
    display: none;
  }
  .box.journal-carousel {
    background-color: transparent;
  }
  .side-products .product-wrapper{
    background: transparent;
  }
  .product-wrapper{
    box-shadow: none !important;
  }
}

.ie:not(.edge) .side-column .oc-module .product-details{
  float: left;
}

/******************************
OC 2
*******************************/

#column-right + .row #content {
  margin-right: $side;
}

#column-left + .row #content {
  margin-left: $side;
}

#column-left + #column-right + .row #content {
  margin-left: $side;
  margin-right: $side;
}

//FLYOUT MENU
.flyout {
  .fly-mega-menu {
    left: 100%;
    top: 0;
    z-index: 1;
    min-height: 100%;
    width: 764px;
    transition: all 0.2s;
    box-shadow: 12px 15px 30px -8px rgba(0, 0, 0, 0.2);
    .mega-menu-column {
      margin: 0;
      &:last-of-type:not(:only-of-type) > div {
        margin-right: 0;
        margin-bottom: 15px;
        > h3 {
          margin-right: 15px;
        }
      }
      &.mega-menu-html-block > div {
        margin-right: 15px;
        margin-bottom: 15px;
        > h3 {
          margin-right: 0;
        }
      }
    }
  }
}

.flyout .mega-menu div > h3 > a{
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.flyout-menu {
  overflow: visible;
  .flyout > ul > li {
    display: table;
    width: 100%;
    min-height: 40px;
    > a {
      padding: 7px 25px 7px 12px;
      width: 100%;
      min-height: inherit;
      display: table-cell;
      vertical-align: middle;
      position: relative;
      transition: background-color .2s, color .2s;
      border-bottom-width: 1px;
      border-bottom-color: $f4;
      border-bottom-style: solid;
      &:before {
        display: none;
      }
      i {
        left: -2px;
        &:before {
          padding-left: 1px;
        }
        &.menu-plus {
          left: auto;
        }
      }
    }
    &:last-of-type {
      a {
        border-bottom-width: 0;
      }
    }
    &:hover {
      .fly-mega-menu,
      > ul {
        display: block;
      }
    }
  }
}

.flyout > ul > li.fly-mega-menu-mixed {
  position: static;
}

.fly-drop-down,
.fly-mega-menu-mixed {
  .menu-plus {
    position: absolute;
    font-size: 17px;
    top: 14px;
    right: 8px;
    &::before {
      content: "\e620";
      font-size: 11px;
      float: left;
    }
  }
}

.flyout-menu .flyout > ul > li:hover > a {
  z-index: 2;
  transition: all 0.2s;
}

.fly-drop-down {
  ul {
    z-index: 999;
    position: absolute;
    list-style: none;
    margin: 0;
    padding: 0;
    box-shadow: 0 1px 8px -3px rgba(0, 0, 0, .5);
    height: 100%;
    min-height: inherit;
    li {
      color: $dark;
      background-color: white;
      position: relative;
      border-bottom: 1px solid $f4;
      height: 100%;
      display: table;
      width: 100%;
      min-height: inherit;
    }

    li:last-of-type {
      border-bottom-width: 0;
    }

    li ul {
      visibility: hidden;
      opacity: 0;
      left: 100%;
      top: 0;
      min-height: 40px;
    }

    li.left ul {
      left: -100%;
    }

    li:hover > ul {
      transition: opacity 0.2s;
      visibility: visible;
      opacity: 1;
    }
    li a {
      min-width: 100px;
      padding: 0 30px 0 12px;
      color: inherit;
      white-space: nowrap;
      min-height: inherit;
      display: table-cell;
      vertical-align: middle;
      &:before {
        margin-right: 5px;
      }
    }
  }
  > ul {
    display: none;
    left: 100%;
    top: 0;
    > li > a {
      min-width: 120px;
    }
  }
}

.flyout-left {
  z-index: 4;
  .fly-mega-menu {
    left: 100%;
  }
}

.flyout-right {
  z-index: 3;
  .fly-mega-menu {
    left: -100%;
  }
  .fly-drop-down {
    > ul {
      left: auto;
      right: 100%;
    }
    ul li ul {
      left: auto;
      right: 100%;
    }
  }
}

#column-right {
  &:hover {
    z-index: 9;
  }
  .flyout-menu .flyout > ul > li > a i.menu-plus {
    left: 8px;
    right: auto;
    transform: scale(-1);
  }
  .flyout-menu i.menu-plus {
    left: 8px;
    right: auto;
    transform: scale(-1);
  }
  .fly-drop-down ul li a {
    min-width: 100px;
    padding: 0 12px 0 25px;
  }
  .flyout-menu .flyout > ul > li > a {
    padding: 7px 12px 7px 25px;
    text-align: right;
  }
}

//END Flyout

