/**
 * eCommerce Dashboard Styles
 * Modern gaming-themed design with glassmorphism effects
 */

/* Google Fonts - will fail gracefully if offline, fallbacks are in font-family declarations */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;600;700;800;900&family=Rajdhani:wght@300;400;500;600;700&display=swap');

:root {
    /* Gaming Color Palette */
    --neon-cyan: #00d4ff;
    --neon-purple: #9d4edd;
    --neon-pink: #ff006e;
    --neon-green: #39ff14;
    --neon-orange: #ff6b35;
    --dark-bg: #0a0a0f;
    --card-bg: #1a1a2e;
    --card-hover: #16213e;
    --text-primary: #ffffff;
    --text-secondary: #b8c6db;
    --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-3: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --shadow-neon: 0 0 20px rgba(0, 212, 255, 0.3);
    --shadow-purple: 0 0 20px rgba(157, 78, 221, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Rajdhani', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--dark-bg);
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(120, 219, 255, 0.3) 0%, transparent 50%);
    min-height: 100vh;
    color: var(--text-primary);
    overflow-x: hidden;
    position: relative;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* Prevent text size adjustment on iOS */
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(0,245,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    z-index: -1;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(10px, 10px); }
}

/* Header */
.dashboard-header {
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 2px solid rgba(0, 212, 255, 0.3);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.logo-section {
    flex: 0 0 auto;
}

.logo {
    font-family: 'Orbitron', 'Courier New', 'Consolas', monospace;
    font-size: 2rem;
    font-weight: 900;
    margin: 0;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    font-size: 2.5rem;
    display: inline-block;
    animation: logoPulse 2s ease-in-out infinite;
    filter: drop-shadow(0 0 10px rgba(0, 212, 255, 0.5));
    transition: transform 0.3s ease;
}

.logo:hover .logo-icon {
    transform: rotate(15deg) scale(1.1);
    filter: drop-shadow(0 0 15px rgba(0, 212, 255, 0.8));
}

.logo-text {
    background: linear-gradient(135deg, var(--neon-cyan), var(--neon-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

.logo-text::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--neon-cyan), var(--neon-purple));
    border-radius: 2px;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.logo:hover .logo-text::after {
    opacity: 1;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

@keyframes logoPulse {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 0 10px rgba(0, 212, 255, 0.5));
    }
    50% {
        transform: scale(1.05);
        filter: drop-shadow(0 0 15px rgba(0, 212, 255, 0.8));
    }
}

/* Floating Action Buttons */
.floating-filter-btn {
    position: fixed;
    bottom: 110px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--gradient-1);
    border: 3px solid rgba(157, 78, 221, 0.5);
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(157, 78, 221, 0.4);
    transition: all 0.3s ease;
}

.floating-filter-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(157, 78, 221, 0.6);
    border-color: var(--neon-purple);
}

.floating-search-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--gradient-3);
    border: 3px solid rgba(0, 212, 255, 0.5);
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0, 212, 255, 0.4);
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
}

.floating-search-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(0, 212, 255, 0.6);
    border-color: var(--neon-cyan);
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(0, 212, 255, 0.4);
    }
    50% {
        box-shadow: 0 4px 30px rgba(0, 212, 255, 0.7);
    }
}

/* Search Modal */
.search-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
}

.search-modal.active {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
}

.search-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.search-modal-content {
    position: relative;
    background: rgba(26, 26, 46, 0.98);
    border: 2px solid rgba(0, 212, 255, 0.5);
    border-radius: 20px;
    padding: 0;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    box-shadow: 0 10px 50px rgba(0, 212, 255, 0.3);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
    overflow: hidden;
}

.search-modal.active .search-modal-content {
    transform: scale(1) translateY(0);
}

.search-modal-header {
    padding: 20px 25px;
    border-bottom: 2px solid rgba(0, 212, 255, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.3);
}

