/* ASMAK Mobile Performance & Layout Fix */

/* Force proper mobile viewport */
@media screen and (max-width: 768px) {
    /* Fix container overflow */
    body, html {
        overflow-x: hidden !important;
        width: 100% !important;
    }
    
    .site, .container, .row, .elementor-section, .elementor-container {
        max-width: 100vw !important;
        overflow-x: hidden !important;
    }
    
    /* Fix images */
    img {
        max-width: 100% !important;
        height: auto !important;
    }
    
    /* Fix Elementor sections */
    .elementor-section {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
    
    .elementor-column-wrap, .elementor-widget-wrap {
        padding: 10px !important;
    }
    
    /* Fix product grid */
    .products, .product-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }
    
    .products .product, .product-grid .product {
        width: 100% !important;
        margin: 0 !important;
    }
    
    /* Fix font sizes */
    h1 { font-size: 1.5rem !important; }
    h2 { font-size: 1.3rem !important; }
    h3 { font-size: 1.1rem !important; }
    body, p { font-size: 14px !important; }
    
    /* Fix header */
    .site-header {
        position: sticky !important;
        top: 0 !important;
        z-index: 9999 !important;
    }
    
    /* Fix buttons */
    .button, button, .btn {
        padding: 10px 20px !important;
        font-size: 14px !important;
        width: 100% !important;
        text-align: center !important;
    }
    
    /* Fix tables */
    table {
        display: block !important;
        overflow-x: auto !important;
        white-space: nowrap !important;
    }
    
    /* Hide unnecessary elements on mobile */
    .hide-on-mobile, .desktop-only {
        display: none !important;
    }
    
    /* Fix navigation */
    .main-navigation {
        width: 100% !important;
    }
    
    /* Reduce spacing */
    .elementor-section {
        margin-bottom: 20px !important;
    }
    
    /* Fix slider/carousel */
    .swiper-container, .carousel {
        width: 100% !important;
        overflow: hidden !important;
    }
}

/* Very small screens */
@media screen and (max-width: 480px) {
    .products, .product-grid {
        grid-template-columns: 1fr !important;
    }
    
    h1 { font-size: 1.3rem !important; }
    h2 { font-size: 1.1rem !important; }
    
    .elementor-section {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
}
