<section class="ssa-pricing-section">
    <div class="text-center ssa-section-heading reveal-on-scroll">
        <div class="prespa-saas-box ssa-badge justify-center">
            <img src="{{ asset('assets/themes/prespa-saas/assets/img/ps-patterns/icons/check.png') }}" alt="">
            <span>{{ $pricing['badge'] ?? 'Pricing & packages' }}</span>
        </div>

        <h2>{{ $pricing['title'] ?? 'Flexible packages for tracking builds, cleanup, and growth support.' }}</h2>
        <p>{{ $pricing['description'] ?? 'Use competitor-aligned starter packages as a guide, then request a free audit for a more exact scope.' }}</p>
    </div>

    <div class="ssa-pricing-grid">
        @foreach($pricing['packages'] ?? [] as $package)
            <div class="ssa-pricing-card reveal-on-scroll {{ !empty($package['featured']) ? 'is-featured' : '' }}">
                @if(! empty($package['badge']))
                    <span class="ssa-pricing-pill">{{ $package['badge'] }}</span>
                @endif

                <h3>{{ $package['name'] ?? 'Package' }}</h3>
                <p class="ssa-pricing-price">{{ $package['price'] ?? 'From $149' }}</p>
                <p class="ssa-pricing-meta">{{ $package['timeline'] ?? 'Typical turnaround: 3-5 days' }}</p>
                <p>{{ $package['summary'] ?? '' }}</p>

                @if(! empty($package['items']))
                    <ul class="ssa-pricing-features">
                        @foreach($package['items'] as $item)
                            <li>{{ $item }}</li>
                        @endforeach
                    </ul>
                @endif

                <a href="{{ route('contact', ['intent' => 'pricing', 'package' => $package['name'] ?? 'Package']) }}" class="ssa-inline-link">
                    Ask about this package
                </a>
            </div>
        @endforeach
    </div>

    <div class="ssa-inline-banner reveal-on-scroll">
        <div>
            <h3>{{ $pricing['audit_title'] ?? 'Request a free audit before choosing a package.' }}</h3>
            <p>{{ $pricing['audit_description'] ?? 'If you already have GA4, GTM, Meta Pixel, or Google Ads running, start with a free audit request and get a practical recommendation first.' }}</p>
        </div>

        <a href="{{ route('contact', ['intent' => 'free-audit']) }}" class="ssa-primary-button ssa-primary-button--inline">
            {{ $pricing['audit_label'] ?? 'Request Free Audit' }}
        </a>
    </div>
</section>
