
@extends('frontend.layouts.navBar')

@section('content')


<div class="page">
  <section class="breadcrumbs-custom">
    <div class="parallax-container" data-parallax-img="{{asset('frontend/images/bg-shop.jpg')}}">
      <div class="breadcrumbs-custom-body parallax-content context-dark">
        <div class="container">
          <h2 class="breadcrumbs-custom-title">Tifawt</h2>
        </div>
      </div>
    </div>
    <div class="breadcrumbs-custom-footer">
      <div class="container">
        <ul class="breadcrumbs-custom-path">
          <li><a href="/">Accueil</a></li>
          <li><a href="{{ URL::previous() }}">Produit</a></li>
          <li class="active">{{$produit ->nom}}</li>
        </ul>
      </div>
    </div>
  </section>
  <!-- Single Product-->
  <section class="section section-sm section-first bg-default">
    <div class="container">
      <div class="row row-30">
        <div class="col-lg-6">
          
                
          <div class="slick-vertical slick-product">
            <!-- Slick Carousel-->
            
            <div class="slick-slider carousel-parent" id="carousel-parent" data-items="1" data-swipe="true" data-child="#child-carousel" data-for="#child-carousel">
             @foreach($diapos as $diapo)
              <div class="item">
                <div class="slick-product-figure"><img src="{{ asset('storage/diapo/'.$diapo->diapo) }}" alt="" width="530" height="480"/>
                </div>
              </div>
            @endforeach
              
            </div>
             <div class="slick-slider child-carousel slick-nav-1" id="child-carousel" data-arrows="true" data-items="3" data-sm-items="3" data-md-items="3" data-lg-items="3" data-xl-items="3" data-xxl-items="3" data-md-vertical="true" data-for="#carousel-parent">
              
            @foreach($diapos as $diapo)
                
                <div class="item">
                  <div class="slick-product-figure"><img src="{{ asset('storage/diapo/'.$diapo->diapo) }}" alt="" width="530" height="480"/>
                  </div>
                </div>
            @endforeach
              
              
              </div> 
            
            
          </div>
        </div>
        <div class="col-lg-6">
          <div class="single-product">
            <h3 class="text-transform-none font-weight-medium">{{$produit ->nom}}</h3>
            <div class="group-md group-middle">
              
            </div>
            <p>{!! html_entity_decode($produit ->description) !!}</p>
            <hr class="hr-gray-100">
            <ul class="list list-description">
              <li><span>Categories:</span><span>  @foreach ($produit->categories as $singleTag)
               {{ $singleTag->nom }}
            @endforeach</span></li>
              @if($produit->promotion)
                  @foreach($promotions as $promotion )
                <span class="product-badge product-badge-sale">{{$promotion->remise}}</span>
                <li>  <span>Date:</span> <span>{{$promotion->debut}} -> {{$promotion->fin}}</span></li>
            
                <li>  <span>Date:</span> <span>{!! html_entity_decode($promotion->description)!!}</span></li>
       
                @endforeach
                  @endif
       
            </ul>
            <div class="group-xs group-middle">
              @if ($produit->document !=null)
              <div><a class="button button-lg button-secondary button-zakaria" href="{{ route('doc.download', $produit->id) }}"><i class="fa fa-download"></i> Fiche Technique.{{$extension}} <span style="    font-size: 10px;">{{  $sizeFile}} kB</span></a></div>
              @endif

            </div>
            <hr class="hr-gray-100">
            {{-- <div class="group-xs group-middle"><span class="list-social-title">Share</span> --}}
              <div>
                <ul class="list-inline list-social list-inline-sm">
             
                  {{-- @foreach($contacts as $contact)
                  @if($contact->coorType_id == 6)
                  <li><a class="icon mdi mdi-facebook" href="{{$contact->coordonnees}}" target="_blank"></a></li>
                  
                  @elseif($contact->coorType_id == 8)
                  <li><a class="icon mdi mdi-twitter" href="#"></a></li>

                  @elseif($contact->coorType_id == 7)
                  <li><a class="icon mdi mdi-instagram" href="#"></a></li>
                  @endif
                  @endforeach --}}
                  
                </ul>
              </div>
            </div>
          </div>
        </div>
      </div>
      <!-- Bootstrap tabs-->
    
</div>

@endsection