/* تحسينات الموبايل الإضافية */

/* تحسين القائمة الجانبية */
.nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--bg-card);
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
    transition: right 0.3s ease;
    z-index: 1000;
    overflow-y: auto;
    padding: 0;
    margin: 0;
    list-style: none;
}

.nav-menu.active {
    right: 0;
}

.nav-menu .menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 1rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.nav-menu li {
    border-bottom: 1px solid var(--border-color);
}

.nav-menu li:last-child {
    border-bottom: none;
}

.nav-menu a {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    text-decoration: none;
    color: var(--text-primary);
    transition: background 0.3s;
    gap: 0.75rem;
}

.nav-menu a:hover {
    background: var(--bg-secondary);
}

.nav-menu i {
    width: 20px;
    text-align: center;
}

.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* تحسين شبكة المنتجات للموبايل */
@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .product-card {
        padding: 0.75rem;
    }
    
    .product-card h3 {
        font-size: 0.9rem;
        line-height: 1.3;
    }
    
    .product-card .price {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .section-subtitle {
        font-size: 0.9rem;
    }
}

/* تحسين الأزرار للموبايل */
@media (max-width: 768px) {
    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .btn-lg {
        padding: 1rem 2rem;
        font-size: 1rem;
    }
}

/* تحسين النصوص للموبايل */
@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }
    
    .section {
        padding: 1.5rem 0;
    }
    
    .categories-compact-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .category-compact-card h4 {
        font-size: 0.8rem !important;
    }
}

/* تحسين السلايدر للموبايل */
@media (max-width: 768px) {
    .slider-container {
        height: 250px;
    }
    
    .slide h2 {
        font-size: 1.5rem;
    }
    
    .slide p {
        font-size: 0.9rem;
    }
    
    .slider-nav {
        bottom: 10px;
    }
    
    .slider-nav button {
        width: 8px;
        height: 8px;
    }
}

/* تحسين الهيدر للموبايل */
@media (max-width: 768px) {
    .main-header .container {
        padding: 0 1rem;
    }
    
    .navbar {
        padding: 0.75rem 0;
    }
    
    .logo {
        font-size: 1.2rem;
    }
    
    .nav-icons {
        gap: 0.75rem;
    }
    
    .nav-icons button,
    .nav-icons a {
        font-size: 1.3rem;
    }
}

/* إظهار القائمة الأفقية في الديسكتوب */
@media (min-width: 769px) {
    .desktop-nav {
        display: flex !important;
    }
    
    .menu-toggle {
        display: none !important;
    }
}

/* إخفاء عناصر غير ضرورية في الموبايل */
@media (max-width: 768px) {
    .search-form {
        display: none !important;
    }
    
    .desktop-nav {
        display: none !important;
    }
}

/* تحسين الفوتر للموبايل */
@media (max-width: 768px) {
    .footer {
        text-align: center;
    }
    
    .footer .container {
        padding: 1.5rem 1rem;
    }
}
