Despite the growing potential of deep learning in diagnosing Atrial Fibrillation (Afib), challenges such as overfitting and limited generalizability continue to persist. These limitations are accentuated in single-lead ECGs generated from wearable devices, which frequently suffer from inadequate annotation and substantial data variability. This study seeks to address these challenges by enhancing both the accuracy and generalizability of Afib detection algorithms. We introduce Afib-CNN, a specialized Convolutional Neural Network engineered for 9-second, single-lead ECGs. The architecture comprises ten convolutional blocks and three fully connected layers, focusing on computational efficiency. To mitigate data variability, we apply advanced pre-processing techniques like Moving Average by Convolution Filter (MAConv) and Minimum-Maximum Normalization. Further dataset refinement is achieved using z-score normalization and a shifted-length overlapping technique. The effectiveness of our model is rigorously validated across three distinct ECG databases, demonstrating robust intra-and inter-patient generalizability. Employing 10-fold stratified cross-validation, Afib-CNN exhibits exemplary performance, achieving mean F1 scores of 98%, 97%, and 99% on the CinC2017, CPSC2018, and MIT-AFIB datasets, respectively. The model also attains an F1 score of 98% on the CinC2017 test set. Comparative analyses demonstrate that Afib-CNN successfully balances high performance, computational efficiency, and robust generalization. These characteristics render it well-suited for practical clinical deployment.