/* Header Categories Menu - دسته‌بندی‌ها در Header */
.wd-header-categories-nav {
    position: relative;
}

.categories-menu {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.category-menu-item {
    position: relative;
}

.category-menu-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    text-decoration: none;
    color: #333;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    border-radius: 8px;
    white-space: nowrap;
}

.category-menu-link:hover {
    color: #f26a30;
    background: rgba(242, 106, 48, 0.08);
}

.category-menu-arrow {
    font-size: 10px;
    opacity: 0.7;
    transition: transform 0.3s ease;
}

.category-menu-item:hover .category-menu-arrow {
    transform: rotate(180deg);
    opacity: 1;
}

/* Submenu Dropdown */
.category-submenu {
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    width: 900px;
    max-width: 90vw;
    padding: 0;
    margin-top: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10000;
    border: 1px solid #e0e0e0;
    overflow: hidden;
}

.category-menu-item:hover .category-submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.category-submenu-content {
    padding: 24px;
}

.submenu-header {
    padding-bottom: 16px;
    margin-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.submenu-all-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #f26a30;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
}

.submenu-all-link:hover {
    color: #ff4757;
    gap: 12px;
}

.submenu-all-link i {
    font-size: 12px;
}

.submenu-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
}

.submenu-column {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.submenu-column-title {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: #1a1a1a;
}

.submenu-column-title a {
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.3s ease;
}

.submenu-column-title a:hover {
    color: #f26a30;
}

.submenu-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.submenu-list li {
    margin: 0;
}

.submenu-list a {
    display: block;
    padding: 8px 12px;
    color: #666;
    font-size: 13px;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.submenu-list a:hover {
    color: #f26a30;
    background: rgba(242, 106, 48, 0.08);
    padding-right: 16px;
}

/* Responsive */
@media (max-width: 1200px) {
    .category-submenu {
        width: 700px;
    }
    
    .submenu-columns {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }
}

@media (max-width: 992px) {
    .wd-header-categories-nav {
        display: none;
    }
}

/* Mega Menu Styles - New Design */
.wd-header-cats {
    position: relative;
    z-index: 1000;
}

.menu-opener {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 14px;
    color: #333;
}

.menu-opener:hover {
    background: #f8f8f8;
    border-color: #f26a30;
    color: #f26a30;
}

.menu-opener-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.menu-open-label {
    white-space: nowrap;
}

/* Mega Menu Dropdown - New Layout */
.wd-dropdown-cats.mega-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    width: 1200px;
    max-width: 95vw;
    padding: 0;
    margin-top: 10px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 10000;
    border: 1px solid #e0e0e0;
    display: block !important;
    overflow: hidden;
}

.wd-header-cats.wd-event-hover:hover .wd-dropdown-cats.mega-menu,
.wd-header-cats:hover .wd-dropdown-cats.mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mega-menu-content {
    width: 100%;
}

.mega-menu-layout {
    display: flex;
    height: 600px;
    max-height: 80vh;
    min-height: 400px;
}

/* Sidebar: دسته‌بندی‌های اصلی */
.mega-menu-sidebar {
    width: 280px;
    background: #f8f9fa;
    border-left: 1px solid #e0e0e0;
    overflow-y: auto;
    padding: 20px 0;
}

.mega-menu-category-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    text-decoration: none;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    border-right: 3px solid transparent;
    position: relative;
}

.mega-menu-category-item:hover {
    background: #fff;
    color: #f26a30;
}

.mega-menu-category-item.active {
    background: #fff;
    color: #f26a30;
    border-right-color: #f26a30;
    font-weight: 600;
}

.category-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 16px;
}

.mega-menu-category-item.active .category-icon,
.mega-menu-category-item:hover .category-icon {
    color: #f26a30;
}

.category-name {
    flex: 1;
}

/* Main Content Area */
.mega-menu-main {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
    background: #fff;
}

.mega-menu-category-content {
    display: none;
}

.mega-menu-category-content.active {
    display: block;
}

.category-header {
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.category-title {
    font-size: 18px;
    font-weight: 700;
    color: #1d1d1d;
    margin: 0;
}

.category-columns {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    max-height: 500px;
    overflow-y: auto;
}

.category-column {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.column-title {
    font-size: 14px;
    font-weight: 700;
    color: #f26a30;
    margin: 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.category-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.category-list li {
    margin: 0;
}

.category-list a {
    display: block;
    padding: 8px 0;
    color: #666;
    text-decoration: none;
    font-size: 13px;
    transition: all 0.2s ease;
    position: relative;
    padding-right: 12px;
}

.category-list a::before {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 4px;
    background: #f26a30;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.category-list a:hover {
    color: #f26a30;
    padding-right: 20px;
}

.category-list a:hover::before {
    opacity: 1;
}

/* Responsive */
@media (max-width: 1400px) {
    .wd-dropdown-cats.mega-menu {
        width: 1000px;
    }
    
    .category-columns {
        grid-template-columns: repeat(3, 1fr);
        gap: 24px;
    }
}

@media (max-width: 1200px) {
    .wd-dropdown-cats.mega-menu {
        width: 900px;
    }
    
    .mega-menu-sidebar {
        width: 240px;
    }
    
    .category-columns {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 1024px) {
    .wd-dropdown-cats.mega-menu {
        width: 700px;
    }
    
    .mega-menu-sidebar {
        width: 200px;
    }
    
    .category-columns {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .wd-dropdown-cats.mega-menu {
        position: fixed;
        top: auto;
        right: 0;
        left: 0;
        width: 100%;
        max-width: 100%;
        border-radius: 0;
        margin-top: 0;
        max-height: calc(100vh - 200px);
    }
    
    .mega-menu-layout {
        flex-direction: column;
        height: auto;
        max-height: calc(100vh - 200px);
    }
    
    .mega-menu-sidebar {
        width: 100%;
        border-left: none;
        border-bottom: 1px solid #e0e0e0;
        max-height: 200px;
        overflow-x: auto;
        overflow-y: hidden;
        display: flex;
        padding: 10px;
    }
    
    .mega-menu-category-item {
        white-space: nowrap;
        min-width: 120px;
        border-right: none;
        border-bottom: 3px solid transparent;
        padding: 10px 15px;
    }
    
    .mega-menu-category-item.active {
        border-right: none;
        border-bottom-color: #f26a30;
    }
    
    .mega-menu-main {
        padding: 20px;
    }
    
    .category-columns {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .category-columns {
        grid-template-columns: 1fr;
    }
}
