

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

<section class="text-gray-700 body-font overflow-hidden bg-white">
  <div class="container px-5 py-24 mx-auto">
    <div class="lg:w-4/5 mx-auto flex flex-wrap">
      <img alt="ecommerce" class="lg:w-1/2 w-full object-cover object-center rounded border border-gray-200" src="<?php echo e(asset('images/barrel3.png')); ?>">
      <div class="lg:w-1/2 w-full lg:pl-10 lg:py-6 mt-6 lg:mt-0">
        <h2 class="text-sm title-font text-gray-500 tracking-widest">PURE STANDARD</h2>
        <h1 id="<?php echo e($product->id); ?>" class="product text-gray-900 text-3xl title-font font-medium mb-1"><?php echo e($product->name); ?>(s)</h1>
        <div class="flex mb-4">
          <span class="flex items-center">
            <svg fill="currentColor" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" class="w-4 h-4 text-blue-500" viewBox="0 0 24 24">
              <path d="M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z"></path>
            </svg>
            <svg fill="currentColor" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" class="w-4 h-4 text-blue-500" viewBox="0 0 24 24">
              <path d="M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z"></path>
            </svg>
            <svg fill="currentColor" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" class="w-4 h-4 text-blue-500" viewBox="0 0 24 24">
              <path d="M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z"></path>
            </svg>
            <svg fill="currentColor" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" class="w-4 h-4 text-blue-500" viewBox="0 0 24 24">
              <path d="M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z"></path>
            </svg>
            <svg fill="currentColor" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" class="w-4 h-4 text-blue-500" viewBox="0 0 24 24">
              <path d="M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z"></path>
            </svg>
            <span class="text-gray-600 ml-3">5 Star Product</span>
          </span>
          <span class="flex ml-3 pl-3 py-2 border-l-2 border-gray-200">
          </span>
        </div>
        <p class="leading-relaxed"><?php echo e($product->description); ?></p>
        <div class="flex mt-6 items-center pb-5 border-b-2 border-gray-200 mb-5">

          <div class="flex">
            <form id="iform" action="<?php echo e(route('add_to_cart')); ?>" method="post" class="">
                <?php echo csrf_field(); ?>
                <div class="block w-full pb-3">
                    <input type="number" min="<?php echo e($product->min); ?>" max="<?php echo e($product->max); ?>" name="qty" id="item-qty" placeholder="How many Barrels?" 
                    class="w-full p-3 bg-gray-100 h-12 text-black"
                    required autofocus style="width:200px;"/>
                    <input type="hidden" name="product_id" value="<?php echo e($product->id); ?>">
                </div>
            </form>
          </div>

          <div class="flex ml-6 items-center">
            <span class="mr-1">&#8358;<?php echo e(number_format($product->price)); ?>/Barrel</span>
            <!-- <div class="relative">
              <select class="rounded border appearance-none border-gray-400 py-2 focus:outline-none focus:border-red-500 text-base pl-3 pr-10">
                <option>SM</option>
                <option>M</option>
                <option>L</option>
                <option>XL</option>
              </select>
              <span class="absolute right-0 top-0 h-full w-10 text-center text-gray-600 pointer-events-none flex items-center justify-center">
                <svg fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" class="w-4 h-4" viewBox="0 0 24 24">
                  <path d="M6 9l6 6 6-6"></path>
                </svg>
              </span>
            </div> -->
          </div>
        </div>
        <div class="flex">
          <span class="title-font font-medium text-2xl text-gray-900">&#8358;<span class="total"></span></span>
          <button type="submit" form="iform" class="flex ml-auto text-white bg-blue-600 shadow-md shadow-blue-600 border-0 py-2 px-6 focus:outline-none hover:bg-blue-700 transition rounded">
             Buy Now
             <svg class="h-6 w-6 ml-1 text-white"  fill="none" viewBox="0 0 24 24" stroke="currentColor">
                <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" 
                d="M16 11V7a4 4 0 00-8 0v4M5 9h14l1 12H4L5 9z"/>
            </svg>
          </button>
          <a href="<?php echo e(route('welcome')); ?>" class="rounded-full w-10 h-10 bg-gray-200 p-0 border-0 inline-flex items-center justify-center text-gray-500 ml-4">
            <svg class="h-6 w-6 text-gray-700"  width="24" height="24" viewBox="0 0 24 24" 
                stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" 
                stroke-linejoin="round">  <path stroke="none" d="M0 0h24v24H0z"/>  
                <polyline points="5 12 3 12 12 3 21 12 19 12" />  
                <path d="M5 12v7a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-7" />  <rect x="10" y="12" width="4" 
                height="4" />
            </svg>
          </a>
        </div>   
      </div>
    </div>
  </div>
</section>



<script>
    $(document).bind("ajaxSend", function() {
        $("#loader-body").removeClass("invisible");
    }).bind("ajaxComplete", function() {
        $("#loader-body").addClass("invisible");
    });
  
        // Get the user curent balance
        let myid = $('.product').attr('id');
        
        $.get("<?php echo e(URL::to('product-show')); ?>/"+myid, function (data) {
            
            //Calculate the input price
            let currency = Intl.NumberFormat('en-US');
            let price = data.price;
            
            $(".total").html($("#item-qty").val() * price);
            
            $("#item-qty").on('input', function(){
                    $(".total").html(currency.format($(this).val() * price));
            });
            
        });
          
</script>

<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/jangodri/public_html/resources/views/barrel.blade.php ENDPATH**/ ?>