<!DOCTYPE html>
<html lang="<?php echo e(str_replace('_', '-', app()->getLocale())); ?>">
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <meta name="csrf-token" content="<?php echo e(csrf_token()); ?>">

        <?php
            $pageTitle       = ($title ?? false) ? $title . ' | ' . config('app.name') : config('app.name');
            $pageDescription = ($description ?? false) ? $description : 'Buy and sell musical instruments and gear on ' . config('app.name') . '.';
            $pageImage       = $image ?? null;
            $canonicalUrl    = url()->current();
        ?>

        <title><?php echo e($pageTitle); ?></title>

        <!-- SEO Meta Tags -->
        <meta name="description" content="<?php echo e($pageDescription); ?>">
        <link rel="canonical" href="<?php echo e($canonicalUrl); ?>">

        <!-- Open Graph -->
        <meta property="og:type" content="website">
        <meta property="og:site_name" content="<?php echo e(config('app.name')); ?>">
        <meta property="og:title" content="<?php echo e($pageTitle); ?>">
        <meta property="og:description" content="<?php echo e($pageDescription); ?>">
        <meta property="og:url" content="<?php echo e($canonicalUrl); ?>">
        <?php if($pageImage): ?>
        <meta property="og:image" content="<?php echo e($pageImage); ?>">
        <?php endif; ?>

        <!-- Twitter Card -->
        <meta name="twitter:card" content="<?php echo e($pageImage ? 'summary_large_image' : 'summary'); ?>">
        <meta name="twitter:title" content="<?php echo e($pageTitle); ?>">
        <meta name="twitter:description" content="<?php echo e($pageDescription); ?>">
        <?php if($pageImage): ?>
        <meta name="twitter:image" content="<?php echo e($pageImage); ?>">
        <?php endif; ?>

        <!-- Fonts -->
        <link rel="preconnect" href="https://fonts.bunny.net">
        <link href="https://fonts.bunny.net/css?family=figtree:400,500,600&display=swap" rel="stylesheet" />

        <!-- Scripts -->
        <?php echo app('Illuminate\Foundation\Vite')(['resources/css/app.css', 'resources/js/app.js']); ?>
        
        <!-- Choices.js for enhanced dropdowns -->
        <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/choices.js/public/assets/styles/choices.min.css" />
        <script src="https://cdn.jsdelivr.net/npm/choices.js/public/assets/scripts/choices.min.js"></script>
    </head>
    <body class="font-sans antialiased">
        <div class="min-h-screen bg-white dark:bg-gray-900 transition-colors duration-300">
            <?php echo $__env->make('layouts.navigation', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>


            <!-- Page Content -->
            <main class="pt-20">
                <?php if (isset($component)) { $__componentOriginal374d5c3cb117958356c5c6df84071567 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal374d5c3cb117958356c5c6df84071567 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.announcement-display','data' => []] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('announcement-display'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes([]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal374d5c3cb117958356c5c6df84071567)): ?>
<?php $attributes = $__attributesOriginal374d5c3cb117958356c5c6df84071567; ?>
<?php unset($__attributesOriginal374d5c3cb117958356c5c6df84071567); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal374d5c3cb117958356c5c6df84071567)): ?>
<?php $component = $__componentOriginal374d5c3cb117958356c5c6df84071567; ?>
<?php unset($__componentOriginal374d5c3cb117958356c5c6df84071567); ?>
<?php endif; ?>
                <?php echo e($slot); ?>

            </main>

            <!-- Footer -->
            <?php if (isset($component)) { $__componentOriginal8a8716efb3c62a45938aca52e78e0322 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal8a8716efb3c62a45938aca52e78e0322 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.footer','data' => []] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('footer'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes([]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal8a8716efb3c62a45938aca52e78e0322)): ?>
<?php $attributes = $__attributesOriginal8a8716efb3c62a45938aca52e78e0322; ?>
<?php unset($__attributesOriginal8a8716efb3c62a45938aca52e78e0322); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal8a8716efb3c62a45938aca52e78e0322)): ?>
<?php $component = $__componentOriginal8a8716efb3c62a45938aca52e78e0322; ?>
<?php unset($__componentOriginal8a8716efb3c62a45938aca52e78e0322); ?>
<?php endif; ?>
        </div>

        <!-- Behavioral Tracking Script -->
        <script>
            window.trackInteraction = function(itemId, interactionType, metadata = {}) {
                if (!itemId) return;
                
                fetch('<?php echo e(route("track.interaction")); ?>', {
                    method: 'POST',
                    headers: {
                        'Content-Type': 'application/json',
                        'X-CSRF-TOKEN': document.querySelector('meta[name="csrf-token"]').getAttribute('content'),
                        'Accept': 'application/json'
                    },
                    body: JSON.stringify({
                        item_id: itemId,
                        interaction_type: interactionType,
                        metadata: metadata
                    })
                }).catch(error => {
                    // Silent fail for tracking
                    console.debug('Tracking failed:', error);
                });
            };

            // Auto-track clicks on item links
            document.addEventListener('DOMContentLoaded', function() {
                document.querySelectorAll('a[data-item-id]').forEach(link => {
                    link.addEventListener('click', function() {
                        const itemId = this.getAttribute('data-item-id');
                        trackInteraction(itemId, 'click', {
                            source: window.location.pathname,
                            referrer: document.referrer
                        });
                    });
                });
            });
        </script>
    </body>
</html>
<?php /**PATH /var/www/html/resources/views/layouts/app.blade.php ENDPATH**/ ?>