// Home
.home-slider,
.boxed-slider {
  @include lazy-anim();
}

.owl-carousel.loaded .owl-item .owl-lazy {
  opacity: 1;
}

a.with-icon {
  font: 700 1.4rem $font-family;
  letter-spacing: 0.15em;
  color: $primary-color-dark;

  i {
    margin-left: 1rem;
  }

  &:hover {
    border-bottom: 1px solid $secondary-color;
  }

  &.btn{
    padding: 1.5rem 2rem;
    border: 2px solid #e7e7e7;

    &:hover {
      background-color: $primary-color;
      border-color: $primary-color;
      color: white;
      text-decoration: none;
    }        
  }

  &.align-center {
    margin-left: 50%;
    transform: translateX(-50%);
  }

  .section-title & {
    color: $secondary-color;
  }
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;

  h2 {
    font: 700 2.2rem $font-family;
    color: $primary-color-dark;
    letter-spacing: 0.15em;
  }

  &.vertical-line {
    justify-content: flex-start;
  }

  hr.vertical {
    height: 25px;
  }
}

.featured-section {
  a.with-icon {
    padding-left: 3.8rem;
    padding-right: 3.8rem;
    margin-bottom: 2rem;
  }
}

.home {
  section {
    margin-bottom: 2rem;
  }

  .featured-section {
    padding: 0;

    .nav.nav-tabs {
      position: absolute;
      top: 6px;
      left: 35rem;
    }

    .tab-content {
      padding-top: 3rem;
      margin-bottom: 2rem;
    }
  }

  .nav.nav-tabs {
    border-bottom: none;
  }

  .nav-tabs .nav-item {
    .nav-link {
      padding: 0 0 3px;
      text-transform: uppercase;
      margin-right: 4rem;
      color: #777;
      letter-spacing: 0.15em;
      transition: all .2s;
      font: 500 1.4rem $font-family;
      cursor: pointer;

      &.active,
      &:hover {
        color: $secondary-color;
        border-bottom-color: $secondary-color;
      }
    }

    &:last-child .nav-link {
      margin-right: 0;
    }
  }
}

hr {
  max-width: 100%;
  margin: 2rem auto;

  &.vertical {
    width: 0;
    max-height: 100%;
    margin: 0 2rem;
    border-right: 1px solid rgba(0, 0, 0, 0.09);
  }
}

.owl-carousel-lazy.owl-carousel {
  display: block;
  margin-bottom: 2rem;

  &.owl-loaded .owl-items>*{
    display: flex;
  }
}

.height-x1,
.height-x2 {
  >div {
    height: 100%;
  }
}

.height-x1 {
  height: 335px;
}

.height-x2 {
  height: 670px;
}

.height-x3 {
  height: 380px;
}

