﻿/* ==========================================
   MEGA MENU - DIGIKALA STYLE
========================================== */

.mega-wrapper {
    position: relative;
}

/* پنل اصلی */
.mega-menu-full {
    position: absolute;
    top: 100%;
    right: 0;
    width: 100vw;
    height: calc(100vh - 120px);
    background: #fff;
    display: none;
    z-index: 999;
    border-top: 1px solid #ececec;
    box-shadow: 0 15px 40px rgba(0,0,0,.08);
    overflow: hidden;
}

/* نمایش */
.mega-wrapper:hover .mega-menu-full {
    display: block;
}

/* فول ارتفاع */
.mega-menu-full .row {
    height: 100%;
    margin: 0;
}

/* ==========================================
   RIGHT CATEGORY LIST
========================================== */

.category-list {
    background: #f8f8fa;
    border-left: 1px solid #ececec;
    padding: 0;
    overflow-y: auto;
}

    .category-list::-webkit-scrollbar {
        width: 6px;
    }

    .category-list::-webkit-scrollbar-thumb {
        background: #d9d9e2;
        border-radius: 30px;
    }

    .category-list ul {
        list-style: none;
        margin: 0;
        padding: 0;
    }

    .category-list li {
        position: relative;
        transition: .15s;
    }

        .category-list li a {
            display: flex;
            align-items: center;
            padding: 14px 18px;
            text-decoration: none;
            color: #444;
            font-size: .92rem;
        }

        .category-list li:hover,
        .category-list li.active {
            background: #fff;
        }

            .category-list li.active a {
                color: #9b177e;
                font-weight: 700;
            }

            .category-list li.active::before {
                content: "";
                position: absolute;
                right: 0;
                top: 0;
                width: 4px;
                height: 100%;
                background: #9b177e;
            }

/* ==========================================
   LEFT CONTENT
========================================== */

.subcategory-content {
    position: relative;
    background: #fff;
    overflow: hidden;
    height: 100%;
}

/* پنل های داخلی */

.subcategory {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transform: translateX(20px);
    transition: all .25s ease;
}

    .subcategory.active {
        opacity: 1;
        pointer-events: auto;
        transform: translateX(0);
        z-index: 2;
    }

    .subcategory.leaving {
        opacity: 0;
        transform: translateX(-20px);
    }

/* ==========================================
   COLUMN LAYOUT
========================================== */

.subcategory-columns {
    height: calc(100vh - 220px);
    column-width: 200px;
    column-gap: 20px;
    overflow-y: auto;
    padding: 20px;
}

    .subcategory-columns::-webkit-scrollbar {
        width: 8px;
    }

    .subcategory-columns::-webkit-scrollbar-thumb {
        background: #d5d5df;
        border-radius: 20px;
    }

/* ==========================================
   CATEGORY CARD
========================================== */

.menu-item-parent {
    break-inside: avoid;
    page-break-inside: avoid;
    margin-bottom: 16px;
    border: 1px solid var(--danger-light);
    border-radius: 16px;
    background: var(--primary-light);
    padding: 10px;
    transition: .2s;
    box-shadow: 0 2px 8px rgba(0,0,0,.02);
}

    .menu-item-parent:hover {
        border-color: #eadbfd;
        box-shadow: 0 8px 18px rgba(111,66,193,.08);
    }

/* عنوان گروه */






/* ==========================================
   CHILD ITEMS
========================================== */

.menu-item-child {
    break-inside: avoid;
    page-break-inside: avoid;
}

.menu-item-child-link {
    display: block;
    text-decoration: none;
    color: #666;
    font-size: .88rem;
    padding: 5px 10px;
    border-radius: 10px;
    transition: .15s;
}

    .menu-item-child-link:hover {
        background: #faf5ff;
        color: #9b177e;
        padding-right: 14px;
    }
.menu-item-children {
    display: flex;
    flex-direction: column;
    gap: 2px;
}


.menu-item-parent .menu-item-parent {
    margin-top: 10px;
    margin-bottom: 8px;
    border: none;
    box-shadow: none;
    background: transparent;
    padding: 0;
}
.menu-item-parent-link {
    position: relative;
    display: block;
    text-decoration: none;
    color: #222;
    font-size:13px;
    font-weight: 700;
    font-size: .95rem;
    margin-bottom: 0px;
    cursor: default;

}
.menu-item-parent .menu-item-parent-link {
    position: relative;
    display: block;
    text-decoration: none;
    color: #222;
    font-weight: 700;
    font-size: .95rem;
    margin-bottom: 0px;
    font-size: 13px;
    cursor: default;
}

    .menu-item-parent .menu-item-parent-link::before {
        color: #b16aa2;
        font-size: .7rem;
    }

/* ==========================================
   MOBILE
========================================== */

@media(max-width:768px) {

    .mega-menu-full {
        display: none !important;
    }
}
@media (min-width: 768px) {
    .navbar-expand-lg .navbar-nav {
        flex-direction: row;
    }
}
