/* Mobile First Responsive Design */

/* Extra Small Devices (phones, up to 576px) */
@media (max-width: 575.98px) {
    .container {
        padding: 0 var(--spacing-md);
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.25rem;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .collections-grid {
        grid-template-columns: 1fr;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .nav-menu {
        position: fixed;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--background-primary);
        box-shadow: 0 4px 20px var(--shadow-medium);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition-medium);
        padding: var(--spacing-lg);
    }
    
    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .nav-list {
        flex-direction: column;
        gap: var(--spacing-lg);
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .nav-actions {
        gap: var(--spacing-sm);
    }
    
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: var(--background-secondary);
        margin-top: var(--spacing-sm);
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
    }
    
    .modal-content {
        margin: var(--spacing-md);
        max-width: calc(100vw - 2rem);
    }
    
    .modal-body {
        padding: var(--spacing-md);
        max-height: 70vh;
    }
    
    .cart-actions {
        flex-direction: column;
    }
    
    .hero-actions .btn {
        width: 100%;
        max-width: 280px;
    }
    
    .filters-grid {
        grid-template-columns: 1fr;
    }
}

/* Small Devices (landscape phones, 576px and up) */
@media (min-width: 576px) {
    .collections-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Medium Devices (tablets, 768px and up) */
@media (min-width: 768px) {
    .container {
        padding: 0 var(--spacing-xl);
    }
    
    .hero-title {
        font-size: 4rem;
    }
    
    .hero-subtitle {
        font-size: 1.5rem;
    }
    
    .section-title {
        font-size: 2.5rem;
    }
    
    .collections-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .nav-menu {
        position: static;
        transform: none;
        opacity: 1;
        visibility: visible;
        background: none;
        box-shadow: none;
        padding: 0;
    }
    
    .nav-list {
        flex-direction: row;
        gap: var(--spacing-xl);
    }
    
    .nav-toggle {
        display: none;
    }
    
    .dropdown-menu {
        position: absolute;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        background: var(--background-primary);
        box-shadow: 0 4px 20px var(--shadow-medium);
        margin-top: 0;
    }
    
    .modal-content {
        max-width: 600px;
        margin: 0;
    }
    
    .modal-body {
        padding: var(--spacing-xl);
    }
    
    .cart-actions {
        flex-direction: row;
    }
    
    .filters-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .form-group.form-row {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-md);
    }
}

/* Large Devices (desktops, 992px and up) */
@media (min-width: 992px) {
    .collections-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .footer-content {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .filters-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Extra Large Devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .container {
        max-width: 1200px;
    }
    
    .hero-title {
        font-size: 5rem;
    }
    
    .hero-subtitle {
        font-size: 1.75rem;
    }
    
    .section-title {
        font-size: 3rem;
    }
}

/* Ultra Wide Screens */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
}

/* Print Styles */
@media print {
    .header,
    .footer,
    .nav-actions,
    .product-actions,
    .btn,
    .modal {
        display: none !important;
    }
    
    .hero {
        height: auto;
        min-height: auto;
    }
    
    .hero-overlay {
        display: none;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
        color: black;
        background: white;
    }
    
    a {
        color: black;
        text-decoration: underline;
    }
    
    .page-break {
        page-break-before: always;
    }
}

/* 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 */
@media (prefers-contrast: high) {
    :root {
        --shadow-light: rgba(0, 0, 0, 0.3);
        --shadow-medium: rgba(0, 0, 0, 0.5);
        --shadow-dark: rgba(0, 0, 0, 0.7);
        --border-color: #000;
        --border-light: #333;
    }
    
    .btn-outline {
        border-width: 3px;
    }
    
    .form-input:focus,
    .form-select:focus,
    .form-textarea:focus {
        border-width: 3px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --text-primary: #ffffff;
        --text-secondary: #b3b3b3;
        --text-light: #808080;
        --background-primary: #1a1a1a;
        --background-secondary: #2d2d2d;
        --border-color: #404040;
        --border-light: #333333;
        --shadow-light: rgba(255, 255, 255, 0.05);
        --shadow-medium: rgba(255, 255, 255, 0.1);
        --shadow-dark: rgba(255, 255, 255, 0.15);
    }
    
    .hero-overlay {
        background: linear-gradient(135deg, rgba(0, 0, 0, 0.6), rgba(212, 175, 55, 0.3));
    }
    
    .collection-overlay {
        background: linear-gradient(135deg, rgba(0, 0, 0, 0.8), rgba(212, 175, 55, 0.4));
    }
}

/* Touch Devices */
@media (hover: none) and (pointer: coarse) {
    .nav-btn,
    .btn,
    .product-action-btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    .product-actions {
        opacity: 1;
        transform: none;
    }
    
    .collection-overlay {
        opacity: 1;
    }
    
    .collection-content {
        transform: none;
    }
}

/* Orientation Specific */
@media (orientation: landscape) and (max-height: 600px) {
    .hero {
        height: 100vh;
        min-height: 500px;
    }
    
    .hero-title {
        font-size: 3rem;
    }
}

/* Specific Device Breakpoints */

/* iPhone SE */
@media (max-width: 375px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .container {
        padding: 0 var(--spacing-sm);
    }
}

/* iPad */
@media (min-width: 768px) and (max-width: 1024px) {
    .collections-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Large Tablets */
@media (min-width: 1024px) and (max-width: 1199px) {
    .collections-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}