.home-banner {
  padding-bottom: 2rem;
  position: relative;

  figure {
    height: 100%;
    margin: 0;
    position: relative;

    img {
      object-fit: contain;

      .home & {
        object-fit: cover;
      }
    }

    &::after {
      position: absolute;
      left: 0;
      top: 0;
      bottom: 0;
      right: 0;
      background-color: rgba(0, 0, 0, .1);
      opacity: 0;
      transition: all 0.25s;
      z-index: 1;
      content: '';
    }
  }

  &:hover {
    figure::after {
      opacity: 1;
    }
  }

  .banner-content {
    position: absolute;
    font-family: $font-family;
    letter-spacing: 0.01em;
    line-height: 1;
    text-transform: uppercase;
    z-index: 2;
    padding: 0 1rem;

    .btn {
      color: $secondary-color;
      letter-spacing: 0.15em;
      line-height: 1;
      background: transparent;
      border: 2px solid #e7e7e7;
      font-weight: 700;

      .height-x1 & {
        font-size: 1.1rem;
        padding: 1.3rem 1.8rem;
      }

      .height-x2 & {
        font-size: 1.4rem;
        padding: 1.9rem 2rem;
        margin-bottom: 4rem;
      }

      &:hover {
        background-color: $primary-color;
        border-color: $primary-color;
        color: white;
      }
    }

    p {
      color: $primary-color;
      font-weight: 600;
      
      .height-x1 & {
        font-size: 1.5rem;
        margin-bottom: 2.5rem;
      }

      .height-x2 & {
        font-size: 2rem;
        margin-bottom: 4rem;
      }
    }

    span {
      color: white;
      opacity: 0.5;
      font-size: 1.2rem;
      letter-spacing: 0.025em;
      font-weight:  400;
      line-height: 20px;
    }

    h3 {
      text-align: right;
      color: $primary-color-dark;
      text-transform: none;

      strong {
        line-height: 1.3;
        text-transform: uppercase;
      }

      .height-x1 & {
        font-size: 2.8rem;
        margin-bottom: 2rem;

        strong {
          font-size: 3.4rem;
        }
      }

      .height-x2 & {
        font-size: 4.815rem;
        margin-bottom: 4rem;
      }
    }

    h4 {
      color: white;
      font-size: 2.8rem;
    }

    .banner-info {
      a.btn {
        font: 700 2.4rem $second-font-family;
        color: white;
        background-color: $primary-color-dark;
        padding: 1rem 1.5rem;
        letter-spacing: 0.01em;
        border: none;
        margin-bottom: 1rem;

        &:hover {
          background-color: $primary-color;
        }
      }

      .sale-off {
        font: 700 2.14rem $second-font-family;
        color: $primary-color-dark;
        text-transform: uppercase;
        text-align: left;
        position: relative;

        &::before {
          content: 'UP TO';
          font: 700 1.34rem $second-font-family;
          letter-spacing: 0;
          color: $primary-color-dark;
          opacity: 0.6;
          position: absolute;
          left: 0;
          top: 50%;
          transform: translate(-80%, -50%) rotate(-90deg);
        }
      }      

      span {
        background-color: $primary-color-dark;
        color: white;
        font: 700 3.477rem $second-font-family;
        padding: 0 1rem;
        opacity: 1;
        margin-right: 5px;
      }
    }

    .skew-box {
      transform: skew(2deg, -3deg);
    }

    &.content-right {
      bottom: 5rem;
      right: calc(3.68% - 10px);
      text-align: right;
    }

    &.content-left {
      left: calc(5.79% - 10px);
      top: 50%;
      transform: translateY(-50%);
      display: flex;
      flex-direction: column;
      align-items: center;
    }

    &.content-top {
      top: 3.5rem;
      text-align: center;
      width: 100%;
    }

    &.content-bottom {
      bottom: 5.5rem;
      text-align: center;
      width: 100%;
    }

    &.full-content {
      left: 0;
      top: 50%;
      transform: translateY(-50%);
      margin-bottom: 2rem;

      .left-content {
        margin-right: 5rem;
        display: flex;
        flex-direction: column;
        align-items: flex-end;
      }

      span {
        font: 700 1.6rem $second-font-family;
      }

      h4 {
        font-size: 5rem;
        text-transform: none;
        letter-spacing: 0.01em;
        margin-bottom: 1rem;
      }

      button {
        color: white;
        padding: 1.8rem 2rem;
        margin-bottom: 1rem;
      }

      .banner-info {
        margin: 4rem 0;
        a.btn {
          background-color: white;
          color : $primary-color-dark;
          font-size: 3rem;
          text-transform: none;
          padding: 1.2rem 1.7rem;
        }

        .sale-off {
          font-size: 2.67rem;
          color: white;

          &::before {
            color: white;
            font-size: 1.67rem;
          }

          span {
            font-size: 4.32rem;
            background-color: $secondary-color;
            padding: 0 1.5rem;
            margin-right: 2rem;
          }
        }
      }
    }

    .container {
      display: flex;
      justify-content: space-between;
      flex-wrap: wrap-reverse;
      align-items: center;
    }
  }
}

.service-widget {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2rem;

  .service-icon {
    font-size: 4rem;
    color: $primary-color-dark;
    margin-right:  .8rem;
  }

  .service-content {
    display: flex;
    flex-direction: column;
  }

  .service-title {
    font: 700 1.4rem/1 $font-family;
    color: $primary-color-dark;
    text-transform: uppercase;
  }

  p {
    font: 300 1.3rem $second-font-family;
    line-height: 22px;
    color: #777;
    letter-spacing: 0.01em;
    margin-bottom: 0;
  }
}

.bg-grey {
  background-color: #f4f4f4;
}

.owl-carousel-lazy.owl-carousel {
  display: block;
}

.owl-theme .owl-dots .owl-dot.active span {
  background-color: $primary-color;
  border-color: $primary-color;
}

.modal#addCartModal {
  width: 340px;
  top: calc((100% - 320px) / 2);
  left: calc((100% - 320px) / 2);
  padding: 10px !important;
  overflow: hidden;

  .modal-dialog {
    margin: 0;
  }

  .modal-content {
    margin: 0;
    border: none;
    box-shadow: none;
  }
}

.add-cart-box {
  padding: 19px 10px 20px !important;
  border-top: 4px solid $primary-color;
  background-color: white;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.6);

  h4 {
    font-weight: 500;
    color: $primary-color;
    margin-bottom: 1.8rem;
  }

  img {
    margin: 0 auto 10px;
    width: 120px;
  }

  .btn-actions {
    display: flex;
    justify-content: space-around;

    .btn-primary {
      width: 140px;
      padding: 8px 0;
      font: 500 16px $font-family;
      border: none;
      cursor: pointer;

      &:focus,
      &:active,
      &:active:focus {
        outline: none;
        border: none;
        box-shadow: none;
      }
    }
  }
}