.search-modal-header h3 {
    font-family: 'Orbitron', 'Courier New', 'Consolas', monospace;
    font-size: 1.3rem;
    color: var(--neon-cyan);
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.search-modal-close {
    background: transparent;
    border: 2px solid rgba(0, 212, 255, 0.3);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.search-modal-close:hover {
    border-color: var(--neon-pink);
    color: var(--neon-pink);
    transform: rotate(90deg);
}

.search-modal-form {
    padding: 25px;
}

.search-input-wrapper {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.search-modal-input {
    width: 100%;
    padding: 15px 20px;
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(0, 212, 255, 0.3);
    border-radius: 15px;
    color: var(--text-primary);
    font-size: 1.1rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

.search-modal-input:focus {
    outline: none;
    border-color: var(--neon-cyan);
    box-shadow: var(--shadow-neon);
    background: rgba(0, 0, 0, 0.6);
}

.search-modal-submit {
    width: 100%;
    padding: 15px 20px;
    background: var(--gradient-3);
    border: none;
    border-radius: 15px;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.search-modal-submit:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-neon);
}

/* Filter Modal */
.filter-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
}

.filter-modal.active {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
}

.filter-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.filter-modal-content {
    position: relative;
    background: rgba(26, 26, 46, 0.98);
    border: 2px solid rgba(157, 78, 221, 0.5);
    border-radius: 20px;
    padding: 0;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    box-shadow: 0 10px 50px rgba(157, 78, 221, 0.3);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.filter-modal.active .filter-modal-content {
    transform: scale(1) translateY(0);
}

.filter-modal-header {
    padding: 20px 25px;
    border-bottom: 2px solid rgba(157, 78, 221, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.3);
}

.filter-modal-header h3 {
    font-family: 'Orbitron', 'Courier New', 'Consolas', monospace;
    font-size: 1.3rem;
    color: var(--neon-purple);
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.filter-modal-close {
    background: transparent;
    border: 2px solid rgba(157, 78, 221, 0.3);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.filter-modal-close:hover {
    border-color: var(--neon-pink);
    color: var(--neon-pink);
    transform: rotate(90deg);
}

.filter-modal-form {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}

.filter-modal-body {
    padding: 25px;
    overflow-y: auto;
    flex: 1;
    -webkit-overflow-scrolling: touch;
}

.filter-section {
    margin-bottom: 25px;
}

.filter-section:last-child {
    margin-bottom: 0;
}

.filter-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 12px;
}

.filter-label i {
    color: var(--neon-purple);
    font-size: 1.1rem;
}

.filter-select-input {
    width: 100%;
    padding: 12px 15px;
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(157, 78, 221, 0.3);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    cursor: pointer;
}

.filter-select-input:focus {
    outline: none;
    border-color: var(--neon-purple);
    box-shadow: 0 0 15px rgba(157, 78, 221, 0.3);
    background: rgba(0, 0, 0, 0.6);
}

.price-range-inputs {
    display: flex;
    align-items: center;
    gap: 12px;
}

.price-range-input {
    flex: 1;
    padding: 12px 15px;
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(157, 78, 221, 0.3);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

.price-range-input:focus {
    outline: none;
    border-color: var(--neon-purple);
    box-shadow: 0 0 15px rgba(157, 78, 221, 0.3);
    background: rgba(0, 0, 0, 0.6);
}

.price-range-separator {
    color: var(--text-secondary);
    font-weight: 600;
    white-space: nowrap;
}

.filter-modal-footer {
    padding: 20px 25px;
    border-top: 2px solid rgba(157, 78, 221, 0.3);
    display: flex;
    gap: 12px;
    background: rgba(0, 0, 0, 0.3);
}

.filter-reset-btn, .filter-apply-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.filter-reset-btn {
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
}

.filter-reset-btn:hover {
    background: rgba(0, 0, 0, 0.6);
    border-color: var(--text-secondary);
    transform: translateY(-2px);
}

.filter-apply-btn {
    background: var(--gradient-1);
    color: white;
    box-shadow: 0 4px 15px rgba(157, 78, 221, 0.4);
}

.filter-apply-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(157, 78, 221, 0.6);
}

.header-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

.admin-link, .cart-btn, .menu-toggle-btn {
    padding: 12px 20px;
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(0, 212, 255, 0.3);
    border-radius: 25px;
    color: var(--text-primary);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.menu-toggle-btn {
    padding: 12px 18px;
    min-width: 50px;
    justify-content: center;
    font-size: 1.2rem;
}

.menu-toggle-btn:hover {
    border-color: var(--neon-cyan);
    box-shadow: var(--shadow-neon);
    transform: translateY(-2px);
}

.cart-btn {
    padding: 12px 18px;
    min-width: 50px;
    justify-content: center;
}

.admin-link:hover, .cart-btn:hover {
    border-color: var(--neon-cyan);
    box-shadow: var(--shadow-neon);
    transform: translateY(-2px);
}

.cart-count {
    background: var(--neon-pink);
    color: white;
    border-radius: 50%;
    min-width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    position: absolute;
    top: -8px;
    right: -8px;
    padding: 0 4px;
    box-shadow: 0 2px 8px rgba(255, 0, 110, 0.5);
    border: 2px solid rgba(26, 26, 46, 0.9);
}

/* Sidebar Navigation */
.sidebar {
    position: fixed;
    top: 0;
    left: -320px;
    width: 320px;
    height: 100vh;
    background: rgba(26, 26, 46, 0.98);
    backdrop-filter: blur(20px);
    border-right: 2px solid rgba(0, 212, 255, 0.3);
    z-index: 2000;
    transition: left 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.5);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.sidebar.active {
    left: 0;
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 1999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 2px solid rgba(0, 212, 255, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.3);
    position: sticky;
    top: 0;
    z-index: 10;
}

.sidebar-title {
    font-family: 'Orbitron', 'Courier New', 'Consolas', monospace;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--neon-cyan);
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.sidebar-title .logo-icon {
    font-size: 1.5rem;
    filter: drop-shadow(0 0 8px rgba(0, 212, 255, 0.5));
}

.sidebar-close {
    background: transparent;
    border: 2px solid rgba(0, 212, 255, 0.3);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.sidebar-close:hover {
    border-color: var(--neon-pink);
    color: var(--neon-pink);
    transform: rotate(90deg);
}

.sidebar-nav {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.sidebar-nav-item {
    padding: 16px 20px;
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid transparent;
    border-radius: 12px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 14px;
    font-weight: 600;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
    margin-bottom: 8px;
}

.sidebar-nav-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--neon-cyan), var(--neon-purple));
    transform: scaleY(0);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 0 4px 4px 0;
}

.sidebar-nav-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.1), rgba(157, 78, 221, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-nav-item i, .sidebar-nav-item .category-icon {
    font-size: 1.3rem;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.sidebar-nav-item span:not(.category-icon) {
    flex: 1;
    position: relative;
    z-index: 1;
    transition: color 0.3s ease;
}

.sidebar-nav-item:hover {
    border-color: rgba(0, 212, 255, 0.4);
    color: var(--text-primary);
    background: rgba(0, 0, 0, 0.5);
    transform: translateX(8px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.sidebar-nav-item:hover::before {
    transform: scaleY(1);
}

.sidebar-nav-item:hover::after {
    opacity: 1;
}

.sidebar-nav-item:hover i, .sidebar-nav-item:hover .category-icon {
    transform: scale(1.1);
    color: var(--neon-cyan);
}

.sidebar-nav-item.active {
    background: linear-gradient(135deg, rgba(79, 172, 254, 0.2), rgba(0, 242, 254, 0.2));
    border: 2px solid var(--neon-cyan);
    color: white;
    box-shadow: 
        0 0 20px rgba(0, 212, 255, 0.4),
        inset 0 0 20px rgba(0, 212, 255, 0.1);
    font-weight: 700;
    transform: translateX(8px);
}

.sidebar-nav-item.active::before {
    transform: scaleY(1);
    background: linear-gradient(180deg, var(--neon-cyan), var(--neon-purple));
    width: 5px;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.6);
}

.sidebar-nav-item.active::after {
    opacity: 1;
    background: linear-gradient(135deg, rgba(79, 172, 254, 0.15), rgba(0, 242, 254, 0.15));
}

.sidebar-nav-item.active i, .sidebar-nav-item.active .category-icon {
    color: white;
    transform: scale(1.15);
    filter: drop-shadow(0 0 8px rgba(0, 212, 255, 0.8));
}

.sidebar-nav-item.active span {
    color: white;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

/* Hide old navigation bar */
.dashboard-nav {
    display: none;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    gap: 10px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    /* Show subtle scrollbar on mobile for better UX */
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 212, 255, 0.3) transparent;
}

.nav-container::-webkit-scrollbar {
    height: 4px; /* Show thin scrollbar on mobile */
}

.nav-container::-webkit-scrollbar-track {
    background: transparent;
}

.nav-container::-webkit-scrollbar-thumb {
    background: rgba(0, 212, 255, 0.3);
    border-radius: 10px;
}

.nav-container::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 212, 255, 0.5);
}

.nav-item {
    padding: 12px 24px;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid transparent;
    border-radius: 25px;
    color: var(--text-secondary);
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    flex-shrink: 0;
    min-width: fit-content;
    font-size: 0.95rem;
    position: relative;
}

.nav-item i, .nav-item span {
    font-size: 1rem;
    display: flex;
    align-items: center;
}

.nav-item:hover {
    border-color: rgba(0, 212, 255, 0.5);
    color: var(--text-primary);
    transform: translateY(-2px);
    background: rgba(0, 0, 0, 0.4);
}

.nav-item.active {
    background: var(--gradient-3);
    border-color: var(--neon-cyan);
    color: white;
    box-shadow: var(--shadow-neon);
    font-weight: 700;
}

.nav-item.active i, .nav-item.active span {
    color: white;
}

/* Hero Section */
.hero-section {
    max-width: 1400px;
    margin: 40px auto;
    padding: 0 20px;
}

.hero-content {
    text-align: center;
    margin-bottom: 40px;
}

.hero-content h2 {
    font-family: 'Orbitron', 'Courier New', 'Consolas', monospace;
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--neon-cyan), var(--neon-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 15px;
}

.hero-content p {
    font-size: 1.3rem;
    color: var(--text-secondary);
}

.admin-quick-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 25px;
    flex-wrap: wrap;
}

.quick-action-btn {
    padding: 12px 25px;
    background: var(--gradient-3);
    border: 2px solid var(--neon-cyan);
    border-radius: 25px;
    color: white;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-neon);
}

.quick-action-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.6);
    background: var(--gradient-1);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.stat-card {
    background: rgba(26, 26, 46, 0.9);
    border: 2px solid rgba(0, 212, 255, 0.3);
    border-radius: 20px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: var(--neon-cyan);
    box-shadow: var(--shadow-neon);
}

.stat-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.stat-value {
    font-family: 'Orbitron', 'Courier New', 'Consolas', monospace;
    font-size: 2rem;
    font-weight: 700;
    color: var(--neon-cyan);
    margin-bottom: 5px;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Filters Section */
.filters-section {
    max-width: 1400px;
    margin: 30px auto;
    padding: 0 20px;
}

/* Hide filters section on mobile - show only in popup */
@media (max-width: 768px) {
    .filters-section.desktop-only {
        display: none;
    }
}

.filters-container {
    background: rgba(26, 26, 46, 0.8);
    border: 2px solid rgba(0, 212, 255, 0.3);
    border-radius: 15px;
    padding: 20px;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: center;
    backdrop-filter: blur(10px);
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-group label {
    color: var(--text-secondary);
    font-weight: 600;
    white-space: nowrap;
}

.filter-select, .price-input {
    padding: 10px 15px;
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(0, 212, 255, 0.3);
    border-radius: 10px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.filter-select:focus, .price-input:focus {
    outline: none;
    border-color: var(--neon-cyan);
    box-shadow: var(--shadow-neon);
}

.price-input {
    width: 100px;
}

.filter-btn {
    padding: 10px 20px;
    background: var(--gradient-3);
    border: none;
    border-radius: 10px;
    color: white;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-neon);
}

/* Main Content */
.main-content {
    max-width: 1400px;
    margin: 40px auto;
    padding: 0 20px;
}

.products-container {
    margin-bottom: 40px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

/* Product Card */
.product-card {
    background: rgba(26, 26, 46, 0.9);
    border: 2px solid rgba(0, 212, 255, 0.3);
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    backdrop-filter: blur(10px);
    position: relative;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    border-color: var(--neon-cyan);
    box-shadow: var(--shadow-neon);
}

.product-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
    background: rgba(0, 0, 0, 0.1);
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--neon-cyan);
    opacity: 0.5;
}

.featured-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--gradient-2);
    color: white;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(255, 0, 110, 0.4);
}

