/**
 * Blyze Art - Modern Responsive Styles
 * Theme: Red & Black with Glassmorphism
 * Optimized for Mobile, Tablet, and Desktop
 */

/* ========== Large Desktop (1400px+) ========== */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }

    .products-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .categories-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* ========== Desktop (992px - 1399px) ========== */
@media (max-width: 1399px) and (min-width: 992px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .categories-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .hero-slider {
        height: 500px;
    }
}

/* ========== Tablet (768px - 991px) ========== */
@media (max-width: 991px) {
    .container {
        padding: 0 15px;
    }

    /* Header - Tablet */
    .header-main {
        flex-wrap: wrap;
        padding: 15px 0;
    }

    .logo-text {
        font-size: 22px;
    }

    .logo-img {
        width: 48px;
        height: 48px;
    }

    .mobile-toggle {
        display: flex !important;
    }

    /* Navigation - Tablet */
    .main-nav {
        display: none;
        width: 100%;
        background: rgba(0, 0, 0, 0.95);
        backdrop-filter: blur(20px);
        margin-top: 15px;
        border-radius: var(--radius);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .main-nav.active {
        display: block;
        max-height: 500px;
        overflow-y: auto;
    }

    .nav-list {
        flex-direction: column;
        padding: 10px;
    }

    .nav-link {
        width: 100%;
        padding: 16px 20px;
        border-radius: var(--radius);
        border-bottom: 1px solid rgba(220, 53, 69, 0.15);
    }

    .nav-link::before {
        display: none;
    }

    /* Products - Tablet */
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .product-card {
        margin-bottom: 0;
    }

    .product-image {
        height: 220px;
    }

    .product-actions .btn {
        font-size: 13px;
        padding: 10px 14px;
    }

    /* Categories - Tablet */
    .categories-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }

    /* Hero Slider - Tablet */
    .hero-slider {
        height: 420px;
        border-radius: var(--radius);
    }

    .hero-content h2 {
        font-size: 32px;
    }

    /* Footer - Tablet */
    .footer-sections {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }

    /* Forms - Tablet */
    .form-control {
        padding: 12px 16px;
    }

    .btn {
        padding: 12px 24px;
        font-size: 14px;
    }

    /* Cookie Consent - Tablet */
    .cookie-consent {
        flex-direction: column;
        text-align: center;
    }
}

