/* Figma Nav 2:75 — 1440 设计稿站点头（绝对定位） */
.site-header {
    --site-header-bg: #0a1a2e;
    --site-header-primary: #5bc8dd;
    --site-header-link: #a6b5c8;
    --site-header-white: #ffffff;
    position: relative;
    width: 1440px;
    height: 92px;
    background: var(--site-header-bg);
    font-family: "Noto Sans TC", "Inter", sans-serif;
    overflow: hidden;
}

.site-header__brand {
    position: absolute;
    left: 80px;
    top: 20px;
    width: 252px;
    height: 52px;
    text-decoration: none;
}

.site-header__logo {
    position: absolute;
    left: 0;
    top: 0;
    width: 52px;
    height: 52px;
    display: block;
    overflow: hidden;
}

.site-header__logo img {
    position: absolute;
    left: 0;
    top: 0;
    width: 52px;
    height: 52px;
}

.site-header__title {
    position: absolute;
    left: 60px;
    top: 50%;
    margin: 0;
    transform: translateY(-50%);
    color: var(--site-header-white);
    font-family: Inter, "Noto Sans TC", sans-serif;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 5.88px;
    line-height: normal;
    white-space: nowrap;
}

/* 右侧导航组：相对 header 右侧 80px 对齐 */
.site-header__nav {
    position: absolute;
    right: 80px;
    top: 20px;
    width: 540px;
    height: 52px;
}

.site-header__links {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 32px;
}

.site-header__link {
    color: var(--site-header-link);
    font-size: 18px;
    font-weight: 500;
    line-height: normal;
    text-decoration: none;
    white-space: nowrap;
}

.site-header__link:hover,
.site-header__link.is-active {
    color: var(--site-header-primary);
}

.site-header__cta-primary {
    position: absolute;
    left: 268px;
    top: 50%;
    transform: translateY(-50%);
    box-sizing: border-box;
    padding: 10px 16px;
    background: var(--site-header-primary);
    color: var(--site-header-white);
    border-radius: 8px;
    font-size: 18px;
    font-weight: 700;
    line-height: normal;
    text-decoration: none;
    white-space: nowrap;
}

.site-header__cta-primary:hover {
    color: var(--site-header-white);
    background: #4ab8cd;
}

.site-header__auth {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
}

.site-header__cta-outline {
    display: block;
    box-sizing: border-box;
    padding: 10px 16px;
    border: 1px solid var(--site-header-primary);
    border-radius: 8px;
    color: var(--site-header-primary);
    background: transparent;
    font-size: 18px;
    font-weight: 700;
    line-height: normal;
    text-decoration: none;
    white-space: nowrap;
}

.site-header__cta-outline:hover {
    color: var(--site-header-white);
    background: rgba(91, 200, 221, 0.15);
}

/* 登入後：頭像 + 姓名膠囊（Figma 2:8673） */
.site-header__user {
    display: flex;
    align-items: center;
    box-sizing: border-box;
    max-width: 148px;
    height: 46px;
    padding: 7px 16px 7px 7px;
    background: #ffffff;
    border-radius: 999px;
    gap: 8px;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.site-header__user:hover {
    opacity: 0.92;
}

.site-header__user-avatar {
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
}

.site-header__user-avatar img {
    display: block;
    width: 32px;
    height: 32px;
}

.site-header__user-name {
    flex: 1 1 auto;
    min-width: 0;
    color: #1b2a3f;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Mobile actions / drawer — hidden on desktop */
.site-header__mobile-actions,
.site-header__drawer {
    display: none;
}

/* ========== Mobile Nav — Figma 2:3248 ========== */
@media (max-width: 1439.98px) {
    .site-header {
        width: 100%;
        height: 52px;
        overflow: visible;
        z-index: 100;
    }

    .site-header__brand {
        left: 7px;
        top: 8px;
        width: auto;
        height: 36px;
        display: flex;
        align-items: center;
        gap: 5.5px;
    }

    .site-header__logo,
    .site-header__logo img {
        position: static;
        width: 36px;
        height: 36px;
    }

    .site-header__title {
        position: static;
        transform: none;
        font-size: 13.85px;
        letter-spacing: 2.91px;
        line-height: normal;
    }

    .site-header__nav {
        display: none;
    }

    .site-header__mobile-actions {
        display: flex;
        position: absolute;
        right: 15px;
        top: 6px;
        align-items: center;
        gap: 8px;
    }

    .site-header__icon-btn {
        position: relative;
        box-sizing: border-box;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 32px;
        height: 32px;
        padding: 5px;
        background: var(--site-header-primary);
        border-radius: 23px;
        text-decoration: none;
        flex-shrink: 0;
    }

    .site-header__icon-btn img {
        display: block;
        width: 21px;
        height: 21px;
    }

    .site-header__cart-badge {
        position: absolute;
        top: -4px;
        right: -4px;
        min-width: 16px;
        height: 16px;
        padding: 0 4px;
        box-sizing: border-box;
        background: #ff6d0b;
        color: #fff;
        border-radius: 999px;
        font-size: 10px;
        font-weight: 700;
        line-height: 16px;
        text-align: center;
    }

    .site-header__cart-badge[hidden] {
        display: none !important;
    }

    .site-header__menu-btn {
        box-sizing: border-box;
        display: block;
        width: 40px;
        height: 40px;
        padding: 0;
        margin: 0;
        border: 1px solid #1f324c;
        border-radius: 10px;
        background: #1a2e4d;
        cursor: pointer;
        position: relative;
        flex-shrink: 0;
    }

    .site-header__menu-btn span {
        position: absolute;
        left: 11px;
        width: 16px;
        height: 2px;
        border-radius: 1px;
        background: #e8edf3;
    }

    .site-header__menu-btn span:nth-child(1) { top: 13px; }
    .site-header__menu-btn span:nth-child(2) { top: 19px; }
    .site-header__menu-btn span:nth-child(3) { top: 25px; }

    .site-header.is-menu-open .site-header__menu-btn span:nth-child(1) {
        top: 19px;
        transform: rotate(45deg);
    }
    .site-header.is-menu-open .site-header__menu-btn span:nth-child(2) {
        opacity: 0;
    }
    .site-header.is-menu-open .site-header__menu-btn span:nth-child(3) {
        top: 19px;
        transform: rotate(-45deg);
    }

    .site-header__drawer {
        display: block;
        position: absolute;
        left: 0;
        right: 0;
        top: 52px;
        z-index: 110;
        background: #0a1a2e;
        border-top: 1px solid #1f324c;
        box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
        padding: 16px 20px 24px;
    }

    .site-header__drawer[hidden] {
        display: none !important;
    }

    .site-header__drawer-nav {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }

    .site-header__drawer-link {
        display: block;
        padding: 14px 8px;
        color: #a6b5c8;
        font-size: 16px;
        font-weight: 500;
        text-decoration: none;
        border-bottom: 1px solid #1f324c;
    }

    .site-header__drawer-link:hover,
    .site-header__drawer-link.is-active {
        color: var(--site-header-primary);
    }

    .site-header__drawer-cta {
        display: block;
        margin-top: 12px;
        padding: 14px 16px;
        background: var(--site-header-primary);
        color: #fff;
        border-radius: 8px;
        font-size: 16px;
        font-weight: 700;
        text-align: center;
        text-decoration: none;
    }
}
