@extends('layouts.admin')

@section('content')

@include('partials.admin-show-header', [
    'back' => route('admin.gallery.index'),
    'backLabel' => 'Back to Gallery',
    'title' => 'Gallery Photo',
    'subtitle' => ucfirst($item->category) . ' · Added ' . $item->created_at->format('M d, Y'),
    'destroy' => route('admin.gallery.destroy', $item->id),
    'deleteTitle' => 'Delete this photo?',
    'deleteText' => 'This image will be permanently removed from the gallery.',
])

<div class="row g-4">
    <div class="col-lg-8">
        <div class="card border-0 shadow-sm rounded-4 overflow-hidden bg-white">
            <img src="{{ asset($item->image_path) }}" class="w-100" style="max-height:520px;object-fit:contain;background:#f8f9fa;" alt="Gallery photo">
        </div>
    </div>
    <div class="col-lg-4">
        <div class="card border-0 shadow-sm rounded-4 p-4 bg-white">
            <h6 class="fw-bold text-secondary border-bottom pb-2 mb-3">Photo Details</h6>
            <div class="mb-3">
                <span class="text-muted small d-block">CAPTION</span>
                <span class="text-secondary">{{ $item->caption ?? 'No caption provided' }}</span>
            </div>
            <div class="mb-3">
                <span class="text-muted small d-block">CATEGORY</span>
                <span class="badge bg-light text-secondary border rounded-pill">{{ ucfirst($item->category) }}</span>
            </div>
            <div class="mb-3">
                <span class="text-muted small d-block">FILE PATH</span>
                <code class="small text-muted">{{ $item->image_path }}</code>
            </div>
            <div>
                <span class="text-muted small d-block">UPLOADED</span>
                <span class="text-secondary small">{{ $item->created_at->format('F j, Y g:i A') }}</span>
            </div>
        </div>
    </div>
</div>

@endsection
