!function(o){woodmartThemeModule.$document.on("wdShopPageInit wdUpdateWishlist wdArrowsLoadProducts wdLoadMoreLoadProducts wdProductsTabsLoaded wdSearchFullScreenContentLoaded wdArrowsLoadProducts wdBackHistory wdRecentlyViewedProductLoaded",function(){woodmartThemeModule.productHover()}),woodmartThemeModule.wcTabsHoverFix=function(){o(".wc-tabs > li").on("click",function(){woodmartThemeModule.productHover()})},woodmartThemeModule.$document.on("wdProductHoverContentRecalc",function(o,e){woodmartThemeModule.productHoverRecalc(e)}),o.each(["frontend/element_ready/wd_products.default","frontend/element_ready/wd_products_tabs.default"],function(o,e){woodmartThemeModule.wdElementorAddAction(e,function(){woodmartThemeModule.productHover()})}),woodmartThemeModule.productHoverRecalc=function(o){if(!o.hasClass("wd-fade-off")){var e=o.find(".wd-product-card-hover").outerHeight();o.find(".wd-product-card-bg").css({marginBottom:-e}),o.addClass("hover-ready")}},woodmartThemeModule.productHover=function(){var e=o(".wd-hover-with-fade"),d=e.closest(".wd-carousel");function t(o){if(!o.data("column_width")){var e=o.outerWidth()/o.data("columns");o.data("column_width",e)}}woodmartThemeModule.windowWidth<=1024&&(d.length>0&&e.hasClass("wd-hover-fw-button")&&e.addClass("wd-fade-off"),e.on("click",function(e){var d=o(this),t="state-hover";d.hasClass("wp-block-wd-li-product-card")||d.hasClass(t)||d.hasClass("wd-fade-off")||"no"!==woodmart_settings.base_hover_mobile_click||(e.preventDefault(),o("."+t).removeClass(t),d.addClass(t))}),woodmartThemeModule.$document.on("click touchstart",function(e){0===o(e.target).closest(".state-hover").length&&o(".state-hover").removeClass("state-hover")})),e.on("mouseenter mousemove touchstart",function(){var e=o(this);e.hasClass("wd-height-calculated")||(e.imagesLoaded(function(){woodmartThemeModule.productHoverRecalc(e)}),e.addClass("wd-height-calculated"))}),o(".wd-products").on("mouseenter mousemove touchstart",function(){t(o(this))}),e.on("mouseenter mousemove touchstart",function(){if(woodmart_settings.hover_width_small){var e=o(this);if(!e.hasClass("wd-hover-fw-button")&&!e.hasClass("wp-block-wd-li-product-card")){t(e.parent(".wd-products"));var d=e.parent(".wd-products").data("column_width");d&&(255>d||woodmartThemeModule.windowWidth<=1024?(e.find(".wd-add-btn").parent().addClass("wd-add-small-btn"),e.find(".wd-add-btn").removeClass("wd-add-btn-replace").addClass("wd-action-btn wd-style-icon wd-add-cart-icon")):(woodmartThemeModule.$body.hasClass("catalog-mode-on")||woodmartThemeModule.$body.hasClass("login-see-prices"))&&e.find(".wd-bottom-actions .wd-action-btn").removeClass("wd-style-icon").addClass("wd-style-text"),woodmartThemeModule.$document.trigger("wdProductBaseHoverIconsResize"))}}})},o(document).ready(function(){woodmartThemeModule.productHover(),woodmartThemeModule.wcTabsHoverFix()})}(jQuery);