@php $storeName = \App\Models\Setting::where('key', 'store_name')->value('value') ?? 'DigiShop'; $storeDesc = \App\Models\Setting::where('key', 'store_description')->value('value') ?? 'Marketplace digital terbaik.'; // Fetch all hero settings $settings = \App\Models\Setting::where('key', 'like', 'hero_%')->orWhere('key', 'like', 'digi-emerald_hero_%')->pluck('value', 'key'); // Background Gradient Logic $bgGradient = ""; $color1 = $settings['digi-emerald_hero_bg_color1'] ?? $settings['hero_bg_color1'] ?? null; $color2 = $settings['digi-emerald_hero_bg_color2'] ?? $settings['hero_bg_color2'] ?? null; if ($color1 && $color2) { $angle = $settings['digi-emerald_hero_bg_angle'] ?? $settings['hero_bg_angle'] ?? '135'; $bgGradient = "background: linear-gradient({$angle}deg, {$color1}, {$color2});"; } // Texts $heroEyebrow = $settings['hero_eyebrow'] ?: ($storeName . ' — Marketplace Digital'); $heroH1 = $settings['hero_headline_1'] ?? ''; $heroH2 = $settings['hero_headline_2'] ?? ''; if (empty($heroH1) && empty($heroH2)) { $oldHeadline = $settings['hero_headline'] ?? ''; if ($oldHeadline) { $heroH1 = $oldHeadline; $heroH2 = ''; } else { $heroH1 = 'Solusi Digital Premium'; $heroH2 = 'Untuk Bisnis Anda.'; } } $heroTagline = $settings['hero_tagline'] ?: $storeDesc; // CTAs $cta1Label = $settings['hero_cta1_label'] ?: 'Mulai Eksplorasi'; $cta1Url = $settings['hero_cta1_url'] ?: '#catalog'; $cta2Label = $settings['hero_cta2_label'] ?: 'Pelajari Detailnya'; $cta2Url = $settings['hero_cta2_url'] ?: '#about'; // Trust Badges $badge1 = $settings['hero_badge1'] ?? ''; $badge2 = $settings['hero_badge2'] ?? ''; $badge3 = $settings['hero_badge3'] ?? ''; @endphp @section('title', $storeName . ' - Beranda') @section('schema') @endsection {{-- HERO SECTION : Split Layout (Kiri Teks, Kanan Slider Flash Sale) --}}
@if($heroEyebrow)
{{ $heroEyebrow }}
@endif

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

@if($heroTagline)

{{ $heroTagline }}

@endif
@if($cta1Label) {{ $cta1Label }} @endif @if($cta2Label) {{ $cta2Label }} @endif
{{-- Trust Badges --}} @if($badge1 || $badge2 || $badge3)
@if($badge1)
{{ $badge1 }}
@endif @if($badge2)
{{ $badge2 }}
@endif @if($badge3)
{{ $badge3 }}
@endif
@endif
{{-- ============================================================ --}} {{-- TRUST BAR --}} {{-- ============================================================ --}} {{-- KATALOG SECTION : Tata Letak Grid Bersih (Tanpa Sidebar Kiri) --}} @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') ?: 'Akses Instan'; $catalogTitle = \App\Models\Setting::where('key', 'catalog_title')->value('value') ?: 'Koleksi Akun Kredensial'; $catalogSubtitle = \App\Models\Setting::where('key', 'catalog_subtitle')->value('value') ?: 'Pilihan akun premium siap pakai yang akan mempermudah dan memaksimalkan produktivitas Anda.'; @endphp

{{ $catalogEyebrow }}

{{ $catalogTitle }}

{{ $catalogSubtitle }}

{{-- Kolom Pencarian Besar di Tengah --}}
@if(request('category')) @endif
{{-- Grid Produk : 3 Kolom Penuh --}}
@forelse($products as $product)
@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.' }}

Rate - {{ 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

Produk Tidak Ditemukan

Maaf, kami tidak dapat menemukan produk yang sesuai dengan pencarian Anda.

Reset Pencarian
@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.' }}

Rate -
Terjual 1.2k+
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: Hijau — 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 {{-- ============================================================ --}} {{-- PAYMENT LOGOS SECTION --}} {{-- ============================================================ --}} @php $paymentLogosVisible = \App\Models\Setting::where('key', 'payment_logos_is_visible')->value('value'); $paymentLogosVisible = $paymentLogosVisible === null ? '1' : $paymentLogosVisible; @endphp @if($paymentLogosVisible == '1') @php $paymentLogosJson = \App\Models\Setting::where('key', 'payment_logos')->value('value'); $paymentLogos = $paymentLogosJson ? json_decode($paymentLogosJson, true) : []; if (!is_array($paymentLogos)) { $paymentLogos = []; } @endphp @endif