/* ===== BASE ===== */
#wcbh-header {
    font-family: 'Poppins', sans-serif;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    background: #fff;
    position: relative;
    z-index: 9999; /* Ensure header is above slider */
}
.wp-block-template-part {z-index:10;}
#wcbh-header .wcbh-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
}

/* ===== TOP BAR ===== */
#wcbh-header .wcbh-top-bar {
    background: #333;
    color: #fff;
    padding: 8px 0;
    font-size: 14px;
}
#wcbh-header .wcbh-top-bar .wcbh-container {
    justify-content: space-between;
}
#wcbh-header .wcbh-top-bar a {
    color: #fff;
    text-decoration: none;
}
#wcbh-header .wcbh-top-bar a:hover {
    text-decoration: underline;
}
#wcbh-header .wcbh-top-right span {
    margin-left: 20px;
}
#wcbh-header .wcbh-top-right i {
    margin-right: 5px;
}

/* ===== MAIN HEADER ===== */
#wcbh-header .wcbh-main-header {
    padding: 15px 0;
    background: #fff;
}
#wcbh-header .wcbh-logo img {
    max-height: 60px;
    width: auto;
}
#wcbh-header .wcbh-site-title {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    text-decoration: none;
}

/* ===== SEARCH ===== */
#wcbh-header .wcbh-search {
    flex: 1 1 400px;
    margin: 0 20px;
    position: relative;
}
#wcbh-header .wcbh-search form {
    display: flex;
    border: 2px solid #ddd;
    border-radius: 30px;
    overflow: hidden;
    background: #fff;
}
#wcbh-header .wcbh-search select {
    border: none;
    padding: 8px 15px;
    background: #f8f8f8;
    font-size: 14px;
    cursor: pointer;
    outline: none;
}
#wcbh-header .wcbh-search input[type="search"] {
    flex: 1;
    border: none;
    padding: 8px 15px;
    font-size: 14px;
    outline: none;
}
#wcbh-header .wcbh-search button {
    background: #333;
    border: none;
    color: #fff;
    padding: 0 20px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s;
}
#wcbh-header .wcbh-search button:hover {
    opacity: 0.8;
}

/* ===== ICONS ===== */
#wcbh-header .wcbh-icons {
    display: flex;
    align-items: center;
    gap: 20px;
}
#wcbh-header .wcbh-icon {
    color: #333;
    font-size: 20px;
    position: relative;
    text-decoration: none;
    transition: color 0.3s;
}
#wcbh-header .wcbh-icon:hover {
    opacity: 0.7;
}
#wcbh-header .wcbh-cart-count {
    position: absolute;
    top: -10px;
    right: -10px;
    background: #333;
    color: #fff;
    font-size: 12px;
    font-weight: bold;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== MOBILE TOGGLE ===== */
#wcbh-header .wcbh-mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}
#wcbh-header .wcbh-mobile-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: #333;
    transition: 0.3s;
}

/* ===== DESKTOP NAVIGATION ===== */
#wcbh-header .wcbh-nav-desktop {
    background: #f8f8f8;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}
#wcbh-header .wcbh-nav-desktop .wcbh-container {
    justify-content: flex-start;
}
#wcbh-header .wcbh-menu {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}
#wcbh-header .wcbh-menu > li {
    position: relative;
    margin: 0 15px;
}
#wcbh-header .wcbh-menu > li > a {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 12px 0;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    font-size: 16px;
    transition: color 0.3s;
}
#wcbh-header .wcbh-menu > li > a i {
    font-size: 14px;
}
#wcbh-header .wcbh-menu > li > a:hover,
#wcbh-header .wcbh-menu > li.current-menu-item > a {
    color: var(--primary-color);
}

/* ===== MEGA MENU ===== */
#wcbh-header .wcbh-categories-mega {
    position: static !important;
}
#wcbh-header .wcbh-categories-mega > a {
    background: var(--primary-color);
    color: #fff !important;
    padding: 8px 18px !important;
    border-radius: 30px;
    margin-right: 10px;
}
#wcbh-header .wcbh-categories-mega > a:hover {
    opacity: 0.8;
}
#wcbh-header .mega-menu-wrapper {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: #fff;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    padding: 30px 40px;
    z-index: 10000;
    border-top: 3px solid var(--primary-color);
}
#wcbh-header .wcbh-categories-mega:hover .mega-menu-wrapper {
    display: block;
}
#wcbh-header .mega-menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}
#wcbh-header .mega-menu-grid .mega-col {
    padding: 10px;
}
#wcbh-header .mega-menu-grid .mega-cat-title {
    font-weight: 600;
    color: var(--primary-color);
    display: block;
    margin-bottom: 10px;
    font-size: 16px;
}
#wcbh-header .mega-menu-grid .mega-sub-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
#wcbh-header .mega-menu-grid .mega-sub-list li {
    padding: 5px 0;
}
#wcbh-header .mega-menu-grid .mega-sub-list li a {
    color: #555;
    text-decoration: none;
    font-size: 14px;
}
#wcbh-header .mega-menu-grid .mega-sub-list li a:hover {
    color: var(--primary-color);
}

