<?php
  $nfotos = $imagens->count();
  $prod = $produtos->first();
  $image = $imagens->first();
?>
<script type="text/javascript">
  function somarQtde(){
    var s1 = document.getElementById("s1").value;
    var s2 = 1;
    var s3 = parseInt(s1) + parseInt(s2);
    document.getElementById("s1").value = s3;
  }
  function subtrairQtde(){
    var s1 = document.getElementById("s1").value;
    var s2 = 1;
    var s3 = parseInt(s1) - parseInt(s2);
    if(s3 >= 1){document.getElementById("s1").value = s3;}
  }
</script>
<section class="section1" id="carouselSection">
  <br>
  <div class="container">
    <div class="card card-solid">
      <div class="row">
        <div class="col-md-6">
          <h3 class="d-inline-block d-sm-none m-3"><?php echo e($prod->descricao); ?></h3>
          <div align="center">
            <!-- slides -->
            <div class="carousel-inner mt-2">
                  <div class="carousel-item active">
                    <img src="<?php echo e(asset($image->caminho)); ?>" class="img-fluid">
                  </div>
            </div>
          </div>
        </div>
        <div class="col-12 col-md-6">
          <form id="formAddCard" name="formAddCard" novalidate="novalidate"
                action="<?php echo e(route('home.card.upitens')); ?>"
                method="POST">
            <?php echo e(csrf_field()); ?>

            <input name="codigo" type="text" hidden value="<?php echo e($prod->codigo); ?>">
            <input name="descricao" type="text" hidden value="<?php echo e($prod->descricao); ?>">
            <input name="img" type="text" hidden value="<?php echo e($image->caminho); ?>">
            <h3 name class="m-3"><?php echo e($prod->descricao); ?></h3>
            <p class="text-justify m-3"><?php echo e(strip_tags(substr($prod->obsprod, 0, 200))); ?></p>
            <div class="bg-gray py-2 px-3 mt-4">
              <h2 class="mb-0">
                R$ <?php echo e(FormataValor($prod->precoeco,13,2)); ?>

              </h2>
            </div>
            <div class="row d-flex center-block px-3 mt-4">
              <div class="btn-group btn-sm btn-group-toggle w-25" data-toggle="buttons">
                <label class="btn btn-secondary ">
                  <input type="radio" id="subtrair" onclick="subtrairQtde()"> <b>+</b>
                </label>
                <label class="btn">
    
                  <input class="w-100" id="s1" name="qtde" type="text" value="1"/>
                </label>
                <label class="btn btn-secondary">
                  <input type="radio" id="somar" onclick="somarQtde()"> <b>+</b>
                </label>
              </div>
              <div class="justify-content-center">
                <button type="submit" class="btn btn-primary btn-lg">
                  <i class="fas fa-shopping-basket"></i>
                  Comprar
                </button>
              </div>
            </div>
          </form>
    </div>
  </div>
  <br>
  <div class="container">
    <div class="card card-solid">
      <div class="container">
        <br>
        <div class="alert alert-dark" role="alert">
          Descrição do Produto
        </div>
        <div class="container">
          <div class="tab-pane fade show active" id="product-desc" role="tabpanel" aria-labelledby="product-desc-tab">
            <?php echo $prod->obsprod ?>
          </div>
        </div>
      </div>
    </div>
  </div>


  <br>
  <br>
  <br>

</section>





<?php /**PATH C:\projects\lara\projectwix\resources\views/layout_cardapio/_includes/detalhar-produto.blade.php ENDPATH**/ ?>