@extends('layout.front.master') @section('title', ($product->name ?? 'Producto') . ' | ' . config('site.name', 'CD-System')) @section('description', \Illuminate\Support\Str::limit($product->description ?? '', 160)) @push('head') {{-- Structured Data para SEO --}} @endpush @section('content') @php $moduleConfig = get_module_page_header_config('products'); $pageTitle = $product->name ?? $moduleConfig['title']; $pageSubtitle = isset($product->category) ? 'Equipo de ' . $product->category->name : $moduleConfig['subtitle']; // Usar imagen del producto si existe, sino usar imagen por defecto $backgroundImage = null; if ($product->images->count() > 0) { $firstImage = $product->images->first(); $imagePath = $firstImage->image_path; if (!\Illuminate\Support\Str::startsWith($imagePath, ['http://', 'https://', '/'])) { $backgroundImage = asset($imagePath); } else { $backgroundImage = $imagePath; } } else { // Imagen por defecto $backgroundImage = asset('cd-project/img/demos/transportation-logistic/generic/generic-1.png'); } @endphp @if(view()->exists('modules.products.frontend.partials.dynamic-header')) @include('modules.products.frontend.partials.dynamic-header', [ 'product' => $product, 'backgroundImage' => $backgroundImage ]) @else {{-- Fallback a header moderno si no existe el dinámico --}} @endif
{{-- Mobile Filter Button --}}
{{-- Sidebar Filters for Products (Desktop) --}}
{{ __('Filtros') }}
@include('modules.products.frontend.partials.filters-content')
{{-- Mobile Offcanvas Filters --}}
{{ __('Filtros') }}
@include('modules.products.frontend.partials.filters-content')
{{-- Main Content Area --}}
@if($product->images->count() > 0) {{-- Galería con Lightbox --}} @else {{-- Placeholder cuando no hay imágenes --}} @endif

{{ $product->name }}


{{-- Precio --}}

${{ number_format($product->price ?? 0, 2, ',', '.') }}

{{ $product->description }}

  • {{ __('DISPONIBILIDAD') }}: {{ $product->is_active ? __('DISPONIBLE') : __('AGOTADO') }}
  • @if(isset($product->official_link) && $product->official_link)
  • {{ __('Ver Documentación Técnica Oficial') }}
    {{ __('Especificaciones completas') }}
  • @endif


{{ $product->description }}
@if($product->tags->count() > 0)
{{ __('Características Principales') }}:
@foreach($product->tags as $tag) {{ $tag->name }} @endforeach
@endif
@if($product->tags->count() > 0) @endif @if(isset($product->official_link) && $product->official_link) @endif
{{ __('Categoría') }}: {{ $product->category->name ?? 'N/A' }}
{{ __('Características') }}: @foreach($product->tags as $tag) {{ $tag->name }} @endforeach
{{ __('Documentación') }}: {{ __('Ver especificaciones técnicas completas') }}

{{ __('Productos') }} {{ __('Relacionados') }}

@if($relatedProducts->count() > 0) @else
{{ __('No hay productos relacionados para este producto') }}

{{ __('Explora otras categorías para descubrir más productos.') }}

@endif
{{-- CTA Flotante para Móviles --}}
{{ $product->name }} - {{ __('Cotización gratuita') }}
{{-- JavaScript específico para galería de productos --}} @push('scripts') @endpush @push('styles') @endpush @endsection