/* ============================================
   MOBILE CART COMPLETE FIX
   ============================================ */

/* Ensure box-sizing is applied (safety check) */
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* Prevent horizontal scroll */
html, 
body {
    overflow-x: hidden !important;
    max-width: 100vw;
}

/* Mobile cart fixes */
@media (max-width: 768px) {
    .cart-sidebar {
        width: 100% !important;
        max-width: 100% !important;
        right: -100% !important;
    }
    
    .cart-sidebar.active {
        right: 0 !important;
    }
    
    .cart-item {
        flex-direction: column !important;
        align-items: stretch !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 1rem !important;
        box-sizing: border-box !important;
    }
    
    .cart-item-icon {
        width: 100% !important;
        max-width: 120px !important;
        height: 120px !important;
        align-self: center !important;
    }
    
    .cart-item-details {
        width: 100% !important;
    }
    
    .cart-item-controls {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100% !important;
        flex-wrap: wrap !important;
        gap: 0.5rem !important;
    }
    
    .quantity-btn {
        width: auto !important;
        min-width: 32px !important;
    }
    
    .remove-item {
        width: 100% !important;
        margin: 0.75rem 0 0 0 !important;
        text-align: center !important;
        white-space: nowrap !important;
    }
    
    .cart-header {
        padding: 1.5rem 1rem !important;
    }
    
    .cart-items {
        padding: 1rem !important;
    }
    
    .cart-footer {
        padding: 1rem !important;
    }
}

@media (max-width: 480px) {
    .cart-item-controls {
        flex-direction: column !important;
        gap: 0.75rem !important;
    }
    
    .cart-item-controls > * {
        width: 100% !important;
    }
    
    .quantity-btn,
    .cart-item-quantity {
        flex: 0 0 auto !important;
    }
}
