<?php
// phpcs:disable WordPress.NamingConventions.PrefixAllGlobals
// phpcs:disable WordPress.Security.NonceVerification
// phpcs:disable WordPress.Security.ValidatedSanitizedInput
// phpcs:disable WordPress.WP.EnqueuedResourceParameters
// phpcs:disable WordPress.DB.PreparedSQL
// phpcs:disable WordPress.DB.PreparedSQLPlaceholders
// phpcs:disable WordPress.DB.DirectDatabaseQuery
// phpcs:disable WordPress.DB.SlowDBQuery
// phpcs:disable PluginCheck.Security.DirectDB
// phpcs:disable PluginCheck.CodeAnalysis
// phpcs:disable WordPressVIPMinimum

/**
 * GT BOGO Engine — PRO Rules / Packs
 *
 * @package GT_BOGO_Engine
 * @since   3.10.1
 */
if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

global $wpdb;

$is_pro          = function_exists( 'gt_bogo_has_pro' ) ? gt_bogo_has_pro() : false;
$license_manager = function_exists( 'gt_bogo_license_manager' ) ? gt_bogo_license_manager() : null;
$owned_packs     = class_exists( 'GT_BOGO_Pack_Downloader' ) ? GT_BOGO_Pack_Downloader::get_owned_pack_ids() : array();
$message         = '';
$message_type    = '';

if ( $is_pro ) {
	if ( isset( $_GET['delete'] ) && check_admin_referer( 'delete_rule_' . intval( $_GET['delete'] ) ) ) {
		$wpdb->delete( $wpdb->prefix . 'gtbogo_rules', array( 'id' => intval( $_GET['delete'] ) ), array( '%d' ) ); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery,WordPress.DB.DirectDatabaseQuery.NoCaching,WordPress.DB.DirectDatabaseQuery.SchemaChange
		delete_transient( 'gtbogo_active_rules' );
		delete_transient( 'gtbogo_active_rules_summary' );
		$message      = 'Rule deleted.';
		$message_type = 'success';
	}
	if ( isset( $_GET['toggle'] ) && check_admin_referer( 'toggle_rule_' . intval( $_GET['toggle'] ) ) ) {
		$rule = $wpdb->get_row( $wpdb->prepare( "SELECT id, status FROM {$wpdb->prefix}gtbogo_rules WHERE id = %d", intval( $_GET['toggle'] ) ) ); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery,WordPress.DB.DirectDatabaseQuery.NoCaching,WordPress.DB.DirectDatabaseQuery.SchemaChange
		if ( $rule ) {
			$new_status = $rule->status === 'active' ? 'inactive' : 'active';
			$wpdb->update( $wpdb->prefix . 'gtbogo_rules', array( 'status' => $new_status ), array( 'id' => $rule->id ), array( '%s' ), array( '%d' ) ); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery,WordPress.DB.DirectDatabaseQuery.NoCaching,WordPress.DB.DirectDatabaseQuery.SchemaChange
			$rule_id = $rule->id;
			if ( $new_status === 'active' ) {
				do_action( 'gtbogo_rule_activated', $rule_id );
			} else {
				do_action( 'gtbogo_rule_deactivated', $rule_id ); }
			delete_transient( 'gtbogo_active_rules' );
			delete_transient( 'gtbogo_active_rules_summary' );
			$message      = 'Rule ' . ( $new_status === 'active' ? 'activated' : 'deactivated' ) . '.';
			$message_type = 'success';
		}
	}
}

$table_exists = $wpdb->get_var( $wpdb->prepare( 'SHOW TABLES LIKE %s', $wpdb->prefix . 'gtbogo_rules' ) ); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery,WordPress.DB.DirectDatabaseQuery.NoCaching,WordPress.DB.DirectDatabaseQuery.SchemaChange
$rules        = $table_exists ? $wpdb->get_results( "SELECT * FROM {$wpdb->prefix}gtbogo_rules ORDER BY priority ASC, id DESC" ) : array(); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery,WordPress.DB.DirectDatabaseQuery.NoCaching,WordPress.DB.DirectDatabaseQuery.SchemaChange
$active_rules = array_filter( $rules, fn( $r ) => $r->status === 'active' );

$rules_fired_today = (int) get_option( 'gtbogo_rules_fired_today', 0 );

// ── Integrity check — detect tampered pack rules ──────────────────────────
$tampered_rules = array();
if ( ! empty( $rules ) ) {
	require_once GT_BOGO_ENGINE_PATH . 'includes/class-gt-bogo-pack-downloader.php';
	foreach ( $rules as $chk ) {
		if ( empty( $chk->rule_hash ) || empty( $chk->pack_source ) ) {
			continue;
		}
		$expected = GT_BOGO_Pack_Downloader::compute_rule_hash(
			array(
				'name'           => $chk->name,
				'type'           => $chk->type,
				'buy_quantity'   => $chk->buy_quantity,
				'get_quantity'   => $chk->get_quantity,
				'discount_type'  => $chk->discount_type,
				'discount_value' => $chk->discount_value,
			)
		);
		if ( ! hash_equals( $expected, $chk->rule_hash ) ) {
			$tampered_rules[] = esc_html( $chk->name );
			// Auto-deactivate tampered rule
			$wpdb->update( $wpdb->prefix . 'gtbogo_rules', array( 'status' => 'inactive' ), array( 'id' => $chk->id ), array( '%s' ), array( '%d' ) ); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery,WordPress.DB.DirectDatabaseQuery.NoCaching,WordPress.DB.DirectDatabaseQuery.SchemaChange
		}
	}
	// Reload rules if any were deactivated
	if ( ! empty( $tampered_rules ) ) {
		$rules        = $wpdb->get_results( "SELECT * FROM {$wpdb->prefix}gtbogo_rules ORDER BY priority ASC, id DESC" ); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery,WordPress.DB.DirectDatabaseQuery.NoCaching,WordPress.DB.DirectDatabaseQuery.SchemaChange
		$active_rules = array_filter( $rules, fn( $r ) => $r->status === 'active' );
	}
}
$revenue_from_rules = (float) get_option( 'gtbogo_revenue_from_rules', 0 );

$all_packs = array(
	array(
		'id'      => 'stack-master',
		'name'    => 'Stack Master',
		'icon'    => '📦',
		'price'   => '$79.99',
		'desc'    => 'Layer multiple BOGO rules simultaneously for powerful promotional stacking. Perfect for stores running complex multi-tier deals — buy 1 get 1, plus spend threshold, plus category discount all at once. Eliminates conflicts and maximises average order value.',
		'bullets' => array( 'Multi-tier rule stacking', 'Conflict-free execution', 'Priority-based rule ordering', 'Works with all WooCommerce product types' ),
		'btn'     => '9CMGVJDB6FYAN',
	),

	array(
		'id'      => 'cart-threshold',
		'name'    => 'Cart Threshold Boost',
		'icon'    => '🛒',
		'price'   => '$79.99',
		'desc'    => 'Unlock BOGO deals automatically when a shopper cart hits a dollar threshold. Drive average order value up by incentivising customers to add just one more item. Includes animated progress bars that show shoppers exactly how close they are.',
		'bullets' => array( 'Dollar-amount trigger rules', 'Animated "almost there" progress bar', 'Stackable with other pack rules', 'Configurable thresholds per category' ),
		'btn'     => 'FTFZJVH3XCABQ',
	),

	array(
		'id'      => 'flash-sale',
		'name'    => 'Flash Sale Engine',
		'icon'    => '⚡',
		'price'   => '$79.99',
		'desc'    => 'Launch time-limited BOGO campaigns that create genuine scarcity and urgency. Set start and end times, display live countdown clocks, and automatically deactivate deals when they expire — no manual cleanup required.',
		'bullets' => array( 'Scheduled start & end times', 'Live countdown display', 'Auto-deactivation on expiry', 'Email notification on deal launch' ),
		'btn'     => 'FR592Y6D8FBML',
	),

	array(
		'id'      => 'seasonal',
		'name'    => 'Seasonal Promotions',
		'icon'    => '🎄',
		'price'   => '$79.99',
		'desc'    => '12 pre-built, expert-crafted BOGO rule sets for every major retail moment — Christmas, Black Friday, Valentines Day, Back to School, and more. Import any seasonal pack in one click and go live instantly.',
		'bullets' => array( '12 seasonal rule templates', 'One-click activation per season', 'Recurring date-based scheduling', 'Pre-written promotional copy included' ),
		'btn'     => 'H6F4MX7NACP8E',
	),

	array(
		'id'      => 'inventory-clearance',
		'name'    => 'Inventory Clearance',
		'icon'    => '🏷️',
		'price'   => '$79.99',
		'desc'    => 'Move excess stock fast with intelligent inventory-based BOGO triggers. Automatically apply deals to products above your stock threshold and remove them once cleared — reducing dead inventory without manual intervention.',
		'bullets' => array( 'Stock-level triggered deals', 'Auto-disable on clearance', 'Bulk category clearance rules', 'Works with variable products' ),
		'btn'     => 'HPKXLRZQ5CPU2',
	),

	array(
		'id'      => 'slow-seller',
		'name'    => 'Slow Seller Recovery',
		'icon'    => '📉',
		'price'   => '$79.99',
		'desc'    => 'Identify and rescue underperforming products with targeted BOGO incentives. Sales-velocity rules automatically apply promotions to items that have not moved in a set period, then remove them once velocity recovers.',
		'bullets' => array( 'Sales-velocity detection', 'Automatic rule activation & retirement', 'Per-product and per-category targeting', 'Performance reporting per product' ),
		'btn'     => 'MKHLL5JCT9BXU',
	),

	array(
		'id'      => 'new-customer',
		'name'    => 'New Customer Acquisition',
		'icon'    => '🎯',
		'price'   => '$79.99',
		'desc'    => 'Convert first-time visitors into buyers with irresistible first-order BOGO deals. Rules apply exclusively to new customers and self-disable after first purchase — so loyal customers are not undervalued.',
		'bullets' => array( 'First-order-only BOGO rules', 'New vs returning customer detection', 'Coupon-free automatic application', 'A/B test first-order offers' ),
		'btn'     => 'QACS4M9B7H4MW',
	),

	array(
		'id'      => 'vip-loyalty',
		'name'    => 'VIP & Loyalty Rewards',
		'icon'    => '👑',
		'price'   => '$79.99',
		'desc'    => 'Reward your highest-value customers with exclusive BOGO tiers they cannot get anywhere else. Segment by lifetime spend, order count, or custom tags — and deliver personalised deals that build genuine loyalty.',
		'bullets' => array( 'Spend-tier based BOGO rules', 'Order-count segmentation', 'Custom customer tag targeting', 'Tiered reward escalation (Silver/Gold/VIP)' ),
		'btn'     => 'WEL53HVYRYWPC',
	),

	array(
		'id'      => 'free-gift',
		'name'    => 'Free Gift Engine',
		'icon'    => '🎁',
		'price'   => '$79.99',
		'desc'    => 'Add a free gift product to qualifying carts automatically — no coupon codes needed. Configure any product as a gift, set eligibility rules by cart value or product, and delight customers with a surprise add-to-cart moment.',
		'bullets' => array( 'Auto-add gift to cart', 'Any product can be the gift', 'Cart value & product eligibility rules', 'Gift swap options for customers' ),
		'btn'     => 'MVWE8ZP3QV55W',
	),

	array(
		'id'      => 'countdown-urgency',
		'name'    => 'Countdown Urgency',
		'icon'    => '⏱️',
		'price'   => '$79.99',
		'desc'    => 'Drive purchase urgency with FOMO-powered countdown timers embedded directly in product pages and the cart. Displays time remaining on any BOGO deal — real scarcity, not fake timers.',
		'bullets' => array( 'Product page countdown display', 'Cart countdown timer', 'Deal-expiry synced timers', 'Mobile-optimised display' ),
		'btn'     => 'VLVTBLVC6RLNG',
	),

	array(
		'id'      => 'visual-badge',
		'name'    => 'Visual Badge',
		'icon'    => '🏅',
		'price'   => '$79.99',
		'desc'    => 'Make BOGO deals impossible to miss with eye-catching product badges. Customise badge text, colour, position and style — overlay them on product images to drive click-through on deals across your shop and category pages.',
		'bullets' => array( 'Product image badge overlays', 'Customisable badge text & colours', 'Shop/category/product page display', 'Animated badge options' ),
		'btn'     => '238WE5NQTRLHL',
	),

	array(
		'id'      => 'savings-display',
		'name'    => 'Savings Display',
		'icon'    => '💰',
		'price'   => '$79.99',
		'desc'    => 'Show customers exactly how much they are saving in real time. Dynamic savings callouts on product pages, in the cart, and at checkout reinforce the value of your BOGO deal and reduce abandonment at the final step.',
		'bullets' => array( 'Real-time savings calculation', 'Product, cart & checkout display', 'Percentage and dollar-amount display', 'Animated savings reveal on add-to-cart' ),
		'btn'     => 'USUWDEV57EKUA',
	),

	array(
		'id'      => 'social-proof',
		'name'    => 'Social Proof',
		'icon'    => '📣',
		'price'   => '$79.99',
		'desc'    => 'Boost BOGO conversions with live social proof signals. Show real-time notifications of other shoppers claiming deals, recent purchases, and deal popularity counters — building trust and momentum during active promotions.',
		'bullets' => array( 'Live deal-claim notifications', 'Recent purchase popups', 'Deal popularity counters', 'Configurable display frequency & position' ),
		'btn'     => 'K6BH8Y2636K76',
	),

	array(
		'id'      => 'smart-upsell',
		'name'    => 'Smart Upsell',
		'icon'    => '🚀',
		'price'   => '$79.99',
		'desc'    => 'Intelligently cross-sell and upsell using BOGO incentives as the hook. Suggests complementary products that complete a deal, increasing both AOV and units per transaction — all powered by product relationship rules.',
		'bullets' => array( 'BOGO-triggered upsell suggestions', 'Cross-sell by category or tag', 'Cart drawer upsell display', 'Revenue attribution per upsell rule' ),
		'btn'     => 'KBTM4TGUH6TXC',
	),

	array(
		'id'      => 'quick-deal',
		'name'    => 'Quick Deal',
		'icon'    => '💥',
		'price'   => '$79.99',
		'desc'    => 'One-click deal activation for store owners who need to launch a flash promotion immediately. Pre-configure deal parameters and deploy in seconds — no rule builder required. Perfect for responsive, time-sensitive campaigns.',
		'bullets' => array( 'One-click deal launch', 'Pre-saved deal configurations', 'Instant activation & deactivation', 'Deal history log' ),
		'btn'     => '9MYEG9M2D2434',
	),
);

