/**
 * STIFF BEAST™ Navigation Bar Component Styles
 * 导航栏组件样式 - 所有页面共用
 * 版本: 2025-11-17
 */

/* ============ CSS COLOR VARIABLES - NAVBAR ============ */
:root {
    --primary-gold: #FFD700 !important;
    --primary-black: #000000 !important;
    --primary-white: #FFFFFF !important;
    --primary-red: #D40000 !important;
}

/* ============ TOP NAVIGATION BAR ============ */
.top-navbar {
    background: linear-gradient(180deg, rgba(0,0,0,0.95) 0%, rgba(20,20,20,0.9) 100%);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 215, 0, 0.1);
}

.navbar-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ============ BRAND LOGO ============ */
.brand-logo {
    font-size: 1.5rem;
    font-weight: 900;
    color: #FFD700 !important;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 180px;
    transition: all 0.3s ease;
}

.brand-logo:hover {
    color: var(--primary-white) !important;
    transform: scale(1.02);
}

.brand-logo a {
    color: #FFD700 !important;
    text-decoration: none;
}

.brand-logo-img {
    width: 4rem !important;
    height: 4rem !important;
    object-fit: contain;
}

.brand-logo-text {
    color: #FFD700;
    font-size: 1.5rem;
    font-weight: 900;
}

.brand-logo svg {
    width: 2.5rem !important;
    height: 2.5rem !important;
    flex-shrink: 0 !important;
    fill: #D40000 !important;
}

.brand-logo .icon,
.brand-logo .icon-fire {
    width: 2.5rem !important;
    height: 2.5rem !important;
    fill: #D40000 !important;
}

/* ============ NAVIGATION LINKS ============ */
.nav-links {
    display: flex;
    gap: 5px;
    flex: 1;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.nav-item {
    padding: 10px 18px;
    color: var(--primary-white) !important;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 0;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
    white-space: nowrap;
}

.nav-item:hover {
    background-color: rgba(255, 215, 0, 0.1);
    border-color: var(--primary-gold);
    color: var(--primary-gold) !important;
}

.nav-item.active {
    background-color: var(--primary-gold);
    color: var(--primary-black) !important;
    border-color: var(--primary-gold);
    font-weight: 700;
}

/* ============ NAVIGATION ACTIONS (Language & Cart) ============ */
/* PC端：在菜单右边 */
.navbar-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* PC端隐藏三杠菜单按钮 */
.navbar-menu-toggle {
    display: none;
}

.nav-icons {
    display: flex;
    gap: 20px;
    align-items: center;
}

/* ============ LANGUAGE TOGGLE BUTTON ============ */
/* [MODIFIED] 原按钮样式保留，新增下拉菜单样式 */
.lang-toggle-btn {
    background: transparent;
    color: #FFD700 !important;
    padding: 8px 16px;
    font-size: 0.95rem;
    border: 2px solid #FFD700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    min-height: 36px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.lang-toggle-btn:hover {
    background: #FFD700;
    color: #000 !important;
    transform: scale(1.05);
}

.lang-toggle-btn:active {
    transform: scale(0.98);
}

/* ============ LANGUAGE DROPDOWN ============ */
.lang-dropdown {
    position: relative;
    display: inline-block;
}

.lang-dropdown-btn {
    background: transparent;
    color: #FFD700 !important;
    padding: 8px 12px;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    min-height: 36px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.lang-dropdown-btn:hover {
    background: rgba(255, 215, 0, 0.1);
}

.lang-dropdown.active .lang-dropdown-btn {
    background: rgba(255, 215, 0, 0.15);
}

.lang-dropdown-arrow {
    transition: transform 0.3s ease;
}

.lang-dropdown.active .lang-dropdown-arrow {
    transform: rotate(180deg);
}

.lang-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: #1a1a1a;
    border: 1px solid rgba(255, 215, 0, 0.3);
    min-width: 140px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.lang-dropdown.active .lang-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.lang-option:hover {
    background: rgba(255, 215, 0, 0.2);
    color: #FFD700;
}

.lang-option.active {
    background: rgba(255, 215, 0, 0.15);
    color: #FFD700;
}

.lang-flag {
    font-size: 1.1rem;
}

/* ============ SHOPPING CART BUTTON ============ */
.nav-cart-btn {
    background: none;
    color: #FFD700 !important;
    padding: 8px 15px;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    text-decoration: none;
    font-weight: 600;
    min-height: 36px;
}

.nav-cart-btn:hover {
    transform: scale(1.05);
    color: var(--primary-white) !important;
}

.nav-cart-btn svg {
    width: 1.3rem;
    height: 1.3rem;
    flex-shrink: 0;
}

/* Cart Badge */
.cart-badge {
    background: var(--primary-gold);
    color: #000;
    font-size: 0.85rem;
    padding: 0;
    width: 20px;
    height: 20px;
    border-radius: 0;
    text-align: center;
    line-height: 20px;
    font-weight: bold;
    display: inline-block;
}

/* ============ MOBILE MENU TOGGLE ============ */
.navbar-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #FFD700 !important;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 8px 0;
    margin: 0 10px;
    transition: all 0.3s ease;
    z-index: 1001;
}

.navbar-menu-toggle:hover {
    transform: scale(1.1);
}

.navbar-menu-toggle.active {
    transform: rotate(90deg);
}

/* Mobile Menu Container */
.navbar-mobile-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.95) 0%, rgba(20,20,20,0.9) 100%);
    border-bottom: 2px solid rgba(255, 215, 0, 0.15);
    padding: 15px 0;
    flex-direction: column;
    gap: 5px;
    z-index: 1000;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.navbar-mobile-menu.active {
    display: flex;
}

