/* Mobile-Specific Optimizations */

/* Touch-friendly interactions */
@media (max-width: 768px) {
    /* Larger tap targets for mobile */
    a, button, input[type="submit"], .btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Prevent text selection on double tap */
    .product-card,
    .category-card,
    .btn {
        -webkit-tap-highlight-color: rgba(245, 114, 36, 0.2);
        -webkit-touch-callout: none;
    }
    
    /* Smooth scrolling */
    html {
        scroll-behavior: smooth;
    }
    
    /* Fixed mobile menu */
    body {
        overflow-x: hidden;
    }
    
    /* Better form inputs on mobile */
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="password"],
    input[type="number"],
    textarea,
    select {
        font-size: 16px; /* Prevents zoom on iOS */
        -webkit-appearance: none;
        appearance: none;
    }
    
    /* Product cards - mobile optimized */
    .product-card {
        margin-bottom: 0;
    }
    
    .product-card:active {
        transform: scale(0.98);
    }
    
    /* Cart button fixed on mobile product page */
    .product-actions .btn-add-cart {
        position: sticky;
        bottom: 0;
        z-index: 100;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    }
    
    /* Mobile table responsiveness */
    table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Image optimization */
    img {
        max-width: 100%;
        height: auto;
    }
    
    /* Hide desktop-only elements */
    .desktop-only {
        display: none !important;
    }
    
    /* Show mobile-only elements */
    .mobile-only {
        display: block !important;
    }
    
    /* Sticky header on scroll */
    .main-header {
        position: sticky;
        top: 0;
        z-index: 999;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    }
    
    /* Better spacing for touch */
    .nav-menu li a {
        padding: 18px 20px;
        font-size: 15px;
    }
    
    /* Quantity selector - mobile friendly */
    .quantity-selector button {
        padding: 12px 20px;
        font-size: 20px;
    }
    
    .quantity-selector input {
        width: 80px;
        font-size: 18px;
    }
    
    /* Modal/popup improvements */
    .modal {
        width: 95%;
        max-width: 400px;
    }
    
    /* Better checkout on mobile */
    .checkout-form input,
    .checkout-form select,
    .checkout-form textarea {
        padding: 14px;
        font-size: 16px;
    }
    
    /* Contact form mobile */
    .form-group {
        margin-bottom: 18px;
    }
    
    /* Search bar mobile */
    .search-bar form {
        display: flex;
        width: 100%;
    }
    
    .search-bar input {
        flex: 1;
    }
    
    /* Footer mobile */
    .footer-col {
        text-align: center;
    }
    
    .footer-col ul {
        padding: 0;
    }
    
    /* Loading states */
    .loading {
        pointer-events: none;
        opacity: 0.6;
    }
}

/* Landscape mobile optimizations */
@media (max-width: 768px) and (orientation: landscape) {
    .hero-banner {
        padding: 20px 0;
    }
    
    .banner-content h2 {
        font-size: 20px;
        margin-bottom: 8px;
    }
    
    .banner-content p {
        font-size: 13px;
        margin-bottom: 15px;
    }
    
    .product-image {
        height: 140px;
    }
}

/* Small mobile devices */
@media (max-width: 375px) {
    .container {
        padding: 0 10px;
    }
    
    .header-logo-img {
        width: 40px;
        height: 40px;
    }
    
    .logo h1 {
        font-size: 18px;
    }
    
    .products-grid {
        gap: 8px;
    }
    
    .product-info {
        padding: 8px;
    }
    
    .btn {
        padding: 8px 15px;
        font-size: 13px;
    }
}

/* Very small devices */
@media (max-width: 320px) {
    .logo h1 {
        font-size: 16px;
    }
    
    .section-title {
        font-size: 16px;
    }
    
    .price-current,
    .price-sale {
        font-size: 14px;
    }
}
