:root {
    --primary-blue: #1975FF;
    --primary-orange: #FE8100;
    --primary-green: #33C759;
    --primary-red: #E83624;
    --white: #FFFFFF;
    --black: #333333;
    --gray: #999999;
    --light-gray: #F5F5F5;
    --light-blue: #f7faff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: var(--light-gray);
    color: var(--black);
    line-height: 1.6;
}

.container {
    max-width: 1170px;
    width: 100%;
    margin: 0 auto;
    padding: 0 15px;
    box-sizing: border-box;
}

/* 顶部信息栏样式 */
.top-bar {
    background-color: var(--white);
    padding: 8px 0;
    border-bottom: 1px solid var(--light-gray);
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 15px;
}

.top-right {
    display: flex;
    gap: 20px;
}

.top-link {
    color: var(--primary-green);
    text-decoration: none;
    transition: color 0.3s;
}

.top-link:hover {
    color: #2aa94a;  /* 稍深一点的绿色，用于悬浮效果 */
}

/* 头部区域样式 */
.main-header {
    background-color: var(--white);
    padding: 20px 0;
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 15px;
}

.search-box {
    flex: 1;
    max-width: 500px;
    margin: 0 40px;
    display: flex;
    gap: 10px;
}

.search-box input {
    flex: 1;
    padding: 10px;
    border: 2px solid var(--primary-blue);
    outline: none;
}

.search-box button {
    background: var(--primary-blue);
    color: var(--white);
    border: none;
    padding: 0 25px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
}

.search-box button:hover {
    background: #1560d1;
}

/* 导航栏样式 */
.main-nav {
    background-color: var(--primary-blue);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 10;
    margin-bottom: 10px;
}

.main-nav ul {
    display: flex;
    list-style: none;
}

.main-nav a {
    color: var(--white);
    text-decoration: none;
    padding: 15px 25px;
    display: block;
}

.main-nav a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .main-header .container {
        flex-direction: column;
        gap: 20px;
    }
    
    .search-box {
        margin: 20px 0;
        width: 100%;
    }
    
    .main-nav ul {
        flex-direction: column;
    }
}

/* 主要内容区域样式 */
main {
    padding-bottom: 10px;
}

.main-content {
    background-color: var(--white);
    border-radius: 8px;
    padding: 20px 20px 5px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    width: 1170px;
    margin: 0 auto;
}

/* 统计数字部样式 */
.stats-section {
    padding: 0 0 15px 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 15px;
}

