.g5shop__product-actions {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;

  .g5shop__add-to-cart {
    @include transition(all .3s);
    margin-bottom: var(--g5shop-product-actions-spacing);
  }

  .g5shop__quick-view {
    @include transition(all .3s);
    margin-bottom: var(--g5shop-product-actions-spacing);
  }

  .yith-wcwl-add-to-wishlist {
    @include transition(all .3s);
    margin-bottom: var(--g5shop-product-actions-spacing);
  }

  .compare {
    @include transition(all .3s);
    transition: color .4s .001s ease-out, background .4s .001s ease-out, visibility .4s .25s ease-out, opacity .4s .25s ease-out, transform .4s .25s ease-out;
  }

  opacity: 0;
  @include transform(translateX(100%));
  @include transition(.4s);
  &.horizontal {
    top: auto;
    left: 50%;
    right: auto;
    bottom: 20px;
    @include transform(translate(-50%,100%));

    .g5shop__add-to-cart {
      margin-bottom: 0;
      margin-right: var(--g5shop-product-actions-spacing);
    }

    .g5shop__quick-view {
      margin-bottom: 0;
      margin-right: var(--g5shop-product-actions-spacing);
    }
  }
}

.g5shop__product-action {
  position: absolute;
  z-index: 3;
  &.wishlist {
    top: 10px;
    right: 10px;
    --g5shop-product-actions-box-shadow: 0 0;
    --g5shop-product-actions-color: var(--g5shop-product-action-color);
    --g5shop-product-actions-bg-color: var(--g5shop-product-action-bg-color);
    --g5shop-product-actions-color-hover: var(--g5shop-product-action-color-hover);
    --g5shop-product-actions-bg-color-hover: var(--g5shop-product-action-bg-color-hover);
  }

  &.add-to-cart {
    bottom: 20px;
    left: 20px;
    right: 20px;
    @include transition(.4s);
    opacity: 0;
    @include transform(translateY(100%));

    .product_type_simple,
    .add_to_cart_button,
    .product_type_grouped,
    .product_type_external,
    .added_to_cart,
    .product_out_of_stock,
    .product_type_variable {
      display: block !important;
      text-align: center;
      overflow: hidden;
      text-overflow: ellipsis;
    }
  }

}

.g5shop__add-to-cart {
  background-color: var(--g5shop-product-actions-bg-color);
  color: var(--g5shop-product-actions-color);
  @include border-radius(var(--g5shop-product-actions-radius));
  @include box-shadow(var(--g5shop-product-actions-box-shadow));
  font-size: 0;
  cursor: pointer;
  &:hover,
  &:active,
  &:focus {
    background-color: var(--g5shop-product-actions-bg-color-hover);
    color: var(--g5shop-product-actions-color-hover);
  }

  .product_type_simple,
  .add_to_cart_button,
  .product_type_grouped,
  .product_type_external,
  .added_to_cart,
  .product_out_of_stock,
  .product_type_variable {
    width: var(--g5shop-product-actions-size);
    height: var(--g5shop-product-actions-size);
    color: inherit;
    @include d-flex('important');
    @include justify-content-center();
    @include align-items-center();
    &:before {
      font-size: var(--g5shop-product-actions-icon-size);
      font-family: var(--g5shop-product-actions-icon-font);
      content: var(--g5shop-product-actions-add-to-cart);
      font-weight: 400;
    }
  }

  .product_out_of_stock,
  .product_type_variable,
  .product_type_grouped {
    &:before {
      content: var(--g5shop-product-actions-add-to-cart-variable);
    }
  }



  .added_to_cart:before {
    font-weight: 900;
    content: var(--g5shop-product-actions-added-to-cart);
  }

  .add_to_cart_button.loading {
    &:after {
      display: none;
    }
    &:before {
      display: inline-block;
      -webkit-animation: spin 2s linear infinite;
      -moz-animation: spin 2s linear infinite;
      animation: spin 2s linear infinite;
      content: '\f110' !important;
      font-family: 'Font Awesome 5 Pro' !important;
      font-weight: 300 !important;
    }
  }

  .add_to_cart_button.added {
    display: none;
  }

}


