/* Mobile Responsive Styles */

/* Tablet Styles */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: white;
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
        padding: 2rem;
        transition: left 0.3s;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-links {
        flex-direction: column;
        gap: 1rem;
        margin-bottom: 2rem;
    }
    
    .nav-links a {
        padding: 1rem 0;
        border-bottom: 1px solid #eee;
        font-size: 1.1rem;
    }
    
    .nav-actions {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-content p {
        font-size: 1.1rem;
    }
    
    .categories h2,
    .featured-products h2 {
        font-size: 2rem;
    }
    
    .category-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: 1.5rem;
    }
    
    .category-image {
        height: 180px;
    }
    
    .category-content {
        padding: 1.25rem;
    }
    
    .category-content h3 {
        font-size: 1.2rem;
    }
    
    .product-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.5rem;
    }
    
    /* Slider responsive */
    .product-slide {
        min-width: 50%;
        flex: 0 0 50%;
    }
    
    .featured-products .section-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .slider-info {
        width: 100%;
        justify-content: space-between;
    }
    
    .featured-products h2 {
        font-size: 2rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .table-responsive {
        overflow-x: auto;
    }
    
    .table {
        min-width: 600px;
    }
}

/* Mobile Styles */
@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
    
    .navbar {
        padding: 0.75rem 0;
    }
    
    .nav-brand a {
        font-size: 1.5rem;
    }
    
    .hero {
        padding: 3rem 0;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .categories,
    .featured-products {
        padding: 3rem 0;
    }
    
    .categories h2,
    .featured-products h2 {
        font-size: 1.8rem;
        margin-bottom: 2rem;
    }
    
    .category-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .product-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .category-card,
    .product-card {
        margin: 0 auto;
        max-width: 100%;
    }
    
    /* Slider responsive - single slide on mobile */
    .product-slide {
        min-width: 100%;
        flex: 0 0 100%;
    }
    
    .featured-products h2 {
        font-size: 1.8rem;
    }
    
    .slider-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .slider-controls {
        align-self: center;
    }
    
    .category-image {
        height: 200px;
    }
    
    .category-content {
        padding: 1.5rem;
    }
    
    .category-content h3 {
        font-size: 1.3rem;
    }
    
    .category-description {
        font-size: 0.95rem;
    }
    
    .btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
    
    .card-header,
    .card-body {
        padding: 1rem;
    }
    
    .main-footer {
        padding: 2rem 0 1rem;
    }
    
    .footer-section {
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
    }
    
    /* Form adjustments for mobile */
    .form-control {
        padding: 0.6rem;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    /* Dashboard adjustments */
    .dashboard-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .stat-card {
        text-align: center;
    }
    
    /* Cart adjustments */
    .cart-item {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .cart-item-info {
        text-align: center;
    }
    
    .quantity-controls {
        justify-content: center;
    }
    
    /* Order details adjustments */
    .order-summary {
        padding: 1rem;
    }
    
    .order-items {
        overflow-x: auto;
    }
    
    /* Profile form adjustments */
    .profile-form {
        padding: 1rem;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .form-col {
        width: 100%;
        margin-bottom: 1rem;
    }
}

/* Large Desktop Styles */
@media (min-width: 1200px) {
    .container {
        max-width: 1400px;
    }
    
    .hero-content h1 {
        font-size: 3.5rem;
    }
    
    .category-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .product-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Print Styles */
@media print {
    .main-header,
    .main-footer,
    .nav-toggle,
    .btn,
    .alert {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .container {
        max-width: none !important;
        padding: 0 !important;
    }
    
    .card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .btn-outline {
        border-width: 3px;
    }
    
    .form-control:focus {
        box-shadow: 0 0 0 3px rgba(0,123,255,0.5);
    }
    
    .card {
        border: 2px solid #333;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #1a1a1a;
        color: #e0e0e0;
    }
    
    .main-header {
        background: #2d2d2d;
    }
    
    .nav-links a {
        color: #e0e0e0;
    }
    
    .card {
        background: #2d2d2d;
        color: #e0e0e0;
    }
    
    .form-control {
        background: #2d2d2d;
        border-color: #555;
        color: #e0e0e0;
    }
    
    .table {
        background: #2d2d2d;
        color: #e0e0e0;
    }
    
    .table th {
        background: #3d3d3d;
    }
}