<?php require_once __DIR__ . '/config.php'; $settings = Settings::all(); $featuredCount = (int)($settings['featured_product_count'] ?? 6); $featuredProducts = Product::getFeatured($featuredCount); $seo = new Seo(); $seo->setFromSettings($settings); require_once BASE_PATH . '/templates/header.php'; ?> <!-- Hero / Banner Video --> <section class="relative h-[85vh] min-h-[500px] flex items-center justify-center overflow-hidden"> <video autoplay muted loop playsinline class="absolute inset-0 w-full h-full object-cover" poster="/assets/images/hero-poster.jpg"> <source src="<?php echo e($settings['banner_video'] ?? '/assets/uploads/settings/banner.mp4'); ?>" type="video/mp4"> </video> <div class="absolute inset-0 bg-gradient-to-b from-black/60 via-black/40 to-black/70"></div> <div class="relative z-10 text-center text-white px-4 max-w-4xl mx-auto"> <h1 class="font-display text-4xl sm:text-5xl lg:text-7xl font-bold mb-4 leading-tight"> <?php echo e($settings['banner_title'] ?? 'Doganin En Guzel Hali'); ?> </h1> <p class="text-lg sm:text-xl lg:text-2xl text-white/90 mb-8 font-light"> <?php echo e($settings['banner_subtitle'] ?? 'Tarim, Fidancilik ve Cicekcilik'); ?> </p> <div class="flex flex-col sm:flex-row gap-4 justify-center"> <a href="/urunler" class="inline-flex items-center justify-center bg-leaf-600 hover:bg-leaf-500 text-white px-8 py-3.5 rounded-full font-medium transition shadow-xl"> Urunlerimizi Inceleyin </a> <a href="<?php echo whatsapp_link('Merhaba, bilgi almak istiyorum.'); ?>" target="_blank" rel="noopener" class="inline-flex items-center justify-center bg-white/10 hover:bg-white/20 backdrop-blur text-white border border-white/30 px-8 py-3.5 rounded-full font-medium transition"> WhatsApp ile Ulasin </a> </div> </div> </section> <!-- Hakkimizda Kisa Tanitim --> <section class="py-16 lg:py-24 bg-white"> <div class="max-w-4xl mx-auto px-4 sm:px-6 text-center"> <span class="text-leaf-600 font-medium text-sm uppercase tracking-wider">Biz Kimiz</span> <h2 class="font-display text-3xl lg:text-4xl font-bold text-leaf-900 mt-3 mb-6">Mercan Tarim ve Fidancilik</h2> <p class="text-gray-600 text-lg leading-relaxed"> <?php echo e($settings['about_text'] ?? ''); ?> </p> <a href="/hakkimizda" class="inline-block mt-8 text-leaf-700 hover:text-leaf-900 font-medium border-b-2 border-leaf-600 pb-1 transition"> Daha Fazla Bilgi &rarr; </a> </div> </section> <!-- One Cikan Urunler --> <section class="py-16 lg:py-24 bg-earth-50"> <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8"> <div class="text-center mb-12"> <span class="text-leaf-600 font-medium text-sm uppercase tracking-wider">Koleksiyonumuz</span> <h2 class="font-display text-3xl lg:text-4xl font-bold text-leaf-900 mt-3">One Cikan Urunler</h2> </div> <?php if (empty($featuredProducts)): ?> <p class="text-center text-gray-500">Henuz urun eklenmemis.</p> <?php else: ?> <div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-8"> <?php foreach ($featuredProducts as $product): ?> <article class="group bg-white rounded-2xl overflow-hidden shadow-sm hover:shadow-xl transition-all duration-300 border border-earth-100"> <a href="<?php echo product_url($product['slug']); ?>" class="block"> <div class="aspect-[4/3] overflow-hidden bg-earth-100"> <?php if (!empty($product['main_image'])): ?> <img src="<?php echo e($product['main_image']); ?>" alt="<?php echo e($product['name']); ?>" class="w-full h-full object-cover group-hover:scale-105 transition-transform duration-500" loading="lazy"> <?php else: ?> <div class="w-full h-full flex items-center justify-center text-earth-400"> <svg class="w-16 h-16" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="1" d="M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"/></svg> </div> <?php endif; ?> </div> <div class="p-6"> <h3 class="font-display text-xl font-semibold text-leaf-900 group-hover:text-leaf-700 transition"> <?php echo e($product['name']); ?> </h3> <p class="text-gray-500 mt-2 text-sm leading-relaxed"> <?php echo e(truncate($product['short_description'], 100)); ?> </p> <span class="inline-block mt-4 text-leaf-600 font-medium text-sm">Detaylari Gor &rarr;</span> </div> </a> </article> <?php endforeach; ?> </div> <?php endif; ?> <div class="text-center mt-12"> <a href="/urunler" class="inline-flex items-center bg-leaf-700 hover:bg-leaf-800 text-white px-8 py-3 rounded-full font-medium transition"> Tum Urunleri Gor </a> </div> </div> </section> <!-- CTA --> <section class="py-16 bg-leaf-800 text-white"> <div class="max-w-4xl mx-auto px-4 text-center"> <h2 class="font-display text-3xl font-bold mb-4">Size Nasil Yardimci Olabiliriz?</h2> <p class="text-leaf-100 mb-8">Urunlerimiz hakkinda bilgi almak icin bize ulasin.</p> <div class="flex flex-col sm:flex-row gap-4 justify-center"> <a href="tel:<?php echo e(preg_replace('/\s+/', '', $settings['phone'] ?? '')); ?>" class="inline-flex items-center justify-center gap-2 bg-white text-leaf-800 px-8 py-3 rounded-full font-medium hover:bg-earth-50 transition"> <?php echo e($settings['phone'] ?? ''); ?> </a> <a href="<?php echo whatsapp_link('Merhaba, bilgi almak istiyorum.'); ?>" target="_blank" rel="noopener" class="inline-flex items-center justify-center gap-2 bg-leaf-600 hover:bg-leaf-500 px-8 py-3 rounded-full font-medium transition"> WhatsApp ile Yazin </a> </div> </div> </section> <?php require_once BASE_PATH . '/templates/footer.php'; ?>