/* ==========================================================================
   ۱. بخش المان‌های پایه و دکمه شناور فوتر
   ========================================================================== */
.wc-menu-footer-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #ef4056;
    color: #ffffff;
    border: none;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: bold;
    border-radius: 30px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(239, 64, 86, 0.4);
    z-index: 99999;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.2s, background-color 0.2s;
}
.wc-menu-footer-btn:hover {
    background-color: #d63447;
    transform: translateY(-2px);
}

/* اورلی واقعی لایه تاریک پشت منو */
.wc-real-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 100000;
    display: none;
    direction: rtl;
}
.wc-real-menu-overlay.open {
    display: block;
}

/* ==========================================================================
   ۲. کانتینر اصلی دراور منو (دسکتاپ)
   ========================================================================== */
.wc-drawer-container {
    position: fixed;
    top: 0;
    right: -120%;
    height: 100vh;
    display: flex;
    flex-direction: row-reverse;
    background: #ffffff;
    box-shadow: -5px 0 25px rgba(0,0,0,0.3);
    z-index: 100001;
    transition: right 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    direction: rtl;
    max-width: 100vw;
    overflow-x: auto;
    overflow-y: hidden;
}
.wc-real-menu-overlay.open + .wc-drawer-container {
    right: 0;
}

/* دکمه بازگشت پله‌ای در موبایل */
.wc-menu-back-btn {
    display: none;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 14px 20px;
    background: #f9f9f9;
    border: none;
    border-bottom: 1px solid #eeeeee;
    font-size: 13px;
    font-weight: bold;
    color: #555555;
    cursor: pointer;
    text-align: right;
    transition: background 0.2s;
    font-family: inherit;
}
.wc-menu-back-btn:hover {
    background: #f1f1f1;
}
.wc-menu-back-btn svg {
    flex-shrink: 0;
}

/* ==========================================================================
   ۳. استایل عمومی ستون‌ها و آیتم‌های لیست (دسکتاپ)
   ========================================================================== */
.wc-menu-column {
    height: 100vh;
    overflow-y: auto;
    padding-top: 25px;
    padding-bottom: 30px;
    box-sizing: border-box;
    border-right: 1px solid #f0f0f0;
    background: #ffffff;
    width: calc(100vw / 4);
    flex-shrink: 0;
    display: none;
}

.wc-menu-column.layer-1 {
    display: block;
    border-right: none;
}

.wc-menu-column.active {
    display: block !important;
    animation: fadeInSlider 0.25s ease-out;
}

@keyframes fadeInSlider {
    from { opacity: 0; transform: translateX(15px); }
    to { opacity: 1; transform: translateX(0); }
}

.wc-menu-column:nth-child(even).active {
    background: #fafafa;
}

.wc-menu-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
    overflow: hidden;
}

.wc-menu-column ul li {
    padding: 14px 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: #333;
    border-bottom: 1px solid #fcfcfc;
    white-space: nowrap;
    transition: background 0.2s, color 0.2s;
}

.wc-menu-column ul li:hover {
    background: rgba(8, 101, 254, 0.08);
}
.wc-menu-column ul li:hover .arrow-icon {
    color: #000000;
}

.wc-menu-column ul li.selected {
    background: rgba(8, 101, 254, 0.08);
    font-weight: bold;
}
.wc-menu-column ul li.selected .arrow-icon {
    color: #000000;
}

.wc-menu-column ul li a {
    text-decoration: none;
    color: inherit;
    display: block;
    width: 100%;
}

/* کانتینر هدر برای قرارگیری دکمه ضربدر در سمت چپ عنوان */
.wc-column-header-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px 15px 20px;
    border-bottom: 1px solid #e4e4e4;
    margin-bottom: 15px;
    gap: 15px;
}

.wc-column-header {
    flex-grow: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wc-column-header span.root-title {
    font-weight: bold;
    font-size: 15px;
    color: #000000;
    display: block;
}

.wc-column-header a {
    font-weight: bold;
    font-size: 15px;
    color: #000000;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: color 0.2s;
}
.wc-column-header a:hover {
    color: #007dff;
    display: flex;
}
.wc-column-header a:hover .view-all-text {
    background: #007dff;
    color: #fff;
}

.view-all-text {
    font-size: 11px;
    color: #000;
    font-weight: normal;
    background: rgba(8, 101, 254, 0.08);
    padding: 2px 8px;
    border-radius: 10px;
    margin-right: 8px;
    transition: all 0.2s;
}

/* استایل دکمه ضربدر بستن منو */
.wc-menu-close-btn {
    background: none;
    border: none;
    color: #aaa;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    border-radius: 50%;
    transition: background 0.2s, color 0.2s;
    flex-shrink: 0;
}
.wc-menu-close-btn:hover {
    background: #f5f5f5;
    color: #ef4056;
}

.arrow-icon {
    display: flex;
    align-items: center;
    color: #bbb;
    transition: color 0.2s;
}

/* ==========================================================================
   ۴. استایل‌های اختصاصی موبایل
   ========================================================================== */
@media (max-width: 768px) {
    .wc-drawer-container {
        width: 85vw;
        max-width: 85vw;
        overflow-x: hidden;
        overflow-y: hidden;
        flex-direction: row !important;
        display: block !important;
    }

    .wc-menu-back-btn {
        display: flex;
    }

    .wc-menu-column {
        position: absolute;
        top: 0;
        right: 0;
        width: 100%;
        height: 100vh;
        padding-top: 0;
        border-right: none;
        display: none;
        background: #ffffff !important;
        box-sizing: border-box;
    }

    .wc-menu-column.layer-1 {
        display: block;
        z-index: 10;
    }

    .wc-menu-column.active {
        display: block !important;
        animation: slideInMobileDeep 0.25s cubic-bezier(0.25, 1, 0.5, 1);
    }

    @keyframes slideInMobileDeep {
        from {
            transform: translateX(100%);
            opacity: 0.9;
        }
        to {
            transform: translateX(0);
            opacity: 1;
        }
    }

    .wc-column-header-wrapper {
        padding: 15px 20px;
    }
}