/* Transparent header, sticky navigation and page-specific header colors */

/* ==================================================================
   02. HEADER AND STICKY NAVIGATION / 页眉与滚动吸顶
================================================================== */

/* 1. 初始状态：让页眉绝对定位叠在 Banner 上方 */
body.home .header-wrapper:not(.stuck):not(.is-sticky) {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    z-index: 999 !important;
    background-color: transparent !important;
    box-shadow: none !important;
}

body.home .header-main:not(.stuck):not(.is-sticky) {
    background-color: transparent !important;
}

/* 所有页面滚动吸顶 */
body .header-wrapper.stuck,
body .header-wrapper.is-sticky,
body .header-main.stuck,
body .header-main.is-sticky {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    z-index: 9999 !important;
    background-color: #ffffff !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1) !important;
}


/* 所有页面滚动后的菜单颜色 */
body .header-wrapper.stuck .nav > li > a,
body .header-wrapper.is-sticky .nav > li > a,
body .header-main.stuck .nav > li > a,
body .header-main.is-sticky .nav > li > a {
    color: #005732 !important;
}


/* 所有页面滚动后的图标颜色 */
body .header-wrapper.stuck .icon-search,
body .header-wrapper.is-sticky .icon-search,
body .header-main.stuck .icon-search,
body .header-main.is-sticky .icon-search {
    color: #005732 !important;
}

/* ==================================================
   WooCommerce 产品页面页眉
   适用：
   1. 产品集合页
   2. 产品分类页
   3. 产品详情页
================================================== */

/* 初始状态：页眉统一为白色背景 */
body.woocommerce-shop #header .header-wrapper:not(.stuck):not(.is-sticky),
body.post-type-archive-product #header .header-wrapper:not(.stuck):not(.is-sticky),
body.tax-product_cat #header .header-wrapper:not(.stuck):not(.is-sticky),
body.single-product #header .header-wrapper:not(.stuck):not(.is-sticky),

body.woocommerce-shop #header .header-wrapper:not(.stuck):not(.is-sticky) .header-main,
body.post-type-archive-product #header .header-wrapper:not(.stuck):not(.is-sticky) .header-main,
body.tax-product_cat #header .header-wrapper:not(.stuck):not(.is-sticky) .header-main,
body.single-product #header .header-wrapper:not(.stuck):not(.is-sticky) .header-main,

body.woocommerce-shop #header .header-wrapper:not(.stuck):not(.is-sticky) .header-bg-container,
body.post-type-archive-product #header .header-wrapper:not(.stuck):not(.is-sticky) .header-bg-container,
body.tax-product_cat #header .header-wrapper:not(.stuck):not(.is-sticky) .header-bg-container,
body.single-product #header .header-wrapper:not(.stuck):not(.is-sticky) .header-bg-container,

body.woocommerce-shop #header .header-wrapper:not(.stuck):not(.is-sticky) .header-bg-color,
body.post-type-archive-product #header .header-wrapper:not(.stuck):not(.is-sticky) .header-bg-color,
body.tax-product_cat #header .header-wrapper:not(.stuck):not(.is-sticky) .header-bg-color,
body.single-product #header .header-wrapper:not(.stuck):not(.is-sticky) .header-bg-color {
    background: #ffffff !important;
    background-color: #ffffff !important;
}


/* 一级菜单文字改成绿色 */
body.woocommerce-shop #header .header-nav-main > li > a,
body.post-type-archive-product #header .header-nav-main > li > a,
body.tax-product_cat #header .header-nav-main > li > a,
body.single-product #header .header-nav-main > li > a {
    color: #005732 !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* 搜索、账户、购物车、手机菜单图标 */
body.woocommerce-shop #header .icon-search,
body.woocommerce-shop #header .icon-user,
body.woocommerce-shop #header .icon-shopping-cart,
body.woocommerce-shop #header .icon-menu,

body.post-type-archive-product #header .icon-search,
body.post-type-archive-product #header .icon-user,
body.post-type-archive-product #header .icon-shopping-cart,
body.post-type-archive-product #header .icon-menu,

body.tax-product_cat #header .icon-search,
body.tax-product_cat #header .icon-user,
body.tax-product_cat #header .icon-shopping-cart,
body.tax-product_cat #header .icon-menu,

body.single-product #header .icon-search,
body.single-product #header .icon-user,
body.single-product #header .icon-shopping-cart,
body.single-product #header .icon-menu {
    color: #005732 !important;
}

/* ==================================================
   单篇文章页：透明页眉覆盖 Banner
================================================== */

body.single-post #header
.header-wrapper:not(.stuck):not(.is-sticky) {
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    left: 0 !important;

    width: 100% !important;
    z-index: 9999 !important;

    background: transparent !important;
    box-shadow: none !important;
}

body.single-post #header
.header-wrapper:not(.stuck):not(.is-sticky) .header-main,

body.single-post #header
.header-wrapper:not(.stuck):not(.is-sticky) .header-bg-container,

body.single-post #header
.header-wrapper:not(.stuck):not(.is-sticky) .header-bg-color {
    background: transparent !important;
    background-color: transparent !important;
}

body.single-post #header
.header-wrapper:not(.stuck):not(.is-sticky)
.header-nav-main > li > a {
    color: #ffffff !important;
}

body.single-post #header
.header-wrapper:not(.stuck):not(.is-sticky) .icon-search,

body.single-post #header
.header-wrapper:not(.stuck):not(.is-sticky) .icon-user,

body.single-post #header
.header-wrapper:not(.stuck):not(.is-sticky) .icon-menu,

body.single-post #header
.header-wrapper:not(.stuck):not(.is-sticky) .icon-shopping-cart {
    color: #ffffff !important;
}
