/* Responsive Design */
@media (max-width: 1200px) {
    .container {
        max-width: 1140px;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    }
}

@media (max-width: 992px) {
    .container {
        max-width: 960px;
    }
    
    .header-content {
        flex-direction: column;
        gap: var(--spacing-md);
    }
    
    .nav-links {
        gap: var(--spacing-md);
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: var(--spacing-lg);
    }
    
    .checkout-steps {
        flex-direction: column;
        gap: var(--spacing-md);
    }
    
    .step {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .container {
        max-width: 720px;
    }
    
    h1 { font-size: var(--font-size-3xl); }
    h2 { font-size: var(--font-size-2xl); }
    h3 { font-size: var(--font-size-xl); }
    
    .nav-links {
        flex-direction: column;
        width: 100%;
        gap: var(--spacing-sm);
    }
    
    .nav-link {
        justify-content: center;
        width: 100%;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: var(--spacing-md);
    }
    
    .cart-item {
        flex-direction: column;
        text-align: center;
        gap: var(--spacing-md);
    }
    
    .cart-item-details {
        text-align: center;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
    }
    
    .checkout-container {
        grid-template-columns: 1fr;
    }
    
    .order-summary {
        order: -1;
        margin-bottom: var(--spacing-xl);
    }
}

@media (max-width: 576px) {
    .container {
        max-width: 540px;
        padding: 0 var(--spacing-sm);
    }
    
    .products-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .product-actions-footer {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .modal-content {
        margin: var(--spacing-sm);
        width: calc(100% - var(--spacing-xl));
    }
    
    .cart-container,
    .checkout-container {
        padding: var(--spacing-md) var(--spacing-sm);
    }
    
    .notification {
        right: var(--spacing-sm);
        left: var(--spacing-sm);
    }
}

/* Mobile First Approach */
@media (min-width: 576px) {
    .container {
        max-width: 540px;
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 720px;
    }
}

@media (min-width: 992px) {
    .container {
        max-width: 960px;
    }
}

@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
}

@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
}

/* Print Styles */
@media print {
    .webshop-header,
    .webshop-footer,
    .btn,
    .no-print {
        display: none !important;
    }
    
    .container {
        max-width: none;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    a[href]:after {
        content: " (" attr(href) ")";
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #0000ff;
        --secondary-color: #ff0000;
    }
    
    .product-card {
        border: 2px solid #000;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #1a202c;
        --text-color: #e2e8f0;
        --card-bg: #2d3748;
        --border-color: #4a5568;
    }
    
    body {
        background: var(--bg-color);
        color: var(--text-color);
    }
    
    .product-card,
    .cart-item,
    .checkout-section,
    .dashboard-card {
        background: var(--card-bg);
        border-color: var(--border-color);
    }
    
    .form-input,
    .form-select,
    .form-textarea {
        background: var(--card-bg);
        border-color: var(--border-color);
        color: var(--text-color);
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .product-actions {
        opacity: 1;
    }
    
    .hover-lift:hover,
    .hover-scale:hover,
    .hover-rotate:hover {
        transform: none;
    }
    
    .nav-link {
        padding: var(--spacing-md);
    }
}

/* Orientation Specific */
@media (orientation: landscape) and (max-height: 500px) {
    .webshop-header {
        position: static;
    }
    
    .main-content {
        padding-top: var(--spacing-md);
    }
}

/* 2K and 4K Displays */
@media (min-width: 1920px) {
    .container {
        max-width: 1800px;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
        gap: var(--spacing-2xl);
    }
    
    h1 { font-size: 3.5rem; }
    h2 { font-size: 2.5rem; }
    h3 { font-size: 2rem; }
}

/* Ultra-wide displays */
@media (min-width: 2560px) {
    .container {
        max-width: 2400px;
    }
}
