<?php $__env->startSection('title', 'Add Ready Stock Vehicle – Admin CRM'); ?>
<?php $__env->startSection('page_title', 'Add Ready Stock Vehicle'); ?>

<?php $__env->startSection('content'); ?>
<div class="max-w-4xl space-y-6">
    
    <div class="flex items-center justify-between">
        <a href="<?php echo e(route('admin.inventory.index')); ?>" class="text-xs font-bold text-slate-400 hover:text-white flex items-center gap-1.5">
            <i class="fa-solid fa-arrow-left"></i>
            <span>Back to Inventory</span>
        </a>
    </div>

    <?php if($errors->any()): ?>
        <div class="p-4 rounded-xl bg-rose-500/10 border border-rose-500/30 text-rose-400 text-xs space-y-1">
            <span class="font-bold block">Validation Errors:</span>
            <ul class="list-disc pl-5 space-y-0.5">
                <?php $__currentLoopData = $errors->all(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $error): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <li><?php echo e($error); ?></li>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
            </ul>
        </div>
    <?php endif; ?>

    <form method="POST" action="<?php echo e(route('admin.inventory.store')); ?>" class="bg-slate-900 border border-white/10 rounded-2xl p-6 sm:p-8 shadow-xl space-y-6">
        <?php echo csrf_field(); ?>

        <h3 class="text-base font-bold text-white font-heading border-b border-white/10 pb-3">Vehicle Details & Specifications</h3>

        <div class="grid grid-cols-1 sm:grid-cols-3 gap-4">
            <div>
                <label class="block text-xs font-bold uppercase tracking-wider text-slate-300 mb-1">Make / Brand *</label>
                <input type="text" name="make" value="<?php echo e(old('make', 'Toyota')); ?>" required class="w-full bg-slate-950 border border-white/10 rounded-xl px-4 py-2.5 text-white text-xs font-semibold focus:border-red-500 focus:outline-none">
            </div>
            <div>
                <label class="block text-xs font-bold uppercase tracking-wider text-slate-300 mb-1">Model *</label>
                <input type="text" name="model" value="<?php echo e(old('model', 'Harrier')); ?>" required class="w-full bg-slate-950 border border-white/10 rounded-xl px-4 py-2.5 text-white text-xs font-semibold focus:border-red-500 focus:outline-none">
            </div>
            <div>
                <label class="block text-xs font-bold uppercase tracking-wider text-slate-300 mb-1">Variant / Trim</label>
                <input type="text" name="variant" value="<?php echo e(old('variant', 'Z Leather Package')); ?>" class="w-full bg-slate-950 border border-white/10 rounded-xl px-4 py-2.5 text-white text-xs font-semibold focus:border-red-500 focus:outline-none">
            </div>
        </div>

        <div class="grid grid-cols-2 sm:grid-cols-4 gap-4">
            <div>
                <label class="block text-xs font-bold uppercase tracking-wider text-slate-300 mb-1">Year *</label>
                <input type="number" name="year" value="<?php echo e(old('year', date('Y') - 2)); ?>" required class="w-full bg-slate-950 border border-white/10 rounded-xl px-4 py-2.5 text-white text-xs font-semibold focus:border-red-500 focus:outline-none">
            </div>
            <div>
                <label class="block text-xs font-bold uppercase tracking-wider text-slate-300 mb-1">Chassis Number *</label>
                <input type="text" name="chassis_number" value="<?php echo e(old('chassis_number')); ?>" required class="w-full bg-slate-950 border border-white/10 rounded-xl px-4 py-2.5 text-white text-xs font-semibold focus:border-red-500 focus:outline-none uppercase" placeholder="MXUA80-1234567">
            </div>
            <div>
                <label class="block text-xs font-bold uppercase tracking-wider text-slate-300 mb-1">Engine Displacement (CC) *</label>
                <input type="number" name="engine_cc" value="<?php echo e(old('engine_cc', 1986)); ?>" required class="w-full bg-slate-950 border border-white/10 rounded-xl px-4 py-2.5 text-white text-xs font-semibold focus:border-red-500 focus:outline-none">
            </div>
            <div>
                <label class="block text-xs font-bold uppercase tracking-wider text-slate-300 mb-1">Mileage (KM) *</label>
                <input type="number" name="mileage" value="<?php echo e(old('mileage', 18500)); ?>" required class="w-full bg-slate-950 border border-white/10 rounded-xl px-4 py-2.5 text-white text-xs font-semibold focus:border-red-500 focus:outline-none">
            </div>
        </div>

        <div class="grid grid-cols-2 sm:grid-cols-4 gap-4">
            <div>
                <label class="block text-xs font-bold uppercase tracking-wider text-slate-300 mb-1">Fuel Type *</label>
                <select name="fuel_type" class="w-full bg-slate-950 border border-white/10 rounded-xl px-3 py-2.5 text-white text-xs font-semibold">
                    <option value="Hybrid">Hybrid</option>
                    <option value="Petrol">Petrol</option>
                    <option value="Diesel">Diesel</option>
                    <option value="Electric">Electric</option>
                </select>
            </div>
            <div>
                <label class="block text-xs font-bold uppercase tracking-wider text-slate-300 mb-1">Transmission *</label>
                <input type="text" name="transmission" value="<?php echo e(old('transmission', 'Automatic (CVT)')); ?>" required class="w-full bg-slate-950 border border-white/10 rounded-xl px-4 py-2.5 text-white text-xs font-semibold">
            </div>
            <div>
                <label class="block text-xs font-bold uppercase tracking-wider text-slate-300 mb-1">Drive Type *</label>
                <select name="drive_type" class="w-full bg-slate-950 border border-white/10 rounded-xl px-3 py-2.5 text-white text-xs font-semibold">
                    <option value="2WD">2WD</option>
                    <option value="4WD">4WD</option>
                    <option value="AWD">AWD</option>
                </select>
            </div>
            <div>
                <label class="block text-xs font-bold uppercase tracking-wider text-slate-300 mb-1">Body Type *</label>
                <input type="text" name="body_type" value="<?php echo e(old('body_type', 'SUV')); ?>" required class="w-full bg-slate-950 border border-white/10 rounded-xl px-4 py-2.5 text-white text-xs font-semibold">
            </div>
        </div>

        <div class="grid grid-cols-2 sm:grid-cols-4 gap-4">
            <div>
                <label class="block text-xs font-bold uppercase tracking-wider text-slate-300 mb-1">Color *</label>
                <input type="text" name="color" value="<?php echo e(old('color', 'Pearl White')); ?>" required class="w-full bg-slate-950 border border-white/10 rounded-xl px-4 py-2.5 text-white text-xs font-semibold">
            </div>
            <div>
                <label class="block text-xs font-bold uppercase tracking-wider text-slate-300 mb-1">Auction Grade *</label>
                <input type="text" name="auction_grade" value="<?php echo e(old('auction_grade', '4.5')); ?>" required class="w-full bg-slate-950 border border-white/10 rounded-xl px-4 py-2.5 text-white text-xs font-semibold">
            </div>
            <div>
                <label class="block text-xs font-bold uppercase tracking-wider text-slate-300 mb-1">Selling Price (BDT) *</label>
                <input type="number" name="selling_price_bdt" value="<?php echo e(old('selling_price_bdt', 7500000)); ?>" required class="w-full bg-slate-950 border border-white/10 rounded-xl px-4 py-2.5 text-white text-xs font-semibold">
            </div>
            <div>
                <label class="block text-xs font-bold uppercase tracking-wider text-slate-300 mb-1">Discount (BDT)</label>
                <input type="number" name="discount_bdt" value="<?php echo e(old('discount_bdt', 0)); ?>" class="w-full bg-slate-950 border border-white/10 rounded-xl px-4 py-2.5 text-white text-xs font-semibold">
            </div>
        </div>

        <div>
            <label class="block text-xs font-bold uppercase tracking-wider text-slate-300 mb-1">Main Vehicle Image URL *</label>
            <input type="url" name="main_image" value="<?php echo e(old('main_image', 'https://images.unsplash.com/photo-1549399542-7e3f8b79c341?w=800&q=80')); ?>" required class="w-full bg-slate-950 border border-white/10 rounded-xl px-4 py-2.5 text-white text-xs font-semibold">
        </div>

        <div class="grid grid-cols-2 gap-4">
            <div>
                <label class="block text-xs font-bold uppercase tracking-wider text-slate-300 mb-1">Inventory Status *</label>
                <select name="status" class="w-full bg-slate-950 border border-white/10 rounded-xl px-3 py-2.5 text-white text-xs font-semibold">
                    <option value="available">Available in Showroom</option>
                    <option value="reserved">Reserved / Deposit Paid</option>
                    <option value="sold">Sold</option>
                    <option value="arriving">Arriving at Port</option>
                </select>
            </div>
            <div class="flex items-center pt-5">
                <label class="flex items-center gap-2 cursor-pointer text-xs font-semibold text-white">
                    <input type="checkbox" name="is_featured" value="1" class="rounded accent-red-600">
                    <span>Feature on Homepage Showcase</span>
                </label>
            </div>
        </div>

        <div>
            <label class="block text-xs font-bold uppercase tracking-wider text-slate-300 mb-1">Vehicle Description & Highlights</label>
            <textarea name="description" rows="3" class="w-full bg-slate-950 border border-white/10 rounded-xl px-4 py-2.5 text-white text-xs font-semibold focus:border-red-500 focus:outline-none" placeholder="Key factory options, leather color, safety sense, sunroof..."></textarea>
        </div>

        <button type="submit" class="px-6 py-3 rounded-xl bg-red-600 hover:bg-red-700 text-white font-bold text-xs shadow-lg shadow-red-900/30 transition flex items-center gap-2">
            <i class="fa-solid fa-plus"></i>
            <span>Add to Ready Stock Showroom</span>
        </button>
    </form>

</div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.admin', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /Users/redwoneferdous/Desktop/MotoSolution/resources/views/admin/inventory/create.blade.php ENDPATH**/ ?>