@extends('layouts.app') @section('title','Savero — Home') @section('content') {{-- HERO (unchanged) --}} @php /* slides existente */ @endphp @includeWhen(isset($slides), 'partials.home.hero', ['slides'=>$slides]) {{-- BUCĂȚI DINAMICE --}} @foreach($sections as $s) @php $layout = $s->opt('layout','slider'); $rows = max(1, (int)$s->opt('rows',1)); @endphp @if($s->type === 'products_auto' || $s->type === 'products_manual') @php $products = data_get($s->payload,'products', collect()); @endphp @if($products->count()) @include('partials.home.block-products', compact('s','products','layout','rows')) @endif @elseif($s->type === 'categories_with_products') @php $cats = data_get($s->payload,'categories', collect()); @endphp @if($cats->count()) @include('partials.home.block-categories-products', compact('s','cats','layout','rows')) @endif @endif @endforeach @endsection