@php $allSettings = \App\Models\Setting::whereIn('key', [ 'store_name', 'store_description', 'hero_bg_color1', 'hero_bg_color2', 'hero_bg_angle', 'hero_image', 'hero_eyebrow', 'hero_headline', 'hero_headline_1', 'hero_headline_2', 'hero_tagline', 'hero_cta1_label', 'hero_cta1_url', 'hero_cta2_label', 'hero_cta2_url', 'hero_badge1', 'hero_badge2', 'hero_badge3', 'video_section_active', 'video_title', 'video_description' ])->pluck('value', 'key'); $storeName = $allSettings['store_name'] ?? 'DigiShop'; $storeDesc = $allSettings['store_description'] ?? 'Marketplace digital terbaik.'; $heroImage = $allSettings['hero_image'] ?? null; $heroBgColor1 = $allSettings['hero_bg_color1'] ?? '#2563EB'; $heroBgColor2 = $allSettings['hero_bg_color2'] ?? '#60a5fa'; $heroBgAngle = $allSettings['hero_bg_angle'] ?? '135'; $heroEyebrow = $allSettings['hero_eyebrow'] ?: ''; $heroH1 = $allSettings['hero_headline_1'] ?? ''; $heroH2 = $allSettings['hero_headline_2'] ?? ''; if (empty($heroH1) && empty($heroH2) && !empty($allSettings['hero_headline'])) { $heroH1 = $allSettings['hero_headline']; $heroH2 = ''; } $heroH1 = $heroH1 ?: 'Temukan Produk Digital'; $heroH2 = $heroH2 ?: 'Berkualitas Tinggi'; $heroTagline = $allSettings['hero_tagline'] ?: ($storeDesc ?: 'Akses instan ke produk digital premium — dari template, e-book, hingga source code siap pakai.'); $heroCta1Label = $allSettings['hero_cta1_label'] ?: 'Lihat Katalog'; $heroCta1Url = $allSettings['hero_cta1_url'] ?: '#catalog'; $heroCta2Label = $allSettings['hero_cta2_label'] ?? ''; $heroCta2Url = $allSettings['hero_cta2_url'] ?? ''; $heroBadge1 = $allSettings['hero_badge1'] ?: 'Transaksi Aman & Terenkripsi'; $heroBadge2 = $allSettings['hero_badge2'] ?: 'Akses Instan Setelah Disetujui'; $heroBadge3 = $allSettings['hero_badge3'] ?: 'Unduh Tanpa Batas'; $heroStoreName = $storeName; $heroGradient = "linear-gradient(135deg, #2563EB 0%, #3b82f6 50%, #60a5fa 100%)"; $videoActive = $allSettings['video_section_active'] ?? '0'; $videoTitle = $allSettings['video_title'] ?? 'Walkthrough Produk'; $videoDesc = $allSettings['video_description'] ?? 'Gambaran visual interaktif aplikasi dan template digital kami.'; @endphp @section('title', $storeName . ' - ' . $storeDesc) @section('schema') @endsection {{-- ============================================================ --}} {{-- HERO SECTION --}} {{-- ============================================================ --}}
{{-- Decorative pattern --}}
{{-- LEFT: Text --}}
{{-- Decorative Dot Pattern (Consistent Small Circles) --}} {{-- Eyebrow --}}
{{ $heroEyebrow ?: ($heroStoreName . ' — Marketplace Digital') }}

{{ $heroH1 }} {{ $heroH2 }}

{{ $heroTagline }}

@if($heroCta1Label) {{ $heroCta1Label }} @endif @if($heroCta2Label) {{ $heroCta2Label }} @endif
{{-- RIGHT: Hero Image --}}
{{-- Floating Bubble 1: Kiri Atas (Digital Download) --}} {{-- Floating Bubble 2: Kanan Atas (Akun Kredensial) --}} {{-- Floating Bubble 3: Kiri Bawah (Unlimited Download) --}} {{-- Decorative Circles (Static - No Animation) --}}
{{-- Circle 1: Large Glow --}}
{{-- Circle 2: Sky Blue Outline --}} {{-- Circle 3: Cyan Outline (Thicker) --}}
@if($heroImage) Hero Image @else
Image Belum Diatur Upload Hero Image di pengaturan Admin untuk menampilkannya di sini.
@endif
{{-- ============================================================ --}} {{-- TRUST BAR --}} {{-- ============================================================ --}} {{-- ============================================================ --}} {{-- CATALOG SECTION --}} {{-- ============================================================ --}} @php $catalogVisible = \App\Models\Setting::where('key', 'catalog_is_visible')->value('value'); $catalogVisible = $catalogVisible === null ? '1' : $catalogVisible; @endphp @if($catalogVisible == '1')
@php $catalogEyebrow = \App\Models\Setting::where('key', 'catalog_eyebrow')->value('value') ?: 'Katalog Terbaik'; $catalogTitle = \App\Models\Setting::where('key', 'catalog_title')->value('value') ?: 'Eksplorasi Produk Digital'; $catalogSubtitle = \App\Models\Setting::where('key', 'catalog_subtitle')->value('value') ?: 'Pilihan produk premium siap pakai yang akan mempermudah produktivitas Anda.'; @endphp

