<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title><?= e(APP_NAME) ?> — Smart Multi-Location Inventory & POS SaaS</title>
    <meta name="description" content="Scale your retail business with TellerPro. Manage multiple locations, track real-time inventory, and process lightning-fast POS sales. Start your <?= TRIAL_DAYS ?>-day free trial today.">
    <meta property="og:title" content="<?= e(APP_NAME) ?> — Smart Multi-Location Inventory & POS SaaS">
    <meta property="og:description" content="The all-in-one platform for modern retail management.">
    <link rel="stylesheet" href="<?= APP_URL ?>/assets/css/landing.css">
</head>
<body>

    <!-- Navbar -->
    <nav class="nav">
        <a href="<?= APP_URL ?>/" class="nav-brand">TellerPro</a>
        <ul class="nav-links">
            <li><a href="#features">Features</a></li>
            <li><a href="#pricing">Pricing</a></li>
            <li><a href="#testimonials">Testimonials</a></li>
        </ul>
        <div class="nav-actions" style="margin-left: auto;">
            <?php if (Auth::check()): ?>
                <a href="<?= APP_URL ?>/dashboard" class="btn-nav btn-nav-primary">Go to Dashboard</a>
            <?php else: ?>
                <a href="<?= APP_URL ?>/login" class="btn-nav btn-nav-outline">Log in</a>
                <a href="<?= APP_URL ?>/register" class="btn-nav btn-nav-primary">Start Free Trial</a>
            <?php endif; ?>
        </div>
    </nav>

    <!-- Hero Section -->
    <header class="hero">
        <div class="hero-bg"></div>
        <div class="hero-grid"></div>
        <div class="hero-content">
            <div class="hero-text">
                <div class="hero-eyebrow">
                    <span></span> <?= TRIAL_DAYS ?>-Day Free Trial Available
                </div>
                <h1>Smart Inventory & <span class="gradient-text">Sales POS</span> Reimagined.</h1>
                <p>Manage multiple warehouse locations, track real-time stock, process quick POS transactions, and scale your business effortlessly.</p>
                <div class="hero-actions">
                    <a href="<?= APP_URL ?>/register" class="btn-hero-primary">
                        <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M5 12h14"></path><path d="m12 5 7 7-7 7"></path></svg>
                        Get Started Free
                    </a>
                    <a href="#pricing" class="btn-hero-secondary">View Pricing</a>
                </div>
                <div class="hero-badge">
                    <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M22 11.08V12a10 10 0 1 1-5.93-9.14"></path><polyline points="22 4 12 14.01 9 11.01"></polyline></svg>
                    No credit card required to start.
                </div>
            </div>
            
            <div class="hero-visual">
                <div class="dashboard-preview">
                    <!-- Fake Dashboard UI -->
                    <div class="preview-topbar">
                        <div class="preview-dots"><span></span><span></span><span></span></div>
                        <div class="preview-title">tellerpro.com/dashboard</div>
                    </div>
                    <div class="preview-stats">
                        <div class="preview-stat"><div class="preview-stat-label">Sales Today</div><div class="preview-stat-value">$1,248</div></div>
                        <div class="preview-stat"><div class="preview-stat-label">Transactions</div><div class="preview-stat-value">64</div></div>
                        <div class="preview-stat"><div class="preview-stat-label">Est. Profit</div><div class="preview-stat-value">$320</div></div>
                        <div class="preview-stat"><div class="preview-stat-label">Low Stock</div><div class="preview-stat-value">3</div></div>
                    </div>
                    <div class="preview-chart">
                        <div class="preview-bar" style="height:40%"></div>
                        <div class="preview-bar" style="height:60%"></div>
                        <div class="preview-bar" style="height:35%"></div>
                        <div class="preview-bar" style="height:80%"></div>
                        <div class="preview-bar" style="height:55%"></div>
                        <div class="preview-bar" style="height:90%"></div>
                        <div class="preview-bar" style="height:100%"></div>
                    </div>
                    <div class="preview-table">
                        <div class="preview-row"><div class="preview-row-label">AirPods Pro Gen 2</div><div class="preview-row-val">$249</div><div class="preview-row-badge badge-green">In Stock</div></div>
                        <div class="preview-row"><div class="preview-row-label">MacBook Air M2</div><div class="preview-row-val">$1,199</div><div class="preview-row-badge badge-yellow">Low Stock</div></div>
                    </div>
                </div>
            </div>
        </div>
    </header>

    <!-- Social Proof -->
    <section class="stats-row">
        <div class="stats-item"><div class="stats-number">99.9%</div><div class="stats-label">Uptime</div></div>
        <div class="stats-item"><div class="stats-number">5M+</div><div class="stats-label">Transactions Processed</div></div>
        <div class="stats-item"><div class="stats-number">10k+</div><div class="stats-label">Active Retailers</div></div>
    </section>

    <!-- Features -->
    <section id="features" class="section section-center">
        <span class="section-eyebrow">Powerful Tools</span>
        <h2>Everything you need to run your store</h2>
        <p class="sub">TellerPro comes packed with all the tools required to manage inventory, process sales, and analyze business performance.</p>
        
        <div class="features-grid">
            <div class="feature-card">
                <div class="feature-icon"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="2" y="3" width="20" height="14" rx="2" ry="2"></rect><line x1="8" y1="21" x2="16" y2="21"></line><line x1="12" y1="17" x2="12" y2="21"></line></svg></div>
                <h3>Advanced POS Terminal</h3>
                <p>Lightning-fast dual POS system. Process sales with barcode scanners and print receipts instantly (80mm/50mm).</p>
            </div>
            <div class="feature-card">
                <div class="feature-icon"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"></path><polyline points="3.27 6.96 12 12.01 20.73 6.96"></polyline><line x1="12" y1="22.08" x2="12" y2="12"></line></svg></div>
                <h3>Multi-Location Routing</h3>
                <p>Manage infinite warehouse locations. Transfer stock seamlessly while maintaining accurate history logs.</p>
            </div>
            <div class="feature-card">
                <div class="feature-icon"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="22 12 18 12 15 21 9 3 6 12 2 12"></polyline></svg></div>
                <h3>Batch & Expiry Tracking</h3>
                <p>Never sell expired goods again. Track individual product batches directly from supplier to customer.</p>
            </div>
        </div>
    </section>

    <!-- Pricing -->
    <section id="pricing" class="section section-center" style="background: rgba(255,255,255,0.01); border-top: 1px solid var(--border)">
        <span class="section-eyebrow">Fair Pricing</span>
        <h2>Choose the perfect plan</h2>
        <p class="sub">Start free, upgrade as you grow. No hidden fees or surprises.</p>
        
        <div class="pricing-grid">
            <?php foreach ($plans as $plan): 
                $features = json_decode($plan['features'], true);
            ?>
            <div class="pricing-card <?= $plan['slug'] === 'pro' ? 'popular' : '' ?>">
                <?php if ($plan['slug'] === 'pro'): ?><div class="plan-popular">MOST POPULAR</div><?php endif; ?>
                <div class="pricing-name"><?= e($plan['name']) ?></div>
                <div class="pricing-price">
                    <span class="pricing-amount">GH₵<?= number_format($plan['price_monthly']) ?></span>
                    <span class="pricing-period">/mo</span>
                </div>
                <div class="pricing-desc">
                    <?= $plan['max_products'] === -1 ? 'Unlimited' : $plan['max_products'] ?> Products, 
                    <?= $plan['max_users'] === -1 ? 'Unlimited' : $plan['max_users'] ?> Users.
                </div>
                
                <div class="pricing-features">
                    <div class="pricing-feature"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="20 6 9 17 4 12"></polyline></svg> <?= $plan['max_locations'] === -1 ? 'Unlimited' : $plan['max_locations'] ?> Location(s)</div>
                    <div class="pricing-feature"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="20 6 9 17 4 12"></polyline></svg> POS Terminal</div>
                    
                    <?php if (!empty($features['invoice'])): ?>
                    <div class="pricing-feature"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="20 6 9 17 4 12"></polyline></svg> A4 Invoice Module</div>
                    <?php endif; ?>
                    
                    <?php if (!empty($features['batch_tracking'])): ?>
                    <div class="pricing-feature"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="20 6 9 17 4 12"></polyline></svg> Batch & Expiry Alerts</div>
                    <?php endif; ?>
                    
                    <?php if (!empty($features['reports_advanced'])): ?>
                    <div class="pricing-feature"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="20 6 9 17 4 12"></polyline></svg> Advanced Reports</div>
                    <?php endif; ?>
                </div>
                
                <a href="<?= APP_URL ?>/register" class="btn-pricing <?= $plan['slug'] === 'pro' ? 'btn-pricing-primary' : 'btn-pricing-outline' ?>">
                    Get Started
                </a>
            </div>
            <?php endforeach; ?>
        </div>
    </section>

    <!-- CTA -->
    <section class="cta-section">
        <div class="cta-card">
            <h2>Ready to transform your retail business?</h2>
            <p>Join thousands of businesses managing their inventory flawlessly.</p>
            <div class="cta-actions">
                <a href="<?= APP_URL ?>/register" class="btn-hero-primary">Start <?= TRIAL_DAYS ?>-Day Free Trial</a>
                <a href="#features" class="btn-hero-secondary" style="background: rgba(255,255,255,0.03);">Scroll Features</a>
            </div>
        </div>
    </section>

    <!-- Footer -->
    <footer>
        <div class="footer-brand">TellerPro SaaS</div>
        <ul class="footer-links">
            <li><a href="#">Privacy</a></li>
            <li><a href="#">Terms</a></li>
            <li><a href="#">Support</a></li>
        </ul>
        <div class="footer-copy">© <?= date('Y') ?> TellerPro. All rights reserved.</div>
    </footer>

</body>
</html>