.stat-card {
    text-align: center;
    padding: 10px 10px;
    background: var(--white);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-number {
    font-size: 1rem;
    font-weight: bold;
    color: var(--primary-red);
    margin-bottom: 8px;
    position: relative;
    display: inline-block;
}

.stat-number::after {
    content: "+";
    color: var(--primary-green);
    position: absolute;
    top: -5px;
    right: -10px;
    font-size: 1rem;
    font-weight: bold;
    display: none;
}

.stat-number span.counter {
    display: inline-block;
}

.stat-label {
    color: var(--black);
    font-size: 0.8rem;
    line-height: 1.3;
}

/* 只在非100%的数字上显示加号 */
.stat-card:not([data-value="100"]) .stat-number::after {
    display: block;
}

/* 服务卡片部分样式 */
.services-section {
    padding: 0 0 10px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.service-card {
    padding: 10px;
    background: var(--light-blue);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
}

.service-card h3 {
    color: var(--black);
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.service-card p {
    color: var(--gray);
    line-height: 1.6;
    font-size: 14px;
}

/* 响应式整 */
@media (max-width: 768px) {
    main .container {
        padding: 15px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-number {
        font-size: 0.9rem;
    }
    
    .stat-label {
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-number {
        font-size: 0.85rem;
    }
    
    .stat-label {
        font-size: 0.7rem;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
}

/* 联系信息样式 */
.contact-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.phone, .email {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-orange);
    font-size: 1.2rem;
    font-weight: bold;
}

.phone i, .email i {
    color: var(--primary-orange);
    font-size: 1.3rem;
    width: 20px;
    text-align: center;
    line-height: 1;
}

@media (max-width: 768px) {
    .main-header .container {
        flex-direction: column;
        gap: 20px;
    }
    
    .contact-info {
        flex-direction: row;
        justify-content: center;
        gap: 20px;
    }
    
    .search-box {
        margin: 20px 0;
        width: 100%;
    }
}

/* 内容块通用样式 */
.content-block {
    background-color: var(--white);
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin-top: 10px;
    max-width: 1170px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

/* 区块标题样式 */
.section-title {
    font-size: 1.5rem;
    color: var(--primary-blue);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--light-blue);
}

/* 区块标题链接样式 */
.section-title a {
    color: inherit;
    text-decoration: none;
    font-size: inherit;
    font-weight: inherit;
}

.section-title a:hover {
    color: var(--primary-blue);
    text-decoration: none;
}

/* 底部信息样式 */
footer {
    background-color: var(--white);
    padding: 30px 0;
    border-top: 1px solid var(--light-gray);
}

footer .container {
    padding: 0 15px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.footer-main {
    text-align: center;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--light-gray);
}

.footer-main p {
    color: var(--gray);
    line-height: 1.8;
}

.footer-links {
    text-align: center;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--light-gray);
}

.footer-links a {
    color: var(--gray);
    text-decoration: none;
    margin: 0 10px;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--primary-blue);
}

.footer-copyright {
    text-align: center;
}

.footer-copyright p {
    color: var(--gray);
    font-size: 0.9rem;
    line-height: 1.8;
}

.footer-copyright a {
    color: var(--gray);
    text-decoration: none;
}

.footer-copyright a:hover {
    color: var(--gray);
}

/* 响应式调整 */
@media (max-width: 768px) {
    footer {
        padding: 15px 0;
    }

    .footer-main,
    .footer-links,
    .footer-copyright {
        padding-bottom: 15px;
    }

    .footer-links a {
        display: inline-block;
        margin: 5px 10px;
    }
}

/* 现货展示样式 */
.products-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 15px;
}

.product-card {
    background: var(--white);
    overflow: hidden;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-image {
    width: 100%;
    height: 120px;
    object-fit: cover;
}

.product-info {
    padding: 10px;
}

.product-info h3 {
    font-size: 0.9rem;
    color: var(--black);
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-info h3 a {
    color: inherit;
    text-decoration: none;
}

.product-info h3 a:hover {
    color: var(--primary-blue);
}

.product-info p {
    font-size: 0.8rem;
    color: var(--gray);
    line-height: 1.4;
    margin: 3px 0;
}

.product-price {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
}

.price {
    color: var(--primary-red);
    font-size: 1rem;
    font-weight: bold;
}

.quote-btn {
    padding: 3px 8px;
    font-size: 0.8rem;
    background: var(--primary-blue);
    color: var(--white);
    border: none;
    border-radius: 3px;
    text-decoration: none;
    transition: background-color 0.3s;
}

.quote-btn:hover {
    background: #1560d1;
    color: var(--white);
    text-decoration: none;
}

/* 经销品牌样式 */
.brands-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    grid-template-rows: repeat(2, 1fr);
    grid-auto-flow: column;
    gap: 10px;
    margin: 0 10px;
    max-height: 180px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-blue) var(--light-gray);
    -webkit-overflow-scrolling: touch;
}

.brands-grid::-webkit-scrollbar {
    height: 8px;
}

.brands-grid::-webkit-scrollbar-track {
    background: var(--light-gray);
    border-radius: 4px;
}

.brands-grid::-webkit-scrollbar-thumb {
    background: var(--primary-blue);
    border-radius: 4px;
}

.brands-grid::-webkit-scrollbar-thumb:hover {
    background: #1560d1;
}
.brand-card {
    background: var(--white);
    padding: 10px 5px;
    text-align: center;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    width: 130px;
    height: 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.brand-card a {
    text-decoration: none;
    color: var(--black);
    display: block;
}

.brand-image {
    width: 120px;
    height: 40px;
    object-fit: contain;
    margin-bottom: 8px;
}

.brand-card strong {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.9rem;
    padding: 0 8px;
    width: 100%;
    box-sizing: border-box;
}

.brand-card:hover {
    transform: translateY(-5px);
}

/* 型号展示样式 */
.models-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 15px;
}

.model-card {
    background: var(--light-blue);
    overflow: hidden;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.model-card:hover {
    transform: translateY(-5px);
}

.model-image {
    width: 100%;
    height: 120px;
    object-fit: cover;
}

.model-info {
    padding: 10px;
    background: var(--white);
}

.model-info h3 {
    font-size: 0.9rem;
    color: var(--primary-blue);
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.model-info p {
    font-size: 0.8rem;
    color: var(--gray);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 新闻资讯样式 */
.news-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.news-card {
    background: var(--white);
    padding: 15px;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    min-width: 0;
}

.news-card:hover {
    transform: translateY(-5px);
}

.news-card h3 {
    font-size: 1.1rem;
    color: var(--black);
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin: 0;
    min-width: 0;
}

.news-card h3 a {
    color: var(--black);
    text-decoration: none;
    transition: color 0.3s;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.news-card h3 a:hover {
    color: var(--primary-blue);
}

.news-date {
    font-size: 0.8rem;
    color: var(--gray);
    white-space: nowrap;
    padding-left: 15px;
    text-align: right;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .news-card {
        flex-direction: row;
        align-items: center;
        gap: 8px;
        padding: 10px;
    }
    
    .news-card h3 {
        flex: 1;
        font-size: 0.9rem;
        min-width: 0;
    }

    .news-date {
        padding-left: 10px;
        text-align: right;
        white-space: nowrap;
        font-size: 0.8rem;
        min-width: 85px;
    }
}

/* 友情链接样式 */
.links-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.links-grid a {
    color: var(--gray);
    text-decoration: none;
    transition: color 0.3s;
    font-size: 0.9rem;
}

.links-grid a:hover {
    color: var(--primary-blue);
}

/* 响应式调整 */
@media (max-width: 1024px) {
    .products-grid,
    .brands-grid,
    .models-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .products-grid,
    .brands-grid,
    .models-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .products-grid,
    .brands-grid,
    .models-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
}



.content-block.menu-block {
    padding: 15px;
}

/* 左侧分类导航 + Banner轮播 */
.menu-wrapper {
    display: flex;
    position: relative;
    height: 500px;
}

.main-categories {
    width: 210px;
    flex-shrink: 0;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    background: #f0f6ff;
    list-style: none;
    margin: 0;
    padding: 0;
    scrollbar-width: thin;
    scrollbar-color: #b3d0ff #f0f6ff;
}

.main-categories::-webkit-scrollbar {
    width: 4px;
}

.main-categories::-webkit-scrollbar-thumb {
    background: #b3d0ff;
}

.main-category {
    display: block;
    padding: 11px 15px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    border-bottom: 1px solid #d6e8ff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: background 0.2s, color 0.2s;
}

.main-category:hover {
    background: var(--primary-blue);
    color: #fff;
}

.sub-categories {
    position: absolute;
    left: 210px;
    top: 0;
    width: calc(100% - 210px);
    height: 100%;
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid #e0e0e0;
    z-index: 10;
    display: none;
    overflow-y: auto;
    padding: 20px;
    box-sizing: border-box;
}

.sub-category-panel {
    display: none;
}

.sub-category-panel.active {
    display: block;
}

.sub-category-panel h3 {
    font-size: 15px;
    color: #333;
    margin: 0 0 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary-blue);
}

.sub-category-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.sub-category-list a {
    color: #555;
    text-decoration: none;
    font-size: 13px;
    padding: 4px 12px;
    border: 1px solid #ddd;
    border-radius: 3px;
    white-space: nowrap;
    transition: color 0.2s, border-color 0.2s;
}

.sub-category-list a:hover {
    color: var(--primary-blue);
    border-color: var(--primary-blue);
}

.category-slider {
    flex: 1;
    overflow: hidden;
}

@media (max-width: 768px) {
    .menu-wrapper {
        height: auto;
    }
    .main-categories {
        display: none;
    }
    .sub-categories {
        display: none !important;
    }
    .category-slider {
        height: 250px;
    }
}

.slider-wrapper {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: hidden;
}

@media (max-width: 768px) {
    .slider-wrapper {
        height: 250px;
    }
}

.slider-item {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.slider-item a {
    display: block;
    width: 100%;
    height: 100%;
}

.slider-item img {
    width: 100%;
    height: 100%;
    object-fit: fill;
    display: block;
}

.slider-item.active {
    opacity: 1;
    z-index: 1;
}

/* 轮播导航点样式 */
.slider-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 2;
}

.slider-dot {
    width: 10px;
    height: 10px;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.slider-dot.active {
    background: var(--white);
    transform: scale(1.2);
}

/* 轮播切换按钮样式 */
.slider-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.3);
    color: var(--white);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: all 0.3s ease;
}

.slider-button:hover {
    background: rgba(0, 0, 0, 0.5);
}

.slider-button.prev {
    left: 20px;
}

.slider-button.next {
    right: 20px;
}


.welcome {
    color: var(--primary-red);
    font-size: 0.85rem;
}

/* 在线客服样式 */
.float-service {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 999;
    background: var(--white);
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 130px;
    padding: 10px;
    @media (max-width: 768px) {
        display: none;
    }
}

.service-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    position: relative;
    cursor: pointer;
    color: var(--primary-blue);
    padding: 10px 0px;
    border-bottom: 1px solid var(--light-gray);
    text-align: center;
}

.service-item:last-child {
    border-bottom: none;
}

.service-item i {
    font-size: 24px;
    width: 24px;
    text-align: center;
    color: var(--primary-blue);
}

.service-item p {
    margin: 0;
    white-space: normal;
    font-size: 0.9rem;
    line-height: 1.4;
}

.service-item img {
    margin: 10px 0;
    width: 80px;
    height: 80px;
}



@media (max-width: 768px) {
    .products-grid,
    .brands-grid,
    .models-grid {
        grid-template-columns: repeat(2, 1fr);  /* 改为2列 */
        gap: 10px;
    }

    .product-image,
    .model-image {
        height: 100px;  /* 减小图片高度 */
    }

    .brand-image {
        max-height: 40px;  /* 减小品牌图片高度 */
    }
}

@media (max-width: 768px) {
    .news-grid {
        grid-template-columns: 1fr;  /* 改为单列 */
        gap: 10px;
    }

    .news-card {
        padding: 10px;
    }

    .news-card h3 {
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    .content-block {
        padding: 15px;
        margin-top: 10px;
    }

    .section-title {
        font-size: 1.3rem;
        margin-bottom: 15px;
    }
}

@media (max-width: 480px) {
    .content-block {
        padding: 10px;
    }
}

@media (max-width: 768px) {
    .float-service {
        display: none;  /* 移动端隐藏悬浮客服 */
    }
}

/* 返回顶部按钮样式 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 40px;
    height: 40px;
    background-color: var(--primary-blue);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    @media (max-width: 768px) {
        display: none;
    }
}

/* 移动端菜单按钮 */
.mobile-menu-btn {
    display: none;
    font-size: 1.8rem;
    color: var(--primary-blue);
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

@media (max-width: 768px) {
    .welcome {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .main-nav {
        display: none;
        position: absolute;
        top: 67px;  /* 顶部信息栏的高度 */
        left: 0;
        right: 0;
        z-index: 1000;
        background-color: var(--primary-blue);
    }
    
    .main-nav.show {
        display: block;
    }
    
    .top-right {
        display: flex;
        gap: 10px;
    }
    
    .top-right.show {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        right: 0;
        background: var(--white);
        padding: 10px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        z-index: 1000;
    }
}


.float-service .service-item a {
    text-decoration: none !important;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.float-service .service-item a i {
    margin-bottom: 8px;
}

.float-service .service-item a:hover,
.float-service .service-item a:visited,
.float-service .service-item a:active,
.float-service .service-item a:focus {
    color: inherit;
    text-decoration: none !important;
}

/* 视觉隐藏但对屏幕阅读器和搜索引擎可见 */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
