@extends('layouts.admin')
@section('title', 'Modifier le produit')

@section('content')

<div class="max-w-3xl">
    <div class="flex items-center gap-3 mb-6">
        <a href="{{ route('admin.produits.index') }}" class="text-gray-400 hover:text-gray-600 transition-colors">
            <i class="fas fa-arrow-left"></i>
        </a>
        <h2 class="text-lg font-bold text-gray-900">Modifier : <span class="text-blue-600">{{ $product->name }}</span></h2>
    </div>

    <form action="{{ route('admin.produits.update', $product) }}" method="POST" enctype="multipart/form-data" class="space-y-5">
        @csrf
        @method('PUT')
        @include('admin.products._form')
        <div class="flex gap-3 pt-2">
            <button type="submit" class="bg-blue-600 text-white font-semibold px-6 py-2.5 rounded-xl hover:bg-blue-700 transition-colors flex items-center gap-2">
                <i class="fas fa-save"></i> Enregistrer
            </button>
            <a href="{{ route('admin.produits.index') }}" class="bg-gray-100 text-gray-700 font-semibold px-6 py-2.5 rounded-xl hover:bg-gray-200 transition-colors">
                Annuler
            </a>
        </div>
    </form>
</div>

@endsection
