@php $settings = $settings ?? \App\Models\StoreSetting::getSettings(); $activeTheme = $settings->getActiveTheme(); $mainMenus = $mainMenus ?? \App\Models\StoreNavMenu::with(['children', 'page', 'category'])->mainMenus()->get(); $bgColor = $settings->bg_color ?: ($activeTheme['bg_color'] ?? '#0a0f1d'); $primaryColor = $settings->primary_color ?: ($activeTheme['primary_color'] ?? '#6366f1'); $accentColor = $settings->accent_color ?: ($activeTheme['accent_color'] ?? '#06b6d4'); $textColor = $settings->text_color ?: ($activeTheme['text_color'] ?? '#f8fafc'); $themeKey = $settings->theme_template ?: 'dark_tech'; $isLight = ($themeKey === 'clean_retail'); $isRoyal = ($themeKey === 'royal_wholesale'); @endphp @yield('title', $settings->store_name) {{-- Header / Menú Superior --}}
{{-- Logo & Brand --}} @if($settings->logo_path) {{ $settings->store_name }} @else {{ strtoupper(substr($settings->store_name, 0, 1)) }} @endif
{{ $settings->store_name }} @if($settings->store_slogan) @endif
{{-- Menú de Navegación y Submenús --}} {{-- Acciones Derecha (Login Mayorista, Carrito & WhatsApp) --}}
@auth @php $authUser = auth()->user(); $tierName = $authUser->getCustomerTierName(); $discount = $authUser->getStoreDiscountPercentage(); $isTierCustomer = $discount > 0 || $authUser->is_wholesale || $authUser->isAdmin(); @endphp @if($isTierCustomer)
👑
@else @endif
@csrf
@else @endauth @if($settings->whatsapp_number) @endif Carrito @php $cartCount = collect(session('cart', []))->sum(); @endphp @if($cartCount > 0) {{ $cartCount }} @endif
{{-- Contenido Principal --}}
@if (session('success'))
{{ session('success') }}
@endif @if (session('error'))
{{ session('error') }}
@endif @if (session('info'))
👑 {{ session('info') }}
@endif @yield('content')
{{-- Botón Flotante de WhatsApp --}} @if($settings->whatsapp_number) @endif {{-- Footer Completo con Redes Sociales & GPS --}} {{-- MODAL DE INICIO DE SESIÓN EXCLUSIVO PARA CLIENTES DE LA TIENDA --}}