/* ============================================
   RN Computer - Responsive Styles (Mobile First)
   ============================================ */

/* Tablet & Below */
@media (max-width: 1024px) {
    .product-grid { grid-template-columns: repeat(3, 1fr); }
    .trust-grid { grid-template-columns: repeat(2, 1fr); }
    .category-grid { grid-template-columns: repeat(3, 1fr); }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
    .dashboard-grid { grid-template-columns: 1fr; }
    .dashboard-sidebar { position: static; }
    .hero-slide { min-height: 300px; }
    .hero-slide-content { padding: 30px; }
    .hero-slide-content h2 { font-size: 28px; }
}

/* Mobile */
@media (max-width: 768px) {
    :root { --header-height: 60px; }
    
    .container { padding: 0 15px; }
    .section { padding: 40px 0; }
    .section-title { font-size: 22px; }
    
    /* Header */
    .header-top { display: none; }
    .hamburger { display: flex; }
    .search-bar { display: none; }
    .search-toggle { display: flex !important; }

.navbar-collapse.show {
    display: block !important;
    position: absolute !important;
    top: 100%;
    left: 0;
    width: 100%;
    background: #fff;
    z-index: 9999;
}
.navbar-nav .nav-link {
    display: block;
    padding: 12px 20px;
    color: #333;
    border-bottom: 1px solid #f0f0f0;
}

/* Isse click lock nahi hoga */
.header-main-inner {
    position: relative;
    z-index: 1000;
}
    
    .header-main-inner { gap: 12px; }
    .logo-text h1 { font-size: 16px; }
    .logo-text span { font-size: 8px; }
    .logo img { height: 35px; }
    
    .header-action-btn { width: 36px; height: 36px; font-size: 14px; }
    .badge-count { width: 16px; height: 16px; font-size: 9px; top: -2px; right: -2px; }
    
    /* Nav Mobile */
    .nav-bar {
        position: fixed; top: 0; left: -100%; width: 80%; max-width: 300px;
        height: 100vh; z-index: 10000;
        background: rgba(10, 10, 26, 0.98); backdrop-filter: blur(30px);
        border-right: 1px solid var(--border-glass);
        transition: left 0.3s ease; padding-top: 60px;
        overflow-y: auto;
    }
    .nav-bar.open { left: 0; }
    .nav-menu { flex-direction: column; padding: 20px; }
    .nav-menu li { width: 100%; }
    .nav-menu li a { padding: 14px 16px; border-radius: var(--radius-sm); font-size: 14px; justify-content: flex-start; }
    .nav-menu li a::after { display: none; }
    .nav-menu li a:hover, .nav-menu li a.active { background: rgba(var(--primary-rgb), 0.15); }
    
    /* Mobile overlay for nav */
    .nav-overlay {
        display: none; position: fixed; inset: 0; z-index: 9999;
        background: rgba(0, 0, 0, 0.5);
    }
    .nav-overlay.show { display: block; }
    
    /* Product Grid */
    .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .product-card-body { padding: 12px; }
    .product-card-title { font-size: 12px; }
    .price-current { font-size: 15px; }
    .price-original { font-size: 11px; }
    .product-card-specs { display: none; }
    .product-actions-overlay { transform: translateY(0); background: none; padding: 6px; justify-content: flex-end; }
    .product-actions-overlay button { width: 32px; height: 32px; font-size: 12px; }
    .product-card-footer .btn { font-size: 11px; padding: 8px 14px; min-height: 36px; }
    .warranty-badge { font-size: 9px; padding: 2px 6px; }
    
    /* Categories */
    .category-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
    .category-card { padding: 16px 10px; }
    .category-card-icon { width: 48px; height: 48px; font-size: 20px; }
    .category-card h4 { font-size: 11px; }
    
    /* Trust */
    .trust-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .trust-item { padding: 14px; gap: 10px; }
    .trust-item-icon { width: 40px; height: 40px; font-size: 18px; }
    .trust-item h4 { font-size: 12px; }
    .trust-item p { font-size: 10px; }
    
    /* Hero */
    .hero-slide { min-height: 220px; }
    .hero-slide-content { padding: 20px; }
    .hero-slide-content h2 { font-size: 20px; }
    .hero-slide-content p { font-size: 13px; margin-bottom: 16px; }
    .hero-slide-content .btn { padding: 10px 20px; font-size: 12px; }
    
    /* Flash Sale */
    .flash-sale-banner { flex-direction: column; gap: 12px; text-align: center; padding: 16px; }
    .flash-sale-banner h3 { font-size: 16px; }
    .countdown-item { padding: 6px 10px; min-width: 45px; }
    .countdown-item span { font-size: 18px; }
    
    /* Footer */
    .footer-grid { grid-template-columns: 1fr; gap: 24px; }
    .footer-main { padding: 30px 0; }
    .footer-col h4 { font-size: 14px; }
    
    /* Auth */
    .auth-card { padding: 24px; }
    .auth-card h2 { font-size: 20px; }
    
    /* Dashboard */
    .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .stat-card { padding: 14px; }
    .stat-card h3 { font-size: 20px; }
    .stat-card-icon { width: 40px; height: 40px; font-size: 16px; }
    
    /* Tables */
    td, th { padding: 10px 12px; font-size: 12px; }
    
    /* Order Tracker */
    .order-tracker { padding: 0; }
    .track-dot { width: 28px; height: 28px; font-size: 11px; }
    .track-label { font-size: 9px; }
    
    /* Bottom Navigation */
    .bottom-nav {
        display: flex; position: fixed; bottom: 0; left: 0; right: 0;
        z-index: 9998; background: rgba(10, 10, 26, 0.95);
        backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
        border-top: 1px solid var(--border-glass);
        padding: 6px 0; padding-bottom: calc(6px + env(safe-area-inset-bottom));
    }
    .bottom-nav-item {
        flex: 1; display: flex; flex-direction: column; align-items: center;
        gap: 2px; padding: 6px 0; font-size: 10px; color: var(--text-muted);
        transition: var(--transition); position: relative;
    }
    .bottom-nav-item i { font-size: 18px; }
    .bottom-nav-item.active { color: var(--primary); }
    .bottom-nav-item.active::before {
        content: ''; position: absolute; top: -6px; width: 20px; height: 2px;
        background: var(--primary); border-radius: 2px;
    }
    .cart-nav .nav-cart-count {
        position: absolute; top: 0; right: calc(50% - 18px);
        width: 16px; height: 16px; background: var(--accent); color: #fff;
        font-size: 9px; font-weight: 700; display: flex; align-items: center;
        justify-content: center; border-radius: 50%;
    }
    
    /* Adjust for bottom nav */
    body { padding-bottom: 70px; }
    .whatsapp-float { bottom: 80px; right: 16px; width: 48px; height: 48px; font-size: 22px; }
    .live-notification { bottom: 80px; left: 10px; }
    .footer { margin-bottom: 60px; }
    
    /* Misc mobile adjustments */
    .btn { min-height: 44px; }
    .modal { margin: 15px; max-height: 90vh; overflow-y: auto; }
    .pagination a, .pagination span { min-width: 36px; height: 36px; font-size: 13px; }
    
    /* Compare page */
    .compare-table { font-size: 12px; }
    
    /* Testimonials */
    .testimonial-card { padding: 20px; }
}

