<?php
/**
 * Cart Page Template
 *
 * @package Pawfect
 */

defined('ABSPATH') || exit;

get_header(); ?>

<main id="primary-content" class="pawfect-main-content pawfect-bg-background pawfect-min-h-screen" tabindex="-1">
    
    <?php
// Page Header
if (!get_theme_mod('pawfect_page_header_disabled', false)) {
    get_template_part('template-parts/page-header');
}
?>

    <div class="pawfect-container pawfect-mx-auto pawfect-px-6 pawfect-py-12 md:pawfect-py-16">

        <?php while (have_posts()): ?>
            <?php the_post(); ?>

            <div class="woocommerce pawfect-cart-page">
                <?php
    // Check if cart is empty and apply product card styling
    if (WC()->cart && WC()->cart->is_empty()) {
        // Get the product card style for consistent styling
        $product_card_style = get_theme_mod('pawfect_shop_card_style', 'modern');
        echo '<div class="pawfect-cart-empty-wrapper pawfect-product-card-style-' . esc_attr($product_card_style) . '">';
        the_content();
        echo '</div>';
    }
    else {
        the_content();
    }
?>
            </div>

        <?php
endwhile; ?>

    </div>
</main>

<?php get_footer(); ?>