.modal-backdrop.show {
  opacity: 0.7;
}

.modal-backdrop.fade {
  transition: opacity .3s linear;
}

.product-default {
  .label-group {
    top: 12px;
    left: 12px;
  }

  figure {
    display: flex;
    justify-content: center;

    img {
      object-fit: cover;
    }

    .btn-quickview {
      background-color: $secondary-color;
    }
  }

  .product-category,
  .product-title,
  .old-price,
  .product-price,
  .btn-quickview {
    font-family: $second-font-family;
  }

  .product-label {
    padding: 5px;
    font-family: $second-font-family;

    &.label-cut {
      background-color: $primary-color;
    }
  }
}

.banner-article {
  >* {
    display: flex;
    align-items: center;
  }

  figure {
    position: relative;
    width: 100%;

    img {
      min-height: 280px;
    }
  }  

  .date-box {
    position: absolute;
    left: 1rem;
    top: 1rem;
    padding: 1.2rem 1.8rem;
    background-color: $secondary-color;
    text-align: center;
  }

  .date-day {
    font: 700 2.8rem/1 $font-family;
    color: white;
    letter-spacing: 0.01em;
  }

  .date-month {
    font: 400 1.2rem/1 $font-family;
    opacity: 0.5;
    color: white;
    letter-spacing: 0.01em;
  }

  .article-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;

    p {
      -webkit-line-clamp: 3;
      display: -webkit-box;
      -webkit-box-orient: vertical;
      overflow: hidden;
      font: 400 1.3rem $font-family;
      letter-spacing: 0;
      line-height: 25px;
      color: #777;
    }

    a.btn {
      font-size: 1.1rem;
      padding: 0.5rem 2rem;
    }
  }

  .article-category {
    font: 600 1.1rem/1 $font-family;
    color: white;
    letter-spacing: 0.01em;
    padding: 1rem 1.7rem;
    border-radius: 5px;
    background-color: $primary-color-dark;
  }

  .article-title {
    font: 700 2rem/1 $font-family;
    letter-spacing: 0.01em;
    color: $primary-color-dark;
    margin: 2rem 0;
  }
}

.partners-panel {
  height: 172px;
  display: flex;
  align-items: center;
  background-color: $primary-color-dark;

  .owl-carousel .owl-item img {
    max-width: unset;
    width: auto;
    margin-left: auto;
    margin-right: auto;
  }

  .owl-stage {
    display: flex;
    align-items: center;
  }

  .owl-carousel {
    position: unset;
  }

  .owl-theme .owl-dots {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 1rem;
  }
}

.grid-item {
  >.row,
  [class*='col-'] {
    height: 100%;

    .home-banner {
      height: 100%;
    }
  }
}

.btn-view-more {
  margin-top: 2rem;
  cursor: pointer;
  font: 700 1.4rem/1 $font-family;
  color: #333;
  text-transform: uppercase;
  background-color: white;
  border: 1px solid #e1e1e1;
  border-radius: 30px;
  padding: 2rem 5rem;
  transition: all .3s;

  &:hover {
    background-color: $primary-color;
    border-color: $primary-color;
    color: white;
  }
}

.cross-txt {
  position: absolute;
  left: -1px;
  right: -1px;
  top: 0;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  margin-bottom: 0;

  &::before,
  &::after {
    content: '';
    height :1px;
    flex: 1;
    background: #e1e1e1;
  }

  &::before {
    margin-right: 2.5rem;
  }

  &::after {
    margin-left: 2.5rem;
  }
}

@media (max-width: 1359px) {
  .service-widget {
    flex-direction: column;

    .service-icon { 
      margin-right: 0;
    }

    .service-content {
      text-align: center;
    }
  }

  .home .featured-section .nav.nav-tabs {
    position: relative;
    left: 0;
  }
}

@media (max-width: 1199px) {
  .banner-article {
    margin-bottom: 4rem;
    
    .article-info {
      margin: 2rem 0;
    }
  }
}

@media (max-width: 991px) {
  .service-widget {
    flex-direction: row;
    justify-content: left;

    .service-icon { 
      margin-right: 1rem;
    }

    .service-content {
      text-align: left;
    }
  }

  .height-x3 {
    height: 440px;
  }

  .home-banner .banner-content {
    &.full-content .left-content {
      margin-right: 0;
    }

    .container {
      flex-direction: column-reverse;
      align-items: center;
    }
  }
}

@media (max-width: 575px) {
  .height-x1 {
    height: 220px;
  }

  .height-x2 {
    height: 420px;
  }
}

@media (max-width: 479px) {
  .section-title.vertical-line {
    h2 {
      margin-right: 4rem;
      margin-bottom: 1rem;
    }

    hr {
      display: none;
    }
  }
}