<!-- Top Trust Bar -->
<div class="bg-slate-900 text-slate-300 text-xs py-2 px-8 flex justify-between items-center hidden md:flex">
    <div class="flex space-x-6">
        <span class="flex items-center"><svg class="w-4 h-4 mr-2 text-blue-500" fill="currentColor" viewBox="0 0 20 20"><path d="M2.003 5.884L10 9.882l7.997-3.998A2 2 0 0016 4H4a2 2 0 00-1.997 1.884z"></path><path d="M18 8.118l-8 4-8-4V14a2 2 0 002 2h12a2 2 0 002-2V8.118z"></path></svg> support@utsnparts.in</span>
        <span class="flex items-center"><svg class="w-4 h-4 mr-2 text-blue-500" fill="currentColor" viewBox="0 0 20 20"><path d="M2 3a1 1 0 011-1h2.153a1 1 0 01.986.836l.74 4.435a1 1 0 01-.54 1.06l-1.548.773a11.037 11.037 0 006.105 6.105l.774-1.548a1 1 0 011.059-.54l4.435.74a1 1 0 01.836.986V17a1 1 0 01-1 1h-2C7.82 18 2 12.18 2 5V3z"></path></svg> +91 XXXXX XXXXX</span>
    </div>
    <div class="font-semibold text-blue-400 tracking-wide">
        100% GENUINE OEM & AFTERMARKET PARTS
    </div>
</div>

