export function isMobileDevice(): boolean { if (typeof window === 'undefined') return false; const hasTouch = 'ontouchstart' in window || navigator.maxTouchPoints > 0; const isMobileWidth = window.innerWidth < 768; const mobileRegex = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i; const isMobileUA = mobileRegex.test(navigator.userAgent); return (hasTouch && isMobileWidth) || isMobileUA; }