*{
    padding: 0;
    margin: 0;
    text-decoration: none;
    list-style-type: none;
    box-sizing: border-box; 
}

html {
    font-size: 16px;
}

.header {
    background-color: white;
    z-index: 10;
    transition: all 0.3s ease;
    width: 100%;
}

#img-zuishang {
    top: 0;
    position: fixed;
    width: 100%;
    height: 11.25rem; 
    object-fit: cover;
    z-index: 2;
}

.nav {
    top: 9.625rem; 
    display: flex;
    justify-content: space-between; 
    align-items: center;
    width: 100%;
    position: fixed;
    background-color: #55efc3;
    padding: 0.625rem; 
    z-index: 2;
    box-shadow: 0 0 3.125rem 0 rgba(7, 76, 76, 0.6);
}

.logo {
    width: 8.125rem;
    max-width: 100%;
    height: auto;
}

.logo:hover {
    transition: all 0.3s ease;
    transform: scale(1.1);
}

.search {
    position: relative;
    flex-grow: 1;
    max-width: 18.75rem;
    margin: 0 1rem;
}

.search input {
    width: 100%;
    height: 1.875rem; 
    padding-left: 0.625rem;
    font-size: 0.875rem;
    border: 0.125rem solid #e3f6f6;
    border-radius: 0.3125rem; 
}

.search img {
    position: absolute;
    top: 50%;
    right: 0.625rem;
    transform: translateY(-50%);
    width: 1.375rem; 
    height: 1.375rem;
    cursor: pointer;
}

.login {
    font-size: 1.125rem;
    background-color: #74b9ff;
    padding: 0.5rem 0.625rem; 
    margin-left: 1rem;
    border: 0.125rem solid #f1f9f8;
    border-radius: 0.3125rem;
    box-shadow: 0 0 0.3125rem rgba(55, 55, 55, 0.3);
    transition: all 0.3s ease;
    white-space: nowrap; /* 防止文字换行 */
}

.login a {
    color: #005a48;
    font-weight: bold;
}

.login:hover {
    background-color: #a29bfe;
    box-shadow: 0 0 0.625rem rgba(28, 28, 28, 0.5); 
    transform: scale(1.1);
}

.nav-menu {
    display: flex;
    align-items: center;
    flex-grow: 1;
    justify-content: center;
}

.nav ul {
    list-style-type: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap; /* 允许菜单项换行 */
    justify-content: center;
}

.nav li {
    font-size: 1.375rem;
    font-weight: bold;
    margin: 0 0.625rem;
}

.nav li a {
    text-decoration: none;
    color: #005a48;
    padding: 0.3125rem 0.625rem; 
    transition: all 0.3s ease;
    display: inline-block;
}

.nav li a:hover {
    background-color: #74b9ff;
    color: #fdfdfd;
    border-radius: 0.3125rem;
    box-shadow: 0 0 0.625rem rgba(0, 0, 0, 0.3);
}

#product {
    display: none;
    position: absolute;
    background-color: #55efc3db;
    padding: 0.625rem;
    border-radius: 0.3125rem;
    z-index: 1;
    width: auto;
    min-width: 10rem; 
}

#product li {
    margin: 0.625rem 0;
}

iframe {
    height: calc(100vh ); 
    width: 100%;
}


@media (max-width: 1024px) {
    .nav {
        overflow-x: auto; /* 允许水平滚动 */
        white-space: nowrap; /* 禁止换行 */
        scrollbar-width: none; /* 隐藏滚动条 */
        -webkit-overflow-scrolling: touch; /* iOS平滑滚动 */
    }
    
    .nav::-webkit-scrollbar {
        display: none; /* 隐藏滚动条 */
    }
    
    .nav ul {
        display: inline-flex; /* 内联弹性布局 */
        flex-wrap: nowrap; /* 禁止换行 */
        padding-right: 20px; /* 右侧留白 */
    }
    
    .nav li {
        flex-shrink: 0; /* 禁止项目缩小 */
    }
}


@media (min-width: 769px) and (max-width: 1024px) {
    .nav li {
        font-size: 1.125rem;
        margin: 0 0.5rem;
    }
}
