/*
 Theme Name:   Woodmart Child
 Description:  Woodmart Child Theme
 Author:       XTemos
 Author URI:   http://xtemos.com
 Template:     woodmart
 Version:      1.0.0
 Text Domain:  woodmart
*/

/* ==============================================
   استایل اصلی ناحیه ویجت‌ها (widget-area)
   ============================================== */
.widget-area {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
}

/* ==============================================
   استایل پایه برای هر ویجت
   ============================================== */
.widget-area .wd-widget,
.widget-area .widget {
    margin-bottom: 30px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 14px;
    
}

.widget-area .wd-widget:hover,
.widget-area .widget:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* ==============================================
   استایل عنوان ویجت‌ها
   ============================================== */
.widget-area .widget-title {
    font-size: 18px;
    font-weight: 700;
    color: #212529;
    margin-top: 0;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #007bff;
    position: relative;
    text-align: center;
}

.widget-area .widget-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    right: 0;
    width: 50px;
    height: 2px;
    background-color: #0056b3;
}

/* ==============================================
   حذف اسکرول‌بارهای اضافی
   ============================================== */
.wd-scroll {
    max-height: none !important;
    overflow: visible !important;
}

.wd-scroll::-webkit-scrollbar {
    display: none !important;
}

.wd-scroll-content {
    padding-right: 0 !important;
    overflow: visible !important;
    max-height: none !important;
}

/* ==============================================
   استایل لیست دسته‌بندی‌ها
   ============================================== */
.widget-area .product-categories,
.widget-area .wp-block-categories-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget-area .cat-item {
    margin-bottom: 6px;
    font-size: 15px;
    line-height: 1.6;
    position: relative;
}

.widget-area .cat-item > a {
    color: #495057;
    text-decoration: none;
    display: inline-block;
    padding: 8px 0;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.widget-area .cat-item > a:hover {
    color: #007bff;
    padding-right: 8px;
    background-color: #f1f3f5;
}

.widget-area .cat-item.wd-active > a,
.widget-area .cat-item.current-cat > a {
    color: #007bff;
    font-weight: 600;
    background-color: #e7f1ff;
    border-radius: 4px;
    padding-right: 8px;
}

/* ==============================================
   بازنویسی کامل استایل toggle قالب Woodmart
   ============================================== */

/* حذف کامل آیکون فونت پیش‌فرض */
.wd-cats-toggle:after,
.wd-cats-toggle::after {
    content: none !important;
    font-family: unset !important;
}

.wd-cats-toggle:before,
.wd-cats-toggle::before {
    content: none !important;
    font-family: unset !important;
}

/* استایل پایه دکمه toggle */
.wd-cats-toggle {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 28px !important;
    height: 28px !important;
    cursor: pointer !important;
    position: relative !important;
    transition: all 0.3s ease !important;
    margin-right: 5px !important;
    vertical-align: middle !important;
    background-color: #f1f3f5 !important;
    border-radius: 6px !important;
    border: 1px solid #dee2e6 !important;
    font-size: 0 !important;
    line-height: 0 !important;
    text-align: center !important;
}

/* ایجاد آیکون + و - با استفاده از span داخلی یا مستقیم */
.wd-cats-toggle:before {
    content: '' !important;
    position: absolute !important;
    width: 12px !important;
    height: 2px !important;
    background-color: #495057 !important;
    border-radius: 2px !important;
    transition: all 0.3s ease !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
}

/* خط عمودی برای علامت + */
.wd-cats-toggle:after {
    content: '' !important;
    position: absolute !important;
    width: 2px !important;
    height: 12px !important;
    background-color: #495057 !important;
    border-radius: 2px !important;
    transition: all 0.3s ease !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
}

/* حالت باز (حذف خط عمودی = علامت -) */
.wd-cats-toggle.toggle-active:after {
    transform: translate(-50%, -50%) rotate(90deg) !important;
    opacity: 0 !important;
}

/* چرخش نرم برای حالت باز */
.wd-cats-toggle.toggle-active:before {
    background-color: #007bff !important;
}

/* حالت hover */
.wd-cats-toggle:hover {
    background-color: #007bff !important;
    border-color: #007bff !important;
}

.wd-cats-toggle:hover:before,
.wd-cats-toggle:hover:after {
    background-color: #ffffff !important;
}

/* حالت hover فعال */
.wd-cats-toggle.toggle-active:hover {
    background-color: #dc3545 !important;
    border-color: #dc3545 !important;
}

/* حذف فوکوس اضافی */
.wd-cats-toggle:focus {
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(0,123,255,0.2) !important;
}

/* ==============================================
   استایل زیرمنوها (children categories)
   ============================================== */
.widget-area .children {
    list-style: none;
    padding-right: 20px;
    margin: 5px 0;
    border-right: 2px solid #e9ecef;
}

/* مخفی کردن زیرمنوهای غیرفعال */
.widget-area .cat-item:not(.list-shown) > .children {
    display: none;
}

/* نمایش زیرمنوهای فعال */
.widget-area .cat-item.list-shown > .children {
    display: block;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* استایل لینک‌های زیرمجموعه */
.widget-area .children .cat-item a {
    font-size: 14px;
    color: #6c757d;
    padding: 6px 0;
}

.widget-area .children .cat-item a:hover {
    color: #007bff;
    background-color: transparent;
    padding-right: 5px;
}

/* استایل دسته والد فعال */
.widget-area .cat-item.wd-active-parent > a {
    color: #007bff;
    font-weight: 600;
}

/* ==============================================
   استایل ویجت دوم (block-9) - بدون toggle
   ============================================== */
#block-9 .wd-cats-toggle {
    display: none !important;
}

#block-9 .cat-item {
    margin-bottom: 4px;
}

#block-9 .cat-item a {
    display: block;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.2s ease;
    color: #495057;
}

#block-9 .cat-item a:hover {
    background-color: #f1f3f5;
    color: #007bff;
    padding-right: 15px;
}

#block-9 .cat-item.current-cat > a {
    background-color: #e7f1ff;
    color: #007bff;
    font-weight: 600;
}

/* مخفی کردن children در ویجت دوم */
#block-9 .children {
    display: none !important;
}

/* ==============================================
   واکنش‌گرایی (Responsive)
   ============================================== */
@media (max-width: 768px) {
    .widget-area {
        padding: 15px;
    }
    
    .widget-area .wd-widget,
    .widget-area .widget {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .widget-area .widget-title {
        font-size: 16px;
    }
    
    .widget-area .cat-item a {
        font-size: 14px;
    }
    
    .wd-cats-toggle {
        width: 24px !important;
        height: 24px !important;
    }
    
    .wd-cats-toggle:before {
        width: 10px !important;
    }
    
    .wd-cats-toggle:after {
        height: 10px !important;
    }
}
.wd-nav-header>li>a {
    
    font-family: vazirmatn !important;
}