/* ================================================================
   Sebuda Header — 顶部导航样式
   依赖: variables.css
   结构: 深色顶栏 (60px) + 黄色导航栏 (44px) = 104px
   ================================================================ */

/* 占位：补偿 fixed 定位偏移 */
.sbd-placeholder {
    height: 104px;
}

/* 整体容器 */
.sbd-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: var(--z-sticky);
    font-family: var(--font-family);
}

/* ================================================================
   第一行：深色顶栏
   ================================================================ */
.sbd-topbar {
    background-color: #3D3D3D;
    height: 60px;
    display: flex;
    align-items: center;
    padding: 0 32px;
    gap: 24px;
}

/* --- Logo --- */
.sbd-logo {
    display: inline-flex;
    align-items: baseline;
    text-decoration: none;
    flex-shrink: 0;
}

.sbd-logo-mark {
    font-style: italic;
    font-size: 22px;
    color: #969696;
    font-family: Georgia, 'Times New Roman', serif;
    line-height: 1;
    margin-right: 1px;
}

.sbd-logo-name {
    font-size: 26px;
    font-weight: 700;
    color: #FFFFFF;
    letter-spacing: -0.5px;
    font-family: var(--font-family);
    line-height: 1;
}

/* --- 搜索框 --- */
.sbd-search {
    flex: 1;
    max-width: 560px;
}

.sbd-search-form {
    display: flex;
    align-items: center;
    background: #EAEAEA;
    border-radius: 999px;
    height: 40px;
    padding: 0 6px 0 18px;
    gap: 6px;
}

.sbd-search-input {
    flex: 1;
    min-width: 0;
    border: none;
    background: transparent;
    font-size: 14px;
    color: #333333;
    outline: none;
    font-family: var(--font-family);
}

.sbd-search-input::placeholder {
    color: #AAAAAA;
}

.sbd-search-btn {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666666;
    border-radius: 50%;
    transition: background var(--transition-fast);
}

.sbd-search-btn:hover {
    background: rgba(0, 0, 0, 0.08);
}

.sbd-search-btn svg {
    width: 17px;
    height: 17px;
}

/* --- 右侧操作区 --- */
.sbd-topbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
    flex-shrink: 0;
}

/* 语言 / 货币选择器 */
.sbd-selector {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 7px;
    padding: 5px 10px;
    color: #FFFFFF;
    font-size: 13px;
    font-weight: 500;
    font-family: var(--font-family);
    cursor: pointer;
    white-space: nowrap;
    line-height: 1;
    transition: background var(--transition-fast);
}

.sbd-selector:hover {
    background: rgba(255, 255, 255, 0.13);
}

.sbd-selector-flag {
    font-size: 15px;
    line-height: 1;
}

.sbd-selector-chevron {
    font-size: 9px;
    opacity: 0.6;
    margin-left: 1px;
}

/* Login / Sign Up 按钮 */
.sbd-btn-login {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-100);
    border: 2px solid var(--primary-100);
    border-radius: 999px;
    padding: 6px 22px;
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font-family);
    text-decoration: none;
    background: transparent;
    cursor: pointer;
    white-space: nowrap;
    line-height: 1.4;
    letter-spacing: 0.1px;
    transition: background var(--transition-fast), color var(--transition-fast);
}

.sbd-btn-login:hover {
    background: var(--primary-100);
    color: var(--grayscale-900);
}

.sbd-btn-signup {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-100);
    color: #14142B;
    border: 2px solid var(--primary-100);
    border-radius: 999px;
    padding: 6px 22px;
    font-size: 14px;
    font-weight: 700;
    font-family: var(--font-family);
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    line-height: 1.4;
    letter-spacing: 0.1px;
    transition: background var(--transition-fast), border-color var(--transition-fast);
}

.sbd-btn-signup:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
}

/* 登录区容器 */
.sbd-auth {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ================================================================
   第二行：黄色导航栏
   ================================================================ */
.sbd-navbar {
    background-color: var(--primary-100);
    height: 44px;
    display: flex;
    align-items: center;
    padding: 0 32px;
}

/* 汉堡按钮 */
.sbd-hamburger {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--grayscale-900);
    font-size: 20px;
    line-height: 1;
    padding: 0 16px 0 0;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    transition: opacity var(--transition-fast);
}

.sbd-hamburger:hover {
    opacity: 0.6;
}

/* 导航列表 */
.sbd-nav {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

.sbd-nav > li {
    position: relative;
}

.sbd-nav > li > a {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    color: var(--grayscale-900);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    font-family: var(--font-family);
    padding: 0 14px;
    height: 44px;
    white-space: nowrap;
    transition: background var(--transition-fast);
}

.sbd-nav > li > a:hover,
.sbd-nav > li.sbd-active > a {
    background: rgba(0, 0, 0, 0.1);
}

/* 导航箭头（SVG，细线 v 形） */
.sbd-nav-chevron {
    display: inline-block;
    flex-shrink: 0;
    opacity: 0.6;
    vertical-align: middle;
}

/* 下拉菜单 */
.sbd-nav-sub {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    min-width: 160px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 6px 0;
    list-style: none;
    margin: 0;
    z-index: var(--z-dropdown);
}

.sbd-nav > li:hover > .sbd-nav-sub {
    display: block;
}

.sbd-nav-sub li a {
    display: block;
    padding: 8px 16px;
    color: var(--grayscale-700);
    text-decoration: none;
    font-size: 14px;
    font-family: var(--font-family);
    white-space: nowrap;
    transition: background var(--transition-fast);
}

.sbd-nav-sub li a:hover {
    background: var(--bg-hover);
    color: var(--grayscale-900);
}

/* ================================================================
   响应式
   ================================================================ */
@media (max-width: 768px) {
    .sbd-placeholder {
        height: 60px;
    }

    .sbd-topbar {
        padding: 0 16px;
        gap: 12px;
    }

    .sbd-search {
        max-width: none;
    }

    .sbd-selector {
        display: none;
    }

    .sbd-navbar {
        display: none;
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        height: auto;
        padding: 8px 0;
        flex-direction: column;
        align-items: flex-start;
        box-shadow: var(--shadow-md);
        z-index: var(--z-dropdown);
    }

    .sbd-navbar.is-open {
        display: flex;
    }

    .sbd-hamburger {
        display: none;
    }

    .sbd-nav {
        flex-direction: column;
        width: 100%;
    }

    .sbd-nav > li > a {
        padding: 10px 20px;
        width: 100%;
        height: auto;
    }

    .sbd-topbar-hamburger {
        display: flex;
    }
}

@media (min-width: 769px) {
    .sbd-topbar-hamburger {
        display: none;
    }
}