$bundles = array(
	array(
		'id'      => 'GTBOGO-BUNDLE-STARTER',
		'name'    => 'Starter Revenue Bundle',
		'emoji'   => '⚡',
		'price'   => '$299',
		'packs'   => 5,
		'btn'     => 'SGQSQAYVDQX3J',
		'desc'    => 'Everything you need to start generating more revenue from day one. Includes the 5 highest-impact packs chosen by our team for immediate ROI — Cart Threshold Boost, Flash Sale Engine, Free Gift Engine, Visual Badge, and Savings Display.',
		'bullets' => array( '5 highest-impact packs', 'Immediate ROI focus', 'Perfect for new stores', 'Cart value optimisation' ),
	),

	array(
		'id'      => 'GTBOGO-BUNDLE-GROWTH',
		'name'    => 'Growth Acceleration Bundle',
		'emoji'   => '🚀',
		'price'   => '$299',
		'packs'   => 9,
		'btn'     => '9XQTGVAHUD7XJ',
		'desc'    => 'Built for serious stores ready to scale. 9 expert packs covering every growth lever — urgency, loyalty, social proof, upselling, and inventory optimisation. The complete toolkit for stores doing $10K+/month looking to push further.',
		'bullets' => array( '9 growth-focused packs', 'Urgency + loyalty + social proof', 'Upsell & inventory tools', 'Ideal for scaling stores' ),
	),

	array(
		'id'      => 'GTBOGO-BUNDLE-COMPLETE',
		'name'    => 'Complete BOGO Arsenal',
		'emoji'   => '🏆',
		'price'   => '$799',
		'packs'   => 15,
		'btn'     => 'C8ZS69WB9YYFQ',
		'desc'    => 'All 15 PRO packs. Every strategy, every deal type, every growth mechanism — nothing held back. The definitive BOGO toolkit for enterprise stores and agencies managing multiple clients. Best value by far at less than $20 per pack.',
		'bullets' => array( 'All 15 packs included', 'Every deal type covered', 'Agency & multi-site ready', 'Best value — under $20/pack' ),
	),
);

$owned_count = count( class_exists( 'GT_BOGO_Pack_Downloader' ) ? GT_BOGO_Pack_Downloader::get_owned_pack_ids() : array() );

$templates = array(
	array(
		'name'  => 'Buy 1 Get 1 Free',
		'type'  => 'bogo',
		'buy'   => 1,
		'get'   => 1,
		'dtype' => 'percentage',
		'dval'  => 100,
		'icon'  => '🎁',
		'desc'  => 'Classic BOGO',
	),
	array(
		'name'  => 'Buy 2 Get 1 at 50% Off',
		'type'  => 'bogo',
		'buy'   => 2,
		'get'   => 1,
		'dtype' => 'percentage',
		'dval'  => 50,
		'icon'  => '⚡',
		'desc'  => 'Buy two get third half price',
	),
	array(
		'name'  => 'Buy 3 Get 1 Free',
		'type'  => 'bogo',
		'buy'   => 3,
		'get'   => 1,
		'dtype' => 'percentage',
		'dval'  => 100,
		'icon'  => '📦',
		'desc'  => 'Buy three get fourth free',
	),
	array(
		'name'  => 'Spend $50 Get 20% Off',
		'type'  => 'cart_threshold',
		'buy'   => 1,
		'get'   => 1,
		'dtype' => 'percentage',
		'dval'  => 20,
		'icon'  => '🛒',
		'desc'  => 'Cart threshold AOV boost',
	),
	array(
		'name'  => 'Free Gift on Any Order',
		'type'  => 'free_gift',
		'buy'   => 1,
		'get'   => 1,
		'dtype' => 'percentage',
		'dval'  => 100,
		'icon'  => '🎀',
		'desc'  => 'Free gift every qualifying cart',
	),
	array(
		'name'  => 'Buy 2 Get 2 Free',
		'type'  => 'bogo',
		'buy'   => 2,
		'get'   => 2,
		'dtype' => 'percentage',
		'dval'  => 100,
		'icon'  => '🏷️',
		'desc'  => 'Double BOGO clearance',
	),
	array(
		'name'  => '10% Off Everything',
		'type'  => 'bogo',
		'buy'   => 1,
		'get'   => 1,
		'dtype' => 'percentage',
		'dval'  => 10,
		'icon'  => '💸',
		'desc'  => 'Simple sitewide discount',
	),
	array(
		'name'  => 'VIP Buy 1 Get 1 30% Off',
		'type'  => 'bogo',
		'buy'   => 1,
		'get'   => 1,
		'dtype' => 'percentage',
		'dval'  => 30,
		'icon'  => '👑',
		'desc'  => 'Loyalty reward for returning customers',
	),
);

require_once __DIR__ . '/../ui-system/wrapper-start.php';
?>

<!-- ── PAGE HEADER ─────────────────────────────────────── -->
<div class="gt-page-header gt-animate-in">
	<div>
		<h1 class="gt-page-title">⚡ PRO Rules / Packs</h1>
		<p class="gt-page-subtitle">Purchase expert-built rule packs, manage your stack, and unlock every BOGO strategy</p>
	</div>
</div>

<?php if ( $message ) : ?>
<div class="gt-notice gt-notice-<?php echo esc_attr( $message_type ); ?> gt-animate-in"><?php echo esc_html( $message ); ?></div>
<?php endif; ?>

<!-- ── FREE PLAN VALUE BANNER (always visible) ─────────── -->
<?php if ( ! $is_pro ) : ?>
<div class="gt-card gt-animate-in" style="margin-bottom:24px;border:1px solid rgba(34,197,94,0.3);background:linear-gradient(135deg,rgba(34,197,94,0.05) 0%,var(--gt-navy-mid) 100%)">
	<div style="padding:28px 32px">
		<div style="display:flex;align-items:flex-start;justify-content:space-between;gap:24px;flex-wrap:wrap">
			<div style="flex:1;min-width:280px">
				<div style="display:flex;align-items:center;gap:10px;margin-bottom:12px">
					<span style="font-size:24px">🎁</span>
					<h2 style="font-size:20px;font-weight:800;color:#ffffff;margin:0">You Have Free Plan — Here Is What You Get</h2>
				</div>
				<p style="font-size:14px;color:#94a3b8;line-height:1.65;margin:0 0 20px">GT BOGO Engine Free gives you real, working BOGO functionality right now — no PRO required. Set up your first Buy X Get Y deal in minutes.</p>
				<div style="display:grid;grid-template-columns:repeat(2,1fr);gap:10px;margin-bottom:24px">
					<?php
					$free_features = array(
						array( '✅', 'Free Core Rule', '1 active Buy X Get Y deal — live on your store right now' ),
						array( '✅', 'Product Badges', 'BOGO badge overlays on eligible products — FREE' ),
						array( '✅', 'Cart Progress Bar', 'Show customers how close they are to a deal — FREE' ),
						array( '✅', 'Analytics Dashboard', 'Track revenue, orders and discount performance' ),
						array( '✅', 'Import / Export', 'Back up and restore your rule configuration' ),
						array( '✅', 'WooCommerce Native', 'Zero conflicts — works with any theme or cart plugin' ),
					);
					foreach ( $free_features as $f ) :
						?>
					<div style="display:flex;align-items:flex-start;gap:10px;background:rgba(255,255,255,0.03);border:1px solid rgba(255,255,255,0.06);border-radius:10px;padding:12px 14px">
						<span style="font-size:16px;flex-shrink:0;margin-top:1px"><?php echo esc_html( $f[0] ); ?></span>
						<div>
							<div style="font-size:13px;font-weight:700;color:#ffffff;margin-bottom:3px"><?php echo esc_html( $f[1] ); ?></div>
							<div style="font-size:13px;color:#64748b;line-height:1.4"><?php echo esc_html( $f[2] ); ?></div>
						</div>
					</div>
					<?php endforeach; ?>
				</div>
				<a href="<?php echo esc_url( admin_url( 'admin.php?page=gt-bogo-engine&tab=free-rule' ) ); ?>" class="gt-btn gt-btn-secondary" style="margin-right:10px">⚙️ Configure Free Rule →</a>
			</div>
			<div style="flex:0 0 280px;background:rgba(225,0,0,0.06);border:1px solid rgba(225,0,0,0.25);border-radius:14px;padding:24px;text-align:center">
				<div style="font-size:13px;font-weight:700;color:#ff6666;letter-spacing:1px;text-transform:uppercase;margin-bottom:8px">🔒 Unlock PRO</div>
				<div style="font-size:36px;font-weight:900;color:#ffffff;margin-bottom:4px">$499<span style="font-size:16px;font-weight:400;color:#64748b">/yr</span></div>
				<p style="font-size:13px;color:#94a3b8;line-height:1.5;margin:0 0 16px">Unlimited rules · All 15 packs · Every enterprise feature</p>
				<div style="margin-bottom:8px" id="paypal-container-5KWJ8DPK67RDE"></div>
				<a href="<?php echo esc_url( admin_url( 'admin.php?page=gt-bogo-engine&tab=license' ) ); ?>" style="font-size:13px;color:#64748b;text-decoration:underline;display:block;margin-top:8px">Already purchased? Activate your license →</a>
			</div>
		</div>
	</div>