.product-info {
    padding: 12px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 8px;
}

.product-category {
    color: var(--neon-purple);
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.product-name {
    font-family: 'Orbitron', 'Courier New', 'Consolas', monospace;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.6em;
}

.product-description {
    color: var(--text-secondary);
    font-size: 0.8rem;
    line-height: 1.4;
    margin-bottom: 8px;
    max-height: 40px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    flex: 1;
}

.product-footer {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid rgba(0, 212, 255, 0.1);
}

.product-price {
    font-family: 'Orbitron', 'Courier New', 'Consolas', monospace;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--neon-green);
    text-align: center;
    margin-bottom: 4px;
}

.product-actions {
    display: flex;
    gap: 4px;
    flex-direction: column;
    width: 100%;
}

.btn-add-cart, .btn-daraz {
    padding: 4px 10px;
    border: none;
    border-radius: 5px;
    color: white;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.75rem;
    transition: all 0.3s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 100%;
    height: 28px;
    flex: 1;
}

.btn-add-cart {
    background: var(--gradient-3);
    box-shadow: 0 2px 8px rgba(0, 212, 255, 0.3);
}

.btn-add-cart i {
    font-size: 0.75rem;
}

.btn-add-cart:hover, .btn-add-cart:active {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 212, 255, 0.5);
}