{{ $catalogEyebrow }}

{{ $catalogTitle }}

{{ $catalogSubtitle }}

{{-- Kolom Pencarian --}}
@if(request('category')) @endif
{{-- Grid Produk : Kotak & Aspect Square --}}
{{-- Loading Overlay --}}
@forelse($products as $product)
@if($product->thumbnail) {{ $product->name }} @else
@endif
{{ $product->category->name ?? 'Umum' }}

{{ $product->name }}

{{ $product->description ?? 'Dapatkan produk digital premium terbaik untuk kebutuhan bisnis Anda.' }}

{{ number_format($product->rating, 1) }}
@if($product->sold_count > 0) Terjual {{ number_format($product->sold_count, 0, ',', '.') }} @else Baru @endif
Rp{{ number_format($product->price, 0, ',', '.') }}
Detail
@empty

Belum Ada Produk

Silakan kembali lagi nanti.

@endforelse
@if($products->hasPages())
{{ $products->links() }}
@endif
@endif {{-- ============================================================ --}} {{-- E-COURSE & AFFILIATE SECTION --}} {{-- ============================================================ --}} @php $ecourseVisible = \App\Models\Setting::where('key', 'ecourse_is_visible')->value('value'); $ecourseVisible = $ecourseVisible === null ? '1' : $ecourseVisible; @endphp @if($ecourseVisible == '1')
{{-- KIRI: E-Course Slider (Lebar) --}}
@php $ecourseTitle = \App\Models\Setting::where('key', 'ecourse_title')->value('value') ?: 'Koleksi E-Course'; $ecourseSubtitle = \App\Models\Setting::where('key', 'ecourse_subtitle')->value('value') ?: 'Tingkatkan skill Anda dengan kursus pilihan kami.'; @endphp

{{ $ecourseTitle }}

{{ $ecourseSubtitle }}

{{-- Horizontal scrollable container --}}
@forelse($eCourseProducts ?? [] as $product)
{{-- Gunakan desain card yang sama persis dengan katalog di atas --}}
@if($product->thumbnail) {{ $product->name }} @else
@endif
{{ $product->category->name ?? 'Umum' }}

{{ $product->name }}

{{ $product->description ?? 'Deskripsi tidak tersedia. Dapatkan produk digital premium terbaik untuk kebutuhan bisnis Anda.' }}

{{ number_format($product->rating, 1) }}
@if($product->sold_count > 0) Terjual {{ number_format($product->sold_count, 0, ',', '.') }} @else Baru @endif
Rp{{ number_format($product->price, 0, ',', '.') }}
@empty

Belum ada produk E-Course yang tersedia saat ini.

