/* Mobile Components CSS for IPAC Telecom */

/* Mobile Cart and Wishlist */
@media (max-width: 767px) {
    .w3-ch-sideBar {
        width: 85% !important;
        max-width: 350px;
    }
    
    .cart_select_items {
        max-height: 60vh !important;
    }
    
    .cart_single_caption {
        padding-left: 10px !important;
    }
    
    .cart_action .btn {
        padding: 10px 15px;
        font-size: 14px;
    }
}

/* Mobile Navigation */
@media (max-width: 767px) {
    #navigation {
        padding: 0 !important;
    }
    
    .nav-menus-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding: 5px 0;
    }
    
    .nav-menu {
        display: flex !important;
        flex-wrap: nowrap !important;
        width: auto !important;
        padding: 5px 0 !important;
    }
    
    .nav-menu > li {
        flex: 0 0 auto !important;
        border: none !important;
    }
    
    .nav-menu > li > a {
        padding: 8px 12px !important;
        font-size: 14px !important;
        white-space: nowrap !important;
    }
    
    .nav-toggle {
        display: none !important;
    }
    
    .nav-menus-wrapper-close-button {
        display: none !important;
    }
}

/* Mobile Product Cards */
@media (max-width: 767px) {
    .shop_grid {
        margin-bottom: 15px;
    }
    
    .shop_grid_thumb {
        position: relative;
        padding-top: 100%; /* 1:1 aspect ratio */
        overflow: hidden;
    }
    
    .shop_grid_thumb img {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    
    .shop_grid_caption {
        padding: 10px !important;
    }
    
    .shop_grid_caption h4 {
        font-size: 16px !important;
        margin-bottom: 5px !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .shop_grid_caption .product-price {
        font-size: 14px !important;
    }
    
    .shop_grid_caption .btn {
        padding: 8px 12px !important;
        font-size: 13px !important;
    }
}

/* Mobile Header */
@media (max-width: 767px) {
    .headd-sty-wrap {
        flex-direction: column !important;
        padding: 10px 0 !important;
    }
    
    .headd-sty-left {
        width: 100% !important;
        margin-bottom: 10px !important;
        flex-direction: column !important;
        align-items: center !important;
    }
    
    .headd-sty-01 {
        margin-bottom: 10px !important;
    }
    
    .headd-sty-02 {
        width: 100% !important;
        margin-left: 0 !important;
    }
    
    .headd-sty-right {
        width: 100% !important;
        justify-content: center !important;
        margin-top: 10px !important;
    }
    
    .mobile_nav {
        display: flex !important;
        justify-content: center !important;
        margin-top: 10px !important;
    }
    
    .mobile_nav ul {
        display: flex !important;
        justify-content: space-between !important;
        width: 100% !important;
        max-width: 300px !important;
    }
}

/* Mobile Footer */
@media (max-width: 767px) {
    footer {
        text-align: center !important;
    }
    
    .footer_widget {
        margin-bottom: 20px !important;
    }
    
    .footer_widget h4 {
        margin-bottom: 10px !important;
    }
    
    .footer-menu {
        padding-left: 0 !important;
    }
    
    .list-inline-item {
        margin: 0 5px !important;
    }
    
    .foot-news-last .form-group {
        display: flex !important;
        flex-direction: column !important;
    }
    
    .foot-news-last .btn {
        margin-top: 10px !important;
        width: 100% !important;
    }
}

/* Mobile Form Elements */
@media (max-width: 767px) {
    input, select, textarea {
        font-size: 16px !important; /* Prevents iOS zoom on focus */
        padding: 10px !important;
        height: auto !important;
    }
    
    .form-group {
        margin-bottom: 15px !important;
    }
    
    .btn {
        min-height: 44px !important; /* Minimum touch target size */
    }
    
    .custom-height {
        height: auto !important;
        min-height: 44px !important;
    }
}

/* Fix for fixed elements */
@media (max-width: 767px) {
    .fixed-top, .sticky-top {
        position: relative !important;
    }
    
    #back2Top {
        bottom: 20px !important;
        right: 20px !important;
        width: 35px !important;
        height: 35px !important;
        line-height: 35px !important;
    }
}