.g5shop__product-actions {
  .g5shop__add-to-cart {
    .added_to_cart {
      padding: 0 !important;
      font-size: 0 !important;
      background: transparent !important;
      color: inherit !important;
      border: none !important;
      transition: none;
    }
  }
}

.g5shop__quick-view {
  @include d-flex();
  @include justify-content-center();
  @include align-items-center();
  width: var(--g5shop-product-actions-size);
  height: var(--g5shop-product-actions-size);
  @include box-shadow(var(--g5shop-product-actions-box-shadow));
  @include border-radius(var(--g5shop-product-actions-radius));
  background-color: var(--g5shop-product-actions-bg-color);
  color: var(--g5shop-product-actions-color);
  font-size: var(--g5shop-product-actions-icon-size);
  &:hover,
  &:active,
  &:focus {
    background-color: var(--g5shop-product-actions-bg-color-hover);
    color: var(--g5shop-product-actions-color-hover);
  }

  i {
    @include d-inline-flex();
  }

  i:not(.fa-spinner):before {
    font-family: var(--g5shop-product-actions-icon-font);
    content: var(--g5shop-product-actions-quick-view);
  }
}

.yith-wcwl-add-to-wishlist {
  margin-top: 0;
  i,
  .feedback,
  + div.clear,
  img.ajax-loading {
    display: none !important;
  }

  a {
    @include d-flex();
    @include justify-content-center();
    @include align-items-center();
    width: var(--g5shop-product-actions-size);
    height: var(--g5shop-product-actions-size);
    @include border-radius(var(--g5shop-product-actions-radius));
    @include box-shadow(var(--g5shop-product-actions-box-shadow));
    background-color: var(--g5shop-product-actions-bg-color);
    color: var(--g5shop-product-actions-color);
    font-size: 0;
    cursor: pointer;
    &:hover,
    &:active,
    &:focus {
      background-color: var(--g5shop-product-actions-bg-color-hover);
      color: var(--g5shop-product-actions-color-hover);
    }
  }

  .add_to_wishlist {
    &:before {
      font-family: var(--g5shop-product-actions-icon-font);
      content: var(--g5shop-product-actions-add-to-wishlist);
      font-weight: 400;
      font-size: var(--g5shop-product-actions-icon-size);
    }
  }

  .yith-wcwl-wishlistaddedbrowse,
  .yith-wcwl-wishlistexistsbrowse {
    a {
      &:before {
        font-family: var(--g5shop-product-actions-icon-font);
        content: var(--g5shop-product-actions-added-to-wishlist);
        font-weight: 900;
        font-size: var(--g5shop-product-actions-icon-size);
      }
    }
  }
}
.g5shop__product-list-actions .compare,
.g5shop__product-actions .compare {
  @include d-flex();
  @include justify-content-center();
  @include align-items-center();
  width: var(--g5shop-product-actions-size);
  height: var(--g5shop-product-actions-size);
  @include border-radius(var(--g5shop-product-actions-radius));
  @include box-shadow(var(--g5shop-product-actions-box-shadow));
  background-color: var(--g5shop-product-actions-bg-color);
  color: var(--g5shop-product-actions-color);
  font-size: 0;
  &:hover,
  &:active,
  &:focus {
    background-color: var(--g5shop-product-actions-bg-color-hover);
    color: var(--g5shop-product-actions-color-hover);
  }

  &:before {
    font-size: var(--g5shop-product-actions-icon-size);
    font-family: var(--g5shop-product-actions-icon-font);
    content: var(--g5shop-product-actions-compare);
    font-weight: 400;
  }
}
.g5shop__product-item-inner.active,
.g5shop__product-item-inner:hover {
  .g5shop__product-actions {
    @include transform(translateX(0));
    opacity: 1;

    &.horizontal {
      @include transform(translate(-50%,0));
    }
  }

  .g5shop__product-action.add-to-cart {
    @include transform(translateY(0));
    opacity: 1;
  }

}

.g5shop__product-item .g5shop__product-info {
  .product_type_simple,
  .add_to_cart_button,
  .product_type_grouped,
  .product_type_external,
  .added_to_cart,
  .product_out_of_stock,
  .product_type_variable {
    display: block;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 15px;
    max-width: 100%;
  }
}