@php /** @var \App\Models\WaProduct $p */ $onSale = $p->compare_price_minor && $p->compare_price_minor > $p->price_minor; $isNew = optional($p->created_at)->gt(now()->subDays(14)); // Theme tokens — self-derived so the card works both inside the shop grid // and standalone in the show-more AJAX partial (no base scope there). $theme = $theme ?? []; $brand = $brand ?? ($theme['brand'] ?? '#075E54'); $accent = $accent ?? ($theme['accent'] ?? $brand); @endphp