

<?php $__env->startSection('title'); ?>
	<?php echo e(title_case($page)); ?>

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

<?php 
	$share_url = Request::url();
	$share_title = $masterName." | ".ucfirst($page);
	$share_desc = title_case($page).' @ '.title_case($page_product).' '.$masterName;
	$share_img = asset($storage_url.'img/products/category/'.$main_image);
 ?>

<?php $__env->startSection('meta'); ?>
	<meta name="title" content="<?php echo e($share_title); ?>">
	<meta name="description" content="<?php echo e($share_desc); ?>">
<?php $__env->stopSection(); ?>

<?php $__env->startSection('sharing-meta'); ?>

<meta property="og:url" content="<?php echo e($share_url); ?>" />
<meta property="og:type" content="place" />
<meta property="og:title" content="<?php echo e($share_title); ?>" />
<meta property="og:description" content="<?php echo e($share_desc); ?>" />
<meta property="og:image" content="<?php echo e($share_img); ?>" />


<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="<?php echo e($share_url); ?>">
<meta name="twitter:title" content="<?php echo e($share_title); ?>">
<meta name="twitter:description" content="<?php echo e($share_desc); ?>">
<meta name="twitter:image:src" content="<?php echo e($share_img); ?>">


<meta itemprop="name" content="<?php echo e($share_title); ?>">
<meta itemprop="description" content="<?php echo e($share_desc); ?>">
<meta itemprop="image" content="<?php echo e($share_img); ?>">

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

<?php $__env->startSection('content'); ?>
  <header class="container-fluid text-center">
    <?php 
      $url = asset($storage_url.'img/products/category/'.$banner);
     ?>
    <div class="banner-section">
      <img alt="banner-header" src="<?php echo e($url); ?>" />
      <div class="banner-section-content">
        <h1 data-animate="true" data-effect="fadeInUp">
          <?php echo e($page); ?>

        </h1>
      </div>
    </div>
  </header>

  <main id="mainContent" class="container-fluid">
		<?php if(count($products) == 0): ?>
			<section class="empty-product">
				<div>
					<h1 class="text-center"><i class="fa fa-shopping-bag" aria-hidden="true"></i></h1>
				</div>
			</section>
		<?php endif; ?>
    <section class="row product-list">
      <div class="col-xs-12 col-md-12 col-md-offset-0 col-lg-10 col-lg-offset-1">
        <div class="row m-md-15">
          <?php $__currentLoopData = $products; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $val): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
						<?php 
							$get = $val->locales()->where('locale',config('app.locale'))->first();
						 ?>
            <article class="col-xs-12 col-sm-6 col-md-4 p-l-5 p-r-5">
              <div class="card" style="">
                <figure class="card-img">
                  <img alt="" src="<?php echo e(asset($storage_url.'img/products/'.$val->product_code.'/'.$val->product_image)); ?>"/>
                </figure>
                <div class="text-center card-content">
                  <header class="card-header">
                    <h2><?php echo e(isset($get->product_name) ? $get->product_name : $val->product_name); ?></h2>
										<p class="product-price"><?php 
                
                if($masterCurrency === 'USD' ){
                  echo ($masterCurrency.' '.number_format($val->product_price,2,'.',','));
                }elseif($masterCurrency === 'EUR' ){
                  echo ($masterCurrency.' '.number_format($val->product_price,2,',','.'));
                }else{
                  echo ($masterCurrency.' '.number_format($val->product_price,0,',','.'));
                } 
              
              ?></p>
                  </header>
									<div class="card-footer">
										<?php 
											$category = str_slug($page);
											$name = str_slug(isset($get)?$get->product_name:$val->product_name);
										 ?>
										<a href="<?php echo e(route('productDetail',['category'=>$category,'id'=>$val->product_code,'slug'=>$name])); ?>" class="btn btn-default"><?php echo app('translator')->getFromJson('frontend.detail'); ?></a>
									</div>
                </div>
              </div>
            </article>
          <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
        </div>
      </div>
    </section>
  </main>

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

<?php $__env->startSection('script'); ?>
	<script>
		function resize_card(){
			var $highest = 0;
			$(".product-list .card").each(function(){
				var $h = $($(this)).height();
				if($h > $highest){
					$highest = $h;
				}
			});

			$(".product-list .card").each(function(){
				$($(this)).css("height",$highest+"px");
			});
		};

		$(document).ready(function(){
			resize_card();
		});

		$(window).resize(function(){
			resize_card();
		});
	</script>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.master', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>