.mega-menu-container {
    position: relative;
    width: 260px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border-radius: 8px;
    direction: rtl;
}

.mega-menu-wrapper {
    background: #fff !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08) !important;
    border: none !important;
    width: fit-content !important;
    max-width: calc(100vw - 40px) !important;
    margin: 0 !important;
    margin-top: 15px !important;
    padding: 0 !important;
    display: flex;
    align-items: stretch !important;
    height: auto !important;
    position: relative !important;
    z-index: 999 !important;
    overflow: hidden !important;
}

/* Ensure parent containers don't clip the menu */
.elementor-section,
.elementor-container,
.elementor-column,
.elementor-row,
.elementor-widget-container {
    overflow: visible !important;
}

.mega-menu-level-1 {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mega-menu-item {
    position: relative;
    padding: 12px 20px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
}

.mega-menu-item:last-child {
    border-bottom: none;
}

.mega-menu-item:hover {
    background: #f7f7f7;
}

.category-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.category-title a {
    color: #333;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.category-image {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: #f5f5f5;
    overflow: hidden;
}

.category-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.mega-menu-level-2-grid {
    display: none;
    position: absolute;
    top: 0;
    right: 100%;
    width: 800px;
    background: #fff;
    box-shadow: 0 2px 16px rgba(0,0,0,0.12);
    border-radius: 8px;
    padding: 24px;
    z-index: 1001;
}

.mega-menu-item.has-children:hover .mega-menu-level-2-grid {
    display: block;
}

.mega-menu-level-2-col {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 24px;
}

.mega-menu-level-2-col .mega-menu-item {
    text-align: center;
    border: none;
    padding: 0;
}

.mega-menu-level-2-col .category-image {
    width: 48px;
    height: 48px;
    margin: 0 auto 8px;
}

.mega-menu-level-2-col .category-title {
    flex-direction: column;
    gap: 4px;
}

.mega-menu-level-2-col .category-title a {
    font-size: 13px;
    color: #222;
}

.mega-menu-level-2-col .category-title a:hover {
    color: #d32f2f;
}

.rtl .mega-menu-level-2-grid {
    right: auto;
    left: 100%;
}

.mega-menu-item.has-children > .category-title::after {
    content: '\203A';
    font-size: 18px;
    color: #bbb;
    margin-right: 8px;
    margin-left: 0;
    vertical-align: middle;
}

.rtl .mega-menu-item.has-children > a::after {
    float: right;
    margin-left: 8px;
    margin-right: 0;
}

.mega-menu-vertical {
    width: 200px !important;
    min-width: 200px !important;
    height: auto !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;
    overflow-y: auto !important;
    max-height: 90vh !important;
}

.mega-menu-vertical-item {
    position: relative;
    padding: 12px 20px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background-color 0.2s;
    color: #ef394e !important;
}

.mega-menu-vertical-item:last-child {
    border-bottom: none;
}

.mega-menu-vertical-item.active {
    background-color: #fff !important;
}

.mega-menu-vertical-item.active,
.mega-menu-vertical-item:hover {
    background: #fff !important;
    color: #ef394e !important;
}

.mega-menu-vertical-item a {
    color: inherit;
    text-decoration: none;
}

.mega-menu-dropdown {
    position: static !important;
    width: 1080px !important;
    min-width: 720px !important;
    max-width: calc(100vw - 250px) !important;
    height: auto !important;
    max-height: 90vh !important;
    background: #fff !important;
    border-left: 1px solid #eee !important;
    flex-grow: 1 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding: 24px !important;
    display: none !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    box-sizing: border-box !important;
    border-radius: 0 8px 8px 0 !important;
}


.mega-menu-dropdown.active {
    display: flex !important;
}

.mega-menu-content {
    display: grid !important;
    grid-template-columns: repeat(6, 1fr) !important;
    gap: 24px !important;
    width: 100% !important;
}

.mega-menu-category {
    text-align: center;
}

.mega-menu-category .category-thumb {
    width: 48px;
    height: 48px;
    margin: 0 auto 8px;
    border-radius: 6px;
    background: #f5f5f5;
    overflow: hidden;
    display: block;
}

.mega-menu-category .category-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mega-menu-category .category-title {
    margin-top: 8px;
}

.mega-menu-category .category-title a {
    color: #222;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: color 0.2s;
}

.mega-menu-category .category-title a:hover {
    color: #ef394e;
}

