<section class="max-w-[1440px] mx-auto px-6 lg:px-10 py-16">
    <div class="flex items-end justify-between mb-10">
        <div>
            <h2 class="text-2xl font-bold text-text-main dark:text-white mb-2">@lang('home.heading|Latest Products')</h2>
            <p class="text-text-muted dark:text-gray-400">@lang('home.Fresh assets added to the marketplace this week.')</p>
        </div>
        <a class="hidden sm:flex items-center gap-1 text-primary font-medium hover:gap-2 transition-all"
            href="{{ route('frontend.products.all') }}">
            @lang('home.View all products')
            <span class="material-symbols-outlined text-[18px]">arrow_forward</span>
        </a>
    </div>

    <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8">
        @forelse($products as $product)
            @include('theme::components.cards.product', ['product' => $product])
        @empty
            <div class="col-span-full text-center py-10 text-text-muted">
                @lang('home.No products found.')
            </div>
        @endforelse
    </div>

    <div class="mt-12 text-center sm:hidden">
        <a class="inline-flex items-center justify-center w-full px-6 py-3 border border-gray-200 dark:border-gray-700 rounded-lg text-sm font-medium text-text-main dark:text-white hover:bg-gray-50 dark:hover:bg-gray-800 transition-colors"
            href="{{ route('frontend.products.all') }}">
            @lang('home.button|View All Products')
        </a>
    </div>
</section>
