/**
 * Force Standard Add to Cart (No AJAX)
 * This script completely disables AJAX add to cart and forces standard form submission
 * 
 * @package storzen
 * @since 1.0.3
 */

(function($) {
    'use strict';

    // Wait for DOM to be ready
    $(document).ready(function() {
        
        // Remove all AJAX add to cart handlers
        $(document).off('click', '.ajax_add_to_cart');
        $(document).off('click', 'a.add_to_cart_button');
        
        // Force standard behavior for all add to cart buttons
        $('a.add_to_cart_button').each(function() {
            var $button = $(this);
            
            // Remove AJAX class
            $button.removeClass('ajax_add_to_cart');
            
            // Ensure it's a standard link (not prevented)
            $button.off('click');
            
            // Add our own click handler that allows default behavior
            $button.on('click', function(e) {
                // Don't prevent default - let it work as a normal link
                // This will cause a page reload and standard add to cart
                console.log('Standard add to cart - page will reload');
            });
        });
        
        console.log('Force standard cart loaded - AJAX disabled');
    });

})(jQuery);