<!-- Main Header -->
<header class="sticky top-0 z-50 bg-white shadow-sm border-b border-gray-200 py-4 px-8 flex justify-between items-center" data-aos="fade-down">
    
    <!-- Logo -->
    <div class="text-3xl font-black tracking-tighter text-slate-900 uppercase">
        UTSN<span class="text-blue-600">PARTS</span>
    </div>
    
    <!-- Industrial Prominent Search Bar -->
    <div class="hidden md:block flex-1 max-w-2xl mx-10">
        <form action="#" method="GET" class="flex w-full relative">
            <input 
                type="text" 
                name="search"
                placeholder="Search by part number, vehicle model, or category..." 
                class="w-full pl-5 pr-32 py-3 bg-gray-50 border-2 border-gray-300 rounded-lg text-slate-800 placeholder-gray-500 focus:outline-none focus:border-blue-600 focus:bg-white transition-colors font-medium"
            />
            <button type="submit" class="absolute right-0 top-0 bottom-0 bg-blue-600 text-white px-8 rounded-r-lg font-bold hover:bg-blue-700 transition flex items-center">
                Search
            </button>
        </form>
    </div>

    <!-- User Actions -->
   <!-- User Actions -->
    <div class="flex space-x-6 items-center font-bold text-slate-700">
        
        <!-- Authentication Logic Start -->
        <?php if(auth()->guard('customer')->check()): ?>
            <!-- Logged In User Profile Dropdown (Alpine.js) -->
            <div x-data="{ open: false }" class="relative">
                <button @click="open = !open" @click.away="open = false" class="flex items-center hover:text-blue-600 transition focus:outline-none">
                    <svg class="w-5 h-5 mr-1" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M5.121 17.804A13.937 13.937 0 0112 16c2.5 0 4.847.655 6.879 1.804M15 10a3 3 0 11-6 0 3 3 0 016 0zm6 2a9 9 0 11-18 0 9 9 0 0118 0z"></path></svg>
                    <!-- Show User's Name -->
                    <span><?php echo e(explode(' ', Auth::guard('customer')->user()->name)[0] ?? 'Account'); ?></span>
                    <!-- Dropdown Arrow -->
                    <svg class="w-4 h-4 ml-1 text-slate-400" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M19 9l-7 7-7-7"></path></svg>
                </button>

                <!-- Dropdown Menu Panel -->
                <div 
                    x-show="open" 
                    x-transition:enter="transition ease-out duration-100"
                    x-transition:enter-start="transform opacity-0 scale-95"
                    x-transition:enter-end="transform opacity-100 scale-100"
                    x-transition:leave="transition ease-in duration-75"
                    x-transition:leave-start="transform opacity-100 scale-100"
                    x-transition:leave-end="transform opacity-0 scale-95"
                    class="absolute right-0 mt-3 w-56 bg-white rounded-lg shadow-xl border border-slate-200 z-50 overflow-hidden"
                    style="display: none;"
                >
                    <div class="px-4 py-3 bg-slate-50 border-b border-slate-100">
                        <p class="text-xs text-slate-500 font-medium">Signed in as</p>
                        <p class="text-sm font-bold text-slate-900 truncate"><?php echo e(Auth::guard('customer')->user()->phone ?? Auth::guard('customer')->user()->email); ?></p>
                    </div>
                    
                    <div class="py-1">
                        <a href="#" class="group flex items-center px-4 py-2.5 text-sm text-slate-700 hover:bg-blue-50 hover:text-blue-600 transition-colors">
                            <svg class="w-4 h-4 mr-3 text-slate-400 group-hover:text-blue-500" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M16 11V7a4 4 0 00-8 0v4M5 9h14l1 12H4L5 9z"></path></svg>
                            Your Orders
                        </a>
                        <a href="#" class="group flex items-center px-4 py-2.5 text-sm text-slate-700 hover:bg-blue-50 hover:text-blue-600 transition-colors">
                            <svg class="w-4 h-4 mr-3 text-slate-400 group-hover:text-blue-500" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M5 5a2 2 0 012-2h10a2 2 0 012 2v16l-7-3.5L5 21V5z"></path></svg>
                            My Saved Records
                        </a>
                        <a href="#" class="group flex items-center px-4 py-2.5 text-sm text-slate-700 hover:bg-blue-50 hover:text-blue-600 transition-colors">
                            <svg class="w-4 h-4 mr-3 text-slate-400 group-hover:text-blue-500" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"></path><path stroke-linecap="round" stroke-linejoin="round" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z"></path></svg>
                            Account Settings
                        </a>
                    </div>
                    
                    <div class="border-t border-slate-100">
                        <!-- Logout Form -->
                        <form method="POST" action="<?php echo e(route('logout')); ?>">
                            <?php echo csrf_field(); ?>
                            <button type="submit" class="w-full text-left flex items-center px-4 py-2.5 text-sm text-red-600 font-bold hover:bg-red-50 transition-colors">
                                <svg class="w-4 h-4 mr-3 text-red-500" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M17 16l4-4m0 0l-4-4m4 4H7m6 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h4a3 3 0 013 3v1"></path></svg>
                                Secure Logout
                            </button>
                        </form>
                    </div>
                </div>
            </div>
        <?php else: ?>
            <!-- Guest View (If Not Logged In) -->
            <a href="<?php echo e(route('login')); ?>" class="flex items-center hover:text-blue-600 transition">
                <svg class="w-5 h-5 mr-1" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"></path></svg>
                Login
            </a>
        <?php endif; ?>
        <!-- Authentication Logic End -->

        <!-- Cart Box (Always visible) -->
        <a href="#" class="flex items-center bg-slate-900 text-white px-5 py-2.5 rounded hover:bg-slate-800 transition shadow-md">
            <svg class="w-5 h-5 mr-2 text-blue-400" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M3 3h2l.4 2M7 13h10l4-8H5.4M7 13L5.4 5M7 13l-2.293 2.293c-.63.63-.184 1.707.707 1.707H17m0 0a2 2 0 100 4 2 2 0 000-4zm-8 2a2 2 0 11-4 0 2 2 0 014 0z"></path></svg>
            Cart (0)
        </a>
    </div>
</header><?php /**PATH C:\Users\Administrator\utsn-spare\resources\views/layouts/header.blade.php ENDPATH**/ ?>