/* مرحله ۱: منوی عمودی سمت چپ */
.mega-menu-wrapper {
    background: #fff !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 8%) !important;
    width: fit-content !important;
    margin-top: 17px !important;
    padding: 0 !important;
    display: flex !important;
    align-items: stretch !important;
    height: auto !important;
    position: relative !important;
    z-index: 10000 !important;
}
.mega-menu-vertical {
    width: 200px !important;
    min-width: 200px !important;
    height: 100% !important;
    background: #f5f5f5 !important;
    border-radius: 8px 0 0 8px !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07) !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    z-index: 2 !important;
    flex-shrink: 0 !important;
}
.mega-menu-vertical-item {
    border-bottom: 1px solid #f0f0f0 !important;
    padding: 14px 20px !important;
    cursor: pointer !important;
    font-weight: 500 !important;
    color: #333 !important;
    transition: background 0.2s, color 0.2s !important;
    background: #fff !important;
    display: flex !important;
    align-items: center !important;
}
.mega-menu-vertical-item:last-child {
    border-bottom: none !important;
}
.mega-menu-vertical-item .category-thumb {
    width: 22px !important;
    height: 22px !important;
    margin-left: 8px !important;
}
.category-thumb {
    display: inline-block !important;
    width: 22px !important;
    height: 22px !important;
    margin-left: 8px !important;
    vertical-align: middle !important;
    background: #fafafa !important;
    border-radius: 4px !important;
    overflow: hidden !important;
    flex-shrink: 0 !important;
}
.category-thumb img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    display: block !important;
}
.mega-menu-vertical-item > a {
    color: #222 !important;
}
.mega-menu-vertical-item.active,
.mega-menu-vertical-item:hover {
    background: #fff !important;
    color: #eb7a61  !important;
}
.mega-menu-vertical-item.active > a,
.mega-menu-vertical-item:hover > a {
    color: #eb7a61  !important;
}
.mega-menu-dropdown {
    position: static !important;
    width: 1080px !important;
    min-width: 720px !important;
    max-width: 1200px !important;
    height: auto !important;
    max-height: 60vh !important;
    background: #fff !important;
    border-left: 1px solid #eee !important;
    flex-grow: 1 !important;
    overflow-y: auto !important;
    padding: 0 !important;
}
.mega-menu-content {
    height: auto !important;
    max-height: 100% !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    display: grid !important;
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
    gap: 24px !important;
    padding: 24px !important;
    width: 100% !important;
}

/* تقویت Specificity برای غلبه بر فایل‌های مینیفای دیرتر لودشده */
.mega-menu-wrapper .mega-menu-content {
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
}
.mega-menu-category {
    text-align: center !important;
    margin-bottom: 16px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    width: 100% !important;
    min-width: 0 !important;
}
.mega-menu-category .category-thumb {
    width: 70px !important;
    height: 70px !important;
    margin: 0 auto 8px auto !important;
    display: block !important;
}
.category-title a {
    font-size: 13px !important;
    color: #333 !important;
    text-decoration: none !important;
    display: block !important;
    margin-top: 4px !important;
    transition: color 0.2s !important;
}
.category-title a:hover {
    color: #ef394e !important;
}

/* Scrollbar Styles */
.mega-menu-content::-webkit-scrollbar {
    width: 6px !important;
}
.mega-menu-content::-webkit-scrollbar-track {
    background: #f1f1f1 !important;
    border-radius: 3px !important;
}
.mega-menu-content::-webkit-scrollbar-thumb {
    background: #888 !important;
    border-radius: 3px !important;
}
.mega-menu-content::-webkit-scrollbar-thumb:hover {
    background: #555 !important;
}

/* Scrollbar Styles */
.mega-menu-dropdown::-webkit-scrollbar {
    width: 6px !important;
}

.mega-menu-dropdown::-webkit-scrollbar-track {
    background: #f1f1f1 !important;
    border-radius: 3px !important;
}

.mega-menu-dropdown::-webkit-scrollbar-thumb {
    background: #888 !important;
    border-radius: 3px !important;
}

.mega-menu-dropdown::-webkit-scrollbar-thumb:hover {
    background: #555 !important;
}

/* اضافه کردن منطقه حائل برای جلوگیری از لرزش */
.mega-menu-dropdown::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: -10px !important; /* منطقه حائل سمت چپ */
    width: 10px !important;
    height: 100% !important;
    background: transparent !important;
    z-index: 1 !important;
}

.mega-menu-dropdown::after {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    right: -10px !important; /* منطقه حائل سمت راست */
    width: 10px !important;
    height: 100% !important;
    background: transparent !important;
    z-index: 1 !important;
}

.mega-menu-wrapper .mega-menu-vertical {
    background: #f5f5f5 !important;
}

.mega-menu-container,
.mega-menu-dropdown,
.mega-menu-content,
.dk-mega-submenu,
.dk-menu-level-1,
.dk-menu-item,
.mega-menu-level-2-grid {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
}