/* ===== REGULAR SUB-MENUS (desktop) ===== */
#wcbh-header .wcbh-menu .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    min-width: 220px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    list-style: none;
    padding: 10px 0;
    z-index: 10000;
    border-radius: 4px;
}
#wcbh-header .wcbh-menu .sub-menu .sub-menu {
    top: 0;
    left: 100%;
    margin-top: -10px;
}
#wcbh-header .wcbh-menu .menu-item-has-children:hover > .sub-menu,
#wcbh-header .wcbh-menu .menu-item-has-children:focus-within > .sub-menu {
    display: block;
}
#wcbh-header .wcbh-menu .sub-menu li {
    padding: 0 20px;
}
#wcbh-header .wcbh-menu .sub-menu li a {
    display: block;
    padding: 8px 0;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    border-bottom: 1px solid #f5f5f5;
}
#wcbh-header .wcbh-menu .sub-menu li:last-child a {
    border-bottom: none;
}
#wcbh-header .wcbh-menu .sub-menu li a:hover {
    color: var(--primary-color);
}

/* ===== OFF-CANVAS MOBILE MENU ===== */
#wcbh-header .wcbh-mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 99999;
}
#wcbh-header .wcbh-mobile-overlay.open {
    display: block;
}
#wcbh-header .wcbh-mobile-menu {
    position: fixed;
    top: 0;
    left: -300px;
    width: 300px;
    height: 100%;
    background: #fff;
    z-index: 100000;
    overflow-y: auto;
    transition: left 0.3s ease;
    box-shadow: 2px 0 15px rgba(0,0,0,0.2);
    padding: 20px;
}
#wcbh-header .wcbh-mobile-menu.open {
    left: 0;
}
#wcbh-header .wcbh-mobile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
    margin-bottom: 20px;
}
#wcbh-header .wcbh-mobile-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #333;
}
#wcbh-header .wcbh-mobile-logo img {
    max-height: 40px;
}
#wcbh-header .wcbh-mobile-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}
#wcbh-header .wcbh-mobile-nav > li {
    border-bottom: 1px solid #f0f0f0;
}
#wcbh-header .wcbh-mobile-nav > li > a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    color: #333;
    text-decoration: none;
    font-weight: 500;
}
#wcbh-header .wcbh-mobile-nav .sub-menu {
    display: none;
    list-style: none;
    padding-left: 20px;
}
#wcbh-header .wcbh-mobile-nav .sub-menu li a {
    display: block;
    padding: 8px 0;
    color: #666;
    text-decoration: none;
}
#wcbh-header .wcbh-mobile-nav .menu-item-has-children.open > .sub-menu {
    display: block;
}
#wcbh-header .wcbh-mobile-nav .menu-item-has-children > a i:last-child {
    transition: transform 0.3s;
}
#wcbh-header .wcbh-mobile-nav .menu-item-has-children.open > a i:last-child {
    transform: rotate(180deg);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 992px) {
    #wcbh-header .wcbh-nav-desktop {
        display: none;
    }
    #wcbh-header .wcbh-mobile-toggle {
        display: flex;
    }
    #wcbh-header .wcbh-container {
        flex-wrap: wrap;
    }
    #wcbh-header .wcbh-top-bar .wcbh-container {
        flex-direction: column;
        text-align: center;
    }
    #wcbh-header .wcbh-top-right span {
        margin: 0 10px;
    }
    #wcbh-header .wcbh-logo {
        flex: 1;
    }
    #wcbh-header .wcbh-search {
        flex: 1 1 100%;
        margin: 10px 0;
        order: 3;
    }
    #wcbh-header .wcbh-icons {
        gap: 15px;
    }
    /* Fix mobile menu z-index */
    #wcbh-header .wcbh-mobile-overlay,
    #wcbh-header .wcbh-mobile-menu {
        z-index: 99999;
    }
}

@media (max-width: 576px) {
    #wcbh-header .wcbh-search form {
        border-radius: 20px;
    }
    #wcbh-header .wcbh-search select {
        padding: 5px 10px;
        font-size: 12px;
    }
    #wcbh-header .wcbh-search input[type="search"] {
        padding: 5px 10px;
        font-size: 12px;
    }
    #wcbh-header .wcbh-search button {
        padding: 0 12px;
        font-size: 14px;
    }
    #wcbh-header .wcbh-mobile-menu {
        width: 280px;
        left: -280px;
    }
}