* {
    box-sizing: border-box;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

img, video {
    max-width: 100%;
    height: auto;
    display: block;
}

button, a, .btn {
    cursor: pointer;
    min-height: 44px;
    min-width: 44px;
    touch-action: manipulation;
}

input, select, textarea {
    font-size: 16px;
}

.table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: #333;
    padding: 10px;
    cursor: pointer;
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: white;
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
    z-index: 9999;
    transition: right 0.3s ease;
    overflow-y: auto;
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 9998;
}

.mobile-menu-overlay.active {
    display: block;
}

.mobile-menu-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mobile-menu-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
}

.mobile-menu-links {
    padding: 20px;
}

.mobile-menu-links a {
    display: block;
    padding: 15px 0;
    color: #333;
    text-decoration: none;
    border-bottom: 1px solid #eee;
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }
    
    .secondary-nav {
        display: none;
    }
    
    .mobile-menu {
        display: block;
    }
    
    .navbar .nav-wrapper {
        flex-wrap: wrap;
    }
    
    .navbar .search-section {
        order: 3;
        width: 100%;
        margin-top: 10px;
    }
    
    .navbar .logo-section {
        flex: 1;
    }
    
    .navbar .nav-items {
        gap: 10px;
    }
    
    .navbar .nav-item .nav-label {
        display: none;
    }
    
    .product-grid {
        grid-template-columns: 1fr !important;
        gap: 15px;
    }
    
    .category-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .features-grid {
        grid-template-columns: 1fr !important;
    }
    
    .cart-container {
        flex-direction: column;
    }
    
    .cart-items {
        width: 100%;
    }
    
    .cart-summary {
        width: 100%;
        position: sticky;
        bottom: 0;
        z-index: 100;
    }
    
    .checkout-container {
        flex-direction: column;
    }
    
    .checkout-form {
        width: 100%;
    }
    
    .order-summary {
        width: 100%;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-section {
        margin-bottom: 20px;
    }
    
    .hero {
        min-height: 300px;
    }
    
    .hero-content h1 {
        font-size: 28px;
    }
    
    .section-title {
        font-size: 24px;
    }
    
    table {
        font-size: 14px;
    }
    
    .admin-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .admin-actions {
        width: 100%;
        margin-top: 10px;
    }
    
    .profile-container {
        grid-template-columns: 1fr !important;
    }
    
    .info-grid {
        grid-template-columns: 1fr !important;
    }
}

@media (min-width: 481px) and (max-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .category-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
    
    .category-grid {
        grid-template-columns: repeat(4, 1fr) !important;
    }
}

@media (min-width: 1025px) {
    .product-grid {
        grid-template-columns: repeat(4, 1fr) !important;
    }
}

.sticky-bottom {
    position: sticky;
    bottom: 0;
    background: white;
    padding: 15px;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 100;
}

#map {
    width: 100%;
    height: 400px;
}

@media (max-width: 768px) {
    #map {
        height: 300px;
    }
}

.touch-scroll {
    -webkit-overflow-scrolling: touch;
}

@supports (-webkit-touch-callout: none) {
    input, select, textarea {
        font-size: 16px;
    }
}
