!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,d){woodmartThemeModule.productHoverRecalc(d)}),o.each(["frontend/element_ready/wd_products.default","frontend/element_ready/wd_products_tabs.default"],function(o,d){woodmartThemeModule.wdElementorAddAction(d,function(){woodmartThemeModule.productHover()})}),woodmartThemeModule.productHoverRecalc=function(o){if(!o.hasClass("wd-fade-off")){var d=o.find(".wd-product-card-hover").outerHeight();o.find(".wd-product-card-bg").css({"--wd-prod-card-b-sp":d+"px"}),o.addClass("hover-ready")}},woodmartThemeModule.productHover=function(){var d=o(".wd-hover-with-fade"),e=d.closest(".wd-carousel");function t(o){if(!o.data("column_width")){var d=o.outerWidth()/o.data("columns");o.data("column_width",d)}}woodmartThemeModule.windowWidth<=1024&&(e.length>0&&d.hasClass("wd-hover-fw-button")&&d.addClass("wd-fade-off"),d.on("click",function(d){var e=o(this),t="state-hover";e.hasClass("wp-block-wd-li-product-card")||e.hasClass(t)||e.hasClass("wd-fade-off")||"no"!==woodmart_settings.base_hover_mobile_click||(d.preventDefault(),o("."+t).removeClass(t),e.addClass(t))}),woodmartThemeModule.$document.on("click touchstart",function(d){0===o(d.target).closest(".state-hover").length&&o(".state-hover").removeClass("state-hover")})),d.on("mouseenter mousemove touchstart",function(){var d=o(this);d.hasClass("wd-height-calculated")||(d.imagesLoaded(function(){woodmartThemeModule.productHoverRecalc(d)}),d.addClass("wd-height-calculated"))}),o(".wd-products").on("mouseenter mousemove touchstart",function(){t(o(this))}),d.on("mouseenter mousemove touchstart",function(){if(woodmart_settings.hover_width_small){var d=o(this);if(!d.hasClass("wd-hover-fw-button")&&!d.hasClass("wp-block-wd-li-product-card")){t(d.parent(".wd-products"));var e=d.parent(".wd-products").data("column_width");e&&(255>e||woodmartThemeModule.windowWidth<=1024?(d.find(".wd-add-btn").parent().addClass("wd-add-small-btn"),d.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"))&&d.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);