

<?php $__env->startSection('banner'); ?>
     <!-- banner -->
     <section>
        <div class="header-img banner-size">
  
        </div>
        <?php echo $__env->make('partials.telecharger', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
      </section>

<?php $__env->stopSection(); ?>

<?php $__env->startSection('main'); ?>
   <!-- Main -->
   <section>
    <div class="container text-center my-5">
        <div class="row">
          <div class="col-md-12">
            <h2 class="titre text-uppercase">NOTRE CARTE </h2>
            <h3 class="sous-titre text-uppercase"><?php echo e($category_selected); ?></h3>
          </div>
          <div class="col-md-3">
            <div class="accordion" id="accordionExample">
              <?php $__currentLoopData = $menus; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                <div class="accordion-item">
                  <h2 class="accordion-header" id="has<?php echo e($item->id); ?>">
                    <button class="accordion-button <?php if($item->slug != $Pcategory_selected): ?> collapsed <?php endif; ?> " style="color: <?php echo e($item->color); ?>" type="button" data-bs-toggle="collapse" data-bs-target="#collapse<?php echo e($item->slug); ?>" <?php if($item->slug == $Pcategory_selected): ?> aria-expanded="true" <?php else: ?> aria-expanded="false"    <?php endif; ?>  aria-controls="collapse<?php echo e($item->slug); ?>">
                      <?php echo e($item->titre); ?>

                    </button>
                  </h2>
                  
                  <div id="collapse<?php echo e($item->slug); ?>" class="accordion-collapse collapse <?php if($item->slug == $Pcategory_selected): ?>    show <?php endif; ?> " aria-labelledby="has<?php echo e($item->slug); ?>" data-bs-parent="#accordionExample">
                    <div class="accordion-body list p-0" >
                      <ul class="m-0 ps-3">
                        <?php $__currentLoopData = $item->categories; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $category): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <li><a href="<?php echo e(route('cart.produit',[$item->slug,$category->slug])); ?>"><?php echo e($category->titre); ?></a></li>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>

                      </ul> 
                    </div>
                  </div>
                </div>
              <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
 
            
            </div>

          </div>
          <div class="col-md-9">
            <div class="container">
                <div class="row">
                  <div class="col-md-12">
                    <div class="container cart-produits">
                      <div class="row g-4">
                        <?php $__currentLoopData = $produits; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $produit): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <!-- card -->
                        <div class="col-md-3">
                          <div class="card position-relative" >
                            <?php if(!empty($produit->nutriscore) && $produit->nutriscore == 'NEW' ): ?>
                               
                            <div class="new-flag position-absolute"><span>Nouveau</span></div>

                            <?php endif; ?>


                            <?php if(empty($produit->image) || $produit->image == null): ?>
                            <div class="image-produit mt-3">
                              <img src="<?php echo e(asset('images/logo/top-logo.png')); ?>" class="card-img-top produit-img img-fluid " alt="...">
                            </div>
                            <?php else: ?>
                            <div class="image-produit mt-3">
                                <img src="<?php echo e(Storage::url($produit->image)); ?>" class=" img-fluid produit-img" alt="...">
                            </div>

                            <?php endif; ?>
                            <div class="card-body ">
                              <h5 class="card-title"><?php echo e($produit->produit); ?></h5>
                              <?php if(!empty($produit->composition)): ?>
                              <p class="card-text">
                                <?php echo e($produit->composition); ?>

                              </p>
                              <?php endif; ?>
                              <!-- <h6 class="card-title-category">Jambon halal</h6> -->
                              
                                
                            </div>
                            <div class="container card-price <?php if(!empty($produit->prix_menu) || $produit->prix_menu != null): ?> background <?php endif; ?> text-start py-2 px-md-4 px-2">
                              <div class="row justify-content-center">
                                <?php if(empty($produit->prix_menu) || $produit->prix_menu == null): ?>
                                <div class="col-md-12 text-center"><span ><?php echo e($produit->prix_individuel); ?></span></div>
                                <?php else: ?>
                                <div class="col-md-6"><span class="solo-price"><?php echo e($produit->prix_individuel); ?></span></div>
                                <div class="col-md-6"><span class="menu-price"><?php echo e($produit->prix_menu); ?></span></div>
                                <?php endif; ?>
                                
                              </div>
                            </div>
                          </div>
                        </div>
                        <!-- end card -->
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                     
                      </div>
        
                    </div>
                  </div>
                   <div class="popup-image">
                    <span>&times;</span>
                    <img src="<?php echo e(asset('images/rvb/RVB_A.png')); ?>" alt="">
                  </div>
                  
                </div>
            </div>
          </div> 
            
        </div>
        </div>
  </section>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('first-block'); ?>
  <?php echo $__env->make('partials.first-block', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
<?php $__env->stopSection(); ?>


<?php $__env->startPush('scripts'); ?>
    <script>
      
      document.querySelector('.popup-image').addEventListener('click', function (e) {
        if(e.target == document.querySelector('.popup-image')) {
          document.querySelector('.popup-image').classList.remove("active");
        }
      })

      document.querySelectorAll('.image-produit img').forEach(image => {
        image.onclick = () =>{
          document.querySelector('.popup-image').classList.add("active");
          document.querySelector('.popup-image img').src = image.getAttribute('src')
         }
      });
      document.querySelector('.popup-image span').onclick = () => {
        document.querySelector('.popup-image').classList.remove("active");
      }

    </script>
<?php $__env->stopPush(); ?>

<?php echo $__env->make('layouts.layout', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/meritpfd/pommedepain.merimbulaviajes.com/resources/views/frontend/cart/index.blade.php ENDPATH**/ ?>