<x-user.content>
    <x-slot:title>Detail Produk </x-slot:title>
    <x-slot:head> </x-slot:head>
    <div class="container-fluid">
        <div class="row px-xl-5">
            <div class="col-12">
                <nav class="breadcrumb bg-light mb-30">
                    <a class="breadcrumb-item text-dark" href="/">Home</a>
                    <span class="breadcrumb-item active"> Detail</span>
                </nav>
            </div>
        </div>
    </div>
 
    <div class="container-fluid pb-5">
        <div class="row px-xl-5">
            <div class="col-lg-5 mb-30">
                <div id="product-carousel" class="carousel slide" data-ride="carousel">
                    <div class="carousel-inner bg-light">
                        <div class="carousel-item active">
                            @if ($p->gambar != null)
                                <img class="w-100 h-100" src="{{ asset('/storage/produk/' . $p->gambar) }}"
                                    alt="produk">
                            @else
                                <img alt="produk" class="w-100 h-100" src="{{ asset('storage/produk/produk.jpg') }}">
                            @endif
                        </div>
                    </div>
                </div>
            </div>

            <div class="col-lg-7 h-auto mb-30" id="detail">
                <div class="h-100 bg-light p-30">
                    <h3>{{ $p->nm_hadiah }}</h3>

                    <h3 class="font-weight-semi-bold mb-4">
                        {{ number_format($p->poin, 0, ',', '.') }} Poin</h3>
                    <h6>Stok : {{ $p->stok - stok_item($p->kd_hadiah) }}</h6>
                    <br>
                    <p class="mb-4">{!! $p->keterangan !!}</p>




                </div>
            </div>
        </div>



    </div>

    <div class="container vh-100"></div>
    <x-slot:foot>

    </x-slot:foot>
</x-user.content>