</div>
<?php endif; ?>

<!-- ── PRO STATS BAR (PRO only) ─────────────────────────── -->
<?php if ( $is_pro ) : ?>
<div class="gt-metrics gt-animate-in" style="margin-bottom:24px">
	<div class="gt-metric" style="--gt-metric-c:var(--gt-red)">
		<span class="gt-metric-icon">⚡</span>
		<div class="gt-metric-label">Active Rules</div>
		<div class="gt-metric-value"><?php echo esc_html( count( $active_rules ) ); ?>/200</div>
		<div class="gt-metric-trend"><?php echo esc_html( count( $rules ) ); ?> total created</div>
	</div>
	<div class="gt-metric" style="--gt-metric-c:#3b82f6">
		<span class="gt-metric-icon">🔥</span>
		<div class="gt-metric-label">Rules Fired Today</div>
		<div class="gt-metric-value"><?php echo esc_html( (string) $rules_fired_today ); ?></div>
		<div class="gt-metric-trend">cart evaluations</div>
	</div>
	<div class="gt-metric" style="--gt-metric-c:#22c55e">
		<span class="gt-metric-icon">💰</span>
		<div class="gt-metric-label">Revenue Influenced</div>
		<div class="gt-metric-value">$<?php echo esc_html( number_format( $revenue_from_rules, 0 ) ); ?></div>
		<div class="gt-metric-trend">from BOGO rules</div>
	</div>
	<div class="gt-metric" style="--gt-metric-c:#f59e0b">
		<span class="gt-metric-icon">💎</span>
		<div class="gt-metric-label">Packs Owned</div>
		<div class="gt-metric-value"><?php echo esc_html( $owned_count ); ?>/200</div>
		<div class="gt-metric-trend">PRO packs installed</div>
	</div>
</div>

<!-- ── PACK ACTIVATION (PRO only) ─────────────────────── -->
	<?php if ( $is_pro ) : ?>
<div class="gt-card gt-animate-in" style="margin-bottom:24px;border-color:rgba(225,0,0,0.2)">
	<div class="gt-card-header" style="padding:20px 24px 0;border-bottom:none">
		<h2 class="gt-card-title">🔑 Activate a Key</h2>
		<span style="font-size:13px;color:var(--gt-subtle)">Enter your PRO license key, pack key, or bundle key from your purchase email</span>
	</div>
	<div style="display:grid;grid-template-columns:1fr 1fr;gap:0;padding:0">

		<!-- Left: Pack Key Entry -->
		<div style="padding:20px 24px;border-right:1px solid var(--gt-border)">
			<div style="font-size:13px;font-weight:700;color:var(--gt-subtle);text-transform:uppercase;letter-spacing:.07em;margin-bottom:10px">License / Pack / Bundle Key</div>
			<p style="font-size:13px;color:var(--gt-subtle);margin:0 0 14px;line-height:1.6">Your purchase email contains one of these key formats:<br>
			<code style="background:rgba(255,255,255,0.06);padding:2px 6px;border-radius:4px;font-size:12px">GTBOGO-XXXX-XXXX-XXXX-XXXX</code> &nbsp;PRO License&nbsp;&nbsp;
			<code style="background:rgba(255,255,255,0.06);padding:2px 6px;border-radius:4px;font-size:12px">PACK-XXXXXXXXXXXX</code> &nbsp;Pro Pack&nbsp;&nbsp;
			<code style="background:rgba(255,255,255,0.06);padding:2px 6px;border-radius:4px;font-size:12px">GTBOGO-BUNDLE-XXXXXXXXXXXXXXXX</code> &nbsp;Bundle</p>
			<div style="display:flex;gap:10px;align-items:flex-start;flex-wrap:wrap">
				<input type="text" id="gt-pack-key-input"
					placeholder="GTBOGO-XXXX-XXXX or PACK-XXXXXXXXXXXX or GTBOGO-BUNDLE-XXXXXXXX"
					style="flex:1;min-width:220px;font-family:monospace;font-size:13px;letter-spacing:.05em;text-transform:uppercase"
					class="gt-input">
				<button id="gt-activate-pack-key-btn" class="gt-btn gt-btn-primary" style="white-space:nowrap;flex-shrink:0">
					Activate
				</button>
			</div>
			<div id="gt-pack-key-result" style="margin-top:10px;display:none"></div>
		</div>



	</div>
</div>

<script>
function gtbogoRenderPackKeyConflicts(conflicts, packKey, btn, input, result, showResult) {
	var existing = document.getElementById('gtbogo-conflict-modal');
	if (existing) existing.remove();
	document.body.insertAdjacentHTML('beforeend',
		'<div id="gtbogo-conflict-modal" style="display:flex;position:fixed;inset:0;z-index:999999;background:rgba(0,0,0,0.75);align-items:center;justify-content:center">' +
		'<div style="background:#0c1426;border:1px solid #1e293b;border-radius:12px;max-width:660px;width:92%;max-height:85vh;overflow-y:auto;padding:32px;position:relative">' +
		'<button onclick="document.getElementById('gtbogo-conflict-modal').remove()" style="position:absolute;top:16px;right:20px;background:none;border:none;color:#64748b;font-size:22px;cursor:pointer">&times;</button>' +
		'<div id="gtbogo-conflict-body"></div>' +
		'</div></div>'
	);
	var high = conflicts.filter(function(c){ return c.severity === 'high'; });
	var html = '<h2 style="color:#f1f5f9;margin:0 0 8px;font-size:18px">' + (high.length > 0 ? '🚨' : '⚠️') + ' Conflicts Detected — Pack Not Imported Yet</h2>';
	html += '<p style="color:#94a3b8;font-size:13px;line-height:1.6;margin:0 0 20px">The pack has <strong style="color:#f1f5f9">not been imported</strong>. Review each conflict then decide how to proceed.</p>';
	conflicts.forEach(function(c) {
		var color  = c.severity === 'high' ? '#f87171' : '#fcd34d';
		var bg     = c.severity === 'high' ? 'rgba(220,38,38,0.06)' : 'rgba(245,158,11,0.06)';
		var border = c.severity === 'high' ? 'rgba(220,38,38,0.25)' : 'rgba(245,158,11,0.25)';
		var label  = c.severity === 'high' ? '🚨 HIGH — Priority Clash' : '⚠️ MEDIUM — Discount Rate Conflict';
		html += '<div style="background:' + bg + ';border:1px solid ' + border + ';border-radius:8px;padding:16px;margin-bottom:12px">';
		html += '<p style="color:' + color + ';font-size:13px;font-weight:700;text-transform:uppercase;letter-spacing:.7px;margin:0 0 8px">' + label + '</p>';
		html += '<div style="display:grid;grid-template-columns:1fr auto 1fr;gap:10px;align-items:center;margin-bottom:10px">';
		html += '<div style="padding:10px;background:rgba(255,255,255,0.03);border:1px solid #1e293b;border-radius:6px"><p style="margin:0 0 2px;font-size:13px;color:#64748b">INCOMING RULE</p><p style="margin:0;font-size:13px;font-weight:700;color:#f1f5f9">' + c.incoming + '</p></div>';
		html += '<span style="color:' + color + ';font-size:16px;text-align:center">⚔️</span>';
		html += '<div style="padding:10px;background:rgba(255,255,255,0.03);border:1px solid #1e293b;border-radius:6px"><p style="margin:0 0 2px;font-size:13px;color:#64748b">EXISTING RULE</p><p style="margin:0;font-size:13px;font-weight:700;color:#f1f5f9">' + c.existing + '</p><p style="margin:2px 0 0;font-size:13px;color:#64748b">' + (c.existing_pack || '') + '</p></div>';
		html += '</div>';
		html += '<p style="color:#94a3b8;font-size:13px;line-height:1.65;margin:0 0 6px">' + c.detail + '</p>';
		html += '<p style="color:#64748b;font-size:13px;margin:0"><strong style="color:#94a3b8">Resolution:</strong> ' + c.resolution + '</p>';
		html += '</div>';
	});
	html += '<div style="display:flex;gap:10px;margin-top:24px;flex-wrap:wrap;align-items:center">';
		<?php $conflict_url = esc_js( admin_url( 'admin.php?page=gt-bogo-engine&tab=conflicts' ) ); ?>
	var conflictUrl = '<?php echo esc_html( $conflict_url ); ?>';
	if (high.length === 0) {
		html += '<button id="gtbcf-proceed" style="background:rgba(34,197,94,0.15);border:1px solid rgba(34,197,94,0.3);color:#4ade80;padding:10px 22px;border-radius:6px;cursor:pointer;font-weight:700;font-size:13px">Import Anyway</button>';
	} else {
		html += '<button id="gtbcf-force" style="background:rgba(220,38,38,0.1);border:1px solid rgba(220,38,38,0.3);color:#f87171;padding:10px 22px;border-radius:6px;cursor:pointer;font-weight:600;font-size:13px">Force Import Despite Conflicts</button>';
		html += '<a href="' + conflictUrl + '" style="display:inline-block;background:rgba(245,158,11,0.1);border:1px solid rgba(245,158,11,0.3);color:#fcd34d;padding:10px 22px;border-radius:6px;text-decoration:none;font-weight:700;font-size:13px">Resolve Conflicts First →</a>';
	}
	html += '<button onclick="document.getElementById('gtbogo-conflict-modal').remove()" style="background:transparent;border:1px solid #1e293b;color:#64748b;padding:10px 22px;border-radius:6px;cursor:pointer;font-size:13px">Cancel</button>';
	html += '</div>';
	document.getElementById('gtbogo-conflict-body').innerHTML = html;
	['gtbcf-proceed','gtbcf-force'].forEach(function(id) {
		var el = document.getElementById(id);
		if (!el) return;
		el.addEventListener('click', function(){
			document.getElementById('gtbogo-conflict-modal').remove();
			var fd2 = new FormData();
			fd2.append('action',       'gtbogo_activate_pack_key');
			fd2.append('nonce',        '<?php echo esc_js( wp_create_nonce( 'gtbogo_activate_pack_key' ) ); ?>');
			fd2.append('pack_key',     packKey);
			fd2.append('force_import', '1');
			if (btn) { btn.disabled = true; btn.textContent = 'Importing…'; }
			fetch(ajaxurl, { method: 'POST', body: fd2 })
				.then(function(r){ return r.json(); })
				.then(function(d2){
					if (btn) { btn.disabled = false; btn.textContent = 'Activate'; }
					if (d2.success) {
						var extra = (d2.data.conflicts && d2.data.conflicts.length) ? ' (' + d2.data.conflicts.length + ' conflict(s) — review in Conflict Resolver before activating)' : '';
						showResult('success', d2.data.message + extra);
						if (input) input.value = '';
						setTimeout(function(){ location.reload(); }, 2800);
					} else {
						showResult('error', d2.data ? d2.data.message : 'Import failed.');
					}
				})
				.catch(function(){
					if (btn) { btn.disabled = false; btn.textContent = 'Activate'; }
					showResult('error', 'Request failed. Please try again.');
				});
		});
	});
}
</script>
<script>
(function() {
	var btn   = document.getElementById('gt-activate-pack-key-btn');
	var input = document.getElementById('gt-pack-key-input');
	var result = document.getElementById('gt-pack-key-result');
	if (!btn) return;

	// Auto-uppercase as user types
	input.addEventListener('input', function() {
		var pos = this.selectionStart;
		this.value = this.value.toUpperCase();
		this.setSelectionRange(pos, pos);
	});

	btn.addEventListener('click', function() {
		var packKey = input.value.trim().toUpperCase();
		if (!packKey) {
			showResult('error', 'Please enter your pack key.');
			return;
		}
		// Determine key type and route accordingly
		var isProLicense = packKey.match(/^GTBOGO-[A-F0-9]{4}-[A-F0-9]{4}-[A-F0-9]{4}-[A-F0-9]{4}$/i)
						|| (packKey.startsWith('GTBOGO-') && !packKey.startsWith('GTBOGO-BUNDLE-') && !packKey.startsWith('GTBOGO-PACK-'));
		var isBundle     = packKey.startsWith('GTBOGO-BUNDLE-');
		var isPack       = packKey.match(/^(GTBOGO-)?PACK-[A-F0-9]{10,}/i);

		if (!isProLicense && !isBundle && !isPack) {
			showResult('error', 'Invalid key format. Check your purchase email for a GTBOGO-, PACK-, or GTBOGO-BUNDLE- key.');
			return;
		}
		btn.disabled = true;
		btn.textContent = 'Activating…';
		result.style.display = 'none';

		// Route by key type — all handled directly here
		var ajaxAction = isProLicense ? 'gtbogo_verify_license'
						: isBundle     ? 'gtbogo_activate_bundle_key'
						:                'gtbogo_activate_pack_key';
		var fd = new FormData();
		fd.append('action', ajaxAction);
		fd.append('nonce',  isProLicense
			? '<?php echo esc_js( wp_create_nonce( 'gtbogo_license_nonce' ) ); ?>'
			: '<?php echo esc_js( wp_create_nonce( 'gtbogo_activate_pack_key' ) ); ?>');
		if (isProLicense) {
			fd.append('license_key', packKey);
			fd.append('site', '<?php echo esc_js( home_url() ); ?>');
		} else {
			fd.append('pack_key', packKey);
		}

		fetch(ajaxurl, { method: 'POST', body: fd })
			.then(function(r){ return r.json(); })
			.then(function(d) {
				btn.disabled = false; btn.textContent = 'Activate';
				if (!d.success) {
					// Blocked by high conflicts — show conflict modal
					if (d.data && d.data.blocked && d.data.conflicts && d.data.conflicts.length > 0) {
						// Store pack_key for force-import
						window._gtbogoPendingPackKey = packKey;
						gtbogoRenderPackKeyConflicts(d.data.conflicts, packKey, btn, input, result, showResult);
						return;
					}
					showResult('error', d.data ? d.data.message : 'Activation failed. Please try again.');
					return;
				}
				// Success — check for medium conflicts to warn about
				if (d.data && d.data.conflicts && d.data.conflicts.length > 0) {
					showResult('success', d.data.message + ' Note: ' + d.data.conflicts.length + ' conflict(s) detected — review in the <a href="<?php echo esc_js( admin_url( 'admin.php?page=gt-bogo-engine&tab=conflicts' ) ); ?>" style="color:#fcd34d">Conflict Resolver</a> before activating rules.');
				} else {
					showResult('success', d.data.message);
				}
				input.value = '';
				setTimeout(function(){ location.reload(); }, 3000);
			})
			.catch(function() { btn.disabled = false; btn.textContent = 'Activate'; showResult('error', 'Request failed. Please check your connection.'); });
	});

	function showResult(type, msg) {
		var icon = type === 'success' ? '&#10003;' : '&#10007;';
		result.style.display = 'block';
		result.innerHTML = '<div class="gt-notice gt-notice-' + type + '">' + icon + ' ' + msg + '</div>';
	}
})();
</script>
	<?php endif; ?>

