<?php $__currentLoopData = $campaigns_product; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $campain): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
    <style>
        .camppp {
            padding-top: 2rem;
        }
    </style>
    <div class="products camppp">
        <div class="container">
            <?php echo $__env->make('frontend.partial.index.campaign_section_part.header_camp_grid', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
            <div class="text-center mb-2">
                <a href="/Campaign/product/<?php echo e($campain->slug); ?>"><img src="<?php if(file_exists(public_path() . '/uploads/campaign/' . $campain->cover_photo)): ?><?php echo e(asset('uploads/campaign/' . $campain->cover_photo)); ?><?php else: ?><?php echo e(asset('/icon/no-img-cat.png')); ?><?php endif; ?>" alt="<?php echo e($campain->cover_photo); ?>"></a>
            </div>
            <div class="row camp_slides">
                <?php $__currentLoopData = $campain->campaing_products->where('status', 0)->take(7); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $cam_products): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <?php $product = $cam_products->cam_products; ?>
                    <div class="product">
                        <?php $typeid = $product->slug; ?>
                        <div class="product-wrapper" <?php if(setting('is_point') == 1): ?> style="height: 355px;" <?php endif; ?>>
                            <div class="pin">
                                <div class="thumbnail">
                                    <a href="<?php echo e(route('product.cam.details', $cam_products->id)); ?>">
                                        <img src="<?php if(file_exists(public_path() . '/uploads/product/' . $product->image)): ?><?php echo e(asset('uploads/product/' . $product->image)); ?><?php else: ?><?php echo e(asset('/icon/no-img-cat.png')); ?><?php endif; ?>" alt="<?php echo e($product->title); ?>">
                                    </a>
                                </div>
                                <div class="details mt-2" style="padding-top:0 !important">
                                    <?php echo $__env->make('frontend.partial.index.campaign_section_part.rating_camp_section', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
                                    <a href="<?php echo e(route('product.cam.details', $cam_products->id)); ?>">
                                        <h5><?php echo e(mb_strlen($product->title) > 32 ? mb_substr($product->title, 0, setting('product_grid_title_character_counts') ?? 32) . '...' : $product->title); ?></h5>
                                    </a>
                                    <h6>
                                        <strong style="color: var(--primary_color)">৳<?php echo e($cam_products->price ?? ($product->discount_price ?? $product->regular_price)); ?></strong>
                                        <?php if($cam_products->price > 0 || $product->discount_price > 0): ?><del>৳<?php echo e($product->regular_price); ?></del><?php endif; ?>
                                    </h6>
                                </div>
                                <div class="quick-view"> <a href="<?php echo e(route('product.cam.details', $cam_products->id)); ?>">
                                    <i class="icofont icofont-search"></i> Quick View</a>
                                </div>
                            </div>
                            <?php
                                $hw = App\Models\wishlist::where('product_id', $product->id)
                                    ->where('user_id', auth()->id())
                                    ->first();
                                if ($hw) {
                                    $color = '#54c8ec';
                                } else {
                                    $color = '#a2acb5';
                                }
                            ?>
                            <div class="home-add2 d-block" style="display:block !important">
                                <div class="cbtn d-block">
                                    <?php if($product->quantity <= '0'): ?>
                                        <a href="<?php echo e(route('product.details', $product->slug)); ?>" class="redirect" style="margin-top: 10px;background: red;color: white;border-color: red;">Pre Order</a>
                                    <?php else: ?>
                                        <button 
                                            type="submit" 
                                            id="campProductInfo_<?php echo e($product->id); ?>" 
                                            class="redirect campProductInfoAddToCart" 
                                            style="margin-top: 10px;" 
                                            data-url="<?php echo e(route('camp.product.info', $cam_products->id)); ?>" 
                                            title="Add To Cart">
                                            <i class="fal fa-shopping-cart" aria-hidden="true"></i>
                                        </button>
                                    <?php endif; ?>
                                    <form action="<?php echo e(route('wishlist.add')); ?>" method="post" id="submit_payment_form<?php echo e($typeid); ?>">
                                        <?php echo csrf_field(); ?>
                                        <input type="hidden" name="product_id" value="<?php echo e($product->slug); ?>">
                                        <button style="margin-top: 5px;background:<?php echo e($color); ?>" class="redirect" type="submit" title="Wishlist"><i class="fal fa-heart" aria-hidden="true"></i> </button>
                                    </form>
                                </div>
                            </div>
                        </div>
                    </div>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
            </div>
        </div>
    </div>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>

<?php $__env->startPush('js'); ?>
<script>

    // Event listeners
    $(document).on('click', '.campProductInfoAddToCart', function (e) {
        e.preventDefault();
        updateFormMode('cart');
        productInfoPopUp($(this).data('url'), 'cart');
    });

    $(document).ready(function(){
        $('.camp_slides').slick({
            slidesToShow: 6,       // Number of slides to show at a time
            slidesToScroll: 1,     // Number of slides to scroll at once
            autoplay: true,        // Autoplay functionality
            autoplaySpeed: 1500,   // Autoplay speed in milliseconds
            dots: false,            // Enable dots for navigation
            arrows: false,          // Enable next/previous arrows
            infinite: true,        // Infinite loop
            centerMode: false,
            responsive: [
                {
                    breakpoint: 1024,
                    settings: {
                        slidesToShow: 2,
                        slidesToScroll: 1
                    }
                },
                {
                    breakpoint: 600,
                    settings: {
                        slidesToShow: 2,
                        slidesToScroll: 1
                    }
                }
            ]
        });
    });
</script>
<?php $__env->stopPush(); ?>
<?php /**PATH /home/apleusbj/public_html/resources/views/frontend/partial/index/campaign_section.blade.php ENDPATH**/ ?>