/* 头部样式 - Header */

.header {
    width: 100%;
    height: 94px;
    background: linear-gradient(180deg, rgba(255,255,255,0.55) 0%, rgba(255,255,255,0.75) 50%, rgba(255,255,255,0.95) 100%);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    overflow: visible !important;
}

.header__content {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 94px;
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 63px;
    box-sizing: border-box;
    overflow: visible !important;
    position: relative;
}

.header__left {
    position: absolute;
    left: 63px;
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

.header__logo {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 24px;
    font-weight: 400;
    color: #333333;
    text-decoration: none;
    outline: none;
}

.header__logo:hover {
    color: #66CC33;
}

.header__logo:focus {
    outline: none;
}

.header__logo-img {
    height: 40px;
}

.header__nav {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    height: 110px;
    overflow: visible !important;
    column-gap: 20px;
}

.header__nav-left {
    justify-self: end;
    display: flex;
    align-items: center;
    gap: 48px;
    white-space: nowrap;
}

.header__nav-right {
    justify-self: start;
    display: flex;
    align-items: center;
    gap: 48px;
    white-space: nowrap;
}

.header__nav-left .header__nav-link,
.header__nav-right .header__nav-link {
    align-self: center;
}

.header__right {
    position: absolute;
    right: 63px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.header__nav-link {
    font-family: 'Noto Sans SC', 'Source Han Sans SC', sans-serif;
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
    letter-spacing: 0.06em;
    color: #2A9011;
    text-decoration: none;
    transition: color 0.3s ease;
    padding: 8px 0;
    position: relative;
    outline: none;
}

.header__nav-link:hover {
    color: #DDAC4A;
}

.header__nav-link:focus {
    outline: none;
}

.header__nav-link--active {
    color: #DDAC4A;
}

/* 导航栏枝冠Logo - 优雅半圆设计 */
.header__nav-dropdown {
    justify-self: center;
    display: flex;
    align-items: flex-start;
    z-index: 1;
}

.header__nav-link--logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100px;
    height: 110px;
    padding: 0;
    background: #3D9E42;
    border-radius: 0 0 50px 50px;
    position: relative;
    z-index: 1002;
    box-shadow: 0 4px 16px rgba(61,158,66,0.25);
    transition: all 0.3s ease;
}

.header__nav-link--logo:hover {
    transform: translateY(4px);
    box-shadow: 0 6px 20px rgba(61,158,66,0.35);
}

.header__nav-link--logo img {
    height: 40px;
    width: auto;
    filter: brightness(0) invert(1);
    opacity: 1;
}

/* 产品下拉面板 - 怡颗莓风格 */

.dropdown-menu {
    position: absolute;
    top: 94px;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    width: 480px;
    background: #FFFFFF;
    box-shadow: 0 12px 40px rgba(0,0,0,0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 80px;
    padding: 24px 40px 36px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s cubic-bezier(0.25, 0.1, 0.25, 1), opacity 0.5s ease, visibility 0s 0.5s;
    z-index: 998;
    pointer-events: none;
    border-radius: 0 0 16px 16px;
}

.header__nav-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
    transition: all 0.5s cubic-bezier(0.25, 0.1, 0.25, 1), opacity 0.5s ease, visibility 0s 0s;
    pointer-events: auto;
}

/* 产品卡片 */
.product-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
    opacity: 0;
    transform: translateY(15px);
}

.header__nav-dropdown:hover .product-card {
    opacity: 1;
    transform: translateY(0);
}

.header__nav-dropdown:hover .product-card:first-child {
    transition-delay: 0.08s;
}

.header__nav-dropdown:hover .product-card:last-child {
    transition-delay: 0.18s;
}

.product-card:hover {
    transform: translateY(-6px) !important;
}

.product-card__image {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    transition: box-shadow 0.3s ease;
    border: 3px solid #F5F5F5;
}

.product-card:hover .product-card__image {
    box-shadow: 0 10px 30px rgba(61,158,66,0.2);
}

.product-card__label {
    margin-top: 12px;
    padding: 6px 20px;
    background: #3D9E42;
    color: #FFFFFF;
    font-size: 12px;
    font-weight: 600;
    border-radius: 16px;
    letter-spacing: 1.5px;
    transition: all 0.3s ease;
}

.product-card:hover .product-card__label {
    background: #2D7A32;
}



/* Language Switcher */
.lang-switch {
    display: flex;
    gap: 4px;
    align-items: center;
    font-family: 'Noto Sans SC', 'Source Han Sans SC', sans-serif;
}

.lang-switch--mobile {
    display: none;
}

