

<?php $__env->startSection('content'); ?>
<div class="max-w-4xl mx-auto">
    
    <div class="mb-6 flex justify-between items-center">
        <div>
            <h1 class="text-2xl font-black text-white uppercase tracking-widest">Add New <span class="text-transparent bg-clip-text bg-gradient-to-r from-cyan-400 to-purple-500">Spare Part</span></h1>
            <p class="text-sm text-slate-400 mt-1">Register a new product and initialize master stock.</p>
        </div>
        <a href="<?php echo e(route('products.index')); ?>" class="text-slate-400 hover:text-cyan-400 text-sm font-bold transition-colors">
            &larr; Back to Inventory
        </a>
    </div>

    <div class="bg-slate-900/60 backdrop-blur-xl rounded-2xl shadow-2xl border border-slate-800 p-8">
        <form action="<?php echo e(route('products.store')); ?>" method="POST" enctype="multipart/form-data">
            <?php echo csrf_field(); ?>

            <div class="grid grid-cols-1 md:grid-cols-2 gap-6 mb-6">
                
                <div class="md:col-span-2">
                    <label class="block text-xs font-bold text-slate-400 uppercase tracking-wide mb-2">Part Name</label>
                    <input type="text" name="name" required placeholder="e.g. TCL 55-inch Mainboard" class="w-full bg-slate-950/50 border border-slate-700 rounded-lg px-4 py-3 text-white focus:outline-none focus:border-cyan-500 focus:ring-1 focus:ring-cyan-500">
                </div>

                <div>
                    <label class="block text-xs font-bold text-slate-400 uppercase tracking-wide mb-2">Unique Part Code</label>
                    <input type="text" name="part_code" required placeholder="e.g. TCL-MB-123" class="w-full bg-slate-950/50 border border-slate-700 rounded-lg px-4 py-3 text-white focus:outline-none focus:border-cyan-500 focus:ring-1 focus:ring-cyan-500">
                </div>
                <div>
                    <label class="block text-xs font-bold text-slate-400 uppercase tracking-wide mb-2">Category</label>
                    <select name="category_id" required class="w-full bg-slate-950/50 border border-slate-700 rounded-lg px-4 py-3 text-slate-300 focus:outline-none focus:border-cyan-500">
                        <option value="">Select a Category</option>
                        <?php $__currentLoopData = $categories; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $category): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <option value="<?php echo e($category->id); ?>"><?php echo e($category->name); ?> (<?php echo e($category->appliance_type); ?>)</option>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    </select>
                </div>

                <div>
                    <label class="block text-xs font-bold text-slate-400 uppercase tracking-wide mb-2">Genuine Price (₹)</label>
                    <input type="number" step="0.01" name="price" required placeholder="4500.00" class="w-full bg-slate-950/50 border border-slate-700 rounded-lg px-4 py-3 text-white focus:outline-none focus:border-cyan-500 focus:ring-1 focus:ring-cyan-500">
                </div>
                <div>
                    <label class="block text-xs font-bold text-slate-400 uppercase tracking-wide mb-2">Initial Physical Stock</label>
                    <input type="number" name="available_quantity" required placeholder="e.g. 50" class="w-full bg-slate-950/50 border border-slate-700 rounded-lg px-4 py-3 text-white focus:outline-none focus:border-cyan-500 focus:ring-1 focus:ring-cyan-500">
                </div>

                <div class="md:col-span-2">
                    <label class="block text-xs font-bold text-slate-400 uppercase tracking-wide mb-2">Compatible Models (Comma separated)</label>
                    <input type="text" name="compatible_models" placeholder="TCL-55P615, TCL-55P715" class="w-full bg-slate-950/50 border border-slate-700 rounded-lg px-4 py-3 text-white focus:outline-none focus:border-cyan-500 focus:ring-1 focus:ring-cyan-500">
                </div>

                <div class="md:col-span-2">
                    <label class="block text-xs font-bold text-slate-400 uppercase tracking-wide mb-2">Product Image</label>
                    <input type="file" name="image" accept="image/*" class="w-full bg-slate-950/50 border border-slate-700 rounded-lg px-4 py-3 text-slate-400 file:mr-4 file:py-2 file:px-4 file:rounded-full file:border-0 file:text-sm file:font-semibold file:bg-cyan-500/10 file:text-cyan-400 hover:file:bg-cyan-500/20 transition-all cursor-pointer">
                </div>

                <div class="md:col-span-2">
                    <label class="block text-xs font-bold text-slate-400 uppercase tracking-wide mb-2">Detailed Description</label>
                    <textarea name="description" rows="3" class="w-full bg-slate-950/50 border border-slate-700 rounded-lg px-4 py-3 text-white focus:outline-none focus:border-cyan-500 focus:ring-1 focus:ring-cyan-500"></textarea>
                </div>
            </div>

            <div class="flex justify-end pt-4 border-t border-slate-800">
                <button type="submit" class="bg-gradient-to-r from-cyan-500 to-purple-600 hover:from-cyan-400 hover:to-purple-500 text-white font-bold py-3 px-8 rounded-lg transition-all transform hover:scale-[1.02] shadow-[0_0_15px_rgba(6,182,212,0.4)] uppercase tracking-widest">
                    Save Part & Initialize Stock
                </button>
            </div>
        </form>
    </div>
</div>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('admin.layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH C:\Users\Administrator\utsn-spare\resources\views/admin/products/create.blade.php ENDPATH**/ ?>