/* ========== Mobile (576px - 767px) ========== */
@media (max-width: 767px) {
    body {
        font-size: 15px;
    }

    .container {
        padding: 0 12px;
    }

    /* Header - Mobile */
    .site-header {
        position: relative;
    }

    .header-main {
        padding: 12px 0;
    }

    .logo-text {
        font-size: 20px;
    }

    .logo-img {
        width: 45px;
        height: 45px;
        border-radius: 10px;
    }

    .header-left {
        gap: 10px;
    }

    .header-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .user-avatar-header {
        width: 38px;
        height: 38px;
    }

    .mobile-toggle {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    /* Navigation - Mobile */
    .main-nav {
        margin-top: 12px;
        border-radius: var(--radius);
    }

    .nav-list {
        padding: 8px;
    }

    .nav-link {
        padding: 14px 16px;
        font-size: 15px;
    }

    /* Products - Mobile */
    .products-section,
    .categories-section {
        padding: 40px 0;
    }

    .products-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .product-image {
        height: 250px;
    }

    .product-actions {
        flex-direction: column;
    }

    .product-actions .btn {
        width: 100%;
    }

    /* Categories - Mobile */
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    /* Hero Slider - Mobile */
    .hero-slider {
        height: 350px;
        border-radius: var(--radius);
        margin: 15px 0;
    }

    .hero-content {
        padding: 40px 0 30px;
    }

    .hero-content h2 {
        font-size: 26px;
    }

    /* Section Titles - Mobile */
    .section-title {
        font-size: 28px;
        margin-bottom: 35px;
    }

    /* Footer - Mobile */
    .site-footer {
        padding: 40px 0 20px;
        margin-top: 60px;
    }

    .footer-sections {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .footer-section h3 {
        font-size: 18px;
    }

    /* Forms - Mobile */
    .form-group {
        margin-bottom: 20px;
    }

    .form-control {
        padding: 12px 15px;
        font-size: 15px;
    }

    .btn {
        width: 100%;
        padding: 14px 20px;
    }

    /* Cookie Consent - Mobile */
    .cookie-consent {
        padding: 15px 20px;
        flex-direction: column;
        gap: 15px;
    }

    .cookie-consent button {
        width: 100%;
    }

    /* Loading Overlay - Mobile */
    .loading-content {
        padding: 30px 40px;
        margin: 20px;
    }

    /* Notification - Mobile */
    .notification {
        left: 10px;
        right: 10px;
        width: auto;
        padding: 14px 20px;
    }
}

/* ========== Small Mobile (≤ 575px) ========== */
@media (max-width: 575px) {
    body {
        font-size: 14px;
    }

    .container {
        padding: 0 10px;
    }

    /* Header - Small Mobile */
    .header-main {
        padding: 10px 0;
    }

    .logo-text {
        font-size: 18px;
        letter-spacing: 1px;
    }

    .logo-img {
        width: 40px;
        height: 40px;
    }

    .header-icon {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }

    .user-avatar-header {
        width: 35px;
        height: 35px;
    }

    .cart-badge {
        width: 18px;
        height: 18px;
        font-size: 9px;
    }

    /* Navigation - Small Mobile */
    .main-nav {
        background: rgba(0, 0, 0, 0.98);
    }

    .nav-link {
        padding: 12px 14px;
        font-size: 14px;
        gap: 6px;
    }

    .nav-link i {
        font-size: 14px;
    }

    /* Products - Small Mobile */
    .products-section,
    .categories-section {
        padding: 30px 0;
    }

    .products-grid {
        gap: 15px;
    }

    .product-image {
        height: 220px;
    }

    .product-info {
        padding: 15px;
    }

    .product-title {
        font-size: 16px;
    }

    .price-current {
        font-size: 20px;
    }

    /* Categories - Small Mobile */
    .categories-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .category-card {
        aspect-ratio: 16/9;
    }

    /* Hero Slider - Small Mobile */
    .hero-slider {
        height: 280px;
        margin: 12px 0;
    }

    .hero-content {
        padding: 30px 0 20px;
    }

    .hero-content h2 {
        font-size: 22px;
    }

    .hero-content .btn {
        padding: 10px 20px;
        font-size: 13px;
    }

    /* Section Titles - Small Mobile */
    .section-title {
        font-size: 24px;
        margin-bottom: 30px;
    }

    /* Buttons - Small Mobile */
    .btn {
        padding: 12px 18px;
        font-size: 13px;
    }

    /* Footer - Small Mobile */
    .site-footer {
        padding: 30px 0 15px;
    }

    .footer-sections {
        gap: 25px;
    }

    .footer-section h3 {
        font-size: 16px;
        margin-bottom: 15px;
    }

    .footer-links li {
        margin-bottom: 10px;
    }

    .footer-links a {
        font-size: 14px;
    }

    /* Forms - Small Mobile */
    .form-control {
        padding: 11px 14px;
        font-size: 14px;
    }

    .form-label {
        font-size: 13px;
        margin-bottom: 8px;
    }

    /* Login/Register Forms - Small Mobile */
    .auth-box {
        padding: 25px 20px;
        border-radius: var(--radius);
    }

    .auth-box h1 {
        font-size: 24px;
    }

    /* Tables - Small Mobile */
    table {
        font-size: 12px;
    }

    .table-responsive {
        border-radius: var(--radius);
    }

    /* Comments - Small Mobile */
    .comment-card {
        padding: 15px;
    }

    .comment-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    /* User Profile - Small Mobile */
    .profile-header {
        padding: 20px;
    }

    .profile-avatar-large {
        width: 80px;
        height: 80px;
    }
}

/* ========== Ultra Small Mobile (≤ 360px) ========== */
@media (max-width: 360px) {
    .logo-text {
        font-size: 16px;
    }

    .hero-slider {
        height: 240px;
    }

    .hero-content h2 {
        font-size: 20px;
    }

    .section-title {
        font-size: 22px;
    }

    .product-image {
        height: 200px;
    }

    .product-title {
        font-size: 15px;
    }

    .price-current {
        font-size: 18px;
    }
}

/* ========== Landscape Mobile (501px - 767px) ========== */
@media (max-width: 767px) and (min-width: 501px) and (orientation: landscape) {
    .hero-slider {
        height: 300px;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .categories-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ========== Print Styles ========== */
@media print {
    .site-header,
    .site-footer,
    .mobile-toggle,
    .btn,
    .cookie-consent {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }

    .product-card {
        page-break-inside: avoid;
    }
}

/* ========== Dark Mode Support (system preference) ========== */
@media (prefers-color-scheme: dark) {
    /* Keep existing red/black theme for now */
    /* Can be enhanced later if needed */
}

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

/* ========== High Contrast Mode (Accessibility) ========== */
@media (prefers-contrast: high) {
    :root {
        --shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
        --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.4);
    }

    .btn {
        border: 2px solid currentColor;
    }

    .nav-link {
        border-bottom-width: 2px;
    }
}
