<?php $__env->startSection('content'); ?>
<div class="container page-space">
    <?php echo $__env->make('front.partials.ad',['slot'=>'home_top'], array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>

    <div class="quick-pills">
        <span>🔞 18+ Movies</span><span>Join Community</span><span>How to Watch</span>
    </div>

    <div class="home-catalogue-layout">
        <section class="home-catalogue-main">
            <div class="section-head">
                <div>
                    <h2>🔥 Latest Movies & TV Shows</h2>
                    <p class="section-subtitle"><?php echo e($sort === 'trending' ? 'Trending this week on TMDB.' : ($sort === 'latest_released' ? 'Newest releases are shown first.' : ($sort === 'most_viewed' ? 'Most viewed titles are shown first.' : 'Newest TMDB imports are always shown first.'))); ?></p>
                </div>
                <?php if($fromDate || $toDate || $contentType !== 'all' || $sort !== 'trending'): ?>
                    <a class="clear-filter-link" href="<?php echo e(route('home')); ?>">Clear filters</a>
                <?php endif; ?>
            </div>

            <div
                class="grid cinema-grid"
                id="infiniteCatalogue"
                data-infinite-catalogue
                data-next-page-url="<?php echo e($contents->nextPageUrl()); ?>"
                data-loading-message="Loading more movies & TV shows..."
                data-finished-message="You have reached the end of the catalogue."
            >
                <?php $__empty_1 = true; $__currentLoopData = $contents; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $x): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                    <?php echo $__env->make('front.partials.card', ['x' => $x, 'type' => $x->content_type], array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                    <div class="empty-state catalogue-empty">No content found for this date range.</div>
                <?php endif; ?>
            </div>

            <?php if($contents->hasMorePages()): ?>
                <div class="infinite-loader" data-infinite-loader aria-live="polite">
                    <span class="infinite-spinner" aria-hidden="true"></span>
                    <span data-loader-text>Loading more movies & TV shows...</span>
                </div>
                <div class="infinite-sentinel" data-infinite-sentinel aria-hidden="true"></div>
                <button class="infinite-retry" type="button" data-infinite-retry hidden>Try again</button>
            <?php elseif($contents->isNotEmpty()): ?>
                <div class="infinite-finished">You have reached the end of the catalogue.</div>
            <?php endif; ?>
        </section>

        <aside class="home-filter-sidebar" aria-label="Catalogue sorting and date filter">
            <?php echo $__env->make('front.partials.catalogue-filter', [
                'filterAction' => route('home'),
                'showContentType' => true,
            ], array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>
        </aside>
    </div>

    <?php echo $__env->make('front.partials.ad',['slot'=>'home_bottom'], array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>
</div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('front.layout', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /home/megashopltd/moviedocks.com/resources/views/front/home.blade.php ENDPATH**/ ?>