/*
 * Doudoudis desktop header layout v3.
 * Final override for Woodmart Header Builder inline row heights, menu states
 * and mega-menu row alignment.
 */

@media (min-width: 1025px) {
    .whb-header-bottom,
    .doudoudis-main-nav {
        height: 54px !important;
        min-height: 54px !important;
        max-height: 54px !important;
        margin: 0 !important;
        padding: 0 !important;
        border-top: 0 !important;
        border-bottom: 3px solid #f59e0b !important;
        background: #ffffff !important;
        box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08) !important;
    }

    .whb-header-bottom > .container,
    .whb-header-bottom .whb-flex-row,
    .whb-header-bottom .whb-header-bottom-inner,
    .whb-header-bottom .whb-row,
    .whb-header-bottom .whb-column,
    .whb-header-bottom .whb-col-left,
    .whb-header-bottom .whb-col-center,
    .whb-header-bottom .whb-col-right {
        height: 51px !important;
        min-height: 51px !important;
        max-height: 51px !important;
        margin-top: 0 !important;
        margin-bottom: 0 !important;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
        align-items: center !important;
    }

    .whb-header-bottom > .container,
    .whb-header-bottom .whb-flex-row,
    .whb-header-bottom .whb-row {
        display: flex !important;
    }

    .whb-header-bottom .wd-header-nav,
    .whb-header-bottom .wd-nav-main,
    .whb-header-bottom .wd-nav-main > li,
    .whb-header-bottom .wd-nav-main > li > a {
        height: 51px !important;
        min-height: 51px !important;
        max-height: 51px !important;
        margin-top: 0 !important;
        margin-bottom: 0 !important;
    }

    .whb-header-bottom .wd-nav-main {
        display: flex !important;
        align-items: stretch !important;
    }

    .whb-header-bottom .wd-nav-main > li {
        display: flex !important;
        align-items: stretch !important;
    }

    .whb-header-bottom .wd-nav-main > li > a {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 0 18px !important;
        color: #142142 !important;
        font-family: Inter, "Segoe UI", Arial, sans-serif !important;
        font-size: 12px !important;
        font-weight: 750 !important;
        line-height: 1 !important;
        letter-spacing: 0.015em !important;
        text-transform: uppercase !important;
        opacity: 1 !important;
    }

    .whb-header-bottom .wd-nav-main > li:hover > a,
    .whb-header-bottom .wd-nav-main > li.current-menu-item > a,
    .whb-header-bottom .wd-nav-main > li.current-menu-ancestor > a {
        background: #f1f5f9 !important;
        color: #0b1530 !important;
    }

    .whb-header-bottom .wd-nav-main > li.doudoudis-catalog-link > a {
        margin-right: 8px !important;
        padding-inline: 20px !important;
        background: #0b1530 !important;
        color: #ffffff !important;
    }

    /* Keep the catalog button dark while its mega menu is open. */
    .whb-header-bottom .wd-nav-main > li.doudoudis-catalog-link:hover > a,
    .whb-header-bottom .wd-nav-main > li.doudoudis-catalog-link:focus-within > a,
    .whb-header-bottom .wd-nav-main > li.doudoudis-catalog-link.wd-opened > a,
    .whb-header-bottom .wd-nav-main > li.doudoudis-catalog-link.wd-active > a,
    .whb-header-bottom .wd-nav-main > li.doudoudis-catalog-link.current-menu-item > a,
    .whb-header-bottom .wd-nav-main > li.doudoudis-catalog-link.current-menu-ancestor > a,
    .whb-header-bottom .wd-nav-main > li.doudoudis-catalog-link > a[aria-expanded="true"] {
        background: #1d2e59 !important;
        color: #ffffff !important;
    }

    .whb-header-bottom .wd-nav-main > li.doudoudis-catalog-link > a,
    .whb-header-bottom .wd-nav-main > li.doudoudis-catalog-link > a .nav-link-text,
    .whb-header-bottom .wd-nav-main > li.doudoudis-catalog-link > a > span,
    .whb-header-bottom .wd-nav-main > li.doudoudis-catalog-link > a .menu-label,
    .whb-header-bottom .wd-nav-main > li.doudoudis-catalog-link > a::after,
    .whb-header-bottom .wd-nav-main > li.doudoudis-catalog-link:hover > a .nav-link-text,
    .whb-header-bottom .wd-nav-main > li.doudoudis-catalog-link:focus-within > a .nav-link-text,
    .whb-header-bottom .wd-nav-main > li.doudoudis-catalog-link:hover > a::after,
    .whb-header-bottom .wd-nav-main > li.doudoudis-catalog-link:focus-within > a::after {
        color: #ffffff !important;
        opacity: 1 !important;
    }

    .whb-header-bottom .wd-nav-main > li.doudoudis-catalog-link > a::before {
        color: #f59e0b !important;
        opacity: 1 !important;
    }

    .whb-header-bottom .wd-nav-main > li.doudoudis-parts-finder-link > a,
    .whb-header-bottom .wd-nav-main > li.doudoudis-parts-finder-link.current-menu-item > a {
        background: #f59e0b !important;
        color: #0b1530 !important;
    }

    .whb-header-bottom .wd-nav-main > li.doudoudis-parts-finder-link:hover > a {
        background: #fbbf24 !important;
        color: #0b1530 !important;
    }

    .whb-header-bottom .wd-nav-main > li:not(.doudoudis-catalog-link) > a::after {
        color: #64748b !important;
    }
}