/* Small Mobile */
@media (max-width: 400px) {
    .product-grid { gap: 8px; }
    .product-card-body { padding: 8px; }
    .product-card-title { font-size: 11px; -webkit-line-clamp: 1; }
    .price-current { font-size: 14px; }
    .product-badge { font-size: 9px; padding: 2px 8px; top: 8px; left: 8px; }
    .product-discount { font-size: 9px; padding: 2px 8px; top: 8px; right: 8px; }
    .category-grid { grid-template-columns: repeat(2, 1fr); }
    .trust-grid { grid-template-columns: 1fr; }
    .countdown { gap: 6px; }
    .stat-grid { grid-template-columns: 1fr; }
}

/* Landscape phones */
@media (max-width: 768px) and (orientation: landscape) {
    .hero-slide { min-height: 200px; }
    .bottom-nav { display: none; }
    body { padding-bottom: 0; }
}

/* Desktop enhancements */
@media (min-width: 1200px) {
    .product-grid.grid-5 { grid-template-columns: repeat(5, 1fr); }
    .container { padding: 0 30px; }
}

/* Print styles */
@media print {
    .header, .footer, .bottom-nav, .whatsapp-float, .live-notification { display: none !important; }
    body { background: #fff; color: #000; padding: 0; }
    .main-content { padding-top: 0; }
}

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