Spaces:
Running
fix: eurogold/gold false-hit + feature top keyword hits & fresh-added products larger/on-top
Frontend fixes:
Search: compact-SKU substring tier now requires sku >= max(5, len(query)/2) chars. A query "eurogold" was awarding +400 to any product whose sku contains "gold" (e.g. Grob sku=GOLD, 4 chars) just because "eurogold".includes("gold") — this polluted brand searches with unrelated "gold" items above the real Eurogold results.
Featured sizing: top keyword hits (top 3 by vai-avatar score, score >= 300) are now featured too, not only the decisive exact winner. Queries like "xoong noi" that match 4 Eurogold racks at equal score now enlarge the strongest ones instead of leaving them at normal size.
Fresh products: recently-added products (via vai-avatar "Thêm SP" → products_url_added.json, which write
_added_at; preserved as addedAt by normalizeProduct) get the featured 1.45x size among the top 4 newest if they also matched.Z-order: featured tiles now draw at z-index 300+ (above the 1..100 seed range of ordinary tiles) so enlarged results actually sit ON TOP of the adjacent photographs, as requested ("sp mới et résultats de recherche doivent être plus grands et au-dessus des autres").