@extends('layouts.app') @section('title', $product->name) @section('content')
@if($product->images->first()) @if($product->images->first()->is_video) @else {{ $product->name }} @endif @else 🧨 @endif
@foreach($product->images->skip(1) as $img) @if($img->is_video) @else {{ $product->name }} @endif @endforeach

{{ $product->name }}

{{ $product->category->name }} @if($product->brand) · {{ $product->brand->name }} @endif

₹{{ number_format($product->selling_price, 2) }} @if($product->discount_percent > 0) ₹{{ number_format($product->mrp, 2) }} {{ $product->discount_percent }}% off @endif

{{ $product->in_stock ? 'In stock (' . $product->stock . ' available)' : 'Out of stock' }}

{{ $product->description }}

@auth
@csrf
in_stock)>
@csrf
@else Login to purchase @endauth

Reviews

@forelse($product->approvedReviews as $review)

{{ $review->user->name }} – {{ $review->rating }}/5

{{ $review->review }}

@empty

No reviews yet.

@endforelse @auth
@csrf
@endauth
@if($related->count())

Related Products

@foreach($related as $product) @include('customer.products._card', ['product' => $product]) @endforeach
@endif @endsection