
<?php if (isset($component)) { $__componentOriginalf2a1b2b34b0a376d40858ac9c2a946a5 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginalf2a1b2b34b0a376d40858ac9c2a946a5 = $attributes; } ?>
<?php $component = App\View\Components\SiteLayout::resolve(['title' => ''.e($machine->name).'','metaDescription' => ''.e(Str::limit($machine->description, 160)).'','showBreadcrumbs' => false] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('site-layout'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\App\View\Components\SiteLayout::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes([]); ?>
    
    <div class="bg-gradient-to-r from-blue-600 to-blue-700 shadow-lg">
        <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-12">
            <div class="flex items-center gap-6">
                <div class="hidden md:flex w-20 h-20 rounded-xl shadow-lg bg-white/20 items-center justify-center flex-shrink-0">
                    <i class="fas fa-x-ray text-white text-4xl"></i>
                </div>
                <div>
                    <h1 class="text-3xl md:text-4xl font-serif font-bold text-white">
                        <?php echo e($machine->name); ?>

                    </h1>
                    <p class="text-blue-100 mt-2">
                        <?php if($machine->brand): ?><?php echo e($machine->brand); ?><?php endif; ?>@if($machine->brand && $machine->category) &mdash; <?php endif; ?>@if($machine->category)<?php echo e($machine->category); ?><?php endif; ?>
                    </p>
                </div>
            </div>
        </div>
    </div>

    
    <div class="bg-gray-50 border-b border-gray-200">
        <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-3">
            <nav class="flex items-center space-x-2 text-sm text-gray-600" aria-label="Breadcrumb">
                <a href="<?php echo e(url('/')); ?>" class="hover:text-blue-600 transition flex items-center">
                    <i class="fas fa-home mr-1"></i>Home
                </a>
                <i class="fas fa-chevron-right text-gray-400 text-xs"></i>
                <a href="<?php echo e(route('machines.index')); ?>" class="hover:text-blue-600 transition">Machines</a>
                <?php if($machine->category): ?>
                    <i class="fas fa-chevron-right text-gray-400 text-xs"></i>
                    <a href="<?php echo e(route('machines.index', ['category' => $machine->category])); ?>" class="hover:text-blue-600 transition"><?php echo e($machine->category); ?></a>
                <?php endif; ?>
                <i class="fas fa-chevron-right text-gray-400 text-xs"></i>
                <span class="text-gray-900 font-medium"><?php echo e(Str::limit($machine->name, 50)); ?></span>
            </nav>
        </div>
    </div>
    
    
    <section class="py-8 lg:py-12">
        <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
            <div class="lg:grid lg:grid-cols-2 lg:gap-12">
                
                
                <div class="mb-8 lg:mb-0">
                    
                    <div class="relative bg-gray-100 rounded-2xl overflow-hidden mb-4">
                        <div class="aspect-square flex items-center justify-center" x-data="{ activeImage: 0 }">
                            <?php if($machine->images && is_array($machine->images) && count($machine->images) > 0): ?>
                                <img :src="<?php echo e(json_encode($machine->image_urls)); ?>[activeImage]" 
                                     alt="<?php echo e($machine->name); ?>"
                                     class="w-full h-full object-contain p-8"
                                     x-data="{ images: <?php echo e(json_encode($machine->image_urls)); ?> }"
                                     :src="images[activeImage]">
                            <?php else: ?>
                                <div class="w-full h-full flex items-center justify-center">
                                    <i class="fas fa-x-ray text-8xl text-gray-300"></i>
                                </div>
                            <?php endif; ?>
                        </div>
                        
                        
                        <button class="absolute top-4 right-4 w-10 h-10 bg-white/80 backdrop-blur rounded-full flex items-center justify-center text-gray-700 hover:bg-white transition">
                            <i class="fas fa-search-plus"></i>
                        </button>
                    </div>
                    
                    
                    <?php if($machine->images && is_array($machine->images) && count($machine->images) > 1): ?>
                        <div class="flex gap-2 overflow-x-auto pb-2" x-data="{ activeIndex: 0 }">
                            <?php $__currentLoopData = $machine->image_urls; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $index => $imageUrl): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <button 
                                    class="flex-shrink-0 w-20 h-20 rounded-lg overflow-hidden border-2 transition"
                                    :class="activeIndex === <?php echo e($index); ?> ? 'border-blue-600' : 'border-transparent'"
                                    @click="activeIndex = <?php echo e($index); ?>; $dispatch('set-active-image', <?php echo e($index); ?>)">
                                    <img src="<?php echo e($imageUrl); ?>" alt="<?php echo e($machine->name); ?> - Image <?php echo e($index + 1); ?>" class="w-full h-full object-cover">
                                </button>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        </div>
                    <?php endif; ?>
                    
                    
                    <?php if($machine->video_clips && is_array($machine->video_clips) && count($machine->video_clips) > 0): ?>
                        <div class="mt-6">
                            <h4 class="text-sm font-semibold text-gray-700 mb-3">
                                <i class="fas fa-video text-blue-500 mr-2"></i>Video
                            </h4>
                            <div class="aspect-video bg-gray-900 rounded-xl overflow-hidden">
                                <?php $__currentLoopData = $machine->video_urls; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $videoUrl): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <?php if($loop->first): ?>
                                        <video src="<?php echo e($videoUrl); ?>" controls class="w-full h-full"></video>
                                    <?php endif; ?>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            </div>
                        </div>
                    <?php endif; ?>
                </div>
                
                
                <div>
                    
                    <div class="flex items-center gap-2 mb-4">
                        <?php if($machine->category): ?>
                            <span class="px-3 py-1 bg-blue-100 text-blue-700 text-sm font-medium rounded-full">
                                <?php echo e($machine->category); ?>

                            </span>
                        <?php endif; ?>
                        <?php if($machine->brand): ?>
                            <span class="px-3 py-1 bg-gray-100 text-gray-700 text-sm rounded-full">
                                <?php echo e($machine->brand); ?>

                            </span>
                        <?php endif; ?>
                    </div>
                    
                    
                    <h1 class="text-3xl lg:text-4xl font-bold text-gray-800 mb-2">
                        <?php echo e($machine->name); ?>

                    </h1>
                    
                    
                    <div class="flex flex-wrap gap-4 text-gray-600 mb-4">
                        <?php if($machine->model): ?>
                            <span><strong>Model:</strong> <?php echo e($machine->model); ?></span>
                        <?php endif; ?>
                        <?php if($machine->manufacturers): ?>
                            <span><strong>Manufacturer:</strong> <?php echo e($machine->manufacturers); ?></span>
                        <?php endif; ?>
                    </div>
                    
                    
                    <div class="bg-gradient-to-r from-green-50 to-green-100 rounded-xl p-6 mb-6">
                        <?php if($machine->price_publishable): ?>
                            <div class="flex items-baseline gap-4">
                                <?php if($machine->price_ssp): ?>
                                    <span class="text-3xl font-bold text-green-700">
                                        SSP <?php echo e(number_format($machine->price_ssp, 2)); ?>

                                    </span>
                                <?php endif; ?>
                                <?php if($machine->price_usd): ?>
                                    <span class="text-xl font-semibold text-green-600">
                                        $<?php echo e(number_format($machine->price_usd, 2)); ?> USD
                                    </span>
                                <?php endif; ?>
                            </div>
                            <?php if($machine->price_note): ?>
                                <p class="text-green-600 text-sm mt-2"><?php echo e($machine->price_note); ?></p>
                            <?php endif; ?>
                        <?php else: ?>
                            <div class="flex items-center gap-3">
                                <i class="fas fa-eye-slash text-2xl text-gray-400"></i>
                                <div>
                                    <span class="text-xl font-semibold text-gray-700">Contact for Price</span>
                                    <p class="text-gray-500 text-sm">Price available upon inquiry</p>
                                </div>
                            </div>
                        <?php endif; ?>
                    </div>
                    
                    
                    <p class="text-gray-600 leading-relaxed mb-6">
                        <?php echo e(Str::limit($machine->description, 200)); ?>

                    </p>
                    
                    
                    <div class="flex flex-col sm:flex-row gap-3 mb-8">
                        <?php
                            $contactInfo = is_array($machine->contact_info) ? $machine->contact_info : [];
                        ?>
                        <?php if(!empty($contactInfo['phone'])): ?>
                            <a href="tel:<?php echo e($contactInfo['phone']); ?>" 
                               class="flex-1 inline-flex items-center justify-center px-6 py-4 bg-blue-600 text-white font-semibold rounded-xl hover:bg-blue-700 transition shadow-lg">
                                <i class="fas fa-phone mr-2"></i>Call Now
                            </a>
                        <?php endif; ?>
                        <?php if(!empty($contactInfo['email'])): ?>
                            <a href="mailto:<?php echo e($contactInfo['email']); ?>" 
                               class="flex-1 inline-flex items-center justify-center px-6 py-4 bg-white border-2 border-blue-600 text-blue-600 font-semibold rounded-xl hover:bg-blue-50 transition">
                                <i class="fas fa-envelope mr-2"></i>Send Inquiry
                            </a>
                        <?php endif; ?>
                    </div>
                    
                    
                    <?php if($machine->specifications && is_array($machine->specifications) && count($machine->specifications) > 0): ?>
                        <div class="bg-gray-50 rounded-xl p-6 mb-6">
                            <h3 class="text-lg font-bold text-gray-800 mb-4">
                                <i class="fas fa-cog text-blue-500 mr-2"></i>Key Specifications
                            </h3>
                            <dl class="grid grid-cols-1 sm:grid-cols-2 gap-3">
                                <?php $__currentLoopData = $machine->specifications; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $spec): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <?php if(is_array($spec) && isset($spec['key']) && isset($spec['value'])): ?>
                                        <div class="flex justify-between p-3 bg-white rounded-lg">
                                            <dt class="text-gray-600"><?php echo e($spec['key']); ?></dt>
                                            <dd class="font-semibold text-gray-800"><?php echo e($spec['value']); ?></dd>
                                        </div>
                                    <?php endif; ?>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            </dl>
                        </div>
                    <?php endif; ?>
                    
                    
                    <?php
                        $contactInfo = is_array($machine->contact_info) ? $machine->contact_info : [];
                    ?>
                    <?php if(!empty($contactInfo)): ?>
                        <div class="border border-gray-200 rounded-xl p-6">
                            <h3 class="text-lg font-bold text-gray-800 mb-4">
                                <i class="fas fa-address-card text-blue-500 mr-2"></i>Contact Information
                            </h3>
                            <div class="space-y-3">
                                <?php if(!empty($contactInfo['phone'])): ?>
                                    <div class="flex items-center">
                                        <i class="fas fa-phone text-blue-500 w-6"></i>
                                        <a href="tel:<?php echo e($contactInfo['phone']); ?>" class="text-gray-700 hover:text-blue-600">
                                            <?php echo e($contactInfo['phone']); ?>

                                        </a>
                                    </div>
                                <?php endif; ?>
                                <?php if(!empty($contactInfo['email'])): ?>
                                    <div class="flex items-center">
                                        <i class="fas fa-envelope text-blue-500 w-6"></i>
                                        <a href="mailto:<?php echo e($contactInfo['email']); ?>" class="text-gray-700 hover:text-blue-600">
                                            <?php echo e($contactInfo['email']); ?>

                                        </a>
                                    </div>
                                <?php endif; ?>
                                <?php if(!empty($contactInfo['website'])): ?>
                                    <div class="flex items-center">
                                        <i class="fas fa-globe text-blue-500 w-6"></i>
                                        <a href="<?php echo e($contactInfo['website']); ?>" target="_blank" rel="noopener" class="text-gray-700 hover:text-blue-600">
                                            <?php echo e($contactInfo['website']); ?>

                                        </a>
                                    </div>
                                <?php endif; ?>
                                <?php if(!empty($contactInfo['address'])): ?>
                                    <div class="flex items-start">
                                        <i class="fas fa-map-marker-alt text-blue-500 w-6 mt-1"></i>
                                        <span class="text-gray-700"><?php echo e($contactInfo['address']); ?></span>
                                    </div>
                                <?php endif; ?>
                            </div>
                        </div>
                    <?php endif; ?>
                </div>
            </div>
        </div>
    </section>
    
    
    <section class="py-12 bg-gray-50">
        <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
            <div class="bg-white rounded-xl shadow-md p-6 lg:p-8">
                <h2 class="text-2xl font-bold text-gray-800 mb-4">
                    <i class="fas fa-info-circle text-blue-500 mr-2"></i>Description
                </h2>
                <div class="prose prose-blue max-w-none text-gray-600">
                    <?php echo e($machine->description); ?>

                </div>
            </div>
        </div>
    </section>
    
    
    <?php if($machine->functionalities && is_array($machine->functionalities) && count($machine->functionalities) > 0): ?>
        <section class="py-12">
            <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
                <h2 class="text-2xl font-bold text-gray-800 mb-8">
                    <i class="fas fa-star text-blue-500 mr-2"></i>Features & Functionalities
                </h2>
                <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4">
                    <?php $__currentLoopData = $machine->functionalities; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $func): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <?php if(is_string($func) || is_numeric($func)): ?>
                            <div class="flex items-start bg-blue-50 rounded-lg p-4">
                                <i class="fas fa-check-circle text-blue-500 mt-1 mr-3"></i>
                                <span class="text-gray-700"><?php echo e($func); ?></span>
                            </div>
                        <?php endif; ?>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </div>
            </div>
        </section>
    <?php endif; ?>
    
    
    <?php if($related->count() > 0): ?>
        <section class="py-12 bg-gray-50">
            <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
                <h2 class="text-2xl font-bold text-gray-800 mb-8">
                    <i class="fas fa-th-large text-blue-500 mr-2"></i>Related Equipment
                </h2>
                
                <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6">
                    <?php $__currentLoopData = $related; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $relatedMachine): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <a href="<?php echo e(route('machines.show', $relatedMachine->slug)); ?>" 
                           class="bg-white rounded-xl shadow-md hover:shadow-xl transition overflow-hidden group">
                            <div class="h-40 bg-gray-100 flex items-center justify-center">
                                <?php if($relatedMachine->primary_image): ?>
                                    <img src="<?php echo e($relatedMachine->primary_image_url); ?>" alt="<?php echo e($relatedMachine->name); ?>" class="w-full h-full object-cover">
                                <?php else: ?>
                                    <i class="fas fa-x-ray text-4xl text-gray-300"></i>
                                <?php endif; ?>
                            </div>
                            <div class="p-4">
                                <h3 class="font-semibold text-gray-800 group-hover:text-blue-600 transition truncate">
                                    <?php echo e($relatedMachine->name); ?>

                                </h3>
                                <p class="text-sm text-gray-500"><?php echo e($relatedMachine->brand); ?></p>
                                <?php if($relatedMachine->price_publishable && $relatedMachine->price_ssp): ?>
                                    <p class="text-sm font-bold text-green-600 mt-1">
                                        SSP <?php echo e(number_format($relatedMachine->price_ssp, 2)); ?>

                                    </p>
                                <?php endif; ?>
                            </div>
                        </a>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </div>
            </div>
        </section>
    <?php endif; ?>
 <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginalf2a1b2b34b0a376d40858ac9c2a946a5)): ?>
<?php $attributes = $__attributesOriginalf2a1b2b34b0a376d40858ac9c2a946a5; ?>
<?php unset($__attributesOriginalf2a1b2b34b0a376d40858ac9c2a946a5); ?>
<?php endif; ?>
<?php if (isset($__componentOriginalf2a1b2b34b0a376d40858ac9c2a946a5)): ?>
<?php $component = $__componentOriginalf2a1b2b34b0a376d40858ac9c2a946a5; ?>
<?php unset($__componentOriginalf2a1b2b34b0a376d40858ac9c2a946a5); ?>
<?php endif; ?>
<?php /**PATH /home/www/sshia.org/sshia/resources/views/machines/show.blade.php ENDPATH**/ ?>