.btn-add-cart:active {
    transform: translateY(0);
}

.btn-daraz {
    background: var(--gradient-1);
    box-shadow: 0 2px 8px rgba(157, 78, 221, 0.3);
}

.btn-daraz i {
    font-size: 0.75rem;
}

.btn-daraz:hover, .btn-daraz:active {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(157, 78, 221, 0.5);
}

.btn-daraz:active {
    transform: translateY(0);
}

.btn-select-games {
    padding: 4px 10px;
    border: none;
    border-radius: 5px;
    color: white;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.75rem;
    transition: all 0.3s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 100%;
    height: 28px;
    flex: 1;
    background: var(--gradient-2);
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.3);
}

.btn-select-games i {
    font-size: 0.75rem;
}

.btn-select-games:hover, .btn-select-games:active {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.5);
}

.btn-select-games:active {
    transform: translateY(0);
}

.out-of-stock {
    color: var(--neon-pink);
    font-weight: 600;
    font-size: 0.9rem;
}

.no-products {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-secondary);
}

.no-products i {
    font-size: 4rem;
    margin-bottom: 20px;
    color: var(--neon-cyan);
    opacity: 0.5;
}

.no-products h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--text-primary);
}

/* Shopping Cart Sidebar */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: rgba(26, 26, 46, 0.98);
    backdrop-filter: blur(20px);
    border-left: 2px solid rgba(0, 212, 255, 0.3);
    z-index: 2000;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}

