/* ================================
   Responsive Design
   ================================ */

/* Tablet Landscape */
@media (max-width: 1024px) {
    .configurator-container {
        grid-template-columns: 1fr;
    }
    
    .configurator-preview {
        position: relative;
        top: 0;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
    
    .footer-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Tablet Portrait */
@media (max-width: 768px) {
    /* Navigation - FORCE HIDE by default on mobile */
    .nav-menu {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        height: calc(100vh - 70px);
        background: white;
        flex-direction: column;
        padding: 2rem;
        gap: 1rem;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        z-index: 100;
        overflow-y: auto;
    }

    /* FORCE SHOW only when .active class is present */
    .nav-menu.active {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        pointer-events: auto !important;
    }
    
    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-20px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    /* Hero */
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero p {
        font-size: 1.1rem;
        padding: 0 1rem;
    }
    
    /* Products Grid */
    .products-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1.5rem;
    }
    
    /* Cart Sidebar */
    .cart-sidebar {
        width: 100%;
        right: -100%;
    }
    
    /* Footer */
    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
    
    .newsletter-form input,
    .newsletter-form button {
        width: 100%;
    }
    
    /* Configurator */
    .config-actions {
        grid-template-columns: 1fr;
    }
    
    .option-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }
}

/* Mobile */
@media (max-width: 480px) {
    /* Typography */
    body {
        font-size: 14px;
    }
    
    .hero h1 {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    /* Container */
    .container {
        padding: 0 15px;
    }
    
    /* Header */
    .nav-container {
        padding: 0.75rem 1rem;
    }
    
    .logo a {
        font-size: 1.5rem;
    }
    
    /* Products */
    .products-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .product-card {
        border-radius: 10px;
    }
    
    .product-image {
        height: 200px;
    }
    
    /* Configurator */
    .configurator-container {
        padding: 1rem;
    }
    
    .preview-image {
        height: 300px;
    }
    
    .config-step h3 {
        font-size: 1.1rem;
    }
    
    .size-grid {
        grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    }
    
    .color-picker {
        grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
    }
    
    .color-option {
        width: 40px;
        height: 40px;
    }
    
    /* Price Display */
    .price-total {
        font-size: 1.3rem;
    }
    
    /* Buttons */
    .btn {
        padding: 0.6rem 1.5rem;
        font-size: 0.95rem;
    }
    
    /* Footer */
    .footer {
        padding: 2rem 0 1rem;
    }
    
    .footer-section {
        margin-bottom: 1.5rem;
    }
    
    .footer-section h3 {
        font-size: 1.1rem;
    }
}

/* Small Mobile */
@media (max-width: 360px) {
    .hero h1 {
        font-size: 1.75rem;
    }
    
    .logo a {
        font-size: 1.3rem;
    }
    
    .cart-count {
        width: 18px;
        height: 18px;
        font-size: 0.7rem;
    }
    
    .product-info {
        padding: 1rem;
    }
    
    .product-name {
        font-size: 1.1rem;
    }
    
    .product-price {
        font-size: 1.2rem;
    }
}

/* Print Styles */
@media print {
    .header,
    .footer,
    .cart-sidebar,
    .mobile-menu-toggle,
    .cart-icon {
        display: none;
    }
    
    main {
        margin-top: 0;
    }
    
    .hero {
        background: none;
        padding: 2rem 0;
    }
    
    .product-card {
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    * {
        color: black !important;
        background: white !important;
    }
}

/* High Resolution Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .logo a {
        image-rendering: -webkit-optimize-contrast;
    }
    
    .product-image img {
        image-rendering: crisp-edges;
    }
}

/* Hover Effects nur für Desktop */
@media (hover: hover) and (pointer: fine) {
    .nav-link:hover {
        background: var(--light-pink);
        color: var(--primary-pink);
    }
    
    .product-card:hover {
        transform: translateY(-8px);
    }
    
    .btn:hover {
        transform: translateY(-2px);
    }
}

/* Landscape Mode für Mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .hero {
        padding: 3rem 0;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    main {
        margin-top: 60px;
    }
}

/* Accessibility - Motion reduzieren */
@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;
    }
}

/* Dark Mode Support (optional) */
@media (prefers-color-scheme: dark) {
    /* Kann später für Dark Mode implementiert werden */
}