/* ============================================
   ZIRO13 - Responsive Design System
   Mobile, Tablet & Desktop Support
   ============================================ */

/* Large Desktop (> 1440px) */
@media (min-width: 1440px) {
    .hero-title {
        font-size: 4.5rem;
    }
    
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .services-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Desktop (1024px - 1439px) */
@media (max-width: 1439px) {
    .hero-section {
        padding: 6rem 3rem 3rem;
    }
    
    .hero-title {
        font-size: 3.5rem;
    }
    
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Tablet Landscape (768px - 1023px) */
@media (max-width: 1023px) {
    /* Navbar */
    .navbar-menu {
        display: none;
    }
    
    .navbar-actions .btn-login,
    .navbar-actions .btn-register {
        display: none;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .mobile-menu {
        display: none;
    }
    
    .mobile-menu.active {
        display: block;
    }
    
    /* Hero */
    .hero-section {
        flex-direction: column;
        padding: 6rem 2rem 3rem;
        text-align: center;
    }
    
    .hero-content {
        max-width: 100%;
    }
    
    .hero-cta {
        justify-content: center;
    }
    
    .hero-stats {
        justify-content: center;
    }
    
    .hero-visual {
        display: none;
    }
    
    /* Sections */
    .about-section,
    .services-section,
    .marketplace-preview,
    .stats-section,
    .support-section {
        padding: 4rem 2rem;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Footer */
    .footer-content {
        flex-direction: column;
        gap: 2rem;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 2rem;
    }
    
    /* Marketplace */
    .marketplace-toolbar {
        flex-direction: column;
    }
    
    .search-bar {
        min-width: 100%;
    }
    
    .filter-group {
        flex-wrap: wrap;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Quick View */
    .quick-view-grid {
        grid-template-columns: 1fr;
    }
}

/* Tablet Portrait (600px - 767px) */
@media (max-width: 767px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    /* Marketplace */
    .marketplace-header {
        padding: 6rem 1.5rem 2rem;
    }
    
    .marketplace-title-section {
        flex-direction: column;
    }
    
    .marketplace-grid {
        padding: 1.5rem;
    }
    
    /* Auth Pages */
    .auth-container {
        flex-direction: column;
    }
    
    .auth-branding,
    .auth-form-container {
        flex: none;
        width: 100%;
    }
    
    .auth-branding {
        min-height: 300px;
    }
}

/* Mobile (320px - 599px) */
@media (max-width: 599px) {
    html {
        font-size: 14px;
    }

    body {
        overflow-x: hidden;
    }
    
    .navbar {
        padding: 0.75rem 1rem;
    }
    
    .hero-section {
        padding: 5rem 1rem 2rem;
        min-height: auto;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-cta {
        flex-direction: column;
    }
    
    .btn-primary,
    .btn-secondary {
        width: 100%;
        justify-content: center;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .section-description {
        font-size: 0.9375rem;
    }
    
    .about-card,
    .service-card {
        padding: 1.5rem;
    }
    
    .stats-card {
        padding: 1.25rem;
    }
    
    .support-content {
        padding: 2rem;
    }
    
    .cta-buttons {
        flex-direction: column;
    }
    
    /* Marketplace */
    .marketplace-title {
        font-size: 1.75rem;
    }
    
    .filter-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.8125rem;
    }

    .free-toolbar-section,
    .premium-section,
    .marketplace-grid {
        overflow-x: clip;
    }

    .free-toolbar,
    .premium-toolbar,
    .marketplace-toolbar {
        gap: 0.75rem;
    }

    .free-filters,
    .premium-category-tabs,
    .filter-group {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 0.25rem;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .free-filters::-webkit-scrollbar,
    .premium-category-tabs::-webkit-scrollbar,
    .filter-group::-webkit-scrollbar {
        display: none;
    }

    .free-filter-btn,
    .premium-cat-tab,
    .filter-btn {
        flex: 0 0 auto;
        white-space: nowrap;
    }

    .free-products-grid,
    .premium-products-grid,
    .featured-grid,
    .updates-grid,
    .trending-grid,
    .products-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }

    .free-product-card,
    .premium-product-card,
    .product-card {
        width: 100%;
        min-width: 0;
    }

    .free-card-footer,
    .premium-card-footer,
    .product-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .free-card-actions,
    .premium-card-actions,
    .product-actions {
        width: 100%;
        margin-left: 0;
        justify-content: space-between;
    }

    .btn-free-download,
    .btn-premium-buy,
    .btn-product-download {
        flex: 1 1 auto;
        justify-content: center;
    }

    .free-card-meta,
    .premium-card-meta,
    .product-meta {
        flex-wrap: wrap;
    }

    .official-links-section,
    .flow-section,
    .faq-section {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .product-detail-modal,
    .premium-modal {
        align-items: stretch;
        padding: 0;
    }

    .product-detail-dialog,
    .premium-modal-content {
        width: 100%;
        max-height: 100vh;
        border-radius: 0;
    }
    
    .product-card {
        font-size: 0.875rem;
    }
    
    /* Dashboard */
    .dashboard-sidebar {
        width: 100%;
        position: relative;
    }
    
    .dashboard-main {
        margin-left: 0;
    }
    
    /* Modal */
    .modal-content {
        padding: 1.5rem;
    }
    
    .quick-view-content {
        padding: 1.5rem;
    }
    
    /* Footer */
    .footer {
        padding: 2rem 1rem;
    }
}

/* Small Mobile (< 375px) */
@media (max-width: 374px) {
    .hero-badge {
        font-size: 0.75rem;
        padding: 0.375rem 0.75rem;
    }
    
    .hero-stats {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .product-actions {
        flex-direction: column;
    }
    
    .btn-product {
        width: 100%;
    }
    
    .quick-view-actions {
        flex-direction: column;
    }
}

/* Dark Mode Preference */
@media (prefers-color-scheme: dark) {
    /* Already dark by default */
}

/* Light Mode (Future Support) */
@media (prefers-color-scheme: light) {
    /* Light mode styles can be added here */
}

/* 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;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .bg-orb,
    .cursor-glow,
    .mobile-menu,
    .modal {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .glass-card {
        background: white;
        border: 1px solid #ccc;
        box-shadow: none;
    }
}
