@php // "Card" section style on the Phase 2 skin — the wide, image-on-the-right // product cards. Two admin-driven shapes share this template: // • no background image → a full-width row of cards (Deals "Perfect Health Combos") // • background image set → promo panel on the left, cards beside it (Juices "Popular Juices") // The promo layout fits fewer cards per row, so it takes more of them. $promoImage = $section->background_image ? \App\Helpers\Helper::get_image($section->background_image) : null; $comboLimit = $promoImage ? 4 : 3; $comboProducts = $section->products->sortBy(fn ($p) => (int) ($p->pivot->sort_order ?? 0))->take($comboLimit); $comboBowls = $section->saladBowls->sortBy(fn ($b) => (int) ($b->pivot->sort_order ?? 0)); $comboColClass = $promoImage ? 'col-md-6 col-12 v2-combo-col' : 'col-lg-4 col-md-6 col-12 v2-combo-col'; @endphp @if ($comboProducts->isNotEmpty() || $comboBowls->isNotEmpty())
@include('frontend.components.v2-sections.heading', [ 'heading' => $section->name, 'subheading' => $section->short_description, 'seeAllUrl' => route('frontend.deals-list', ['section_id' => $section->id]), ]) @if ($comboProducts->isNotEmpty())
@if ($promoImage)
{{ $section->name }}
@endif
@foreach ($comboProducts as $comboProduct) @include('frontend.components.v2-combo-card', [ 'product' => $comboProduct, 'comboColClass' => $comboColClass, ]) @endforeach
@endif @if ($comboBowls->isNotEmpty())
@foreach ($comboBowls->take(5) as $comboBowl) @include('frontend.components.home-bowl-card', [ 'bowl' => $comboBowl, 'cardColClass' => 'v2-col', ]) @endforeach
@endif
@endif