/*
 * Ethan's Appliance Center - Responsive Styles
 * Mobile-first responsive design
 * Version: 1.0.0
 */

/* ==========================================================================
   Extra Large Screens (1400px and up)
   ========================================================================== */

@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
    
    .hero-title {
        font-size: 5rem;
    }
}

/* ==========================================================================
   Large Screens (1200px and down)
   ========================================================================== */

@media (max-width: 1199.98px) {
    .container {
        max-width: 960px;
    }
    
    .hero-title {
        font-size: var(--text-6xl);
    }
    
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .category-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
        gap: var(--space-8);
    }
    
    .mega-menu {
        min-width: 500px;
    }
    
    .mega-menu-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ==========================================================================
   Medium Screens (992px and down)
   ========================================================================== */

@media (max-width: 991.98px) {
    .container {
        max-width: 720px;
    }
    
    /* Header */
    .header-search {
        display: none;
    }
    
    .header-actions {
        display: none;
    }
    
    .mobile-toggle {
        display: flex;
    }
    
    /* Navigation */
    .header-nav {
        display: none;
    }
    
    /* Hero */
    .hero {
        min-height: 500px;
    }
    
    .hero-title {
        font-size: var(--text-5xl);
    }
    
    .hero-text {
        font-size: var(--text-lg);
    }
    
    /* Product Grid */
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-5);
    }
    
    .product-grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Category Grid */
    .category-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    /* Footer */
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-8);
    }
    
    .footer-about {
        grid-column: span 2;
        padding-right: 0;
        text-align: center;
    }
    
    .footer-social {
        justify-content: center;
    }
    
    /* Section */
    .section {
        padding: var(--space-12) 0;
    }
    
    .section-title {
        font-size: var(--text-3xl);
    }
    
    /* Product Gallery */
    .product-gallery {
        flex-direction: column-reverse;
    }
    
    .gallery-thumbnails {
        flex-direction: row;
        width: 100%;
        justify-content: center;
    }
    
    .gallery-thumb {
        width: 70px;
    }
}

/* ==========================================================================
   Small Screens (768px and down)
   ========================================================================== */

@media (max-width: 767.98px) {
    .container {
        max-width: 100%;
        padding: 0 var(--space-4);
    }
    
    /* Header */
    .header-topbar {
        display: none;
    }
    
    .header-main {
        padding: var(--space-3) 0;
    }
    
    .header-content {
        gap: var(--space-3);
    }
    
    .logo-text {
        display: none;
    }
    
    .logo-img {
        height: 40px;
    }
    
    /* Hero */
    .hero {
        min-height: 450px;
        padding: var(--space-8) 0;
    }
    
    .hero-content {
        text-align: center;
    }
    
    .hero-badge {
        margin-bottom: var(--space-4);
    }
    
    .hero-title {
        font-size: var(--text-4xl);
        margin-bottom: var(--space-4);
    }
    
    .hero-text {
        font-size: var(--text-base);
        margin-bottom: var(--space-6);
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .hero-buttons .btn {
        width: 100%;
        max-width: 200px;
    }
    
    /* Sections */
    .section {
        padding: var(--space-10) 0;
    }
    
    .section-header {
        margin-bottom: var(--space-8);
    }
    
    .section-title {
        font-size: var(--text-2xl);
    }
    
    .section-subtitle {
        font-size: var(--text-base);
    }
    
    /* Product Grid */
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-4);
    }
    
    .product-card-body {
        padding: var(--space-4);
    }
    
    .product-title {
        font-size: var(--text-base);
    }
    
    .price-current {
        font-size: var(--text-lg);
    }
    
    /* Category Grid */
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-3);
    }
    
    .category-card {
        padding: var(--space-4) var(--space-3);
    }
    
    .category-icon {
        width: 50px;
        height: 50px;
        font-size: var(--text-2xl);
        margin-bottom: var(--space-3);
    }
    
    .category-name {
        font-size: var(--text-sm);
    }
    
    /* Footer */
    .footer-main {
        padding: var(--space-10) 0;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--space-8);
        text-align: center;
    }
    
    .footer-about {
        grid-column: span 1;
    }
    
    .footer-title {
        display: block;
        text-align: center;
    }
    
    .footer-links a::before {
        display: none;
    }
    
    .footer-links a:hover {
        transform: none;
    }
    
    .footer-contact li {
        justify-content: center;
    }
    
    .footer-bottom-content {
        flex-direction: column;
        gap: var(--space-4);
        text-align: center;
    }
    
    .footer-bottom-links {
        justify-content: center;
    }
    
    /* Page Header */
    .page-header {
        padding: var(--space-10) 0;
    }
    
    .page-title {
        font-size: var(--text-3xl);
    }
    
    /* Branch Cards */
    .branch-card-header {
        padding: var(--space-4);
    }
    
    .branch-name {
        font-size: var(--text-lg);
    }
    
    /* Filters */
    .filters-sidebar {
        margin-bottom: var(--space-6);
    }
    
    /* Buttons */
    .btn {
        padding: var(--space-3) var(--space-5);
    }
    
    .btn-lg {
        padding: var(--space-4) var(--space-6);
        font-size: var(--text-base);
    }
    
    /* Scroll Top */
    .scroll-top {
        bottom: 20px;
        right: 20px;
        width: 44px;
        height: 44px;
    }
    
    /* Promo Banner */
    .promo-banner {
        padding: var(--space-6);
        min-height: 300px;
    }
    
    .promo-title {
        font-size: var(--text-3xl);
    }
    
    .promo-banner-image {
        display: none;
    }
}

