<!DOCTYPE html>
<html>
<head>
    <title>Tambah Pizza | Admin</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            background: #f2f2f2;
            padding: 20px;
        }
        .container {
            background: white;
            width: 450px;
            margin: auto;
            padding: 25px;
            border-radius: 12px;
            box-shadow: 0 0 10px rgba(0,0,0,0.15);
        }
        h2 {
            text-align: center;
            margin-bottom: 20px;
        }
        label {
            font-weight: bold;
            display: block;
            margin-top: 10px;
        }
        input, textarea {
            width: 100%;
            padding: 8px;
            margin-top: 5px;
            border-radius: 6px;
            border: 1px solid #ccc;
        }
        button {
            width: 100%;
            padding: 10px;
            margin-top: 20px;
            background: #28a745;
            color: white;
            border: none;
            border-radius: 6px;
            cursor: pointer;
            font-weight: bold;
            font-size: 16px;
        }
        button:hover {
            background: #218838;
        }
        .back {
            display: inline-block;
            margin-bottom: 15px;
            color: #007bff;
            text-decoration: none;
            font-size: 14px;
        }
        ul {
            background: #ffe6e6;
            padding: 10px;
            border-radius: 6px;
        }
    </style>
</head>

<body>

<div class="container">
    <h2>Tambah Pizza 🍕</h2>

    <a class="back" href="{{ route('admin.pizzas.index') }}">← Kembali</a>

    @if($errors->any())
        <ul>
            @foreach($errors->all() as $error)
                <li style="color:red;">{{ $error }}</li>
            @endforeach
        </ul>
    @endif

    <form action="{{ route('admin.pizzas.store') }}" method="POST" enctype="multipart/form-data">
        @csrf

        <label>Nama Pizza:</label>
        <input type="text" name="nama_pizza" required>

        <label>Harga:</label>
        <input type="number" name="harga_pizza" required>

        <label>Deskripsi:</label>
        <textarea name="deskripsi"></textarea>

        <label>Gambar:</label>
        <input type="file" name="gambar">

        <button type="submit">Simpan</button>
    </form>
</div>

</body>
</html>