.cart-sidebar.open {
    right: 0;
}

.cart-header {
    padding: 20px;
    border-bottom: 2px solid rgba(0, 212, 255, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-header h3 {
    font-family: 'Orbitron', 'Courier New', 'Consolas', monospace;
    font-size: 1.3rem;
    color: var(--neon-cyan);
    display: flex;
    align-items: center;
    gap: 10px;
}

.cart-close {
    background: transparent;
    border: 2px solid rgba(0, 212, 255, 0.3);
    border-radius: 50%;
    width: 35px;
    height: 35px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-close:hover {
    border-color: var(--neon-pink);
    color: var(--neon-pink);
    transform: rotate(90deg);
}

.cart-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.cart-item {
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(0, 212, 255, 0.2);
    border-radius: 15px;
    padding: 15px;
    margin-bottom: 15px;
    display: flex;
    gap: 15px;
}

.cart-item-image {
    width: 80px;
    height: 80px;
    border-radius: 10px;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cart-item-info {
    flex: 1;
}

.cart-item-name {
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.cart-item-price {
    color: var(--neon-green);
    font-weight: 600;
    margin-bottom: 10px;
}

.cart-item-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.quantity-control {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 10px;
    padding: 5px;
}

.quantity-btn {
    background: transparent;
    border: none;
    color: var(--neon-cyan);
    cursor: pointer;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.quantity-btn:hover {
    background: rgba(0, 212, 255, 0.2);
}

.quantity-input {
    width: 40px;
    text-align: center;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-weight: 600;
}

.remove-item {
    background: var(--neon-pink);
    border: none;
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.remove-item:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(255, 0, 110, 0.4);
}

.cart-footer {
    padding: 20px;
    border-top: 2px solid rgba(0, 212, 255, 0.3);
}

.cart-total {
    font-size: 1.3rem;
    margin-bottom: 15px;
    text-align: center;
    color: var(--neon-cyan);
    font-family: 'Orbitron', 'Courier New', 'Consolas', monospace;
}

.btn-checkout {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #25d366, #128c7e);
    border: none;
    border-radius: 15px;
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-checkout:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.4);
}

.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 1999;
    display: none;
}

.cart-overlay.active {
    display: block;
}

.empty-cart {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}

.empty-cart i {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 18px;
    }
    
    .product-image {
        height: 180px;
    }
    
    .product-image img {
        object-fit: contain;
    }
    
    .product-info {
        padding: 10px;
    }
    
    .product-name {
        font-size: 0.9rem;
    }
    
    .product-price {
        font-size: 1.1rem;
    }
    
    .hero-content h2 {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .header-container {
        flex-direction: row;
        gap: 15px;
        padding: 15px 20px;
        align-items: center;
        justify-content: space-between;
    }
    
    .logo-section {
        flex: 0 0 auto;
    }
    
    .logo {
        font-size: 1.5rem;
        gap: 10px;
    }
    
    .logo-icon {
        font-size: 2rem;
    }
    
    .header-actions {
        flex: 0 0 auto;
        justify-content: flex-end;
        gap: 10px;
    }
    
    .floating-filter-btn {
        width: 55px;
        height: 55px;
        font-size: 1.3rem;
        bottom: 95px;
        right: 25px;
    }
    
    .floating-search-btn {
        width: 55px;
        height: 55px;
        font-size: 1.3rem;
        bottom: 25px;
        right: 25px;
    }
    
    .filter-modal-content {
        width: 95%;
        max-width: 500px;
    }
    
    .filter-modal-header {
        padding: 18px 20px;
    }
    
    .filter-modal-header h3 {
        font-size: 1.1rem;
    }
    
    .filter-modal-body {
        padding: 20px;
    }
    
    .filter-section {
        margin-bottom: 20px;
    }
    
    .filter-label {
        font-size: 0.95rem;
    }
    
    .filter-select-input, .price-range-input {
        padding: 12px 15px;
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    .filter-modal-footer {
        padding: 18px 20px;
    }
    
    .filter-reset-btn, .filter-apply-btn {
        padding: 12px 18px;
        font-size: 0.95rem;
    }
    
    .search-modal-content {
        width: 95%;
        max-width: 500px;
    }
    
    .search-modal-header {
        padding: 18px 20px;
    }
    
    .search-modal-header h3 {
        font-size: 1.1rem;
    }
    
    .search-modal-form {
        padding: 20px;
    }
    
    .search-modal-input {
        padding: 12px 18px;
        font-size: 1rem;
    }
    
    .search-modal-submit {
        padding: 12px 18px;
        font-size: 1rem;
    }
    
    .admin-link, .cart-btn, .menu-toggle-btn {
        padding: 10px 15px;
        font-size: 0.85rem;
    }
    
    .menu-toggle-btn {
        padding: 10px 14px;
        font-size: 1.1rem;
    }
    
    .cart-btn {
        padding: 10px 14px;
    }
    
    .sidebar {
        width: 280px;
        left: -280px;
    }
    
    .sidebar-header {
        padding: 18px;
    }
    
    .sidebar-title {
        font-size: 1.1rem;
    }
    
    .sidebar-close {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .sidebar-nav {
        padding: 15px;
        gap: 8px;
    }
    
    .sidebar-nav-item {
        padding: 14px 18px;
        font-size: 0.95rem;
        min-height: 48px;
        margin-bottom: 6px;
    }
    
    .sidebar-nav-item i, .sidebar-nav-item .category-icon {
        font-size: 1.2rem;
        width: 26px;
        height: 26px;
    }
    
    .sidebar-nav-item.active {
        transform: translateX(6px);
    }
    
    .sidebar-nav-item:hover {
        transform: translateX(6px);
    }
    
    .hero-section {
        margin: 20px auto;
        padding: 0 15px;
    }
    
    .hero-content {
        margin-bottom: 25px;
    }
    
    .hero-content h2 {
        font-size: 1.8rem;
        margin-bottom: 10px;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .admin-quick-actions {
        gap: 10px;
        margin-top: 15px;
    }
    
    .quick-action-btn {
        padding: 10px 18px;
        font-size: 0.85rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        margin-top: 20px;
    }
    
    .stat-card {
        padding: 15px;
    }
    
    .stat-icon {
        font-size: 2rem;
        margin-bottom: 8px;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
    
    .stat-label {
        font-size: 0.75rem;
    }
    
    .filters-section {
        margin: 20px auto;
        padding: 0 15px;
    }
    
    .filters-container {
        flex-direction: column;
        align-items: stretch;
        padding: 15px;
        gap: 15px;
    }
    
    .filter-group {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        gap: 8px;
    }
    
    .filter-group label {
        font-size: 0.85rem;
    }
    
    .filter-select, .price-input {
        width: 100%;
        padding: 10px 12px;
        font-size: 0.9rem;
    }
    
    .filter-btn {
        width: 100%;
        padding: 12px;
    }
    
    .main-content {
        margin: 25px auto;
        padding: 0 15px;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 15px;
    }
    
    .product-card {
        border-radius: 12px;
    }
    
    .product-image {
        height: 180px;
    }
    
    .product-image img {
        object-fit: contain;
    }
    
    .product-info {
        padding: 10px;
        gap: 6px;
    }
    
    .product-category {
        font-size: 0.7rem;
        margin-bottom: 3px;
    }
    
    .product-name {
        font-size: 0.85rem;
        margin-bottom: 4px;
        min-height: 2.4em;
    }
    
    .product-description {
        font-size: 0.75rem;
        margin-bottom: 6px;
        max-height: 36px;
    }
    
    .product-footer {
        gap: 10px;
        padding-top: 8px;
    }
    
    .product-price {
        font-size: 1rem;
        margin-bottom: 4px;
    }
    
    .product-actions {
        width: 100%;
        flex-direction: column;
        gap: 4px;
    }
    
    .btn-add-cart, .btn-daraz, .btn-select-games {
        width: 100%;
        justify-content: center;
        padding: 4px 10px;
        font-size: 0.75rem;
        height: 28px;
    }
    
    .btn-add-cart i, .btn-daraz i, .btn-select-games i {
        font-size: 0.75rem;
    }
    
    .cart-sidebar {
        width: 100%;
        right: -100%;
    }
    
    .cart-header {
        padding: 15px;
    }
    
    .cart-header h3 {
        font-size: 1.1rem;
    }
    
    .cart-content {
        padding: 15px;
    }
    
    .cart-item {
        flex-direction: column;
        padding: 12px;
    }
    
    .cart-item-image {
        width: 100%;
        height: 150px;
        margin-bottom: 10px;
    }
    
    .cart-footer {
        padding: 15px;
    }
    
    .cart-total {
        font-size: 1.1rem;
    }
    
    .btn-checkout {
        padding: 12px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .header-container {
        padding: 12px 15px;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
    
    .logo-section {
        flex: 0 0 auto;
    }
    
    .logo {
        font-size: 1.3rem;
        gap: 8px;
    }
    
    .logo-icon {
        font-size: 1.8rem;
    }
    
    .header-actions {
        flex: 0 0 auto;
        justify-content: flex-end;
        gap: 8px;
    }
    
    .admin-link, .cart-btn, .menu-toggle-btn {
        padding: 10px 14px;
        font-size: 0.8rem;
    }
    
    .menu-toggle-btn {
        flex: 0 0 auto;
        min-width: 50px;
        font-size: 1rem;
    }
    
    .cart-btn {
        flex: 0 0 auto;
        min-width: 50px;
    }
    
    .sidebar {
        width: 100%;
        left: -100%;
    }
    
    .sidebar-header {
        padding: 15px;
    }
    
    .sidebar-title {
        font-size: 1rem;
    }
    
    .sidebar-close {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .sidebar-nav {
        padding: 12px;
        gap: 8px;
    }
    
    .sidebar-nav-item {
        padding: 14px 16px;
        font-size: 0.9rem;
        min-height: 48px;
        margin-bottom: 6px;
    }
    
    .sidebar-nav-item i, .sidebar-nav-item .category-icon {
        font-size: 1.1rem;
        width: 24px;
        height: 24px;
    }
    
    .sidebar-nav-item.active {
        transform: translateX(5px);
    }
    
    .sidebar-nav-item:hover {
        transform: translateX(5px);
    }
    
    .floating-filter-btn {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
        bottom: 80px;
        right: 20px;
    }
    
    .floating-search-btn {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
        bottom: 20px;
        right: 20px;
    }
    
    .filter-modal-content {
        width: 95%;
        max-width: 100%;
        border-radius: 15px;
    }
    
    .filter-modal-header {
        padding: 15px 18px;
    }
    
    .filter-modal-header h3 {
        font-size: 1rem;
    }
    
    .filter-modal-close {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .filter-modal-body {
        padding: 18px;
    }
    
    .filter-section {
        margin-bottom: 18px;
    }
    
    .filter-label {
        font-size: 0.9rem;
        margin-bottom: 10px;
    }
    
    .filter-select-input, .price-range-input {
        padding: 12px 15px;
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    .price-range-inputs {
        flex-direction: column;
        gap: 10px;
    }
    
    .price-range-separator {
        display: none;
    }
    
    .filter-modal-footer {
        padding: 15px 18px;
        flex-direction: column;
    }
    
    .filter-reset-btn, .filter-apply-btn {
        width: 100%;
        padding: 12px 15px;
        font-size: 0.9rem;
    }
    
    .search-modal-content {
        width: 95%;
        max-width: 100%;
        border-radius: 15px;
    }
    
    .search-modal-header {
        padding: 15px 18px;
    }
    
    .search-modal-header h3 {
        font-size: 1rem;
    }
    
    .search-modal-close {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .search-modal-form {
        padding: 18px;
    }
    
    .search-modal-input {
        padding: 12px 15px;
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    .search-modal-submit {
        padding: 12px 15px;
        font-size: 0.95rem;
    }
    
    .nav-item {
        padding: 10px 18px;
        font-size: 0.85rem;
        min-height: 44px; /* Touch-friendly */
        gap: 6px;
        border-radius: 25px;
    }
    
    .nav-item i, .nav-item span {
        font-size: 0.9rem;
    }
    
    .nav-container {
        padding: 0 10px;
        padding-right: 15px;
        gap: 8px;
    }
    
    .nav-item.active {
        background: var(--gradient-3);
        border-color: var(--neon-cyan);
        color: white;
        box-shadow: var(--shadow-neon);
        font-weight: 700;
    }
    
    .hero-content h2 {
        font-size: 1.5rem;
    }
    
    .hero-content p {
        font-size: 0.9rem;
    }
    
    .quick-action-btn {
        padding: 8px 15px;
        font-size: 0.8rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .stat-card {
        padding: 12px;
    }
    
    .stat-icon {
        font-size: 1.8rem;
    }
    
    .stat-value {
        font-size: 1.3rem;
    }
    
    .stat-label {
        font-size: 0.7rem;
    }
    
    .filters-container {
        padding: 12px;
    }
    
    .filter-select, .price-input {
        padding: 8px 10px;
        font-size: 0.85rem;
    }
    
    .filter-btn {
        padding: 10px;
        font-size: 0.85rem;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 12px;
    }
    
    .product-image {
        height: 160px;
    }
    
    .product-image img {
        object-fit: contain;
    }
    
    .product-info {
        padding: 8px;
        gap: 5px;
    }
    
    .product-category {
        font-size: 0.65rem;
        margin-bottom: 2px;
    }
    
    .product-name {
        font-size: 0.8rem;
        min-height: 2.2em;
    }
    
    .product-description {
        font-size: 0.7rem;
        max-height: 32px;
        margin-bottom: 4px;
    }
    
    .product-footer {
        gap: 8px;
        padding-top: 8px;
    }
    
    .product-price {
        font-size: 0.95rem;
        margin-bottom: 4px;
    }
    
    .product-actions {
        gap: 4px;
    }
    
    .btn-add-cart, .btn-daraz, .btn-select-games {
        padding: 3px 8px;
        font-size: 0.7rem;
        gap: 3px;
        height: 26px;
    }
    
    .btn-add-cart i, .btn-daraz i, .btn-select-games i {
        font-size: 0.7rem;
    }
    
    .cart-header {
        padding: 12px;
    }
    
    .cart-header h3 {
        font-size: 1rem;
    }
    
    .cart-content {
        padding: 12px;
    }
    
    .cart-item {
        padding: 10px;
    }
    
    .cart-item-image {
        height: 120px;
    }
    
    .cart-footer {
        padding: 12px;
    }
    
    .cart-total {
        font-size: 1rem;
    }
    
    .btn-checkout {
        padding: 10px;
        font-size: 0.95rem;
    }
}

/* Touch-friendly improvements for mobile */
@media (max-width: 768px) {
    .btn-add-cart, .btn-daraz, .btn-select-games {
        height: 28px; /* Compact but still touchable */
        -webkit-tap-highlight-color: rgba(0, 212, 255, 0.3);
    }
    
    .btn-checkout, .filter-btn, .search-btn {
        min-height: 44px; /* iOS touch target recommendation */
        -webkit-tap-highlight-color: rgba(0, 212, 255, 0.3);
    }
    
    .nav-item, .admin-link, .cart-btn, .quick-action-btn {
        min-height: 44px;
        -webkit-tap-highlight-color: rgba(0, 212, 255, 0.3);
    }
    
    .product-card {
        touch-action: manipulation; /* Prevent double-tap zoom */
        -webkit-tap-highlight-color: transparent;
    }
    
    /* Improve scrolling on mobile */
    .cart-content, .main-content, .filters-container {
        -webkit-overflow-scrolling: touch;
    }
    
    /* Prevent zoom on input focus (iOS) */
    input, select, textarea {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    @media (max-width: 480px) {
        input, select, textarea {
            font-size: 16px !important;
        }
    }
}

/* Landscape mobile optimization */
@media (max-width: 768px) and (orientation: landscape) {
    .hero-content h2 {
        font-size: 1.5rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 10px;
    }
    
    .stat-card {
        padding: 10px;
    }
    
    .stat-icon {
        font-size: 1.5rem;
    }
    
    .stat-value {
        font-size: 1.2rem;
    }
}

