/*
 Theme Name:   Woodmart Child
 Description:  Woodmart Child Theme
 Author:       XTemos
 Author URI:   http://xtemos.com
 Template:     woodmart
 Version:      1.0.0
 Text Domain:  woodmart
*/
/* ===== استایل کلی نوار منو (هدر پایین) ===== */
/* ================== منوی دسکتاپ (هدر پایین) ================== */
@media (min-width: 1025px) {

    /* نوار منو – کارت شیشه‌ای ملایم */
    .whb-header-bottom-inner {
        background: rgba(255, 255, 255, 0.96);
        border-radius: 14px;
        box-shadow: 0 10px 32px rgba(0, 0, 0, 0.08);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        padding: 4px 10px; /* کمی فاصله عمودی برای وسط‌چین شدن کپسول‌ها */
    }

    /* چیدمان آیتم‌های منو */
    .whb-header-bottom-inner .wd-nav-main {
        display: flex;
        align-items: center;
        gap: 4px; /* فاصله بین آیتم‌ها – در صورت نیاز کمترش کن */
    }

    .whb-header-bottom-inner .wd-nav-main > li {
        margin: 0 !important;
    }

    /* لینک‌های منو – کپسولی و کوتاه */
    .whb-header-bottom-inner .wd-nav-main > li > a {
        position: relative;
        display: inline-block;
        padding: 6px 20px;      /* ضخامت کپسول (بالا/پایین = 6) */
        margin: 6px 0;          /* فاصله از بالا و پایین هدر */
        line-height: 1.35;      /* جلوگیری از کپسول خیلی بلند */
        border-radius: 999px;

        font-size: 14px;
        font-weight: 600;
        color: #222;
        text-decoration: none;

        transition:
            background 0.2s ease,
            color 0.2s ease,
            box-shadow 0.2s ease,
            transform 0.2s ease;
    }

    /* حالت هاور و فعال */
    .whb-header-bottom-inner .wd-nav-main > li:hover > a,
    .whb-header-bottom-inner .wd-nav-main > li.current-menu-item > a,
    .whb-header-bottom-inner .wd-nav-main > li.current-menu-ancestor > a {
        background: #eaf5f4;
        color: #0f5c59;
        box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
        transform: translateY(-1px);
    }

    /* خط گرادیانی زیر کپسول */
    .whb-header-bottom-inner .wd-nav-main > li > a::after {
        content: "";
        position: absolute;
        left: 24%;
        right: 24%;
        bottom: 2px;
        height: 3px;
        border-radius: 999px;
        background: linear-gradient(90deg, #0f5c59, #fa8302);
        opacity: 0;
        transform: scaleX(0.4);
        transform-origin: center;
        transition: opacity 0.2s ease, transform 0.2s ease;
        pointer-events: none;
    }

    .whb-header-bottom-inner .wd-nav-main > li:hover > a::after,
    .whb-header-bottom-inner .wd-nav-main > li.current-menu-item > a::after,
    .whb-header-bottom-inner .wd-nav-main > li.current-menu-ancestor > a::after {
        opacity: 1;
        transform: scaleX(1);
    }

    /* ===== زیرمنو (دراپ‌داون) ===== */
    .whb-header-bottom-inner .wd-dropdown-menu {
        border-radius: 14px;
        box-shadow: 0 18px 45px rgba(0, 0, 0, 0.18);
        padding: 8px 0;
        background: rgba(255, 255, 255, 0.98);
        border: 1px solid rgba(0, 0, 0, 0.03);
        overflow: hidden;
    }

    .whb-header-bottom-inner .wd-dropdown-menu ul li a {
        position: relative;
        padding: 8px 22px;
        font-size: 13px;
        color: #333;
        font-weight: 500;
        white-space: nowrap;
        transition:
            background-color 0.18s ease,
            color 0.18s ease,
            padding-right 0.18s ease;
    }

    .whb-header-bottom-inner .wd-dropdown-menu ul li:hover > a {
        background-color: rgba(15, 92, 89, 0.05);
        color: #0f5c59;
        padding-right: 26px;
    }

    .whb-header-bottom-inner .wd-dropdown-menu ul li:hover > a::before {
        content: "";
        position: absolute;
        right: 12px;
        top: 50%;
        width: 6px;
        height: 6px;
        border-radius: 50%;
        background: #fa8302;
        transform: translateY(-50%);
    }
}

/* ================== منوی موبایل (پنل کناری) ================== */
@media (max-width: 1024px) {

    .mobile-nav .wd-nav-mobile {
        background-color: #050505;
    }

    .mobile-nav .wd-nav-mobile > li > a {
        display: block;
        padding: 12px 20px;
        font-size: 14px;
        font-weight: 500;
        text-align: center;
        color: #ffffff;
        background-color: #111111;
        border-bottom: 1px solid rgba(255, 255, 255, 0.04);
        position: relative;
        transition: background 0.2s ease, color 0.2s ease;
    }

    .mobile-nav .wd-nav-mobile > li:last-child > a {
        border-bottom: none;
    }

    .mobile-nav .wd-nav-mobile > li:hover > a,
    .mobile-nav .wd-nav-mobile > li.current-menu-item > a,
    .mobile-nav .wd-nav-mobile > li.current-menu-ancestor > a {
        background-color: #0f5c59;
        color: #ffffff;
    }

    .mobile-nav .wd-nav-mobile > li > a::before {
        content: "";
        position: absolute;
        right: 0;
        top: 0;
        bottom: 0;
        width: 3px;
        background: linear-gradient(180deg, #0f5c59, #fa8302);
        opacity: 0;
        transform: scaleY(0.4);
        transform-origin: center;
        transition: opacity 0.2s ease, transform 0.2s ease;
    }

    .mobile-nav .wd-nav-mobile > li:hover > a::before,
    .mobile-nav .wd-nav-mobile > li.current-menu-item > a::before,
    .mobile-nav .wd-nav-mobile > li.current-menu-ancestor > a::before {
        opacity: 1;
        transform: scaleY(1);
    }

    .mobile-nav .wd-nav-mobile .wd-nav-opener {
        color: #ffffff;
    }
}
/* ===== فیکس بسته‌شدن زیرمنو موقع رفتن با موس ===== */

/* 1. کپسول منو دیگه موقع هاور بالا نره */
.whb-header-bottom-inner .wd-nav-main > li:hover > a,
.whb-header-bottom-inner .wd-nav-main > li.current-menu-item > a,
.whb-header-bottom-inner .wd-nav-main > li.current-menu-ancestor > a {
    transform: none !important;   /* قبلاً translateY(-1px) بود، حذف شد */
}

/* 2. حاشیه‌ی عمودی لینک‌ها صفر بشه تا شکاف نیفته */
.whb-header-bottom-inner .wd-nav-main > li > a {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* 3. زیرمنو دقیقاً به منو بچسبه */
.whb-header-bottom-inner .wd-dropdown-menu {
    margin-top: 0 !important;
}
