Calculate grid column count based on device type
int gridCount({int mobile = 2, int tablet = 3, int desktop = 4}) { if (isDesktop) return desktop; if (isTablet) return tablet; return mobile; }