/* PC端下拉菜单样式 */
.nav-item {
    position: relative;
    font-size: 16px;
    cursor: pointer;
}

.nav-item .submenu {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    min-width: 180px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    z-index: 100;
}

.nav-item .submenu::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 0;
    width: 100%;
    height: 10px;
    background: transparent;
}

.submenu a {
    display: block;
    padding: 12px 20px;
    color: #333;
    font-size: 14px;
    text-decoration: none;
    text-align: center;
}

.nav-toggle{display: none;}

/* PC端鼠标悬停显示 */
@media screen and (min-width: 783px) {
    .nav-item:hover .submenu {
        display: block;
    }
    
    .submenu a:hover {
        background: #f5f5f5;
        color: #285bd0;
    }
}

/* 移动端样式 */
@media screen and (max-width: 782px) {
    .container {
        max-width: 7.5rem;
    }
    
    /* 移动端logo图片尺寸 */
    .logo-img {
        max-height: 30px;
    }

    .nav-menu {
        gap: 0.4rem;
    }

    .nav-item {
        position: relative;
        width: 100%;
        padding: 15px 30px 15px 0;
        font-size: 16px;
    }

    /* 修改移动端下划线样式 */
    .nav-item::after {
        width: 0;
        left: 0;
        transform: none;
    }

    .nav-item:hover::after,
    .nav-item.active::after {
        width: 30px;
    }

    /* 移动端额外功能样式 */
    .mobile-extra {
        display: block;
        width: 100%;
        margin-top: 0.4rem;
        padding-top: 0.4rem;
        border-top: 1px solid #eee;
    }

    .mobile-extra .lang-switch {
        margin-bottom: 0.3rem;
    }

    .mobile-search {
        width: 100%;
        display: flex;
        gap: 10px;
    }

    .mobile-search .search-input {
        flex: 1;
        height: 40px;
        padding: 0 15px;
        border: 1px solid #ddd;
        border-radius: 4px;
        font-size: 14px;
        outline: none;
    }

    .mobile-search .search-input:focus {
        border-color: #285bd0;
    }

    .mobile-search .search-btn {
        width: 80px;
        height: 40px;
        background: #285bd0;
        color: #fff;
        border: none;
        border-radius: 4px;
        cursor: pointer;
        font-size: 14px;
    }

    /* 移动端菜单式调整 */
    .webtop-center {
        padding: 0;
        height: 100vh;
        overflow-y: auto;
    }

    .nav-menu {
        width: 100%;
        padding: 20px;
        box-sizing: border-box;
        max-height: 100vh;
        overflow-y: auto;
        justify-content: flex-start;
    }

    /* 优化滚动条样式 */
    .nav-menu::-webkit-scrollbar {
        width: 4px;
    }

    .nav-menu::-webkit-scrollbar-track {
        background: #f1f1f1;
    }

    .nav-menu::-webkit-scrollbar-thumb {
        background: #888;
        border-radius: 2px;
    }

    .nav-menu::-webkit-scrollbar-thumb:hover {
        background: #555;
    }

    /* 移动端banner样式 */
    .banner .swiper-slide {
        /* height: 350px; */
        height: auto;
        overflow: hidden;
    }

    .banner .swiper-slide img {
        width: 100%;
        /* height: 350px; */
        height: auto;
        display: block;
        object-fit: cover;
        object-position: center;
    }

    /* 修改产品列表布局 */
    .product-list {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 15px;
    }

    .product-item {
        flex: none;
        width: calc(50% - 7.5px);
        padding-bottom: 69%;
        margin: 0;
        border-radius: 10px;
    }

    /* 修改移动端标题字体大小 */
    .item-title {
        font-size: 16px;
    }

    /* 移除移动端hover效果 */
    .product-item:hover .product-title-box {
        height: 20%;
        background-color: #285bd0;
    }

    .product-item:hover .item-title {
        font-size: 16px;
        top: 50%;
    }

    .product-item:hover .item-desc,
    .product-item:hover .item-more {
        display: none;
        opacity: 0;
    }

    /* 移除product-inner的内边距 */
    .product-inner {
        padding: 0;
    }

    /* 修改新闻信息区域内边距 */
    .news-info {
        padding: 15px;
    }

    /* 移动端下拉菜单样式 */
    .nav-item .submenu {
        position: static;
        transform: none;
        box-shadow: none;
        width: 100%;
        /* background: #f5f5f5; */
        margin-top: 20px;
    }

    .submenu a {
        padding: 12px 30px;
        text-align: left;
        border-bottom:1px solid #f6f6f6;
    }

    /* 移动端禁用hover下划线效果 */
    .nav-item:hover::after {
        width: 0;
    }

    /* 添加展开/收起标识 */
    .nav-item {
        position: relative;
        width: 100%;
        padding: 15px 30px 15px 0;
        font-size: 16px;
    }

    /* 有子菜单的导航项添加加号 */
    .nav-item:has(.submenu)::after {
        display: none;
    }

    /* 子菜单展开时改变符号 */
    .nav-item:has(.submenu.show) .nav-toggle {
        content: '-';
    }

    /* 显示切换符号 */
    .nav-toggle {
        display: block;
        position: absolute;
        right: 0;
        top: 15px;
        font-size: 20px;
        color: #333;
        transition: all 0.3s ease;
    }
}

@media screen and (max-width: 480px) {
    .webfoot-right {
        display: none;
    }
} 