The CSS was mostly handed to you so I figured this would go fast.
Start by clarifying the mockup's layout requirements (flexbox properties, responsiveness) and the API data shape. Then outline a component-based implementation: fetch data, format prices using Intl.NumberFormat, and render a flex container with product cards. Emphasize exact visual fidelity and robust error/loading states.
Pro tip: Mention that you'd use CSS `gap` for spacing and `flex-wrap` for responsiveness, and that you'd verify price formatting with `Intl.NumberFormat` to handle locale-specific separators and decimals automatically.
Ask about the mockup's exact layout (columns, spacing, responsiveness) and confirm the API response structure (e.g., array of products with name, imageUrl, price).
Plan a parent component that fetches data and renders a flex container, with child ProductCard components for each item. Consider loading and error states.
Use CSS flexbox with `display: flex`, `flex-wrap: wrap`, and `gap` to match the mockup's grid. Ensure responsiveness with media queries or flexible widths.
Use `Intl.NumberFormat` with appropriate locale and currency options to format prices with currency symbol, decimal places, and thousands separators.
Verify the layout against the mockup at different screen sizes and test price formatting with various values (e.g., 1000, 99.99). Handle edge cases like missing images.
AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.