/* 全局样式 */
:root {
    --primary: #29a7e2;
    --secondary: #ff6b35;
    --dark: #2c3e50;
    --light: #f8f9fa;
    --gray: #6c757d;
    --white: #ffffff;
    --shadow: 0 4px 12px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Microsoft YaHei', 'Segoe UI', sans-serif;
    color: #333;
    background-color: var(--light);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    position: relative;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* ====================== 电脑端导航 ====================== */
.desktop-navbar {
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    height: 120px; /* 增加高度至140px */
    border-top: 4px solid var(--primary);
    position: relative;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.desktop-navbar-brand {
    padding: 15px 0;
    flex: 0 0 auto;
}

.desktop-navbar-brand img {
   
    max-width: 100%;
    display: block;
    transition: var(--transition);
}

.desktop-navbar-brand:hover img {
    transform: scale(1.05);
}

.desktop-navbar-nav {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    width: auto;
    position: absolute;
    left: 50%;
    transform: translateX(-50%); /* 导航居中 */
}

.desktop-nav-item {
    margin: 0 15px;
    position: relative;
}

.desktop-nav-link {
    display: flex;
    flex-direction: column;
    padding: 30px 25px; /* 增加垂直内边距以适应新高度 */
    color: var(--dark) !important;
    text-decoration: none;
    transition: var(--transition);
    font-size: 18px;
    font-weight: 600;
    position: relative;
    height: 100%;
    align-items: center;
    justify-content: center;
}

.desktop-nav-link span {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 3px;
}

.desktop-nav-link em {
    font-size: 14px;
    color: var(--gray);
    font-style: normal;
}

.desktop-nav-link:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 4px;
    background: var(--primary);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.desktop-nav-link:hover {
    color: var(--primary) !important;
}

.desktop-nav-link:hover:after {
    width: 100%;
}

.desktop-nav-item.active .desktop-nav-link {
    color: var(--primary) !important;
    background: rgba(41, 167, 226, 0.1);
}

.desktop-nav-item.active .desktop-nav-link:after {
    width: 100%;
}

/* 导航栏右侧联系电话 - 桌面端显示 */
.desktop-nav-contact {
    display: flex;
    align-items: center;
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
    transition: var(--transition);
    background: rgba(41, 167, 226, 0.1);
    padding: 10px 20px;
    border-radius: 30px;
    position: static;
    transform: none;
    margin-right: 0;
    margin-left: auto;
    z-index: 1001;
}

.desktop-nav-contact:hover {
    color: var(--white);
    background: var(--primary);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(41, 167, 226, 0.3);
}

.desktop-nav-contact i {
    margin-right: 10px;
    font-size: 24px;
}

/* ====================== 手机端导航 ====================== */
.mobile-navbar {
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    height: 80px;
    border-top: 4px solid var(--primary);
    position: relative;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    display: none; /* 默认隐藏，手机端显示 */
}

.mobile-navbar-brand {
    padding: 15px 0;
}

.mobile-navbar-brand img {
    height: 60px;
    max-width: 100%;
    display: block;
    transition: var(--transition);
}

.mobile-navbar-brand:hover img {
    transform: scale(1.05);
}

/* 汉堡菜单按钮 */
.mobile-navbar-toggler {
    border: none;
    background: transparent;
    padding: 12px;
    font-size: 24px;
    z-index: 1001;
    color: var(--dark);
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    transition: var(--transition);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.mobile-navbar-toggler:hover {
    background: rgba(41, 167, 226, 0.1);
    transform: scale(1.05);
}

/* 导航菜单容器 */
.mobile-navbar-collapse {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: #2c3e50;
    z-index: 1100;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    transition: right 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    overflow-y: auto;
    padding: 80px 0 0;
}

.mobile-navbar-collapse.show {
    right: 0;
}

/* 关闭按钮 */
.close-menu-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1101;
}

.close-menu-btn:hover {
    background: rgba(255,255,255,0.2);
    transform: rotate(90deg);
}

.close-menu-btn i {
    color: white;
    font-size: 24px;
}

/* 导航菜单项 */
.mobile-navbar-nav {
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
}

.mobile-nav-item {
    width: 100%;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.mobile-nav-link {
    display: flex;
    flex-direction: column;
    padding: 15px 20px;
    color: white !important;
    text-decoration: none;
    transition: var(--transition);
    font-size: 16px;
}

.mobile-nav-link span {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 3px;
}

.mobile-nav-link em {
    font-size: 14px;
    color: rgba(255,255,255,0.7);
}

.mobile-nav-link:hover {
    background: rgba(41, 167, 226, 0.3);
}

/* 遮罩层 */
.navbar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1099;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.navbar-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* 手机端底部联系电话 */
.mobile-nav-contact {
    display: block;
    text-align: center;
    padding: 15px;
    background: var(--primary);
    color: white;
    font-weight: 700;
    border-top: 1px solid rgba(255,255,255,0.2);
    margin-top: 20px;
}

.mobile-nav-contact i {
    margin-right: 10px;
    color: white;
}

/* 滚动锁定 */
body.menu-open {
    overflow: hidden;
}

/* ====================== 响应式控制 ====================== */
@media (min-width: 992px) {
    /* 电脑端显示桌面导航，隐藏手机导航 */
    .desktop-navbar {
        display: flex;
    }
    .mobile-navbar {
        display: none;
    }
}

@media (max-width: 991px) {
    /* 手机端显示手机导航，隐藏桌面导航 */
    .desktop-navbar {
        display: none;
    }
    .mobile-navbar {
        display: flex;
    }
    
    /* 其他响应式样式 */
    .product-container {
        flex-direction: column;
    }
    
    .product-left {
        flex: 0 0 auto;
        display: none; /* 手机端隐藏左侧区域 */
    }
    
    .footer-menu {
        flex-direction: column;
        gap: 20px;
    }
}

/* ====================== 通用样式 ====================== */
/* 轮播图优化 - 全宽自适应 */
.slider-container {
    width: 100%;
    position: relative;
    overflow: hidden;
    margin: 0 auto 30px;
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.slider-wrapper {
    width: 100%;
    height: 450px;
    position: relative;
    display: flex;
    transition: transform 0.5s ease;
}

.slider-wrapper div {
    min-width: 100%;
    height: 100%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-wrapper div img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.slider-switcher {
    position: absolute;
    bottom: 30px;
    left: 0;
    right: 0;
    text-align: center;
    z-index: 10;
}

.slider-switcher a {
    display: inline-block;
    width: 14px;
    height: 14px;
    background: rgba(255,255,255,0.5);
    border-radius: 50%;
    margin: 0 8px;
    cursor: pointer;
    transition: var(--transition);
}

.slider-switcher a.cur, .slider-switcher a:hover {
    background: var(--secondary);
    transform: scale(1.3);
}

/* 产品目录标题美化 */
.home-title {
    text-align: center;
    padding: 30px 0;
    margin-bottom: 30px;
    background: linear-gradient(to right, var(--light), #e9ecef);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    position: relative;
    overflow: hidden;
}

.home-title h2 {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 10px;
    position: relative;
    z-index: 2;
}

.home-title em {
    display: block;
    font-size: 1.1rem;
    color: var(--gray);
    font-style: normal;
    position: relative;
    z-index: 2;
}

.home-title:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect width="100" height="100" fill="none" stroke="%2329a7e2" stroke-width="1" stroke-dasharray="5,5"/></svg>');
    opacity: 0.1;
    z-index: 1;
}

/* 产品分类标签样式 */
.product-category-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.product-category-tabs a {
    display: inline-block;
    padding: 10px 25px;
    background: var(--white);
    color: var(--dark);
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: var(--shadow);
    border: 2px solid transparent;
}

.product-category-tabs a:hover,
.product-category-tabs a.active {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(41, 167, 226, 0.4);
    border-color: var(--primary);
}

/* 产品目录布局 */
#product-section {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 50px;
}

.product-container {
    display: flex;
    width: 100%;
    gap: 30px;
}

.product-left {
    flex: 0 0 300px;
}

.product-right {
    flex: 1;
}

/* 热销产品排行榜样式 */
.side-panel {
    background: var(--white);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 20px;
    margin-bottom: 30px;
    position: relative;
}

.side-panel h4.hot {
    font-size: 1.5rem;
    color: var(--secondary);
    border-bottom: 2px solid var(--secondary);
    padding-bottom: 10px;
    margin-bottom: 15px;
    text-align: center;
}

/* 热销排行榜悬停效果 */
.rank-item {
    position: relative;
    transition: all 0.3s ease;
    z-index: 1;
}

.rank-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.rank-item {
    position: relative;
    padding: 12px 15px;
    background: var(--light);
    border-radius: 6px;
    transition: var(--transition);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 15px;
}

.rank-item:hover {
    background: rgba(41, 167, 226, 0.1);
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    z-index: 100;
}

.rank-item b {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    font-weight: bold;
    font-size: 16px;
    flex-shrink: 0;
}

.rank-item h1 {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    color: var(--dark);
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-detail {
    display: none;
    position: absolute;
    left: 0;
    top: 100%;
    width: 100%;
    background: var(--white);
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
    z-index: 1000;
    transition: var(--transition);
    opacity: 0;
    transform: translateY(10px);
}

.rank-item:hover .rank-detail,
.rank-item.active .rank-detail {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.rank-detail img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 10px;
}

.rank-detail p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
}

.rank-detail p a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

.rank-detail p a:hover {
    text-decoration: underline;
}

/* 产品列表样式 */
.product-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
}

.product-item-box {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    background: var(--white);
}

.product-item-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

.product-item {
    position: relative;
}

.product-item .action {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(41, 167, 226, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
    z-index: 2;
}

.product-item-box:hover .action {
    opacity: 1;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    background: var(--white);
    color: var(--primary);
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.action-btn:hover {
    background: var(--secondary);
    color: white;
}

.action-btn span.icon {
    margin-right: 8px;
    font-size: 18px;
}

.product-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    transition: var(--transition);
}

.product-item-box:hover .product-img {
    transform: scale(1.05);
}

.product-item p {
    padding: 15px;
    margin: 0;
    text-align: center;
}

.product-item p a {
    color: var(--dark);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
}

.product-item p a:hover {
    color: var(--primary);
}

/* 返回顶部按钮样式 */
.back-to-top {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.back-to-top:hover {
    background-color: var(--secondary);
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.3);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

/* 客服咨询工具样式 */
.service-widget {
    position: fixed;
    right: 30px;
    bottom: 160px;
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.service-item {
    position: relative;
    width: 50px;
    height: 50px;
    background-color: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.service-item:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 15px rgba(0,0,0,0.3);
}

#service-phone {
    background-color: #28a745;
}

#service-wechat {
    background-color: #1e862a;
}

.service-panel {
    position: absolute;
    right: 60px;
    bottom: 0;
    width: 200px;
    background: white;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    transform: translateX(10px);
}

.service-item:hover .service-panel {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.service-panel h4 {
    margin-top: 0;
    color: var(--dark);
    font-size: 16px;
    border-bottom: 2px solid var(--primary);
    padding-bottom: 8px;
}

.service-panel img {
    max-width: 100%;
    margin: 10px 0;
    border-radius: 4px;
}

.service-panel p {
    font-size: 12px;
    color: var(--gray);
    margin-bottom: 0;
}

.phone {
    display: block;
    color: var(--primary);
    font-weight: bold;
    text-decoration: none;
    margin: 5px 0;
}

/* ====================== 网站底部样式优化 ====================== */
.site-footer {
    background: var(--dark);
    color: var(--light);
    padding: 40px 0 20px;
    margin-top: 50px;
    border-top: 4px solid var(--primary);
}

.footer-menu {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 30px;
}

.footer-menu h5 {
    color: var(--white);
    font-size: 1.3rem; /* 增大字体 */
    margin-bottom: 15px;
    font-weight: 600;
    padding-bottom: 8px;
    display: inline-block;
    cursor: pointer;
    position: relative;
    padding-right: 25px;
    width: 100%;
    border-bottom: 2px solid var(--primary);
    transition: all 0.3s ease;
}

.footer-menu h5:after {
    content: '\f107';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    transition: transform 0.3s ease;
}

.footer-menu h5.collapsed:after {
    content: '\f106';
    transform: translateY(-50%) rotate(180deg); /* 添加旋转动画效果 */
}

.footer-menu h5 a {
    color: var(--white);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-menu h5:hover a {
    color: var(--primary);
}

.footer-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
    transition: all 0.3s ease;
    max-height: 300px;
    overflow: hidden;
}

.footer-menu ul.collapse:not(.show) {
    display: none;
}

.footer-menu ul li {
    margin-bottom: 15px; /* 增加间距 */
    color: rgba(255,255,255,0.8);
    transition: all 0.3s ease;
    padding-left: 15px; /* 增加左侧内边距 */
    border-left: 2px solid transparent;
    position: relative;
}

.footer-menu ul li:before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    background: var(--primary);
    border-radius: 50%;
    opacity: 0.5;
    transition: var(--transition);
}

.footer-menu ul li:hover {
    border-left: 2px solid var(--primary);
    padding-left: 20px; /* 悬停时增加内边距 */
}

.footer-menu ul li:hover:before {
    opacity: 1;
    transform: translateY(-50%) scale(1.2);
}

.footer-menu ul li a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: var(--transition);
    display: block;
    padding: 5px 0; /* 增加垂直内边距 */
    font-size: 1.05rem; /* 增大字体 */
}

.footer-menu ul li a:hover {
    color: var(--primary);
    padding-left: 5px;
}

.site-copyright {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.6);
    font-size: 0.9rem;
    line-height: 1.6;
}

.site-copyright a {
    color: var(--primary);
    text-decoration: none;
}

.site-copyright a:hover {
    text-decoration: underline;
}

/* 手机端拨号按钮优化 */
.mobile-call-btn {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 50px;
    background: var(--primary);
    color: white;
    border-radius: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    z-index: 998;
    text-decoration: none;
    transition: var(--transition);
}

.mobile-call-btn:hover {
    background: var(--secondary);
    transform: translateX(-50%) scale(1.05);
}

.mobile-call-btn i {
    margin-right: 10px;
    font-size: 20px;
}

/* 响应式调整 - 手机端优化 */
@media (max-width: 767px) {
    /* 手机端Logo缩小 */
    .mobile-navbar-brand img {
        height: 60px;
    }
    
    /* 轮播图高度减小 */
    .slider-wrapper {
        height: 300px;
    }
    
    /* 热销产品排行榜在手机端隐藏 */
    #hot-products {
        display: none;
    }
    
    /* 产品分类标签在手机端优化 */
    .product-category-tabs {
        gap: 10px;
        padding: 0 15px;
    }
    
    .product-category-tabs a {
        padding: 8px 15px;
        font-size: 14px;
    }
    
    /* 客服工具响应式调整 */
    .service-widget {
        bottom: 90px;
        right: 15px;
    }
    
    .back-to-top {
        bottom: 210px;
        right: 15px;
        width: 45px;
        height: 45px;
    }
    
    .service-item {
        width: 45px;
        height: 45px;
    }
    
    .service-panel {
        width: 180px;
        padding: 12px;
    }
    
    /* 手机端底部折叠菜单样式 */
    .footer-menu h5 {
        width: 100%;
        padding-right: 25px;
    }
    
    .footer-menu h5:after {
        display: block;
    }
    
    .footer-menu ul {
        margin-bottom: 15px;
    }
    
    /* 手机端热销排行榜样式调整 */
    .rank-item {
        position: relative;
    }
    
    .rank-detail {
        position: relative;
        display: none;
        opacity: 1;
        height: auto;
        box-shadow: none;
        transform: none;
        margin-top: 10px;
        padding: 15px;
        top: auto;
        left: auto;
        width: 100%;
    }
    
    .rank-item.active .rank-detail {
        display: block;
    }
}

/* 空白区域 */
.blank {
    height: 30px;
    clear: both;
}