@endforelse
{{-- KANAN: Special Affiliate Banner (Sidebar Kecil) --}}
@php $recTitle = \App\Models\Setting::where('key', 'recommendation_title')->value('value') ?: 'Rekomendasi'; $recSubtitle = \App\Models\Setting::where('key', 'recommendation_subtitle')->value('value') ?: 'Produk spesial pilihan partner.'; $affBanner = \App\Models\Setting::where('key', 'affiliate_banner')->value('value'); $affBadge = \App\Models\Setting::where('key', 'affiliate_badge')->value('value') ?: 'Spesial Affiliate'; $affTitle = \App\Models\Setting::where('key', 'affiliate_title')->value('value') ?: 'Ultimate
Design Bundle'; $affSubtitle = \App\Models\Setting::where('key', 'affiliate_subtitle')->value('value') ?: 'Dapatkan ribuan aset desain premium dengan harga spesial!'; $affLink = \App\Models\Setting::where('key', 'affiliate_link')->value('value') ?: '#'; $affBtn = \App\Models\Setting::where('key', 'affiliate_button')->value('value') ?: 'Beli Sekarang'; @endphp {{-- Wrapper untuk menyamakan tinggi --}}
@endif {{-- ============================================================ --}} {{-- FREE GIFT SECTION --}} {{-- ============================================================ --}} @php $freeGiftVisible = \App\Models\Setting::where('key', 'free_gift_is_visible')->value('value'); $freeGiftVisible = $freeGiftVisible === null ? '1' : $freeGiftVisible; @endphp @if($freeGiftVisible == '1')
{{-- KIRI: Orange — Teks Promo --}} @php $fgHeadline = \App\Models\Setting::where('key', 'free_gift_headline')->value('value') ?: "Dapatkan Free Gift
\nEksklusif, secara gratis.!!"; $fgDesc = \App\Models\Setting::where('key', 'free_gift_description')->value('value') ?: 'Daftarkan nama & email Anda sekarang dan kami kirimkan gift spesial senilai ratusan ribu secara gratis!'; $fgSuccessTitle = \App\Models\Setting::where('key', 'free_gift_success_title')->value('value') ?: 'Yeay, Berhasil! 🎉'; $fgSuccessDesc = \App\Models\Setting::where('key', 'free_gift_success_desc')->value('value') ?: 'Cek inbox email Anda. Gift eksklusif sudah kami kirimkan!'; $fgBtnText = \App\Models\Setting::where('key', 'free_gift_button_text')->value('value') ?: 'Kirim Gift ke Email Saya'; $fgPrivacyText = \App\Models\Setting::where('key', 'free_gift_privacy_text')->value('value') ?: 'Kami menghormati privasi Anda. Tidak ada spam, selamanya.'; @endphp
{{-- Dekorasi latar minimalis --}}

{!! $fgHeadline !!}

{!! $fgDesc !!}

{{-- KANAN: Putih — Form --}}
{{-- Success State --}} {{-- Form --}}

{{ $fgPrivacyText }}

@endif {{-- ============================================================ --}} {{-- TESTIMONIAL SECTION --}} {{-- ============================================================ --}} @php $testimonialVisible = \App\Models\Setting::where('key', 'testimonial_is_visible')->value('value'); $testimonialVisible = $testimonialVisible === null ? '1' : $testimonialVisible; @endphp @if($testimonialVisible == '1' && $testimonials->isNotEmpty()) @php $testiEyebrow = \App\Models\Setting::where('key', 'testimonial_eyebrow')->value('value') ?: 'Ulasan Pelanggan'; $testiTitle = \App\Models\Setting::where('key', 'testimonial_title')->value('value') ?: 'Apa Kata Mereka?'; $testiSubtitle = \App\Models\Setting::where('key', 'testimonial_subtitle')->value('value') ?: 'Ribuan pelanggan telah merasakan manfaat produk digital kami. Bergabunglah sekarang!'; @endphp

{{ $testiEyebrow }}

{{ $testiTitle }}

{{ $testiSubtitle }}

{{-- Auto-scroll testimonial marquee --}} @php $displayTestis = $testimonials->count() < 4 ? $testimonials->concat($testimonials)->concat($testimonials) : $testimonials->concat($testimonials); @endphp
{{-- Left/Right fade edges --}}
@foreach($displayTestis as $testi)
{{-- Header --}}
@if($testi->avatar) {{ $testi->name }} @else
{{ strtoupper(substr($testi->name, 0, 1)) }}
@endif
{{ $testi->name }}
@for($i = 1; $i <= 5; $i++) @endfor
Verified
{{-- Quote --}}

{{ $testi->content }}

@if($testi->product)
{{ $testi->product->name }}
@endif
@endforeach
@endif {{-- ============================================================ --}} {{-- VIDEO SHOWCASE SECTION --}} {{-- ============================================================ --}} @if($videoActive === '1' && $videos->count() > 0)

{{ $videoTitle }}

{{ $videoDesc }}

{{-- Duplicate items for smooth infinite loop illusion --}} @php $displayVideos = $videos->count() < 4 ? $videos->concat($videos)->concat($videos)->concat($videos) : $videos->concat($videos); @endphp @foreach($displayVideos as $video)
Klik untuk Play
@if($video->source_type === 'youtube' && $video->youtube_id) Video Thumbnail @elseif($video->source_type === 'upload' && $video->file_path) @else
@endif
Walkthrough

{{ $video->title }}

@if($video->description)

{{ $video->description }}

@endif
@endforeach
@endif