<!-- ── RULE STACK TABLE (PRO only) ──────────────────────── -->
<div class="gt-card gt-animate-in" style="margin-bottom:24px">
	<div class="gt-card-header">
		<h2 class="gt-card-title">📋 Your Rule Stack</h2>
		<span class="gt-text-soft" style="font-size:13px"><?php echo esc_html( count( $rules ) ); ?> rule<?php echo count( $rules ) !== 1 ? 's' : ''; ?> · <?php echo esc_html( count( $active_rules ) ); ?>/200 active</span>
	</div>
	<?php $pct = min( 100, round( ( count( $active_rules ) / 200 ) * 100 ) ); ?>
	<div style="margin-bottom:16px">
		<div style="display:flex;justify-content:space-between;margin-bottom:6px">
			<span class="gt-text-soft gt-text-xs">Rule stack usage</span>
			<span class="gt-text-soft gt-text-xs"><?php echo esc_html( count( $active_rules ) ); ?>/200 slots</span>
		</div>
		<div style="background:rgba(255,255,255,0.06);border-radius:50px;height:6px;overflow:hidden">
			<div style="height:100%;width:<?php echo esc_html( $pct ); ?>%;background:var(--gt-red);border-radius:50px;transition:width 0.6s"></div>
		</div>
	</div>
	<?php if ( ! empty( $tampered_rules ) ) : ?>
<div class="gt-notice" style="background:rgba(220,38,38,0.12);border:1px solid rgba(220,38,38,0.35);color:#f87171;border-radius:8px;padding:14px 20px;margin-bottom:20px;display:flex;align-items:flex-start;gap:12px">
	<span style="font-size:20px;line-height:1">🔒</span>
	<div>
		<strong style="display:block;margin-bottom:4px">Integrity violation detected</strong>
		<span style="font-size:13px">The following pack rules have been modified outside the plugin and have been automatically deactivated: <strong><?php echo esc_html( implode( ', ', $tampered_rules ) ); ?></strong>. Re-import the pack from My Packs to restore them.</span>
	</div>
</div>
<?php endif; ?>
	<?php if ( $rules ) : ?>
	<div style="overflow-x:auto">
		<style>
