@extends('layouts.app') @section('title', $product->name . ' - AutoPart') @section('content') @php $imgSrc = $product->image_path ? asset('images/' . $product->image_path) : 'https://ui-avatars.com/api/?name=' . urlencode($product->name) . '&background=random&size=400'; $discount = ($product->old_price && $product->old_price > $product->price) ? round((1 - $product->price / $product->old_price) * 100) : 0; $thumbImg = asset('images/341fbb0976be66c1c36fd01a5b73ab10.jpg'); @endphp
{{-- Page Header --}}

Product Details

Home Shop {{ mb_strimwidth($product->name, 0, 30, '...') }}
{{-- Gallery --}}
@if($discount > 0) -{{ $discount }}% @endif {{ $product->name }}
@foreach([$imgSrc, $thumbImg, $imgSrc, $thumbImg] as $idx => $img)
@endforeach
{{-- Info --}}
{{ $product->brand }} | {{ $product->stock > 0 ? 'In Stock' : 'Out of Stock' }}

{{ $product->name }}

{{-- Rating --}}
@for($i = 0; $i < 5; $i++) @if($i < floor($product->rating)) @else @endif @endfor
({{ $product->num_reviews ?? 0 }} Customer Reviews)
{{-- Price --}}
${{ number_format($product->price, 2) }} @if($product->old_price) ${{ number_format($product->old_price, 2) }} @endif

{{ $product->description ?? 'Provide optimal protection and performance with our premium ' . $product->name . '. Engineered for high performance and longevity.' }}

{{-- Add to Cart --}}
{{-- Meta --}}
SKU: SKU-{{ $product->id }}
Brand: {{ $product->brand }}
{{-- Guarantees --}}
Fast Delivery2-4 Business Days
Secure Payment100% Protected
{{-- Tabs --}}
@foreach(['description', 'specifications', 'reviews'] as $tab) @endforeach

Product Overview

{{ $product->description ?? 'Provide optimal protection and performance with our premium ' . $product->name . '.' }} Designed to meet or exceed OEM specifications, this product guarantees perfect fitment and function.

Key Features

  • Advanced friction reduction for improved efficiency
  • Excellent performance under stress
  • Protects against sludge and deposits
  • Compatible with modern vehicle systems
  • Extended lifespan guarantee
{{-- Related Products --}} @if($relatedProducts->count() > 0)

Related Products

@foreach($relatedProducts as $rp) @include('partials.product-card', ['product' => $rp]) @endforeach
@endif
@endsection