@extends('shop.app')

@section('content')
<div class="container">
    <div class="card">
        <div class="container-fliud">
            <div class="wrapper row">
                <div class="preview col-md-6">

                    <div class="preview-pic tab-content">
                        @foreach($product->productImages as $key=>$image)
                        @if($key == 0)
                            <div class="tab-pane active" id="pic-{{$key}}"><img src="{{$image->path}}" /></div>
                        @else
                            <div class="tab-pane" id="pic-{{$key}}"><img src="{{$image->path}}" /></div>
                        @endif
                        @endforeach
                    </div>
                    <ul class="preview-thumbnail nav nav-tabs">
                        @foreach($product->productImages as $key=>$image)
                        @if($key == 0)
                        <li class="active"><a data-target="#pic-{{$key}}" data-toggle="tab"><img src="{{$image->path}}" /></a>
                        </li>
                        @else
                            <li><a data-target="#pic-{{$key}}" data-toggle="tab"><img src="{{$image->path}}" /></a>
                            </li>
                        @endif
                        @endforeach
                    </ul>

                </div>
                <div class="details col-md-6">
                    <h3 class="product-title">{{$product->attributeValue('name')}}</h3>

                    <p class="product-description">{{$product->attributeValue('description')}}</p>
                    <h4 class="price">Cijena: <span>{{$product->finalPrice()}}</span></h4>

                    <h5 class="sizes">sizes:
                        <span class="size" data-toggle="tooltip" title="small">s</span>
                        <span class="size" data-toggle="tooltip" title="medium">m</span>
                        <span class="size" data-toggle="tooltip" title="large">l</span>
                        <span class="size" data-toggle="tooltip" title="xtra large">xl</span>
                    </h5>
                    <h5 class="colors">colors:
                        <span class="color orange not-available" data-toggle="tooltip" title="Not In store"></span>
                        <span class="color green"></span>
                        <span class="color blue"></span>
                    </h5>
                    <div class="action">
                        <a href="{{route('add-to-cart',['id'=>$product->id])}}" class="add-to-cart btn btn-default" type="button">Dodaj u korpu</a>
                        <a href="{{route('add-to-wishlist',['id'=>$product->id])}}" class="like btn btn-default" type="button"><span class="fa fa-heart"></span></a>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
@endsection
<link rel="stylesheet" href="/themes/default/css/product_view.css">