.gtbogo-toggle{display:inline-flex;align-items:center;width:40px;height:22px;background:rgba(255,255,255,0.1);border:1px solid rgba(255,255,255,0.2);border-radius:50px;cursor:pointer;transition:background .2s,border-color .2s;flex-shrink:0;position:relative}
.gtbogo-toggle-on{background:rgba(34,197,94,0.05);border-color:rgba(34,197,94,0.5)}
.gtbogo-toggle-knob{width:16px;height:16px;border-radius:50%;background:#64748b;position:absolute;left:2px;transition:left .2s,background .2s}
.gtbogo-toggle-on .gtbogo-toggle-knob{left:20px;background:#22c55e}
.gtbogo-toggle:hover{border-color:rgba(255,255,255,0.4)}
</style>
<table class="gt-table">
			<thead><tr><th>Name</th><th>Type</th><th>Buy / Get</th><th>Discount</th><th>Priority</th><th>Status</th><th>Actions</th></tr></thead>
			<tbody>
				<?php
				$priorities = array_column( $rules, 'priority' );
				$dupes      = array_filter( array_count_values( $priorities ), fn( $c ) => $c > 1 );
				foreach ( $rules as $rule ) :
					?>
				<tr>
					<td><strong style="color:var(--gt-white)"><?php echo esc_html( $rule->name ); ?></strong></td>
					<td><span style="background:rgba(59,130,246,0.1);border:1px solid rgba(59,130,246,0.2);color:#93c5fd;padding:2px 8px;border-radius:50px;font-size:13px;font-weight:700"><?php echo esc_html( str_replace( '_', ' ', ucfirst( $rule->type ) ) ); ?></span></td>
					<td style="color:var(--gt-white);font-family:'DM Mono',monospace"><?php echo intval( $rule->buy_quantity ); ?> → <?php echo intval( $rule->get_quantity ); ?></td>
					<td style="color:var(--gt-white);font-weight:700">
							<?php echo $rule->discount_type === 'percentage' ? esc_html( floatval( $rule->discount_value ) . '%' ) : '$' . esc_html( number_format( floatval( $rule->discount_value ), 2 ) ); ?>
						<span style="color:var(--gt-subtle);font-size:13px;font-weight:400"> off</span>
					</td>
					<td>
					<?php
					$p        = intval( $rule->priority );
					$conflict = isset( $dupes[ $p ] );
					?>
						<span style="color:<?php echo esc_html( $conflict ) ? 'var(--gt-yellow)' : 'var(--gt-soft)'; ?>;font-family:'DM Mono',monospace"><?php echo esc_html( $p ); ?><?php echo esc_html( $conflict ) ? ' ⚠' : ''; ?></span>
					</td>
					<td><span class="gt-badge <?php echo esc_attr( $rule->status === 'active' ? 'gt-badge-active' : 'gt-badge-free' ); ?>"><?php echo esc_html( $rule->status === 'active' ? '● Active' : '○ Paused' ); ?></span></td>
					<td>
						<div class="gt-flex" style="gap:10px;align-items:center">
							<a href="<?php echo esc_url( wp_nonce_url( admin_url( 'admin.php?page=gt-bogo-engine&tab=pro-rules&toggle=' . $rule->id ), 'toggle_rule_' . $rule->id ) ); ?>"
								title="<?php echo esc_attr( $rule->status === 'active' ? 'Deactivate' : 'Activate' ); ?>" style="text-decoration:none;display:inline-flex">
								<span class="gtbogo-toggle <?php echo esc_attr( $rule->status === 'active' ? 'gtbogo-toggle-on' : '' ); ?>">
									<span class="gtbogo-toggle-knob"></span>
								</span>
							</a>
								<?php if ( empty( $rule->pack_source ) ) : ?>
							<?php endif; ?>
							<a href="<?php echo esc_url( wp_nonce_url( admin_url( 'admin.php?page=gt-bogo-engine&tab=pro-rules&delete=' . $rule->id ), 'delete_rule_' . $rule->id ) ); ?>"
								class="gt-btn gt-btn-xs" style="background:rgba(220,38,38,0.1);color:#f87171;border:1px solid rgba(220,38,38,0.25);font-size:13px;padding:3px 8px"
								onclick="return confirm('Remove from Pro Rules? The pack stays in My Packs and can be re-imported.')">Remove</a>
						</div>
					</td>
				</tr>
				<?php endforeach; ?>
			</tbody>
		</table>
	</div>
		<?php else : ?>
	<div style="text-align:center;padding:48px 24px">
		<div style="font-size:48px;margin-bottom:16px">📋</div>
		<h3 style="color:var(--gt-white);margin:0 0 8px">No Rules Yet</h3>
		<p class="gt-text-soft" style="font-size:13px" style="margin-bottom:24px">Purchase a PRO Pack below to get started, or create a custom rule from scratch.</p>
	</div>
	<?php endif; ?>
</div>
<?php endif; ?>

<div class="gt-card gt-animate-in" style="border:1px solid rgba(225,0,0,0.3)">
	<div class="gt-card-header" style="border-bottom:1px solid var(--gt-border);padding-bottom:20px">
		<div>
			<h2 class="gt-card-title">GT BOGO Engine PRO &mdash; 1 Year License</h2>
			<p style="color:var(--gt-subtle);font-size:13px;margin:4px 0 0">Required to activate any Pro Pack. Unlock every enterprise feature, all 200 packs, and priority support.</p>
		</div>
		<span class="gt-badge" style="background:var(--gt-red);color:var(--gt-white);flex-shrink:0">REQUIRED FOR PACKS</span>
	</div>
	<div class="gt-card-body" style="padding:0">
		<div style="padding:32px">
			<div style="display:grid;grid-template-columns:1fr 320px;gap:40px;align-items:start">
				<!-- Left: features -->
				<div>
					<h3 style="font-size:20px;font-weight:800;color:var(--gt-white);margin:0 0 10px">Everything you need to run a world-class promotions engine</h3>
					<p style="font-size:14px;color:var(--gt-subtle);line-height:1.65;margin:0 0 24px">GT BOGO Engine PRO gives you 200 expert-built rule packs across 19 industries — each pack adds 10 precision rules instantly. Plus 50 intelligence superpowers and a complete customer intelligence platform, all running on autopilot from the moment you activate.</p>
					<div style="display:grid;grid-template-columns:repeat(2,1fr);gap:10px;margin-bottom:24px">
						<?php
						foreach ( array(
							array( '🔓', 'Unlimited PRO Rules', 'No cap on active rules — run as many deals as your store needs' ),
							array( '📦', '200 Expert Rule Packs', '20 packs across 19 industries, 10 rules each — import in one click' ),
							array( '⚡', '25 Conversion Superpowers', 'Cart progress bars, countdown timers, savings display and more' ),
							array( '🧠', 'Customer Intelligence', 'Full lifecycle tracking, VIP detection, streak rewards, RFM scoring' ),
							array( '📧', 'Automated Email System', '23 deal-triggered email types with 8 dark themes and store branding' ),
							array( '🌍', 'Geo Targeting', 'Show different deals based on customer location — 195 countries' ),
							array( '🔄', 'A/B Testing Engine', 'Split-test any rule variation — automatic winner detection' ),
							array( '🛡️', 'Priority Support', 'Dedicated support channel with 24-hour response guarantee' ),
						) as $feat ) :
							?>
						<div style="display:flex;align-items:flex-start;gap:10px;background:rgba(225,0,0,0.04);border:1px solid rgba(225,0,0,0.12);border-radius:10px;padding:12px 14px">
							<span style="font-size:18px;flex-shrink:0;margin-top:1px"><?php echo esc_html( $feat[0] ); ?></span>
							<div>
								<div style="font-size:13px;font-weight:700;color:#ffffff;margin-bottom:3px"><?php echo esc_html( $feat[1] ); ?></div>
								<div style="font-size:12px;color:#64748b;line-height:1.4"><?php echo esc_html( $feat[2] ); ?></div>
							</div>
						</div>
						<?php endforeach; ?>
					</div>
					<div style="display:flex;align-items:center;gap:16px;flex-wrap:wrap">
						<div style="display:flex;align-items:center;gap:8px">
							<span style="font-size:12px;color:#22c55e;font-weight:700">✓</span>
							<span style="font-size:13px;color:var(--gt-subtle)">Zero coupon codes required</span>
						</div>
						<div style="display:flex;align-items:center;gap:8px">
							<span style="font-size:12px;color:#22c55e;font-weight:700">✓</span>
							<span style="font-size:13px;color:var(--gt-subtle)">Works on any WooCommerce theme</span>
						</div>
						<div style="display:flex;align-items:center;gap:8px">
							<span style="font-size:12px;color:#22c55e;font-weight:700">✓</span>
							<span style="font-size:13px;color:var(--gt-subtle)">Instant activation — no setup required</span>
						</div>
						<div style="display:flex;align-items:center;gap:8px">
							<span style="font-size:12px;color:#22c55e;font-weight:700">✓</span>
							<span style="font-size:13px;color:var(--gt-subtle)">Cancel or renew anytime</span>
						</div>
					</div>
				</div>
				<!-- Right: price + PayPal -->
				<div style="background:rgba(225,0,0,0.06);border:1px solid rgba(225,0,0,0.25);border-radius:14px;padding:28px;text-align:center;position:sticky;top:32px">
					<div style="font-size:12px;font-weight:800;color:#ff6666;letter-spacing:1.5px;text-transform:uppercase;margin-bottom:12px">⚡ PRO LICENSE</div>
					<div style="margin-bottom:6px">
						<img src="<?php echo esc_url( plugin_dir_url( GT_BOGO_ENGINE_FILE ) . 'assets/images/icon-256x256.png' ); ?>" width="80" height="80" style="border-radius:12px;display:block;margin:0 auto 16px" alt="GT BOGO Engine PRO">
					</div>
					<div style="font-size:42px;font-weight:900;color:#ffffff;line-height:1;margin-bottom:4px">$499</div>
					<div style="font-size:14px;color:#64748b;margin-bottom:4px">per year · 1 website</div>
					<div style="font-size:12px;color:#4a6a8a;margin-bottom:20px">Billed annually · Cancel anytime</div>
					<div style="margin-bottom:12px" id="paypal-container-5KWJ8DPK67RDE"></div>
					<a href="<?php echo esc_url( admin_url( 'admin.php?page=gt-bogo-engine&tab=license' ) ); ?>" style="font-size:12px;color:#64748b;text-decoration:underline;display:block;margin-top:10px">Already purchased? Activate license →</a>
					<div style="margin-top:16px;padding-top:16px;border-top:1px solid rgba(255,255,255,0.06)">
						<div style="font-size:11px;color:#4a6a8a;line-height:1.6">
							🔒 Secure payment via PayPal<br>
							📧 License delivered instantly by email<br>
							🛡️ 30-day money-back guarantee
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>


<!-- ── STORE SIZE BUNDLES HERO ─────────────────────────────── -->
<div class="gt-card gt-animate-in" style="border:1px solid rgba(255,255,255,0.08)">
	<div class="gt-card-header" style="border-bottom:1px solid var(--gt-border);padding-bottom:20px">
		<div>
			<h2 class="gt-card-title">Store Bundles &mdash; Pick Your Size</h2>
			<p style="color:var(--gt-subtle);font-size:13px;margin:4px 0 0">Get the essential core packs for your store size, then add industry-specific packs below. All bundles include the highest-impact universal deal mechanics.</p>
		</div>
	</div>
	<div class="gt-card-body" style="padding:0">

		<!-- SMALL STORE -->
		<div style="border-bottom:1px solid var(--gt-border);padding:32px">
			<div style="display:grid;grid-template-columns:1fr 320px;gap:40px;align-items:start">
				<div>
					<div style="display:flex;align-items:center;gap:12px;margin-bottom:8px">
						<span style="background:rgba(34,197,94,0.15);border:1px solid rgba(34,197,94,0.3);color:#4ade80;font-size:13px;font-weight:700;letter-spacing:1px;text-transform:uppercase;padding:4px 12px;border-radius:20px">Small Store</span>
						<span style="color:var(--gt-subtle);font-size:13px">Just starting out · Under $5K/month</span>
					</div>
					<h3 style="font-size:22px;font-weight:800;color:var(--gt-white);margin:0 0 8px">Starter Revenue Bundle</h3>
					<p style="color:var(--gt-subtle);font-size:14px;line-height:1.65;margin:0 0 20px">The 5 highest-impact deal mechanics for stores launching or growing. Covers cart value boosting, flash sales, free gift conversion, product badge visibility, and real-time savings display. Everything you need to run professional BOGO promotions from day one.</p>
					<div style="display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:10px;margin-bottom:8px">
						<?php
						$starter_packs = array(
							array( 'Cart Threshold Boost', 'Reward customers who spend more — drive AOV automatically' ),
							array( 'Flash Sale Engine', 'Time-limited deals with countdown urgency and auto-expiry' ),
							array( 'Free Gift Engine', 'Add free products to cart when deal conditions are met' ),
							array( 'Visual Badge', 'Deal badges on product images to catch attention before cart' ),
							array( 'Savings Display', 'Show real-time savings so customers feel the value instantly' ),
						);
						foreach ( $starter_packs as $sp ) :
							?>
						<div style="background:rgba(255,255,255,0.04);border:1px solid var(--gt-border);border-radius:8px;padding:12px 14px">
							<div style="font-size:13px;font-weight:600;color:var(--gt-white);margin-bottom:3px"><?php echo esc_html( $sp[0] ); ?></div>
							<div style="font-size:13px;color:var(--gt-subtle);line-height:1.4"><?php echo esc_html( $sp[1] ); ?></div>
						</div>
						<?php endforeach; ?>
					</div>
				</div>
				<div style="background:rgba(255,255,255,0.03);border:1px solid var(--gt-border);border-radius:14px;padding:28px">
					<div style="font-size:13px;font-weight:700;color:var(--gt-subtle);text-transform:uppercase;letter-spacing:1px;margin-bottom:8px">5 Pro Packs</div>
					<div style="font-size:48px;font-weight:900;color:var(--gt-white);line-height:1;margin-bottom:8px">$149</div>
					<div style="font-size:13px;color:#4ade80;font-weight:600;margin-bottom:24px">Save $100.95 vs buying separately</div>
					<div id="paypal-container-SGQSQAYVDQX3J"></div>
				</div>
			</div>
		</div>

		<!-- MEDIUM STORE -->
		<div style="border-bottom:1px solid var(--gt-border);padding:32px;background:rgba(225,0,0,0.02)">
			<div style="display:grid;grid-template-columns:1fr 320px;gap:40px;align-items:start">
				<div>
					<div style="display:flex;align-items:center;gap:12px;margin-bottom:8px">
						<span style="background:rgba(251,146,60,0.15);border:1px solid rgba(251,146,60,0.3);color:#fb923c;font-size:13px;font-weight:700;letter-spacing:1px;text-transform:uppercase;padding:4px 12px;border-radius:20px">Medium Store</span>
						<span style="color:var(--gt-subtle);font-size:13px">Scaling up · $5K&ndash;$50K/month &middot; Most popular</span>
					</div>
					<h3 style="font-size:22px;font-weight:800;color:var(--gt-white);margin:0 0 8px">Growth Acceleration Bundle</h3>
					<p style="color:var(--gt-subtle);font-size:14px;line-height:1.65;margin:0 0 20px">9 essential packs covering every major growth lever for scaling stores. Adds urgency mechanics, loyalty systems, social proof, intelligent upselling, and inventory automation on top of the starter foundation. Built for stores ready to push past their current plateau.</p>
					<div style="display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:10px;margin-bottom:8px">
						<?php
						$growth_packs = array(
							array( 'Stack Master', 'Layer multiple BOGO rules simultaneously for complex deal stacking' ),
							array( 'Cart Threshold Boost', 'Reward customers who spend more — drive AOV automatically' ),
							array( 'Flash Sale Engine', 'Time-limited deals with countdown urgency and auto-expiry' ),
							array( 'Free Gift Engine', 'Add free products to cart when deal conditions are met' ),
							array( 'Visual Badge', 'Deal badges on product images to catch attention before cart' ),
							array( 'Savings Display', 'Show real-time savings so customers feel the value instantly' ),
							array( 'Countdown Urgency', 'Live timers on any deal creating genuine time pressure' ),
							array( 'Social Proof', 'Live deal activity signals building trust and purchase momentum' ),
							array( 'New Customer Acquisition', 'First-time buyer deals engineered to convert immediately' ),
						);
						foreach ( $growth_packs as $gp ) :
							?>
						<div style="background:rgba(255,255,255,0.04);border:1px solid var(--gt-border);border-radius:8px;padding:12px 14px">
							<div style="font-size:13px;font-weight:600;color:var(--gt-white);margin-bottom:3px"><?php echo esc_html( $gp[0] ); ?></div>
							<div style="font-size:13px;color:var(--gt-subtle);line-height:1.4"><?php echo esc_html( $gp[1] ); ?></div>
						</div>
						<?php endforeach; ?>
					</div>
				</div>
				<div style="background:rgba(225,0,0,0.06);border:1px solid rgba(225,0,0,0.2);border-radius:14px;padding:28px">

					<div style="font-size:13px;font-weight:700;color:var(--gt-red);text-transform:uppercase;letter-spacing:1px;margin-bottom:8px">Most Popular</div>
					<div style="font-size:13px;font-weight:700;color:var(--gt-subtle);text-transform:uppercase;letter-spacing:1px;margin-bottom:8px">9 Pro Packs</div>
					<div style="font-size:48px;font-weight:900;color:var(--gt-white);line-height:1;margin-bottom:8px">$299</div>
					<div style="font-size:13px;color:#4ade80;font-weight:600;margin-bottom:24px">Save $110.91 vs buying separately</div>
					<div id="paypal-container-9XQTGVAHUD7XJ"></div>
				</div>
			</div>
		</div>

		<!-- LARGE STORE -->
		<div style="padding:32px">
			<div style="display:grid;grid-template-columns:1fr 320px;gap:40px;align-items:start">
				<div>
					<div style="display:flex;align-items:center;gap:12px;margin-bottom:8px">
						<span style="background:rgba(139,92,246,0.15);border:1px solid rgba(139,92,246,0.3);color:#a78bfa;font-size:13px;font-weight:700;letter-spacing:1px;text-transform:uppercase;padding:4px 12px;border-radius:20px">Large Store</span>
						<span style="color:var(--gt-subtle);font-size:13px">Enterprise &amp; agency · $50K+/month &middot; Best value</span>
					</div>
					<h3 style="font-size:22px;font-weight:800;color:var(--gt-white);margin:0 0 8px">Complete BOGO Arsenal</h3>
					<p style="color:var(--gt-subtle);font-size:14px;line-height:1.65;margin:0 0 20px">Every core deal mechanic in a single purchase. 15 packs covering the full spectrum of BOGO strategy — from acquisition and urgency through loyalty, retention, bundles, and advanced automation. The definitive toolkit for enterprise stores and agencies managing multiple clients. Nothing held back.</p>
					<div style="display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:10px;margin-bottom:8px">
						<?php
						$complete_packs = array(
							array( 'Stack Master', 'Advanced rule stacking for complex multi-tier promotions' ),
							array( 'Cart Threshold Boost', 'AOV boosting with spend-triggered BOGO rewards' ),
							array( 'Flash Sale Engine', 'Timed campaigns with auto-activation and expiry' ),
							array( 'Inventory Clearance', 'Move stock fast with category and product-specific deals' ),
							array( 'New Customer Acquisition', 'First-time buyer deals engineered to convert immediately' ),
							array( 'VIP & Loyalty Rewards', 'Exclusive deals tied to lifetime spend and order history' ),
							array( 'Free Gift Engine', 'Automated free product rewards on qualifying carts' ),
							array( 'Countdown Urgency', 'Live timers driving immediate purchase decisions' ),
							array( 'Visual Badge', 'Dynamic deal badges across product listings' ),
							array( 'Savings Display', 'Real-time savings calculator in cart and checkout' ),
							array( 'Social Proof', 'Live purchase signals and deal popularity counters' ),
							array( 'Smart Upsell', 'Cart-aware cross-sell using BOGO as the hook' ),
							array( 'Tiered Quantity Breaks', 'Progressive rewards scaling with order quantity' ),
							array( 'Quick Deal', 'One-click deal templates that launch a working BOGO campaign instantly' ),
							array( 'Seasonal Promotions', 'Pre-built rules for every major retail season' ),
						);
						foreach ( $complete_packs as $cp ) :
							?>
						<div style="background:rgba(255,255,255,0.04);border:1px solid var(--gt-border);border-radius:8px;padding:12px 14px">
							<div style="font-size:13px;font-weight:600;color:var(--gt-white);margin-bottom:3px"><?php echo esc_html( $cp[0] ); ?></div>
							<div style="font-size:13px;color:var(--gt-subtle);line-height:1.4"><?php echo esc_html( $cp[1] ); ?></div>
						</div>
						<?php endforeach; ?>
					</div>
				</div>
				<div style="background:rgba(139,92,246,0.06);border:1px solid rgba(139,92,246,0.25);border-radius:14px;padding:28px">

					<div style="font-size:13px;font-weight:700;color:#a78bfa;text-transform:uppercase;letter-spacing:1px;margin-bottom:8px">Best Value</div>
					<div style="font-size:13px;font-weight:700;color:var(--gt-subtle);text-transform:uppercase;letter-spacing:1px;margin-bottom:8px">15 Pro Packs</div>
					<div style="font-size:48px;font-weight:900;color:var(--gt-white);line-height:1;margin-bottom:8px">$399</div>
					<div style="font-size:13px;color:#4ade80;font-weight:600;margin-bottom:24px">Save $400.85 vs buying separately</div>
					<div id="paypal-container-C8ZS69WB9YYFQ"></div>
				</div>
			</div>
		</div>

	</div>
</div>

<div class="gt-card gt-animate-in" style="padding:14px 20px">
	<div style="display:flex;flex-wrap:wrap;gap:8px;align-items:center">
		<span style="font-size:16px;font-weight:700;text-transform:uppercase;letter-spacing:.8px;color:var(--gt-subtle);flex-shrink:0">Jump to:</span>
		<a href="#gtb-cat-core" style="font-size:15px;padding:5px 13px;border:1px solid var(--gt-border);border-radius:20px;color:var(--gt-soft);text-decoration:none">Core Deal Mechanics (40)</a>
		<a href="#gtb-cat-food" style="font-size:15px;padding:5px 13px;border:1px solid var(--gt-border);border-radius:20px;color:var(--gt-soft);text-decoration:none">Food, Dining & Grocery (13)</a>
		<a href="#gtb-cat-beverage" style="font-size:15px;padding:5px 13px;border:1px solid var(--gt-border);border-radius:20px;color:var(--gt-soft);text-decoration:none">Craft Beer, Wine & Spirits (5)</a>
		<a href="#gtb-cat-fashion" style="font-size:15px;padding:5px 13px;border:1px solid var(--gt-border);border-radius:20px;color:var(--gt-soft);text-decoration:none">Fashion & Apparel (10)</a>
		<a href="#gtb-cat-jewelry" style="font-size:15px;padding:5px 13px;border:1px solid var(--gt-border);border-radius:20px;color:var(--gt-soft);text-decoration:none">Jewelry & Luxury Goods (6)</a>
		<a href="#gtb-cat-beauty" style="font-size:15px;padding:5px 13px;border:1px solid var(--gt-border);border-radius:20px;color:var(--gt-soft);text-decoration:none">Beauty, Spa & Salon (15)</a>
		<a href="#gtb-cat-auto" style="font-size:15px;padding:5px 13px;border:1px solid var(--gt-border);border-radius:20px;color:var(--gt-soft);text-decoration:none">Automotive, Marine & Tire (14)</a>
		<a href="#gtb-cat-tech" style="font-size:15px;padding:5px 13px;border:1px solid var(--gt-border);border-radius:20px;color:var(--gt-soft);text-decoration:none">Electronics, Tech & Software (11)</a>
		<a href="#gtb-cat-home" style="font-size:15px;padding:5px 13px;border:1px solid var(--gt-border);border-radius:20px;color:var(--gt-soft);text-decoration:none">Home, Garden & Hardware (14)</a>
		<a href="#gtb-cat-sports" style="font-size:15px;padding:5px 13px;border:1px solid var(--gt-border);border-radius:20px;color:var(--gt-soft);text-decoration:none">Sports, Fitness & Recreation (23)</a>
		<a href="#gtb-cat-b2b" style="font-size:15px;padding:5px 13px;border:1px solid var(--gt-border);border-radius:20px;color:var(--gt-soft);text-decoration:none">B2B & Wholesale (5)</a>
		<a href="#gtb-cat-health" style="font-size:15px;padding:5px 13px;border:1px solid var(--gt-border);border-radius:20px;color:var(--gt-soft);text-decoration:none">Health, Medical & Supplements (5)</a>
		<a href="#gtb-cat-education" style="font-size:15px;padding:5px 13px;border:1px solid var(--gt-border);border-radius:20px;color:var(--gt-soft);text-decoration:none">Education & Training (6)</a>
		<a href="#gtb-cat-travel" style="font-size:15px;padding:5px 13px;border:1px solid var(--gt-border);border-radius:20px;color:var(--gt-soft);text-decoration:none">Travel, Hospitality & Events (10)</a>
		<a href="#gtb-cat-pets" style="font-size:15px;padding:5px 13px;border:1px solid var(--gt-border);border-radius:20px;color:var(--gt-soft);text-decoration:none">Pets & Animal Services (2)</a>
		<a href="#gtb-cat-kids" style="font-size:15px;padding:5px 13px;border:1px solid var(--gt-border);border-radius:20px;color:var(--gt-soft);text-decoration:none">Kids, Toys & Gifts (6)</a>
		<a href="#gtb-cat-gifts" style="font-size:15px;padding:5px 13px;border:1px solid var(--gt-border);border-radius:20px;color:var(--gt-soft);text-decoration:none">Photography, Flowers & Gifts (5)</a>
		<a href="#gtb-cat-specialty" style="font-size:15px;padding:5px 13px;border:1px solid var(--gt-border);border-radius:20px;color:var(--gt-soft);text-decoration:none">Specialty & Niche Retail (8)</a>
		<a href="#gtb-cat-media" style="font-size:15px;padding:5px 13px;border:1px solid var(--gt-border);border-radius:20px;color:var(--gt-soft);text-decoration:none">Books, Music & Instruments (2)</a>
	</div>
</div>

<style>
.gtb-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(340px,1fr));gap:16px}
.gtb-pack{background:rgba(255,255,255,0.04);border:1px solid var(--gt-border);border-radius:12px;padding:20px;display:flex;flex-direction:column;gap:12px;transition:border-color .15s;position:relative}
.gtb-pack:hover{border-color:rgba(225,0,0,0.35)}
.gtb-pack.gtb-owned{border-color:rgba(34,197,94,0.05);background:rgba(34,197,94,0.04)}
.gtb-pack.gtb-owned .gtb-price::before{content:'OWNED · ';color:#22c55e;font-weight:800}
.gtb-import-btn{background:#E10000;color:#fff;border:none;border-radius:999px;padding:8px 18px;font-size:12px;font-weight:700;cursor:pointer;width:100%;margin-top:4px;letter-spacing:.04em}
.gtb-import-btn:disabled{opacity:.5;cursor:not-allowed}
.gtb-pack-name{font-weight:700;font-size:17px;line-height:1.4;color:var(--gt-white)}#gtb-cat-core .gt-card-title,#gtb-cat-food .gt-card-title,#gtb-cat-beverage .gt-card-title,#gtb-cat-fashion .gt-card-title,#gtb-cat-jewelry .gt-card-title,#gtb-cat-beauty .gt-card-title,#gtb-cat-auto .gt-card-title,#gtb-cat-tech .gt-card-title,#gtb-cat-home .gt-card-title,#gtb-cat-sports .gt-card-title,#gtb-cat-b2b .gt-card-title,#gtb-cat-health .gt-card-title,#gtb-cat-education .gt-card-title,#gtb-cat-travel .gt-card-title,#gtb-cat-misc .gt-card-title{font-size:22px!important}
.gtb-price{font-size:13px;color:var(--gt-subtle);font-weight:600}
.gtb-sub{font-size:13px;color:rgba(255,255,255,0.35);margin:0}
</style>

<div class="gt-card gt-animate-in" id="gtb-cat-core">
	<div class="gt-card-header">
		<div>
			<h2 class="gt-card-title">Core Deal Mechanics</h2>
			<p class="gtb-sub">Universal — works for any WooCommerce store</p>
		</div>
		<span class="gt-badge">40 packs</span>
	</div>
	<div class="gt-card-body">
		<div class="gtb-grid">
			<div class="gtb-pack">
				<div class="gtb-pack-name">Stack Master</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-9CMGVJDB6FYAN"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Cart Threshold Boost</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-FTFZJVH3XCABQ"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Flash Sale Engine</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-FR592Y6D8FBML"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Seasonal Promotions</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-H6F4MX7NACP8E"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Inventory Clearance</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-HPKXLRZQ5CPU2"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Slow Seller Recovery</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-MKHLL5JCT9BXU"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">New Customer Acquisition</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-QACS4M9B7H4MW"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">VIP & Loyalty Rewards</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-WEL53HVYRYWPC"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Free Gift Engine</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-MVWE8ZP3QV55W"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Countdown Urgency</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-VLVTBLVC6RLNG"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Visual Badge</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-238WE5NQTRLHL"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Savings Display</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-USUWDEV57EKUA"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Social Proof</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-K6BH8Y2636K76"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Smart Upsell</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-KBTM4TGUH6TXC"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Quick Deal</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-9MYEG9M2D2434"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">First Order Reward</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-GGFM2D87W65BN"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Win-Back Campaign</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-LF9RKMLXHPTS4"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Referral Reward</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-XUHWK3V9FW9US"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Tiered Quantity Breaks</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-KCXH8XDHT8C7Q"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Multi-Buy Saver</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-2JECK5CGERCM4"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Spend More Save More</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-FNSMN9CTC5EFS"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Cross-Category Deal</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-9G38RDYWX2RVJ"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Bundle Builder</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-XZF52Q9924H2U"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Complementary Products</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-GKZ8R3DQHY7UE"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Happy Hour Deal</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-WSYQQ5VZA4WCL"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Day of Week Deals</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-S37GC3R9N2GQA"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Holiday Calendar</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-2353EWT3KM3WA"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Wholesale B2B</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-WLHUZNZJZTAGL"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Birthday Deal</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-F3A5WXULTE74Y"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Subscriber Exclusive</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-HSXQJE6ZW6WNE"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Nth Order Reward</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-ZT5SMBRVFVMSG"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Post-Purchase Unlock</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-6KLPGWSNQKUES"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Purchase Streak</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-UPL9DRVA98H8A"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Low Stock Trigger</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-CLA5FHZHDH5QU"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Last Chance</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-3ZWN9T2RR99PY"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Price Drop Booster</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-FWFTCXTDX425J"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Free Shipping Unlock</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-GTJYB3SK8CW6Y"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Local Pickup Reward</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-6VUJTGVMTYSHA"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Subscription Deal</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-3RPUMJXVDZ8X6"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Group Deal</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-R7NLSQZDUPRHC"></div>
			</div>
		</div>
	</div>
</div>


<div class="gt-card gt-animate-in" id="gtb-cat-food">
	<div class="gt-card-header">
		<div>
			<h2 class="gt-card-title">Food, Dining & Grocery</h2>
			<p class="gtb-sub">Restaurants, meal kits, cafes and online food stores</p>
		</div>
		<span class="gt-badge">13 packs</span>
	</div>
	<div class="gt-card-body">
		<div class="gtb-grid">
			<div class="gtb-pack">
				<div class="gtb-pack-name">Early Bird Dining</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-YC8JDWM433DEJ"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Kids Eat Free</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-ETZPN8J65MDXE"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Meal Kit Bundle</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-E6ZJTYJBF8SZ8"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Catering Package</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-M8HHUGMU96T82"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Table for Two</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-FCDV8L66N76WC"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Chef Special</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-RASR2JJLMM7JN"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Takeout & Delivery Deal</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-WT9CP2B3VUGWE"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Digital Stamp Card</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-TT62FDR2Z3N34"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Weekend Special Deal</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-B6R7PPJCEPS8Y"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Event Dining Package</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-BBKGV38YXCEHN"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Meal Prep Plan Bundle</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-U6UNEH9PUY9YU"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Online Grocery Bundle</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-6UY868G846KGE"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Farm Box Subscription</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-94J9LQRYAJA8N"></div>
			</div>
		</div>
	</div>
</div>


<div class="gt-card gt-animate-in" id="gtb-cat-beverage">
	<div class="gt-card-header">
		<div>
			<h2 class="gt-card-title">Craft Beer, Wine & Spirits</h2>
			<p class="gtb-sub">Breweries, wineries, spirits clubs and bottle shops</p>
		</div>
		<span class="gt-badge">5 packs</span>
	</div>
	<div class="gt-card-body">
		<div class="gtb-grid">
			<div class="gtb-pack">
				<div class="gtb-pack-name">Tasting Flight Deal</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-5NMZP3EHC4T4E"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Beer Club Membership</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-RNMXF3LX495AC"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Wine Case & Club Deal</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-ADZYX6ACHS7D8"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Season Opener Bundle</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-2U7J7UEKBLMWQ"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Spirits & Bottle Club</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-MNKBBHC7W2ZDW"></div>
			</div>
		</div>
	</div>
</div>


<div class="gt-card gt-animate-in" id="gtb-cat-fashion">
	<div class="gt-card-header">
		<div>
			<h2 class="gt-card-title">Fashion & Apparel</h2>
			<p class="gtb-sub">Clothing, footwear, swimwear and workwear</p>
		</div>
		<span class="gt-badge">10 packs</span>
	</div>
	<div class="gt-card-body">
		<div class="gtb-grid">
			<div class="gtb-pack">
				<div class="gtb-pack-name">New Arrival Boost</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-TDPJND962NRFA"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">End of Season Clearance</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-EFAHE5N76Z5D6"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Complete the Inter</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-4P4KEZ93L469A"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Pre-Order Early Access</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-8E2KFX7PYZ2GW"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Capsule Collection Bundle</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-T8SZUWL3L9LZL"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Personalization Upsell</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-9MJL6MH5L4K78"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Limited Drop Deal</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-FYXH8E5S37WR8"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Lingerie Set Deal</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-PZ7BZXLK5P5NY"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Swimwear Season Launch</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-AHGR62G3U39K2"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Workwear Bulk Order</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-79KJKBU69BDHL"></div>
			</div>
		</div>
	</div>
</div>


<div class="gt-card gt-animate-in" id="gtb-cat-jewelry">
	<div class="gt-card-header">
		<div>
			<h2 class="gt-card-title">Jewelry & Luxury Goods</h2>
			<p class="gtb-sub">Fine jewelry, watches and luxury retail</p>
		</div>
		<span class="gt-badge">6 packs</span>
	</div>
	<div class="gt-card-body">
		<div class="gtb-grid">
			<div class="gtb-pack">
				<div class="gtb-pack-name">Bridal & Engagement Bundle</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-2CPFUEE4KUFV2"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Anniversary Reward</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-V895WP8MB36H4"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Gift Packaging Unlock</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-PYW2QFEL6AHLG"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Custom Engraving Deal</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-E34FFTFCYTLR8"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Paired Jewelry Deal</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-LXU3J8PUAAS92"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Luxury Care Package</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-DHNKX8LD62Z2S"></div>
			</div>
		</div>
	</div>
</div>


<div class="gt-card gt-animate-in" id="gtb-cat-beauty">
	<div class="gt-card-header">
		<div>
			<h2 class="gt-card-title">Beauty, Spa & Salon</h2>
			<p class="gtb-sub">Skincare, cosmetics, hair salons and day spas</p>
		</div>
		<span class="gt-badge">15 packs</span>
	</div>
	<div class="gt-card-body">
		<div class="gtb-grid">
			<div class="gtb-pack">
				<div class="gtb-pack-name">Routine Builder Bundle</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-VVB5ZX7EUZG5Q"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Sample Discovery Kit</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-XHWXCJ3BKQP66"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Salon Package Deal</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-KPMBGLZTYNRMQ"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Wellness Streak Deal</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-T5V3YXBGDEXZ4"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Beauty Referral Deal</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-NQ7LKDQHB44L4"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Glow Up Bundle</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-JFEALGM3DCDDC"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Day Spa Package</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-CT6B5YQJSKUKA"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Couples Treatment Bundle</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-UMDE89RDEUT4E"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Spa Monthly Membership</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-BR487TPM8WNMC"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Color & Cut Bundle</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-J763KCNTL3PAY"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Salon Loyalty Stamp</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-TKW7MH96BQ23Q"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Cut & Shave Bundle</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-2GQ4K9CJNJPRJ"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Wellness Starter Discovery</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-G5G3ZHD2EK7WN"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Fragrance Discovery Bundle</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-CJ2ZN4ZU8CD3U"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Teeth Whitening Kit Bundle</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-7ESP6JBD8MEFW"></div>
			</div>
		</div>
	</div>
</div>


<div class="gt-card gt-animate-in" id="gtb-cat-auto">
	<div class="gt-card-header">
		<div>
			<h2 class="gt-card-title">Automotive, Marine & Tire</h2>
			<p class="gtb-sub">Auto parts, service, car wash, marine and RV</p>
		</div>
		<span class="gt-badge">14 packs</span>
	</div>
	<div class="gt-card-body">
		<div class="gtb-grid">
			<div class="gtb-pack">
				<div class="gtb-pack-name">Service Package Bundle</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-6YTMUKMCU2KHS"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Seasonal Vehicle Prep</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-GD4NWHS77XPME"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Fleet Buyer Deal</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-Z8TE884MVP7AW"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Parts & Install Bundle</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-9D6MTZG56D58U"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">First Service Deal</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-VSY5KMX5BW5QG"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Trade-In Bonus Deal</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-86FZL5G2YE826"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Protection Plan Bundle</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-22AVK88YDVGDS"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Accessory Starter Pack</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-XYLL5CQ6GDAV6"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Trade-In Upgrade Deal</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-QAFMX9PJRHSB2"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Monthly Wash Membership</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-3VUUZBM5DV8CN"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Full Detail Package</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-FMJSYLW3CMGXQ"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Seasonal Marine Prep Bundle</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-9ZQNS5JJ6TM76"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">RV Accessory Bundle</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-GE3D9W5FF7R9Q"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">4-for-3 Tire Deal</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-GAGV8PR6FXEDL"></div>
			</div>
		</div>
	</div>
</div>


<div class="gt-card gt-animate-in" id="gtb-cat-tech">
	<div class="gt-card-header">
		<div>
			<h2 class="gt-card-title">Electronics, Tech & Software</h2>
			<p class="gtb-sub">Consumer electronics, SaaS and digital products</p>
		</div>
		<span class="gt-badge">11 packs</span>
	</div>
	<div class="gt-card-body">
		<div class="gtb-grid">
			<div class="gtb-pack">
				<div class="gtb-pack-name">Early Adopter Deal</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-MUE8WTPRQA9CU"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Setup Service Bundle</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-C9VDF57CTZULC"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Refurbished Value Deal</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-Z7LBE58L8R5DE"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Annual Plan Upgrade Deal</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-TCZQY9CDYWT6W"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Add-On Bundle Deal</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-V864CTRZ54754"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Renewal Reward Deal</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-D8G439N59KL6C"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Multi-Seat Volume Deal</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-YRG2Q6K6U3SEE"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Freemium Conversion Deal</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-5PMGPVPFNMD9Q"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Digital Asset Pack Bundle</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-N7DH2A3WH598W"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Domain & Hosting Bundle</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-23EPTB5WRCPL6"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Digital Bundle Deal</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-H33Z98S8BEP48"></div>
			</div>
		</div>
	</div>
</div>


<div class="gt-card gt-animate-in" id="gtb-cat-home">
	<div class="gt-card-header">
		<div>
			<h2 class="gt-card-title">Home, Garden & Hardware</h2>
			<p class="gtb-sub">Furniture, home security, garden and DIY</p>
		</div>
		<span class="gt-badge">14 packs</span>
	</div>
	<div class="gt-card-body">
		<div class="gtb-grid">
			<div class="gtb-pack">
				<div class="gtb-pack-name">Room Bundle Deal</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-9UNFMK48WLEY4"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Installation Service Bundle</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-GMCV4GXAWQ6W4"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Moving Bundle</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-XABNUAU6M8U4N"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Smart Home Starter</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-5SRC4P2W73AKC"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Seasonal Home Refresh</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-P86AFGH3XZ242"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Renovation Bulk Deal</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-ZLMSJJPZJYTDS"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Seasonal Planting Bundle</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-974PL8QQ2DFZU"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Desk Bundle Deal</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-VZP8DE4S3MAUE"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Home Security Bundle</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-NVHD4VDPKU63U"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Pool & Spa Chemical Bundle</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-2PMN6YTAGHRZS"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Online Print & Signage Bundle</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-49VNXLEM6HXE6"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Cleaning Supplies Bulk Deal</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-2CUQE4LPU8VXQ"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Hardware Project Bundle</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-3HSFJXZWZYJT2"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Outdoor Room Bundle Deal</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-MUTZ8R24L6R86"></div>
			</div>
		</div>
	</div>
</div>


<div class="gt-card gt-animate-in" id="gtb-cat-sports">
	<div class="gt-card-header">
		<div>
			<h2 class="gt-card-title">Sports, Fitness & Recreation</h2>
			<p class="gtb-sub">Gyms, golf, cycling, ski, martial arts and more</p>
		</div>
		<span class="gt-badge">23 packs</span>
	</div>
	<div class="gt-card-body">
		<div class="gtb-grid">
			<div class="gtb-pack">
				<div class="gtb-pack-name">Team Order Deal</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-V4PPT4FH2XBXC"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Season Opener Deal</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-D2T94T8SQALLG"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Equipment Service Bundle</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-4GYPEUQN3SCU6"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Adventure Gear Bundle</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-DWAR8UWN4QPCS"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Youth Sports Deal</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-FJVKVNXMM924N"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Gym Membership Upgrade</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-W4YPE7N5GLM7E"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Personal Training Bundle</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-9L5HDLWAV7FXW"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Class Pack Deal</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-7NL9Z38W3BFXC"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Corporate Wellness Deal</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-MHF4BHRKGA9DA"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Studio Intro Offer</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-3QVA754X6E5A6"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Class Pack & Membership</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-SXJWTBP6LMLJA"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Tee Time Bundle</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-NMFCJA6JGH4D4"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Lesson & Round Package</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-KWW2ZUYZ9LQHJ"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Twilight & Off-Peak Deal</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-68LJP7L8QMMXU"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Junior Golf Program</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-ESXAPA3RX43G6"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Bike & Accessories Bundle</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-3GGBVXX5CPCG8"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Bike Service & Tune-Up Deal</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-58SDZ6DDDVM2Y"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Early Booking Reward</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-L5SUGC2D6PL4W"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Lift Pass Bundle</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-F5DKCAACZKYUA"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Lesson & Equipment Rental</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-EAUF4SNYYCXKE"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Intro Course Deal</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-HSZDXZKS6TMKS"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Grading & Gear Bundle</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-GDPQADASVV4JS"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Swim Lesson Pack</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-2E45W7UQ3PPXQ"></div>
			</div>
		</div>
	</div>
</div>


<div class="gt-card gt-animate-in" id="gtb-cat-b2b">
	<div class="gt-card-header">
		<div>
			<h2 class="gt-card-title">B2B & Wholesale</h2>
			<p class="gtb-sub">Trade accounts, volume pricing and resellers</p>
		</div>
		<span class="gt-badge">5 packs</span>
	</div>
	<div class="gt-card-body">
		<div class="gtb-grid">
			<div class="gtb-pack">
				<div class="gtb-pack-name">Contract Pricing Deal</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-YLAYRTAYLT7SU"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Trade Account Exclusive</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-CPR3K9W7JXDCJ"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Reseller Volume Bundle</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-S5EYVEZ9UXXUS"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Sample Order Deal</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-A56KQ5MUQPHE4"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">MOQ Discount Deal</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-PBH9QPTRRBXHC"></div>
			</div>
		</div>
	</div>
</div>


<div class="gt-card gt-animate-in" id="gtb-cat-health">
	<div class="gt-card-header">
		<div>
			<h2 class="gt-card-title">Health, Medical & Supplements</h2>
			<p class="gtb-sub">Pharmacies, wellness and supplement stores</p>
		</div>
		<span class="gt-badge">5 packs</span>
	</div>
	<div class="gt-card-body">
		<div class="gtb-grid">
			<div class="gtb-pack">
				<div class="gtb-pack-name">Wellness Package Deal</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-NE3KAT4U6RYCC"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Family Health Bundle</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-TRCHAHG4UZ45N"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Chronic Care Loyalty</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-7SGJLU8MZY43S"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Supplement Stack Deal</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-47ZA9EVLT5A5E"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Subscribe & Save Bundle</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-EE6NBEQ2THFLJ"></div>
			</div>
		</div>
	</div>
</div>


<div class="gt-card gt-animate-in" id="gtb-cat-education">
	<div class="gt-card-header">
		<div>
			<h2 class="gt-card-title">Education & Training</h2>
			<p class="gtb-sub">Courses, tutoring, music lessons and academies</p>
		</div>
		<span class="gt-badge">6 packs</span>
	</div>
	<div class="gt-card-body">
		<div class="gtb-grid">
			<div class="gtb-pack">
				<div class="gtb-pack-name">Course Bundle Deal</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-5V46VQX8V9CMA"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Student Exclusive Deal</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-UYX5JS3XPGVE8"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Early Enrollment Reward</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-7JHZ833S5RG78"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Alumni Loyalty Deal</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-YUZ6FYLY9D99Q"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Study Kit Bundle</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-SAUN2DEYSTVBW"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Lesson Pack Deal</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-TBF6Z77UEATM8"></div>
			</div>
		</div>
	</div>
</div>


<div class="gt-card gt-animate-in" id="gtb-cat-travel">
	<div class="gt-card-header">
		<div>
			<h2 class="gt-card-title">Travel, Hospitality & Events</h2>
			<p class="gtb-sub">Hotels, tickets, tours and event venues</p>
		</div>
		<span class="gt-badge">10 packs</span>
	</div>
	<div class="gt-card-body">
		<div class="gtb-grid">
			<div class="gtb-pack">
				<div class="gtb-pack-name">Early Bird Booking Deal</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-PX88ZRNLEMQK8"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Stay Longer Reward</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-DS2PCDTP3ZAP2"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Room & Extras Package</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-YXXGWZ8YXA92J"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Group Travel Deal</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-N8N9FFXU4ERWY"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Last Minute Travel Deal</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-LKBLR58NW478C"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Early Bird Ticket Deal</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-W8BK8FZS8PC7Q"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Group Booking Deal</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-EK4RAGMXBYEZ6"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Season Pass Bundle</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-7TEQYXK9E683U"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">VIP Upgrade Deal</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-W3DQZCYRTT8GW"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Merchandise Bundle Deal</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-CFN88W9MMF7PL"></div>
			</div>
		</div>
	</div>
</div>


<div class="gt-card gt-animate-in" id="gtb-cat-pets">
	<div class="gt-card-header">
		<div>
			<h2 class="gt-card-title">Pets & Animal Services</h2>
			<p class="gtb-sub">Grooming, boarding, training and pet supplies</p>
		</div>
		<span class="gt-badge">2 packs</span>
	</div>
	<div class="gt-card-body">
		<div class="gtb-grid">
			<div class="gtb-pack">
				<div class="gtb-pack-name">Grooming Package Deal</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-D3WPZN6UMF9X2"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Boarding & Training Bundle</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-BGG8B756TDB7L"></div>
			</div>
		</div>
	</div>
</div>


<div class="gt-card gt-animate-in" id="gtb-cat-kids">
	<div class="gt-card-header">
		<div>
			<h2 class="gt-card-title">Kids, Toys & Gifts</h2>
			<p class="gtb-sub">Children's products, toys and gift stores</p>
		</div>
		<span class="gt-badge">6 packs</span>
	</div>
	<div class="gt-card-body">
		<div class="gtb-grid">
			<div class="gtb-pack">
				<div class="gtb-pack-name">Art & Craft Project Kit</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-CPX786FQRYCNS"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Toy Age-Up Bundle</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-BQG3U9HCGJJZE"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Baby & Newborn Starter Bundle</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-BJATPGJ5GVQMG"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Occasion Gift Bundle</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-P9M4J874QN8VN"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Gift Card Bonus Deal</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-CPYANPZXCK7EL"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Mystery Box Deal</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-3GH2KKDVLUETW"></div>
			</div>
		</div>
	</div>
</div>


<div class="gt-card gt-animate-in" id="gtb-cat-gifts">
	<div class="gt-card-header">
		<div>
			<h2 class="gt-card-title">Photography, Flowers & Gifts</h2>
			<p class="gtb-sub">Studios, florists and premium accessories</p>
		</div>
		<span class="gt-badge">5 packs</span>
	</div>
	<div class="gt-card-body">
		<div class="gtb-grid">
			<div class="gtb-pack">
				<div class="gtb-pack-name">Subscription Flowers</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-BYZ2MY82SRWJS"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Occasion Bouquet Bundle</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-KAEVUC3EJX98W"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Session & Prints Bundle</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-YJWTT699FX486"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Album Upgrade Deal</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-DVAWCXJGHZBKQ"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Handbag & Leather Care Bundle</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-AEJ6VS45PGBAQ"></div>
			</div>
		</div>
	</div>
</div>


<div class="gt-card gt-animate-in" id="gtb-cat-specialty">
	<div class="gt-card-header">
		<div>
			<h2 class="gt-card-title">Specialty & Niche Retail</h2>
			<p class="gtb-sub">Optical, fragrance, vinyl, collectibles and more</p>
		</div>
		<span class="gt-badge">8 packs</span>
	</div>
	<div class="gt-card-body">
		<div class="gtb-grid">
			<div class="gtb-pack">
				<div class="gtb-pack-name">Second Pair Deal</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-NY9UTKL8KEQSS"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Frames & Lenses Bundle</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-E2A269KDTKNZ4"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Size-Up Reward</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-ZZWAPMXT2MCFS"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Fragrance Discovery Set</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-Y27AD2LLCSS5Y"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Mystery Bundle Deal</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-YHUPE47D22X64"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Collector & Hobby Bundle</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-BAKU9W24UXA3L"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Tabletop Bundle Deal</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-NK5E5JY9CE8H4"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Vinyl Collection Bundle Deal</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-HNU497DDSUUEA"></div>
			</div>
		</div>
	</div>
</div>


<div class="gt-card gt-animate-in" id="gtb-cat-media">
	<div class="gt-card-header">
		<div>
			<h2 class="gt-card-title">Books, Music & Instruments</h2>
			<p class="gtb-sub">Bookstores, music shops and instrument retailers</p>
		</div>
		<span class="gt-badge">2 packs</span>
	</div>
	<div class="gt-card-body">
		<div class="gtb-grid">
			<div class="gtb-pack">
				<div class="gtb-pack-name">Music Instrument Bundle</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-JZXY7QHAAKDH6"></div>
			</div>
			<div class="gtb-pack">
				<div class="gtb-pack-name">Bookstore Series Bundle</div>
				<div class="gtb-price">$79.99</div>
				<div id="paypal-container-7PQ3PEUJ5MPQC"></div>
			</div>
		</div>
	</div>
</div>



<script>
(function() {
	if (typeof paypal === 'undefined') return;
	var rendered = {};
	var observer = new IntersectionObserver(function(entries) {
		entries.forEach(function(entry) {
			if (!entry.isIntersecting) return;
			var el = entry.target;
			var id = el.id.replace('paypal-container-', '');
			if (rendered[id]) { observer.unobserve(el); return; }
			rendered[id] = true;
			observer.unobserve(el);
			try {
				paypal.HostedButtons({ hostedButtonId: id }).render('#paypal-container-' + id);
			} catch(e) {
				// Button already rendered or unavailable
			}
		});
	}, { rootMargin: '300px' });
	document.querySelectorAll('[id^="paypal-container-"]').forEach(function(el) {
		observer.observe(el);
	});
})();
</script>

<script>
(function(){
	var _pollInterval = 30000;
	var _tabName = 'pro-rules';
	function gtbPollRefresh() {
		if (window.location.href.indexOf('tab=' + _tabName) === -1) return;
		var wrap = document.querySelector('.gt-admin-content-wrap, #wpbody-content, .wrap');
		if (!wrap) return;
		fetch(window.location.href, {credentials:'same-origin'})
			.then(function(r){ return r.text(); })
			.then(function(html){
				var doc2 = new DOMParser().parseFromString(html,'text/html');
				var nc = doc2.querySelector('.gt-admin-content-wrap, #wpbody-content .gt-card');
				// Selective update — only refresh KPI numbers, not whole page
				var kpis = document.querySelectorAll('[data-live]');
				var kpis2 = doc2.querySelectorAll('[data-live]');
				kpis.forEach(function(el, i){ if(kpis2[i]) el.textContent = kpis2[i].textContent; });
			}).catch(function(){});
	}
	if (document.querySelector('[data-live]')) {
		setInterval(gtbPollRefresh, _pollInterval);
	}
})();
</script>
<?php require_once __DIR__ . '/../ui-system/wrapper-end.php'; ?>