.navbar-mobile-menu .nav-item {
    padding: 12px 20px;
    display: block;
    border-bottom: 1px solid rgba(255, 215, 0, 0.1);
}

.navbar-mobile-menu .nav-item:hover {
    background-color: rgba(255, 215, 0, 0.05);
}

/* ============ RESPONSIVE STYLES ============ */

/* 768px 及以下 - 平板/手机优化 */
@media (max-width: 768px) {
    /* 显示三杠菜单按钮 */
    nav.top-navbar .navbar-menu-toggle {
        display: block !important;
    }
    
    nav.top-navbar {
        position: relative !important;
    }
    
    nav.top-navbar .navbar-container {
        flex-wrap: nowrap !important;
        padding: 10px 15px;
        align-items: center !important;
        display: flex !important;
    }
    
    /* Logo在最左边 */
    nav.top-navbar .brand-logo {
        font-size: 1.2rem;
        min-width: 130px;
        flex: 0 0 auto !important;
        order: 0 !important;
    }
    
    /* 语言+购物车+三杠 在右边 */
    nav.top-navbar .navbar-actions {
        display: flex !important;
        align-items: center !important;
        justify-content: flex-end;
        gap: 8px;
        margin-left: auto;
        order: 1 !important;
        flex: 0 0 auto !important;
    }
    
    /* 菜单下拉（隐藏，点击三杠显示） */
    nav.top-navbar .nav-links {
        display: none !important;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: linear-gradient(180deg, rgba(0,0,0,0.95) 0%, rgba(20,20,20,0.9) 100%);
        border-bottom: 2px solid rgba(255, 215, 0, 0.15);
        flex-direction: column;
        gap: 0;
        width: 100%;
        z-index: 999;
        order: 2 !important;
    }
    
    nav.top-navbar .nav-links.active {
        display: flex !important;
    }
    
    .nav-links .nav-item {
        padding: 12px 20px;
        border-bottom: 1px solid rgba(255, 215, 0, 0.1);
        text-align: left;
        width: 100%;
    }
    
    .nav-cart-btn {
        flex: 0 0 auto;
        padding: 4px 8px;
        font-size: 0.7rem;
        min-height: 28px;
    }
    
    .nav-cart-btn svg {
        width: 1rem;
        height: 1rem;
    }

    .cart-badge {
        width: 16px;
        height: 16px;
        font-size: 0.7rem;
        line-height: 16px;
    }
    
    .lang-toggle-btn,
    .lang-dropdown-btn {
        min-height: 28px;
        padding: 4px 10px;
        font-size: 0.7rem;
        border-width: 1px;
    }
    .nav-links {
        display: none !important;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: linear-gradient(180deg, rgba(0,0,0,0.95) 0%, rgba(20,20,20,0.9) 100%);
        border-bottom: 2px solid rgba(255, 215, 0, 0.15);
        flex-direction: column;
        gap: 0;
        width: 100%;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        z-index: 999;
        order: 3;
    }
    
    .nav-links.active {
        display: flex !important;
        max-height: 500px;
    }
    
    .nav-links .nav-item {
        padding: 12px 20px;
        border-bottom: 1px solid rgba(255, 215, 0, 0.1);
        text-align: left;
        width: 100%;
    }
    
    .nav-icons {
        margin-left: 0;
        padding: 0;
        gap: 0;
    }
}

