{{-- Premium product picker — shared between server-render and client-render on shop change. Roomy cards: square image, name, price, sync-status badge. Preserves the selection contract (checkbox name="product_ids[]", .peer, .product-pick) and the filter hooks (data-product-card / data-name / data-sku / data-retailer-id) the page JS relies on. --}} @php $statusMeta = [ 'synced' => ['dot' => 'bg-wa-green', 'text' => 'text-wa-deep', 'bg' => 'bg-wa-mint', 'label' => 'Synced'], 'pending' => ['dot' => 'bg-accent-amber','text' => 'text-ink-600', 'bg' => 'bg-accent-amber/15', 'label' => 'Pending'], 'failed' => ['dot' => 'bg-accent-coral','text' => 'text-[#A1431F]', 'bg' => 'bg-accent-coral/10', 'label' => 'Failed'], ]; @endphp
@foreach ($productsByCategory as $catName => $catProducts)
{{ $catName }} {{ $catProducts->count() }}
@foreach ($catProducts as $p) @php $rid = $p->meta_retailer_id ?: ($p->sku ?: 'wsn-' . $p->id); $st = $statusMeta[$p->meta_sync_status] ?? null; @endphp @endforeach
@endforeach