{{-- Shared theme skeleton. Each theme passes a `theme` array with palette + font tokens. The base now ships a richer e-commerce shell: search, wishlist + compare + cart icons in the header, full footer with shipping/contact/social blocks. Themes override visuals via @section('extra-styles') and content via the two shared partials (_partials._index, _partials._product). --}} @php $brand = $theme['brand'] ?? ($settings['brand_color'] ?? '#075E54'); $bg = $theme['bg'] ?? '#FBFAF6'; $surface = $theme['surface'] ?? '#FFFFFF'; $text = $theme['text'] ?? '#0B1F1C'; $muted = $theme['muted'] ?? '#6B807C'; $border = $theme['border'] ?? '#E5DFD0'; $accent = $theme['accent'] ?? $brand; $serif = $theme['serif'] ?? "'Fraunces',Georgia,serif"; $sans = $theme['sans'] ?? "'Plus Jakarta Sans',system-ui,sans-serif"; $mono = $theme['mono'] ?? "'JetBrains Mono',monospace"; $heroSize = $theme['heroSize'] ?? '46px'; $cardRadius = $theme['cardRadius'] ?? '14px'; $logo = $logo ?? ($settings['logo_url'] ?? null); $hero = $hero ?? ($settings['hero_text'] ?? ''); $footer = $footer ?? ($settings['footer_text'] ?? '© ' . date('Y') . ' ' . ($shopName ?? ($workspace?->name ?: 'Store'))); $shopName = $shopName ?? ($workspace?->name ?: 'Store'); @endphp {{ isset($product) ? $product->name . ' · ' . $shopName : $shopName }} @php $seoDesc = isset($product) ? ($product->description ?: $shopName) : $settings['hero_text'] ?? $shopName . ' on WhatsApp'; $seoImg = isset($product) ? $product->image_url : $logo ?? null; $seoUrl = request()->fullUrl(); @endphp {{-- S9 SEO: Open Graph + Twitter so shared links render a rich card. --}} @if ($seoImg) @endif @isset($product) {{-- JSON-LD Product schema for rich results (built in PHP + null-filtered so the directive parser never sees a complex literal). --}} @php $ld = [ '@context' => 'https://schema.org', '@type' => 'Product', 'name' => $product->name, 'image' => array_values(array_filter([$product->image_url])), 'description' => \Illuminate\Support\Str::limit(strip_tags((string) $product->description), 500), 'sku' => $product->sku ?: null, 'brand' => $product->brand ? ['@type' => 'Brand', 'name' => $product->brand] : null, 'offers' => [ '@type' => 'Offer', 'price' => number_format(((int) $product->price_minor) / 100, 2, '.', ''), 'priceCurrency' => $product->currency_code ?: $sf->currency_code ?? 'INR', 'availability' => $product->effective_availability === 'in stock' ? 'https://schema.org/InStock' : 'https://schema.org/OutOfStock', 'url' => $seoUrl, ], 'aggregateRating' => ($ratingCount ?? 0) > 0 ? [ '@type' => 'AggregateRating', 'ratingValue' => $ratingAvg, 'reviewCount' => $ratingCount, ] : null, ]; $ld = array_filter($ld, fn($v) => $v !== null && $v !== []); @endphp @endisset @if (!empty($settings['top_strip']))
{{ $settings['top_strip'] }}
@else
{{ __('Order on WhatsApp · Cash on delivery available · Free chats, fast replies') }}
@endif
@if ($logo) @endif {{ $shopName }}
@yield('content') @isset($product) {{-- Reviews (S6) — shared across all themes so every product page shows social proof + a submit form without per-theme edits. --}}

{{ __('Reviews') }}

@if (($ratingCount ?? 0) > 0)
{{ $ratingAvg }} {{ str_repeat('★', (int) round($ratingAvg)) }}{{ str_repeat('★', 5 - (int) round($ratingAvg)) }} {{ trans_choice('{1}:count review|[2,*]:count reviews', $ratingCount, ['count' => $ratingCount]) }}
@foreach ($reviews as $rv)
{{ $rv->customer_name ?: __('Anonymous') }} {{ str_repeat('★', $rv->rating) }}{{ str_repeat('★', 5 - $rv->rating) }}
@if ($rv->body)

{{ $rv->body }}

@endif
@endforeach @else

{{ __('No reviews yet — be the first to review this product.') }}

@endif
{{ __('Write a review') }}
@endisset {{-- ─────────────── Shop config + catalog handoff to STOREFRONT.* JS ─────────────── --}} @include('storefront._shared')