/* Mega menu rows: force true visual vertical centering after Woodmart styles. */
.doudoudis-mega-menu .doudoudis-mega-menu-links,
.doudoudis-mega-menu .doudoudis-mega-menu-links li {
    margin: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

.doudoudis-mega-menu .doudoudis-mega-menu-links li {
    display: block !important;
    height: 44px !important;
    min-height: 44px !important;
    line-height: 44px !important;
}

.doudoudis-mega-menu .doudoudis-mega-menu-links li > a {
    position: relative !important;
    display: block !important;
    width: 100% !important;
    height: 44px !important;
    min-height: 44px !important;
    margin: 0 !important;
    padding: 0 12px 0 22px !important;
    line-height: 44px !important;
    white-space: nowrap !important;
    vertical-align: middle !important;
    box-sizing: border-box !important;
}

.doudoudis-mega-menu .doudoudis-mega-menu-links li > a::before {
    top: 50% !important;
    left: 9px !important;
    margin: 0 !important;
    transform: translateY(-50%) !important;
}

.doudoudis-mega-menu .doudoudis-mega-menu-links li > a:hover::before,
.doudoudis-mega-menu .doudoudis-mega-menu-links li > a:focus-visible::before {
    transform: translateY(-50%) scale(1.55) !important;
}

.doudoudis-mega-menu .doudoudis-mega-menu-brand {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 52px !important;
    min-height: 52px !important;
    margin: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    line-height: 1 !important;
    box-sizing: border-box !important;
}

.doudoudis-mega-menu .doudoudis-mega-menu-all-brands,
.doudoudis-mega-menu .doudoudis-mega-menu-footer a,
.doudoudis-mega-menu .doudoudis-mega-menu-cta .doudoudis-site-button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

@media (max-width: 1024px) {
    .doudoudis-mega-menu .doudoudis-mega-menu-links li,
    .doudoudis-mega-menu .doudoudis-mega-menu-links li > a,
    .doudoudis-mega-menu .doudoudis-mega-menu-brand {
        height: auto !important;
        min-height: 46px !important;
        line-height: 1.25 !important;
        white-space: normal !important;
    }

    .doudoudis-mega-menu .doudoudis-mega-menu-links li > a {
        display: flex !important;
        align-items: center !important;
    }
}