/* 600px 及以下 - 小屏手机优化 */
@media (max-width: 600px) {
    nav.top-navbar .navbar-container {
        padding: 8px 12px;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
    }
    
    /* [MODIFIED] Logo保持显示，字体稍小 */
    nav.top-navbar .brand-logo {
        font-size: 0.95rem;
        min-width: auto;
        gap: 6px;
        flex: 0 0 auto !important;
        order: 0 !important;
    }
    
    nav.top-navbar .brand-logo-text {
        display: inline !important;
        font-size: 0.95rem;
    }
    
    nav.top-navbar .brand-logo-img {
        width: 2rem !important;
        height: 2rem !important;
    }
    
    nav.top-navbar .brand-logo svg {
        width: 1.4rem !important;
        height: 1.4rem !important;
        fill: #D40000 !important;
    }
    
    nav.top-navbar .brand-logo .icon-fire {
        width: 1.4rem !important;
        height: 1.4rem !important;
        fill: #D40000 !important;
    }
    
    /* [MODIFIED] 右侧元素组：语言 + 购物车 + 菜单按钮 */
    nav.top-navbar .navbar-actions {
        display: flex !important;
        align-items: center !important;
        justify-content: flex-end;
        gap: 12px;
        margin-left: auto;
        flex: 0 0 auto !important;
    }
    
    /* [MODIFIED] 菜单按钮在navbar-actions内部，自然排在最后 */
    nav.top-navbar .navbar-menu-toggle {
        flex: 0 0 auto !important;
        font-size: 1.4rem;
        margin-left: 4px;
    }
    
    .nav-icons {
        margin-left: 0;
        padding: 0;
        gap: 0;
    }
    
    .nav-cart-btn {
        padding: 4px 8px;
        font-size: 0.75rem;
        white-space: nowrap;
        min-height: 28px;
    }
    
    .nav-cart-btn svg {
        width: 1.1rem;
        height: 1.1rem;
    }
    
    .cart-badge {
        width: 14px;
        height: 14px;
        font-size: 0.6rem;
        line-height: 14px;
    }

    .lang-toggle-btn,
    .lang-dropdown-btn {
        padding: 4px 8px;
        font-size: 0.75rem;
        min-height: 28px;
        border-width: 1px;
    }
}

/* 480px 及以下 - 超小屏优化 */
@media (max-width: 480px) {
    nav.top-navbar {
        padding: 8px 0 !important;
    }
    
    nav.top-navbar .navbar-container {
        padding: 6px 10px;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
    }
    
    /* [MODIFIED] Logo保持显示 */
    nav.top-navbar .brand-logo {
        font-size: 0.85rem;
        min-width: auto;
        flex: 0 0 auto !important;
        order: 0 !important;
        gap: 5px;
    }
    
    nav.top-navbar .brand-logo-text {
        display: inline !important;
        font-size: 0.85rem;
    }
    
    nav.top-navbar .brand-logo-img {
        width: 1.8rem !important;
        height: 1.8rem !important;
    }
    
    nav.top-navbar .brand-logo svg {
        width: 1.2rem !important;
        height: 1.2rem !important;
        fill: #D40000 !important;
    }
    
    nav.top-navbar .brand-logo .icon-fire {
        width: 1.2rem !important;
        height: 1.2rem !important;
        fill: #D40000 !important;
    }
    
    /* [MODIFIED] 菜单按钮在navbar-actions内部 */
    nav.top-navbar .navbar-menu-toggle {
        flex: 0 0 auto !important;
        font-size: 1.3rem;
        margin-left: 4px;
        padding: 4px;
    }
    
    nav.top-navbar .navbar-actions {
        display: flex !important;
        align-items: center !important;
        justify-content: flex-end;
        gap: 8px;
        margin-left: auto;
        flex: 0 0 auto !important;
    }
    
    .nav-links {
        display: none !important;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        width: 100%;
        margin-top: 0;
    }
    
    .nav-links.active {
        display: flex !important;
        flex-direction: column;
    }
    
    .nav-links .nav-item {
        padding: 10px 15px;
        font-size: 0.85rem;
        border-bottom: 1px solid rgba(255, 215, 0, 0.1);
    }
    
    .nav-cart-btn {
        padding: 4px 6px;
        font-size: 0.7rem;
        min-height: 24px;
    }
    
    .nav-cart-btn svg {
        width: 1rem;
        height: 1rem;
    }
    
    .cart-badge {
        width: 14px;
        height: 14px;
        font-size: 0.55rem;
        line-height: 14px;
    }

    .lang-toggle-btn,
    .lang-dropdown-btn {
        padding: 4px 6px;
        font-size: 0.7rem;
        min-height: 24px;
        border-width: 1px;
    }
    
    nav.top-navbar .navbar-actions {
        display: flex !important;
        align-items: center !important;
        justify-content: flex-end;
        gap: 6px;
        margin-left: auto;
        flex: 0 0 auto !important;
    }
    
    .nav-icons {
        margin-left: 0;
        padding: 0;
        gap: 0;
    }
}
