/**
Theme Name: Astra Child
Author: Brainstorm Force
Author URI: http://wpastra.com/about/
Description: Astra is the fastest, fully customizable & beautiful theme suitable for blogs, personal portfolios and business websites. It is very lightweight (less than 50KB on frontend) and offers unparalleled speed. Built with SEO in mind, Astra comes with schema.org code integrated so search engines will love your site. Astra offers plenty of sidebar options and widget areas giving you a full control for customizations. Furthermore, we have included special features and templates so feel free to choose any of your favorite page builder plugin to create pages flexibly. Some of the other features: # WooCommerce Ready # Responsive # Compatible with major plugins # Translation Ready # Extendible with premium addons # Regularly updated # Designed, Developed, Maintained & Supported by Brainstorm Force. Looking for a perfect base theme? Look no further. Astra is fast, fully customizable and beautiful theme!
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: astra-child
Template: astra
*/

/* ============================================================
   1. 桌面端页眉：初始状态（轻薄渐变 + 透明背景）
   ============================================================ */
div#ast-desktop-header {
    position: absolute !important;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 9999;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.4) 0%,
        rgba(0, 0, 0, 0.1) 60%,
        rgba(0, 0, 0, 0) 100%
    ) !important;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), background 0.3s ease !important;
    will-change: transform;
}

/* 确保内部所有容器背景透明 */
#ast-desktop-header .ast-main-header-wrap,
#ast-desktop-header .main-header-bar,
#ast-desktop-header .ast-primary-header-bar {
    background-color: transparent !important;
    background: transparent !important;
}

/* ============================================================
   2. 桌面端滚动状态：固定 + 毛玻璃 + 精简高度
   ============================================================ */
.ast-header-sticky-active div#ast-desktop-header {
    position: fixed !important;
    background: rgba(0, 0, 0, 0.4) !important;
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    animation: slideDownCustom 0.4s forwards;
}

.ast-header-sticky-active .ast-primary-header-bar {
    padding: 5px 0 !important;
}

.ast-header-sticky-active .ast-above-header-wrap {
    display: none !important;
}

/* 滑入动画 */
@keyframes slideDownCustom {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

/* ============================================================
   3. 桌面端菜单文字颜色（保持白色）
   ============================================================ */
#ast-desktop-header .main-header-menu .menu-link,
#ast-desktop-header .ast-icon,
#ast-desktop-header .ast-custom-button-link {
    color: #ffffff !important;
}

/* ============================================================
   4. 桌面端子菜单：修复悬停间隙 + 毛玻璃背景
   ============================================================ */
/* 父级菜单项建立层叠上下文 */
#ast-desktop-header .main-header-menu .menu-item-has-children {
    position: relative !important;
    z-index: 1000;
}

/* 父级链接置于上方，保证点击 */
#ast-desktop-header .main-header-menu .menu-item-has-children > a {
    position: relative !important;
    z-index: 1002 !important;
    display: inline-block;
    padding-right: 15px;
}

/* 子菜单容器：去掉间隙，改用内边距作为安全区域 */
#ast-desktop-header .main-header-menu .sub-menu {
    z-index: 1001 !important;
    top: 100% !important;          /* 紧贴父级底部，无空隙 */
    margin-top: 0 !important;
    padding-top: 8px !important;   /* 这个内边距充当“桥梁”，鼠标不会悬空 */
    background-color: rgba(0, 0, 0, 0.60) !important;
    backdrop-filter: blur(10px);
    border: none !important;
    padding: 5px 0 !important;     /* 保留原始上下内边距，会被 padding-top 覆盖？注意合并 */
    overflow: visible !important;
}
/* 修正：上面 padding:5px 0 会覆盖 padding-top，我们用更具体的方式 */
#ast-desktop-header .main-header-menu .sub-menu {
    padding: 8px 0 5px 0 !important; /* 上边距8px作为安全区，下边距保持原样 */
}
/* 子菜单项样式 */
#ast-desktop-header .main-header-menu .sub-menu li {
    margin: 0 !important;
    padding: 0 !important;
}

#ast-desktop-header .main-header-menu .sub-menu .menu-link {
    color: #ffffff !important;
    padding: 12px 25px !important;
    transition: all 0.3s ease !important;
    display: block !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* 子菜单悬浮背景 */
#ast-desktop-header .main-header-menu .sub-menu li:hover > a {
    background-color: #444444 !important;
    color: #ffffff !important;
}

/* 文字微动效 */
#ast-desktop-header .main-header-menu .sub-menu li:hover > a .menu-text {
    display: inline-block;
    transform: scale(1.1);
    transform-origin: left center;
}

/* 三级菜单（横向弹出） */
#ast-desktop-header .main-header-menu .sub-menu .menu-item-has-children {
    position: relative !important;
}

#ast-desktop-header .main-header-menu .sub-menu .menu-item-has-children:hover > .sub-menu {
    left: 100% !important;
    top: -5px !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* 所有子菜单背景统一 */
#ast-desktop-header .main-header-menu .sub-menu .sub-menu {
    background-color: rgba(0, 0, 0, 0.60) !important;
    backdrop-filter: blur(10px);
}

/* ============================================================
   5. 单品页隐藏作者/日期 & 重置标题边距
   ============================================================ */
.single-product .entry-meta {
    display: none !important;
}

.entry-header,
.ast-container .entry-header,
.site-content .entry-header {
    margin-top: 0 !important;
    padding-top: 0 !important;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
    min-height: 0 !important;
}

/* ============================================================
   6. 移动端页眉：初始状态（与桌面风格统一）
   ============================================================ */
div#ast-mobile-header {
    position: absolute !important;
    width: 100% !important;
    top: 0 !important;
    left: 0 !important;
    z-index: 9999 !important;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.4) 0%,
        rgba(0, 0, 0, 0.1) 60%,
        rgba(0, 0, 0, 0) 100%
    ) !important;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), background 0.3s ease !important;
    will-change: transform;
}

#ast-mobile-header .ast-mobile-header-wrap,
#ast-mobile-header .mobile-header-bar,
#ast-mobile-header .ast-primary-header-bar {
    background-color: transparent !important;
    background: transparent !important;
}

/* ============================================================
   7. 移动端滚动状态：固定 + 毛玻璃
   ============================================================ */
.ast-header-sticky-active div#ast-mobile-header {
    position: fixed !important;
    background: rgba(0, 0, 0, 0.5) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15) !important;
    animation: slideDownCustomMobile 0.4s forwards !important;
}

.ast-header-sticky-active #ast-mobile-header .mobile-header-bar {
    padding: 5px 0 !important;
}

@keyframes slideDownCustomMobile {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

/* 移动端图标与文字颜色 */
#ast-mobile-header .ast-button-wrap .menu-toggle,
#ast-mobile-header .mobile-menu-toggle-icon,
#ast-mobile-header .ast-mobile-menu-trigger-fill,
#ast-mobile-header .site-logo-img,
#ast-mobile-header .ast-icon {
    color: #ffffff !important;
    fill: #ffffff !important;
}
