<!DOCTYPE html>
<html lang="{{ app()->getLocale() }}">
<head>
    <title>@yield('page_title')</title>
    <meta name="base-url" content="{{ url()->to('/') }}">
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="csrf-token" content="{{ csrf_token() }}">
    <meta http-equiv="content-language" content="{{ app()->getLocale() }}">
    <meta name="format-detection" content="telephone=no">
@if ($favicon = core()->getCurrentChannel()->favicon_url)
    <link rel="icon" sizes="16x16" href="{{ $favicon }}" />
@else
    <link rel="icon" sizes="16x16" href="{{ bagisto_asset('images/favicon.ico') }}" />
@endif
@yield('head')
@section('seo')
    @if (! request()->is('/'))
    <meta name="description" content="{{ core()->getCurrentChannel()->description }}"/>
    @endif
@show
@stack('css_before')
    <link rel="stylesheet" href="{{bagisto_asset('styles/style.css')}}" />
    @stack('css')
    <style>
        {!! core()->getConfigData('general.content.custom_scripts.custom_css') !!}
    </style>
</head>
<body style="scroll-behavior: smooth;">
    @include('shop::layouts.header.top-nav')
    <div id="app">
        <flash-wrapper ref='flashes' cancel-btn-img="{{ bagisto_asset('icons/cancel.svg') }}"></flash-wrapper>
        @include('shop::layouts.header.search-nav')
        @include('shop::layouts.header.category-nav')
        @yield('content-wrapper')
        @include('shop::layouts.footer.index')
        <overlay-loader :is-open="show_loader"></overlay-loader>
        <go-top bg-color="#c5000e"></go-top>
        @guest('customer')
            @include('shop::layouts.auth')
        @endguest
    </div>
    <script type="text/javascript">
        window.flashMessages = [];
        @if ($success = session('success'))
            window.flashMessages = [{'type': 'alert-success', 'message': "{{ $success }}" }];
        @elseif ($warning = session('warning'))
            window.flashMessages = [{'type': 'alert-warning', 'message': "{{ $warning }}" }];
        @elseif ($error = session('error'))
            window.flashMessages = [{'type': 'alert-error', 'message': "{{ $error }}" }];
        @elseif ($info = session('info'))
            window.flashMessages = [{'type': 'alert-info', 'message': "{{ $info }}" }];
        @endif
        window.serverErrors = [];
        @if (isset($errors))
            @if (count($errors))
                window.serverErrors = @json($errors->getMessages());
            @endif
        @endif
    </script>
    <script type="text/javascript" src="{{ bagisto_asset('scripts/shop.js') }}" ></script>
    @stack('scripts')
    <div class="modal-overlay"></div>
    {!! core()->getConfigData('general.content.custom_scripts.custom_javascript') !!}

</body>

</html>
