/* Mobile Responsive CSS for IPAC Telecom */

/* Base Mobile Styles */
@media (max-width: 991px) {
    html, body {
        overflow-x: hidden;
    }
    
    .container {
        width: 100%;
        padding-left: 15px;
        padding-right: 15px;
    }
    
    img {
        max-width: 100%;
        height: auto;
    }
    
    /* Fix for tables on mobile */
    table {
        width: 100%;
        display: block;
        overflow-x: auto;
    }
}

/* Small Mobile Devices (up to 575px) */
@media (max-width: 575px) {
    /* Header Styles */
    .headd-sty-wrap {
        flex-direction: column;
        padding: 10px 0 !important;
    }
    
    .headd-sty-left {
        width: 100%;
        flex-direction: column;
        align-items: center;
    }
    
    .headd-sty-01 {
        margin-bottom: 10px;
        text-align: center;
    }
    
    .headd-sty-02 {
        width: 100%;
        margin-left: 0 !important;
    }
    
    .headd-sty-02 form {
        width: 100%;
    }
    
    .headd-sty-right {
        width: 100%;
        justify-content: center;
        margin-top: 10px;
    }
    
    /* Navigation */
    #navigation {
        padding: 0 !important;
    }
    
    .nav-menus-wrapper {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .nav-menu {
        display: flex;
        flex-wrap: nowrap;
        width: auto;
        padding: 10px 0;
    }
    
    .nav-menu > li {
        flex: 0 0 auto;
    }
    
    .nav-menu > li > a {
        padding: 8px 12px !important;
        font-size: 14px !important;
        white-space: nowrap;
    }
    
    /* Content Sections */
    .section {
        padding: 30px 0 !important;
    }
    
    .section-title h2 {
        font-size: 24px !important;
    }
    
    /* Product Cards */
    .shop_grid_caption {
        padding: 10px !important;
    }
    
    .shop_grid_caption h4 {
        font-size: 16px !important;
        margin-bottom: 5px !important;
    }
    
    .shop_grid_caption .product-price {
        font-size: 14px !important;
    }
    
    /* Buttons */
    .btn {
        padding: 8px 15px !important;
        font-size: 14px !important;
    }
    
    /* Footer */
    footer {
        text-align: center;
    }
    
    footer .col-xl-3, 
    footer .col-xl-2 {
        margin-bottom: 20px;
    }
    
    .footer_widget h4 {
        margin-bottom: 10px;
    }
    
    /* Back to Top Button */
    #back2Top {
        bottom: 20px;
        right: 20px;
        width: 35px;
        height: 35px;
        line-height: 35px;
    }
}

/* Medium Mobile Devices (576px - 767px) */
@media (min-width: 576px) and (max-width: 767px) {
    /* Header Styles */
    .headd-sty-wrap {
        flex-wrap: wrap;
    }
    
    .headd-sty-left {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .headd-sty-02 {
        width: 70%;
    }
    
    .headd-sty-right {
        width: 100%;
        justify-content: center;
    }
    
    /* Navigation */
    .nav-menu > li > a {
        padding: 10px 15px !important;
        font-size: 15px !important;
    }
    
    /* Content Sections */
    .section-title h2 {
        font-size: 28px !important;
    }
}

/* Tablet Devices (768px - 991px) */
@media (min-width: 768px) and (max-width: 991px) {
    /* Header Styles */
    .headd-sty-02 {
        width: 50%;
    }
    
    /* Navigation */
    .nav-menu > li > a {
        padding: 12px 10px !important;
    }
    
    /* Product Grid */
    .col-lg-3.col-md-4 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

/* Form Elements for All Mobile Sizes */
@media (max-width: 991px) {
    input, select, textarea {
        font-size: 16px !important; /* Prevents iOS zoom on focus */
    }
    
    .form-group {
        margin-bottom: 15px;
    }
    
    /* Fix for checkout and cart pages */
    .checkout-form, .cart-table {
        padding: 15px !important;
    }
}

/* Fix for fixed elements */
@media (max-width: 767px) {
    .fixed-top, .sticky-top {
        position: relative !important;
    }
}
