﻿/*
* Copyright 2014 Shima Shoes Ltd. All rights reserved. (http://www.shimashoes.com)
* http://www.shimashoes.com/t/licensinginfo
*/


@media all and (min-width: 1025px) {

     /* sublist */
    h4.custom2-submenu-column-title {
        gap: 6px;
        direction: rtl;
    }
    .mega-menu .sublist-wrap {
        text-align: right;
    }
    .mega-menu .sublist li a {
        padding: 0 20px 0 35px;
    }

    .mega-menu .sublist-wrap .sublist-wrap {
        right: 100% !important;
        left: auto !important;
    }

    /* dropdown */

    .category-navigation-list > li .dropdown {
        right: 100%;
        left: auto;
        background: url(img/shadow-top.png) top right repeat-x, url(img/shadow-bottom.png) bottom right repeat-x;
    }

    .category-navigation-list .dropdown .box,
    .category-navigation-list .dropdown .empty-box {
        margin-left: auto;
        margin-right: 20px;
    }
    
    .category-navigation-list .dropdown .box:first-child {
        margin-right: 0 !important;
    }

    .mega-menu .has-sublist .sublist-wrap {
        left: 0;
        right: auto;
    }
    
    /* Support for hover in RTL mode */
    .mega-menu .has-sublist:hover > .sublist-wrap,
    .mega-menu .has-sublist .plus-button:hover + .sublist-wrap,
    .mega-menu .sublist .has-sublist:hover > .sublist-wrap,
    .mega-menu .sublist .sublist .has-sublist:hover > .sublist-wrap {
        display: block !important;
    }
    
    /* Hide plus-button for submenu indicators in RTL */
    .mega-menu .plus-button {
        display: none !important;
    }

    /* Menu item icon RTL styling */
    .mega-menu .custom-template-1 .menu-item-icon {
        margin-right: 0;
        margin-left: 8px;
    }

    .mega-menu .custom-template-1 .sublist-wrap .sublist li .menu-item-icon {
        margin-right: 0;
        margin-left: 6px;
    }

    /* Mega Menu RTL styling */
    .mega-menu .mega-menu-dropdown {
        left: auto;
        right: 0;
    }

    .mega-menu-column-title {
        text-align: right;
    }

    .mega-menu-sub-list li a:hover {
        transform: translateX(-4px);
    }

    .mega-menu-icon {
        margin-right: 0;
        margin-left: 10px;
    }

    .mega-menu-sub-list li a {
        text-align: right;
    }
    
    /* Responsive menu sublist for RTL */
    .mega-menu-responsive .sublist-wrap {
        display: none;
    }
    .mega-menu-responsive .sublist-wrap.active {
        display: block;
    }

    .mega-menu .dropdown {
        text-align: right;
    }

    .mega-menu .dropdown.fullWidth {
        right: 0;
        left: auto;
    }

    .mega-menu .box {
        float: right;
    }

    /* Custom Template 2 RTL styling - Vertical menu with right-side submenu */
    .mega-menu .custom-template-2 .menu-arrow {
        float: left;
        transform: scaleX(-1);
    }

    .mega-menu .custom-template-2:hover .menu-arrow {
        transform: scaleX(-1) rotate(90deg);
    }

    /* Custom2 dropdown RTL positioning */
    .mega-menu .custom2-dropdown {
        right: 0;
        left: auto;
        width: max-content;
    }

    /* RTL Layout: Left side shows second level (Best Seller, New Movie), Right side shows first level (Movies, Books) */
    .mega-menu .custom2-layout {
        display: flex;
        flex-direction: row-reverse; /* Reverse for RTL to put Movies/Books on right */
        gap: 20px;
    }

    /* Left side: Second level submenu content (Best Seller, New Movie columns) - in RTL this appears on the left */
    .mega-menu .custom2-submenu-content {
        flex: 1;
        min-height: 200px;
        order: 1; /* Force to appear on the left */
    }

    /* Right side: First level submenu items (Movies, Books) - in RTL this appears on the right */
    .mega-menu .custom2-main-menu {
        border-right: none;
        border-left: 1px solid #e0e0e0;
        padding-right: 0;
        padding-left: 20px;
        width: 200px;
        order: 2; /* Force to appear on the right */
    }

    .mega-menu .custom2-menu-item {
        margin-bottom: 8px;
    }

    .mega-menu .custom2-menu-item a {
        display: flex;
        align-items: center;
        padding: 10px 12px;
        color: #333;
        text-decoration: none;
        border-radius: 4px;
        transition: all 0.3s ease;
        font-weight: 500;
    }

    .mega-menu .custom2-menu-item a:hover {
        background-color: #f5f5f5;
        color: #97c300;
    }

    .mega-menu .custom2-menu-icon {
        margin-right: 0;
        margin-left: 10px;
        width: 20px;
        height: 20px;
        border-radius: 3px;
        object-fit: cover;
    }

    /* Submenu columns styling */
    .mega-menu .custom2-submenu-columns {
        display: flex;
        gap: 15px;
        flex-wrap: nowrap;
        flex-direction: row;
        justify-content: flex-start;
        align-items: flex-start;
    }

    .mega-menu .custom2-submenu-column {
        flex: 0 0 auto;
        min-width: 120px;
        max-width: 180px;
        width: auto;
    }

    .mega-menu .custom2-submenu-column-title {
        font-size: 14px;
        font-weight: 600;
        color: #333;
        margin: 0 0 10px 0;
        display: flex;
        align-items: center;
        text-align: right;
    }

    .mega-menu .custom2-submenu-icon {
        margin-right: 0;
        margin-left: 8px;
        width: 16px;
        height: 16px;
        border-radius: 2px;
        object-fit: cover;
    }

    .mega-menu .custom2-submenu-list {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .mega-menu .custom2-submenu-list li {
        margin-bottom: 6px;
    }

    .mega-menu .custom2-submenu-list li a {
        display: flex;
        align-items: center;
        padding: 6px 8px;
        color: #666;
        text-decoration: none;
        font-size: 13px;
        border-radius: 3px;
        transition: all 0.2s ease;
        text-align: right;
    }

    .mega-menu .custom2-submenu-list li a:hover {
        background-color: #f8f8f8;
        color: #97c300;
    }

    .mega-menu .custom2-item-icon {
        margin-right: 0;
        margin-left: 6px;
        width: 14px;
        height: 14px;
        border-radius: 2px;
        object-fit: cover;
    }

    /* Left side: Second level submenu content (Best Seller, New Movie columns) - in RTL this appears on the left */
    .mega-menu .custom2-submenu-content {
        flex: 1;
        min-height: 200px;
    }

    .mega-menu .custom2-submenu-icon {
        margin-right: 0;
        margin-left: 8px;
    }

    .mega-menu .custom2-item-icon {
        margin-right: 0;
        margin-left: 6px;
    }

    .mega-menu .custom2-submenu-column-title {
        text-align: right;
    }

    .mega-menu .custom2-submenu-list li a {
        text-align: right;
    }

    .mega-menu .custom2-submenu-list li a:hover {
        transform: translateX(4px);
    }

    /* Responsive adjustments for Custom2 RTL */
    @media (max-width: 768px) {
        .mega-menu .custom2-layout {
            flex-direction: column;
        }
        
        .mega-menu .custom2-main-menu {
            border-left: none;
            border-bottom: 1px solid #e0e0e0;
            padding-left: 0;
            padding-bottom: 15px;
            margin-bottom: 15px;
            width: 100%;
        }
    }

}