// =============================================================================
// Shop Display Gird
// =============================================================================

body.woocommerce-shop .site-main-content-wrapper .widget_layered_nav_filters {
  margin: 0 0 rem-calc(20);
  text-align: left;
  @include breakpoint(large) {
    margin: 0 0 rem-calc(20);
  }
}
body.woocommerce ul.products {
  .product {
    width: 50%;
    @include breakpoint(medium) {
      width: calc(100% / 3);
    }
    @include breakpoint(xlarge) {
      padding: 0 rem-calc(15) rem-calc(30);
      display: flex;
      flex-direction: column;
      text-align: left;
      width: calc(100% / 4);
    }
  }
}
ul.products {
  list-style: none;
  margin: 0 rem-calc(-$grid-column-gutter/2) rem-calc(40);
  display: flex;
  flex-wrap: wrap;
  @include breakpoint(large) {
    margin: 0 rem-calc(-$grid-column-gutter/2) rem-calc(24);
  }
  .grid-new-row {
    width: 100%;
  }

  .product {
    position: relative;
    padding: 0 rem-calc($grid-column-gutter/2);

    &.outofstock,
    &.product-type-variable {
      .product-item__description--actions {
        .button {
          &:after {
            font-size: 14px;
          }
        }
      }
    }

    // Include Tooltips
    @include tooltip('product-item__description--actions', nova_product_quick_view_btn, 11, 0);
    @include nyture_addtocart_button('product-item__description--actions', button, 11, 0);
    @include nyture_addtocart_button('product-item__description--actions', product_type_variable, 11, 0);

    &.outofstock {
      @include tooltip('product-item__description--actions', button, 11, 0);
    }
    // Include Badges
    @include shop_product_badges(10px, 10px);
    @include breakpoint(xlarge) {
      @include shop_product_badges(25px, 25px);
    }

    .product-item {
      transition: opacity 1s ease, transform 1.5s ease;
      position: relative;

      body.shop-products-per-row-6 .shop-has-sidebar & {
        overflow: visible;
      }
      .nova_product_quick_view_btn,
      .nova_product_wishlist_btn {
        position: absolute;
        opacity: 0;
        visibility: hidden;
        right: 0;
        padding: rem-calc(25);
        z-index: 12;
        transform: translateY(-5px);
        transition: all cubic-bezier(0.4, 0, 0.2, 1) 0.25s;

        i {
          font-size: rem-calc(22);
          color: v(site-heading-color);
        }
        &.added {
          i {
            color: v(site-accent-color);
          }
        }
      }
      .nova_product_quick_view_btn {
        left: 0;
        right: auto;
      }
      .product-item-link {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 10;
      }
      .category {
        .content-product-cat {
          font-size: rem-calc(11);
          font-weight: 600;
          text-transform: uppercase;
        }
      }
      .product-item__thumbnail {
        position: relative;
        .product-item__thumbnail_overlay {
          position: absolute;
          top: 0;
          left: 0;
          background: rgba(255,255,255,0);
          width: 100%;
          height: 100%;
          opacity: 0;
          z-index: 9;
          @include global_transition;
        }
      }
      &:hover {
        .product-item__badges {
          opacity: 0;
          visibility: hidden;
        }
        .product-item__thumbnail_overlay {
          opacity: 1;
        }
        .nova_product_quick_view_btn,
        .nova_product_wishlist_btn  {
          opacity: 1;
          visibility: visible;
          transform: none;
          transition: all cubic-bezier(0.4, 0, 0.2, 1) 0.25s
        }
        .product-item__description--actions {
          opacity: 1;
        }
        .product-item__thumbnail-placeholder.second_image_enabled.second_image_loaded {
          a img {
            opacity: 0;
            transition: opacity 300ms ease-in-out 0.05s, transform 0.3s ease-in-out;
          }

          .product_second_image {
            opacity: 1;
            transition: opacity 300ms ease-in-out 0.05s, transform 0.3s ease-in-out;
          }
        }
      }

      .product-item__thumbnail-placeholder.second_image_enabled.second_image_loaded {
        a img {
          opacity: 1;
          transition: opacity 300ms ease-in-out 0.05s, transform 0.3s ease-in-out;
        }

        .product_second_image {
          opacity: 0;
          transition: opacity 300ms ease-in-out 0.05s, transform 0.3s ease-in-out;
          width: 100%;
        }
      }

      .product-item__thumbnail-placeholder {
        margin-bottom: rem-calc(8);

        &.second_image_enabled {
          .product_second_image {
            width: 100%;
            height: 100%;
            display: block;
            opacity: 0;
            position: absolute;
            background-size: cover;
            background-repeat: no-repeat;
            transition: opacity 0 ease 0.05s;
          }
        }

        a {
          display: flex;
          align-items: center;
          justify-content: center;
          position: relative;
          color: inherit !important;
          flex-direction: column;
          cursor: pointer;

          img {
            transition: transform 0.3s ease-in-out;
            will-change: transform;
            width: 100%;
          }

          .out-of-stock {
            position: absolute;
            background-color: v(site-heading-color);
            @include product_badge();
            color: v(site-bg-color);
            top: 50%;
            margin-top: -8px;
          }
        }
      }
      .product-item__description--actions {
        position: absolute;
        opacity: 0;
        width: 100%;
        left: 50%;
        bottom: rem-calc(25);
        text-align: center;
        pointer-events: none;
        z-index: 11;
        @include global_transition;
        transform: translate(-50%, 0%);

        .button {
          margin-top: auto;
        }
        .nova_product_quick_view_btn {
          margin-top: rem-calc(16);
        }
        > a {
          position: relative;
          pointer-events: auto;

          &.clicked {
            &:after {
              animation: shop_tooltip_clicked 0.3s ease-out;
              @include breakpoint(xlarge) {
                animation: shop_tooltip_clicked_desktop 0.3s ease-out;
              }
            }
          }

          &.loading {
            @include loader(45px, 45px);

            &:before {
              border-top: 1px solid;
              border-color: v(site-secondary-button-color) #FFF #FFF #FFF;
              position: absolute;
              left: -3px;
              top: -3px;
              z-index: 1;
            }
          }
        }

        > a {
          margin: 0 auto;
          cursor: pointer;
          max-width: rem-calc(160);

        }
         > a.button {
           &.loading {
             @include loader(30px, 30px);

             &:before {
               border-top: 1px solid;
               border-color: v(site-secondary-button-color) #FFF #FFF #FFF;
               position: absolute;
               left: 15px;
               top: 5px;
               z-index: 1;
             }
           }
         }
        @include global-transition();
      }
      .product-item__description {
        position: relative;
        margin-top: rem-calc(20);

        .product-item__description--info {
          position: relative;
          text-align: center;
          @include global-transition();

          a.title {
            .woocommerce-loop-product__title {
              @include product_title(14, 7, v(site-heading-font), 500);
              color: v(site-text-color);
              @include global-transition();

              &:hover {
                color: v(site-accent-color);
              }
            }
          }

          span.price {
            @include product_price(16, 0,500);
            color: v(site-wc-price);
            display: block;
          }

          .star-rating {
            font-size: rem-calc(13);
            margin-top: rem-calc(5);
          }
        }
      }

      &.adding,
      &:hover {
        .product-item__description {

          .product-item__description--info {
            .star-rating {
              opacity: 1;
              visibility: visible;
            }
          }
        }
      }
    }
  }
}
@include breakpoint(large up) {
  @include shop_products_per_row(1);
  @include shop_products_per_row(2);
  @include shop_products_per_row(3);
  @include shop_products_per_row(4);
  @include shop_products_per_row(5);
  @include shop_products_per_row(6);
}
@include woocommerce_columns(1);
@include woocommerce_columns(2) ;
@include breakpoint(medium up) {
  @include woocommerce_columns(3);
  @include woocommerce_columns(4);
  @include woocommerce_columns(5);
  @include woocommerce_columns(6);
}
ul.products.products-grid-2 {
  .product .product-item .product-item__description .product-item__description--info {
    text-align: left;
  }
}
ul.products.products-grid-3 {
.product .product-item {
  .product-item__description {
    position: absolute;
    bottom: 0;
    opacity: 0;
    padding-bottom: -100px;
    width: 100%;
    padding: rem-calc(30);
    z-index: 99;
  }
  &:hover {
    .product-item__description {
      opacity: 1;
    }
  }
}
}