.lang-switch__btn {
    padding: 4px 8px;
    border: 1px solid transparent;
    background: transparent;
    color: #666666;
    cursor: pointer;
    font-family: 'Noto Sans SC', 'Source Han Sans SC', sans-serif;
    font-size: 12px;
    font-weight: 400;
    line-height: 17px;
    letter-spacing: 0.06em;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.lang-switch__btn:hover,
.lang-switch__btn.active {
    background-color: #66CC33;
    color: white;
    border-color: #66CC33;
    font-weight: 500;
}

.lang-switch__divider {
    color: #CCCCCC;
    font-size: 12px;
    line-height: 17px;
    letter-spacing: 0.06em;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 10px;
    background: none;
    border: none;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: #2A9011;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: rgba(102, 204, 51, 0.9);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 24px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.back-to-top:hover {
    background-color: rgba(102, 204, 51, 1);
    transform: translateY(-3px);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .header__content {
        padding: 0 20px;
    }

    .header__nav {
        gap: 32px;
    }
}

/* Hide mobile nav inner on desktop */
.header__nav-inner {
    display: none;
}

/* ========== Mobile Navigation Overlay ========== */
@media (max-width: 768px) {
    .header { height: 60px; }
    .header__content { height: 60px; padding: 0 16px; justify-content: flex-end; }
    .header__left { position: absolute; left: 16px; z-index: 2001; }
    .header__logo img { height: 32px !important; }

    /* Show mobile inner, hide desktop nav items (direct children only) */
    .header__nav-inner { display: flex; }
    .header__nav > .header__nav-left,
    .header__nav > .header__nav-right,
    .header__nav > .header__nav-dropdown { display: none !important; }

    .header__nav {
        position: fixed;
        top: 0; left: 0; right: 0;
        width: 100%; height: 100vh;
        background: rgba(0, 0, 0, 0.55);
        flex-direction: row;
        justify-content: flex-end;
        padding: 0;
        transform: translateX(100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 2000;
        display: flex;
    }

    .header__nav.open {
        transform: translateX(0);
        opacity: 1;
        visibility: visible;
    }

    .header__nav-inner {
        width: 280px;
        height: 100%;
        background: #FFFFFF;
        padding: 56px 24px 32px;
        display: flex;
        flex-direction: column;
        gap: 6px;
        box-shadow: -4px 0 24px rgba(0, 0, 0, 0.12);
        overflow-y: auto;
        position: relative;
    }

    /* Close button */
    .header__nav-close {
        position: absolute;
        top: 14px; right: 14px;
        width: 30px; height: 30px;
        border-radius: 50%;
        border: none;
        background: #F0F0F0;
        color: #666;
        font-size: 15px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.2s ease;
    }
    .header__nav-close:hover { background: #E0E0E0; }

    /* Navigation links */
    .header__nav-left,
    .header__nav-right {
        display: flex;
        flex-direction: column;
        gap: 4px;
        justify-self: auto;
    }

    .header__nav-link {
        font-size: 16px;
        font-weight: 500;
        padding: 12px 16px;
        border-radius: 8px;
        color: #333;
        transition: all 0.2s ease;
    }
    .header__nav-link:hover { background: #F5F5F5; }
    .header__nav-link--active { color: #2E7D32; background: #E8F5E9; }

    /* Divider */
    .header__nav-divider {
        height: 1px;
        background: #EEEEEE;
        margin: 8px 0;
    }

    /* Product links inside mobile menu */
    .header__nav-products {
        display: flex;
        flex-direction: column;
        gap: 4px;
        padding: 0;
        align-items: center;
    }
    .header__nav-products-title {
        font-size: 12px;
        font-weight: 600;
        color: #999;
        text-transform: uppercase;
        letter-spacing: 1px;
        padding: 8px 16px 4px;
        text-align: center;
    }
    .header__nav-product-link {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 12px;
        padding: 10px 16px;
        border-radius: 8px;
        text-decoration: none;
        transition: all 0.2s ease;
    }
    .header__nav-product-link:hover { background: #F5F5F5; }
    .header__nav-product-link img {
        width: 32px;
        height: 32px;
        border-radius: 50%;
        object-fit: cover;
    }
    .header__nav-product-link span {
        font-size: 14px;
        font-weight: 500;
        color: #333;
    }

    /* Hide desktop elements */
    .lang-switch--desktop { display: none !important; }
    .lang-switch--mobile {
         display: flex;
         gap: 4px;
         align-items: center;
         position: fixed;
         bottom: 90px;
         right: 20px;
         background-color: white;
         padding: 8px 12px;
         box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
         border-radius: 8px;
         z-index: 1998;
     }
    .header__right { right: 0; }
    .mobile-menu-toggle {
        display: flex;
        position: absolute;
        right: 16px;
        z-index: 1001;
    }
    .header__logo span { display: none; }
}

@media (max-width: 480px) {
    .header__content { padding: 0 12px; }
    .header__nav-inner { width: 100%; padding: 72px 24px 32px; }
}
