
    * {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
    }

    body {
        font-family: 'Vazirmatn', sans-serif;
        background: #f9fafb;
    }

    :root {
        --primary: #259bea;
        --primary-dark: #259bea;
        --primary-light: #259bea;
        --gray-50: #f9fafb;
        --gray-100: #f3f4f6;
        --gray-200: #e5e7eb;
        --gray-300: #d1d5db;
        --gray-600: #4b5563;
        --gray-700: #374151;
        --gray-800: #1f2937;
        --white: #ffffff;
        --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
        --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
        --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
        --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);
    }

    header {
        background: var(--white);
        box-shadow: var(--shadow-md);
        position: sticky;
        top: 0;
        z-index: 1000;
        border-bottom: 1px solid var(--gray-200);
    }

    .navbar {
        max-width: 1400px;
        margin: 0 auto;
        padding: 0.75rem 1.5rem;
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 1rem;
    }

    .mobile-menu-btn {
        display: none;
        background: none;
        border: none;
        font-size: 1.5rem;
        cursor: pointer;
        color: var(--gray-700);
        padding: 0.5rem;
    }

    .logo-container {
        display: flex;
        align-items: center;
        gap: 0.75rem;
    }

    .logo-img {
        width: 45px;
        height: 45px;
        border-radius: 50%;
        object-fit: cover;
        border: 2px solid var(--primary);
    }

    .logo-text {
        font-size: 1.5rem;
        font-weight: 800;
        color: var(--primary);
    }

    .nav-links {
        display: flex;
        align-items: center;
        gap: 1.5rem;
        list-style: none;
    }

    .nav-links > li {
        position: relative;
    }

    .nav-links > li > a {
        text-decoration: none;
        color: var(--gray-700);
        font-weight: 500;
        padding: 0.5rem 0;
        display: flex;
        align-items: center;
        gap: 0.5rem;
        transition: all 0.2s ease;
    }

    .nav-links > li > a:hover {
        color: var(--primary);
    }

   /* === مگا منو === */
.mega-container {
    position: relative;
}

.mega-dropdown {
    position: absolute;
    top: calc(100% );
    width: 900px;
    max-width: 90vw;
    background: var(--white);
    border-radius: 16px;
    box-shadow: var(--shadow-xl);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.25s ease;
    border: 1px solid var(--gray-200);
    overflow: hidden;
    pointer-events: none;
}

/* دسکتاپ - هاور */
@media (min-width: 769px) {
    .mega-container:hover .mega-dropdown {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        pointer-events: auto;
    }
}

/* چرخش آیکون */
.mega-trigger .chevron-icon {
    transition: transform 0.3s ease;
}

.mega-container:hover .mega-trigger .chevron-icon {
    transform: rotate(180deg);
}

/* ==================== حالت موبایل ==================== */
@media (max-width: 768px) {
    .mega-dropdown {
        position: static !important;
        width: 100% !important;
        max-width: 100% !important;
        margin-top: 8px;
        box-shadow: var(--shadow-lg);
        display: none !important;
        border-radius: 12px;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
    }

    .mega-dropdown.active {
        display: block !important;
    }

    .mega-sidebar {
        height: auto;
        max-height: 300px;
        border-bottom: 1px solid var(--gray-200);
        border-left: none;
    }

    .mega-content {
        height: auto;
        max-height: 420px;
        padding: 16px;
    }

    .product-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

/* استایل‌های عمومی دسته‌بندی */
.category-item {
    padding: 14px 18px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-right: 3px solid transparent;
}

.category-item:hover,
.category-item.active {
    background: #f3f5ff;
    border-right-color: var(--primary);
}
    .category-info {
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .category-info svg {
        width: 20px;
        height: 20px;
        color: var(--gray-600);
    }

    .category-info span {
        font-size: 0.9rem;
        font-weight: 500;
        color: var(--gray-700);
    }

    .arrow-icon {
        width: 16px;
        height: 16px;
        color: var(--gray-400);
    }

    .mega-content {
        height: 450px;
        overflow-y: auto;
        padding: 20px;
        background: #ffffff;
    }
/* پنل‌های محتوا - بسیار مهم */
.mega-content-panel {
    display: none;
}

.mega-content-panel.active {
    display: block !important;
}

/* حالت موبایل */
@media (max-width: 768px) {
    .mega-dropdown {
        position: static !important;
        width: 100% !important;
        max-width: 100% !important;
        margin-top: 8px;
        box-shadow: var(--shadow-lg);
        display: none !important;
        border-radius: 12px;
    }

    .mega-dropdown.active {
        display: block !important;
    }

    /* رفع مشکل نمایش پنل در موبایل */
    .mega-content-panel {
        display: none !important;
    }
    
    .mega-content-panel.active {
        display: block !important;
    }

    .mega-sidebar {
        height: auto;
        max-height: 320px;
        border-bottom: 1px solid var(--gray-200);
        border-left: none;
        overflow-y: auto;
    }

    .mega-content {
        height: auto;
        max-height: 450px;
        padding: 16px;
        overflow-y: auto;
        background: #fff;
    }
}
    .product-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .product-info h4 {
        font-size: 1.1rem;
        font-weight: 700;
        color: var(--gray-800);
        margin-bottom: 16px;
    }

    .product-list {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .product-list a {
        text-decoration: none;
        color: var(--gray-600);
        font-size: 0.85rem;
        transition: all 0.2s ease;
        display: inline-block;
    }

    .product-list a:hover {
        color: var(--success);
        padding-right: 5px;
    }

    .product-img img {
        width: 100%;
        border-radius: 12px;
        object-fit: cover;
    }

    .subcategory-title {
        font-size: 0.9rem;
        font-weight: 600;
        color: var(--gray-700);
        margin-top: 16px;
        margin-bottom: 8px;
    }

    .lang-selector {
        padding: 8px 12px;
        border: 1px solid var(--gray-300);
        border-radius: 10px;
        background: var(--white);
        font-family: 'Vazirmatn', sans-serif;
        font-size: 0.85rem;
        cursor: pointer;
        outline: none;
    }

    .lang-selector:focus {
        border-color: var(--primary);
        box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
    }

    @media (max-width: 768px) {
        .mobile-menu-btn {
            display: block;
        }

        .navbar {
            padding: 0.75rem 1rem;
        }

        .nav-links {
            display: none;
            position: absolute;
            top: 100%;
            left: 0;
            right: 0;
            background: var(--white);
            flex-direction: column;
            align-items: stretch;
            padding: 1rem;
            gap: 0.5rem;
            box-shadow: var(--shadow-lg);
            border-top: 1px solid var(--gray-200);
        }

        .nav-links.active {
            display: flex;
        }

        .mega-dropdown {
            position: static;
            width: 100%;
            max-width: 100%;
            margin-top: 10px;
        }

        .mega-sidebar {
            height: auto;
            max-height: 250px;
            border-left: none;
            border-bottom: 1px solid var(--gray-200);
        }

        .mega-content {
            height: auto;
            max-height: 350px;
        }

        .product-grid {
            grid-template-columns: 1fr;
            gap: 16px;
        }
    }

    @media (min-width: 769px) and (max-width: 1024px) {
        .mega-dropdown {
            width: 750px;
        }
    }

    @media (max-width: 768px) {
    .mega-dropdown * {
        pointer-events: auto !important;
    }

    .category-item {
        pointer-events: auto !important;
        position: relative;
        z-index: 5;
    }

    .mega-content-panel {
        display: none !important;
    }
    
    .mega-content-panel.active {
        display: block !important;
    }
}
