/* =====================================================
   sub_nav.css — 次级导航菜单栏 (Windows 7 Aero Glass)
   ===================================================== */

/* ---------- 次级导航栏容器 ---------- */
.aero-subnav {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    height: 52px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(14px) saturate(160%);
    -webkit-backdrop-filter: blur(14px) saturate(160%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    z-index: 900;
    user-select: none;
}

/* 顶部高光 */
.aero-subnav::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
}

/* =====================================================
   左侧搜索区域
   ===================================================== */
.aero-subnav__left {
    display: flex;
    align-items: center;
    flex: 0 0 340px;
    max-width: 340px;
}

.aero-subnav__search-wrapper {
    display: flex;
    align-items: center;
    width: 100%;
    height: 36px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.aero-subnav__search-wrapper:focus-within {
    border-color: rgba(0, 153, 255, 0.4);
    box-shadow: 0 0 0 3px rgba(0, 153, 255, 0.1);
}

.aero-subnav__search-input {
    flex: 1;
    height: 100%;
    padding: 0 12px;
    background: transparent;
    border: none;
    outline: none;
    color: rgba(255, 255, 255, 0.85);
    font-size: 13px;
    font-family: inherit;
}

.aero-subnav__search-input::placeholder {
    color: rgba(255, 255, 255, 0.35);
    font-size: 12px;
}

.aero-subnav__search-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(0, 153, 255, 0.5);
    border: none;
    cursor: pointer;
    transition: background 0.2s ease;
    flex-shrink: 0;
}

.aero-subnav__search-btn:hover {
    background: rgba(0, 153, 255, 0.7);
}

.aero-subnav__search-btn:active {
    background: rgba(0, 153, 255, 0.85);
}

.aero-subnav__search-btn svg {
    width: 16px;
    height: 16px;
    fill: #fff;
    display: block;
}

/* =====================================================
   中间选项卡区域
   ===================================================== */
.aero-subnav__center {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    justify-content: center;
}

.aero-subnav__tab {
    position: relative;
    padding: 8px 24px;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.55);
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    border-radius: 6px;
    transition: color 0.2s ease, background 0.2s ease;
    letter-spacing: 0.5px;
}

.aero-subnav__tab:hover {
    color: rgba(255, 255, 255, 0.85);
    background: rgba(255, 255, 255, 0.06);
}

/* 激活选项卡 — 下划线指示器 + 高亮文字 */
.aero-subnav__tab--active {
    color: #fff;
    font-weight: 600;
}

.aero-subnav__tab--active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 2px;
    background: linear-gradient(90deg, rgba(0, 153, 255, 0.4), rgba(0, 153, 255, 0.9), rgba(0, 153, 255, 0.4));
    border-radius: 1px;
}

/* 激活状态悬停保留背景 */
.aero-subnav__tab--active:hover {
    background: rgba(255, 255, 255, 0.06);
}

/* =====================================================
   右侧功能按钮区域
   ===================================================== */
.aero-subnav__right {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 0 0 auto;
}

.aero-subnav__action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    white-space: nowrap;
}

.aero-subnav__action-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.15);
}

.aero-subnav__action-btn:active {
    background: rgba(255, 255, 255, 0.06);
}

.aero-subnav__action-btn svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
    display: block;
    flex-shrink: 0;
}

/* 购物车按钮 — 徽章容器 */
.aero-subnav__cart-btn {
    position: relative;
}

.aero-subnav__cart-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #ff4757, #ff6b81);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    border-radius: 9px;
    line-height: 1;
    border: 1.5px solid rgba(30, 30, 50, 0.9);
    pointer-events: none;
}

/* 徽章动画（出现时） */
.aero-subnav__cart-badge--visible {
    animation: aero-badge-pop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes aero-badge-pop {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* =====================================================
   标签页内容区域
   ===================================================== */
.aero-tab-content {
    position: relative;
    min-height: 200px;
}

.aero-tab-panel {
    display: none;
    padding: 32px 24px;
    color: rgba(255, 255, 255, 0.6);
    animation: aero-tab-fade-in 0.3s ease;
}

.aero-tab-panel--active {
    display: block;
}

@keyframes aero-tab-fade-in {
    0% {
        opacity: 0;
        transform: translateY(6px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.aero-tab-panel__title {
    font-size: 24px;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 12px;
    letter-spacing: 1px;
}

.aero-tab-panel__desc {
    font-size: 14px;
    line-height: 1.7;
    max-width: 600px;
    color: rgba(255, 255, 255, 0.4);
}

/* =====================================================
   响应式
   ===================================================== */

/* 中等屏幕 */
@media (max-width: 900px) {
    .aero-subnav {
        padding: 0 16px;
        height: 48px;
    }

    .aero-subnav__left {
        flex: 0 0 260px;
        max-width: 260px;
    }

    .aero-subnav__tab {
        padding: 6px 16px;
        font-size: 13px;
    }
}

/* 小屏幕 — 搜索框缩短，文字隐藏为图标 */
@media (max-width: 680px) {
    .aero-subnav {
        padding: 0 12px;
        height: 46px;
        flex-wrap: nowrap;
    }

    .aero-subnav__left {
        flex: 0 0 180px;
        max-width: 180px;
    }

    .aero-subnav__search-input {
        font-size: 12px;
        padding: 0 8px;
    }

    .aero-subnav__tab {
        padding: 6px 12px;
        font-size: 12px;
    }

    .aero-subnav__action-btn {
        padding: 6px 10px;
        font-size: 12px;
    }

    .aero-subnav__action-btn span {
        display: none;
    }

    .aero-subnav__action-btn {
        gap: 0;
    }

    .aero-subnav__action-btn svg {
        width: 18px;
        height: 18px;
    }
}

/* 超小屏幕 */
@media (max-width: 480px) {
    .aero-subnav__left {
        flex: 0 0 140px;
        max-width: 140px;
    }

    .aero-subnav__tab {
        padding: 6px 8px;
        font-size: 11px;
    }
}