/* ==========================================================================
   Extra Small Screens (576px and down)
   ========================================================================== */

@media (max-width: 575.98px) {
    html {
        font-size: 14px;
    }
    
    .container {
        padding: 0 var(--space-3);
    }
    
    /* Logo */
    .logo-img {
        height: 35px;
    }
    
    /* Hero */
    .hero {
        min-height: 400px;
    }
    
    .hero-title {
        font-size: var(--text-3xl);
    }
    
    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .hero-buttons .btn {
        width: 100%;
        max-width: none;
    }
    
    /* Product Grid - Single Column on very small screens */
    .product-grid {
        grid-template-columns: 1fr;
        gap: var(--space-4);
    }
    
    .product-card-image {
        aspect-ratio: 4/3;
    }
    
    /* Category Grid */
    .category-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-2);
    }
    
    .category-card {
        padding: var(--space-3) var(--space-2);
    }
    
    .category-icon {
        width: 40px;
        height: 40px;
        font-size: var(--text-xl);
        margin-bottom: var(--space-2);
    }
    
    .category-name {
        font-size: var(--text-xs);
    }
    
    /* Breadcrumb */
    .breadcrumb {
        font-size: var(--text-xs);
    }
    
    /* Section Headers */
    .section-badge {
        font-size: var(--text-xs);
        padding: var(--space-1) var(--space-3);
    }
    
    /* Mobile Nav */
    .mobile-nav {
        max-width: 100%;
    }
    
    /* Promo Banner */
    .promo-banner {
        border-radius: var(--radius-lg);
    }
    
    .promo-tag {
        font-size: var(--text-xs);
    }
    
    .promo-title {
        font-size: var(--text-2xl);
    }
    
    .promo-text {
        font-size: var(--text-sm);
    }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
    .site-header,
    .header-nav,
    .mobile-nav,
    .mobile-nav-overlay,
    .site-footer,
    .scroll-top,
    .site-preloader {
        display: none !important;
    }
    
    .site-main {
        padding: 0;
    }
    
    a[href]:after {
        content: " (" attr(href) ")";
    }
    
    .product-card {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}

/* ==========================================================================
   Accessibility - 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;
    }
    
    .hero-slide {
        transition: none;
    }
    
    .brand-track {
        animation: none;
    }
}

/* ==========================================================================
   Dark Mode Support (Optional - for future)
   ========================================================================== */

@media (prefers-color-scheme: dark) {
    /* Can be enabled later for dark mode support */
}

/* ==========================================================================
   High Contrast Mode
   ========================================================================== */

@media (prefers-contrast: high) {
    :root {
        --primary-red: #B71C1C;
        --gray-500: #424242;
    }
    
    .btn {
        border-width: 3px;
    }
    
    a:focus,
    button:focus,
    input:focus {
        outline: 3px solid currentColor;
        outline-offset: 2px;
    }
}
