<?php
if (!defined('ABSPATH')) exit; // Exit if accessed directly

if (function_exists('sapsfwc_fs') && sapsfwc_fs()->is_not_paying()) :

    $upgradeURL = sapsfwc_fs()->get_upgrade_url();

    ?>
    <div class="features-wrap upgrade-notice">

        <h2><?php esc_html_e('Need More Features?', 'simple-ajax-product-search-for-woocommerce'); ?></h2>

        <p>
            <?php
            /* translators: 1: the words "Pro version" wrapped in <strong> tags */
            echo wp_kses(
                    sprintf(
                            __('Upgrade to the %1$s to unlock advanced layout controls, customizable product grids, "Load More" functionality, custom logo support and additional styling options — perfect for tailoring your AJAX search experience to match your brand.', 'simple-ajax-product-search-for-woocommerce'),
                            '<strong>' . esc_html__('Pro version', 'simple-ajax-product-search-for-woocommerce') . '</strong>'
                    ),
                    array('strong' => array())
            );
            ?>
        </p>

        <?php if (!empty($upgradeURL)) : ?>
            <p>
                <a class="sapsfwc-upgrade-button button-primary"
                   href="<?php echo esc_url($upgradeURL); ?>">
                    <?php esc_html_e('Upgrade to Pro', 'simple-ajax-product-search-for-woocommerce'); ?>
                </a>
            </p>
        <?php endif; ?>

    </div>
<?php endif;