.content-wrapper {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 20px;
}

/* 顶部区域布局 */
.top-section {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 20px;
}

@media (max-width: 768px) {
    .top-section {
        grid-template-columns: 1fr; /* 改为单列布局 */
        gap: 10px; /* 减小间距 */
    }
    /* 轮播区域占满宽度 */
    .slider-section {
        width: 100%;
    }
}

/* 左侧分类导航 */
.category-nav {
    position: relative;
    background: var(--white);
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    height: 480px; /* 轮播区域400px + 快速链接60px + 间距20px */
}

.main-categories {
    list-style: none;
    padding: 0;
    margin: 0;
    height: 100%;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-blue) var(--light-gray);
}

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

.main-categories::-webkit-scrollbar-track {
    background: var(--light-gray);
}

.main-categories::-webkit-scrollbar-thumb {
    background-color: var(--primary-blue);
    border-radius: 3px;
}

.main-categories li {
    border-bottom: 1px solid var(--light-gray);
}

.main-categories a {
    display: block;
    padding: 12px 15px;
    color: var(--black);
    text-decoration: none;
    transition: all 0.3s ease;
}

.main-categories a:hover {
    background: var(--light-blue);
    color: var(--primary-blue);
}

/* 子分类面板 */
.sub-categories {
    position: absolute;
    left: 100%;
    top: 0;
    width: 300%;
    height: 100%;
    background: var(--white);
    box-shadow: 2px 2px 8px rgba(0,0,0,0.1);
    display: none;
    z-index: 100;
}

.sub-category-panel {
    padding: 20px;
    display: none;
    height: 100%;
    overflow-y: auto;
}

.sub-category-panel h3 {
    color: var(--primary-blue);
    margin-bottom: 15px;
}

.sub-category-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.sub-category-list a {
    color: var(--black);
    text-decoration: none;
    padding: 5px;
    transition: color 0.3s ease;
}

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

/* 轮播区域 */
.category-slider {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 0px;
}

.slider-wrapper {
    position: relative;
    height: 400px; /* 桌面端固定高度 */
}

@media (max-width: 768px) {
    .slider-wrapper {
        height: auto; /* 移除固定高度 */
        padding-bottom: 43%; /* 根据图片比例设置，930:400 ≈ 43% */
    }

    .slider-item {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }

    .slider-image {
        position: absolute;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
}

.slider-item {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
    display: none;
}

.slider-item.active {
    opacity: 1;
    display: block;
}

.slider-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 轮播控制 */
.slider-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

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

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

.slider-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.3);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    color: var(--white);
    font-size: 20px;
    z-index: 10;
    transition: background-color 0.3s ease;
}

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

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

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

/* 右侧轮播和快速链接区域 */
.slider-section {
    display: flex;
    flex-direction: column;
}

/* 快速链接 */
.quick-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0px;
    background: var(--white);
    border-radius: 4px;
    height: 80px;
}

.action-links a {
    color: var(--white);
    text-decoration: none;
    margin: 0 5px;
    font-size: 20px;
    display: inline-flex;
    align-items: center;
    transition: all 0.3s ease;
    padding: 8px 15px;
    border-radius: 6px;
    background: var(--primary-green);
    box-shadow: 0 4px 8px rgba(51, 199, 89, 0.2);
}

.action-links a:hover {
    background: var(--primary-blue);
    color: var(--white);
    transform: translateY(-2px);
}

.action-links i {
    margin-right: 8px;
    font-size: 20px;
}
.social-links{margin: 10px 10px 0 0;}
.action-links span {
    color: var(--gray);
    margin: 0 5px;
    font-size: 20px;
}

.social-links a {
    color: var(--primary-blue);
    margin-right: 10px;
    font-size: 40px;    
}

/* 为什么选择我们 */
.why-choose-us {
    padding: 20px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.feature-card {
    text-align: center;
    padding: 20px;
    background: var(--white);
    border-radius: 8px;
    transition: transform 0.3s ease;
    box-shadow: 0 0 8px rgba(0,0,0,0.1);
}

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

.feature-card i {
    font-size: 32px;
    color: var(--primary-red);
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 20px;
    margin-bottom: 20px;
    color: var(--primary-red);
}

.feature-card p {
    color: var(--gray);
    font-size: 14px;
}

/* 响应式调整 */
@media (max-width: 1200px) {
    .features-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

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

    .feature-card {
        padding: 15px;
    }

    .feature-card i {
        font-size: 24px;
        margin-bottom: 15px;
    }

    .feature-card h3 {
        font-size: 16px;
        margin-bottom: 10px;
    }

    .feature-card p {
        font-size: 12px;
    }
}

/* 服务优势描述 */
.service-advantages {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 20px;
}

.advantage-item {
    padding: 15px;
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 0 8px rgba(0,0,0,0.1);
}

.advantage-item h3 {
    display: flex;
    align-items: center;
    gap: 15px;
    color: var(--primary-blue);
    margin-bottom: 15px;
    font-size: 20px;
}

.advantage-item h3 i {
    font-size: 24px;
}

.advantage-item p {
    color: var(--gray);
    line-height: 1.6;
    font-size: 16px;
}

/* 品牌网格 */
/* 已移动到 common.css */

/* 产品网格 */
.product-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 20px;
}

.product-card {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--light-gray);
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.product-card a {
    text-decoration: none;
    color: var(--black);
}

.product-card img {
    width: 100%;
    height: 150px;
    object-fit: contain;
}

.product-card h3 {
    padding: 8px;
    margin: 0;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-card .brand {
    padding: 0 8px;
    color: var(--gray);
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-card .stock,
.product-card .price {
    padding: 4px 8px;
    color: var(--primary-blue);
    font-size: 12px;
}

/* 修改产品卡片底部样式 */
.product-card .price-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
    padding: 0 8px 8px 8px;
}

.product-card .price {
    font-size: 18px;
    font-weight: bold;
    color: var(--primary-red);
    padding: 0;
}

.product-card .rfq-btn {
    padding: 4px 8px;
    background: var(--primary-red);
    color: var(--white);
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
    text-align: center;
    font-size: 12px;
    min-width: 60px;
    margin-left: 8px;
}

.product-card .rfq-btn:hover {
    background: var(--primary-blue);
    color: var(--white);
}

@media (max-width: 768px) {
    .product-card .price-action {
        padding: 0 6px 6px 6px;
    }

    .product-card .rfq-btn {
        padding: 3px 6px;
        font-size: 12px;
        min-width: 50px;
        margin-left: 6px;
    }
}

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

@media (max-width: 992px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .product-grid {
        grid-template-columns: 1fr;
    }
}

/* 其他内容区域 */
.main-sections {
    width: 100%;
}
/* 统一所有section的垂直间距 */
.main-sections .section-white {
    margin-bottom: 20px;
    padding: 20px; /* 这个padding是必要的，用于整个section的内边距 */
}
/* 调整各个区块内部的间距 */
.why-choose-us {
    padding: 20px; /* 从40px改为20px */
}

.features-grid {
    margin-bottom: 20px; /* 从50px改为20px */
}

.service-advantages {
    margin-top: 20px; /* 从50px改为20px */
}

/* 调整标题的下边距 */
.section-title {
    margin-bottom: 20px; /* 从40px改为20px */
}

/* 最后一个版块不需要底部间距 */
.section-white:last-child {
    margin-bottom: 0;
}

/* 热门产品网格 - 特定样式 */
.popular-products .product-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 20px;
    padding: 0;
}

.popular-products .product-card {
    text-align: center;
    padding: 8px;
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--light-gray);
}

.popular-products .product-card img {
    width: 100px;
    height: 50px;
    object-fit: contain;
    flex-shrink: 0;
}

.popular-products .product-card h3 {
    margin-top: 5px;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100px;
    color: var(--black);
    padding: 0;
}

.popular-products .product-card .brand {
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100px;
    padding: 0;
    margin-top: 3px;
}

/* 响应式调整 - 特定于热门产品 */
@media (max-width: 1200px) {
    .popular-products .product-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

@media (max-width: 992px) {
    .popular-products .product-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .popular-products .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 480px) {
    .popular-products .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 热门产品的价格样式也要调整 */
.popular-products .product-card .price {
    color: var(--primary-red);
    font-size: 16px;
    font-weight: bold;
    padding: 0;
}

@media (max-width: 768px) {
    .action-links a {
        font-size: 14px;
        padding: 6px 12px;
        margin: 0 3px;
    }

    .action-links i {
        margin-right: 5px;
        font-size: 14px;
    }

    .quick-actions {
        padding: 10px 0;
        height: auto;
    }

    /* 隐藏快速操作区域的社交链接 */
    .quick-actions .social-links {
        display: none;
    }

    /* 调整快速操作区域的布局 */
    .quick-actions {
        justify-content: center; /* 由于社交链接隐藏，让操作链接居中 */
        padding: 10px 0;
        height: auto;
    }
}

@media (max-width: 768px) {
    .section-title {
        font-size: 18px; /* 从24px减小到18px */
        margin-bottom: 20px;
        gap: 10px; /* 从20px减小到10px */
    }
    
    .section-title i {
        font-size: 18px; /* 从24px减小到18px */
    }
    
    .section-title::before,
    .section-title::after {
        max-width: 60px; /* 从100px减小到60px */
    }

    .section-title span {
        padding: 0 5px; /* 从0 10px减小到0 5px */
    }
}

@media (max-width: 768px) {
    .service-advantages {
        grid-template-columns: 1fr; /* 改为单列布局 */
        gap: 10px; /* 减小间距 */
    }

    .advantage-item {
        padding: 12px; /* 减小内边距 */
    }

    .advantage-item h3 {
        font-size: 16px; /* 减小标题字体 */
        gap: 10px; /* 减小图标和文字间距 */
    }

    .advantage-item h3 i {
        font-size: 18px; /* 减小图标大小 */
    }

    .advantage-item p {
        font-size: 14px; /* 减小文字大小 */
    }
}

/* 修改产品展示的响应式布局 */
@media (max-width: 768px) {
    /* 产品展示网格 */
    .products-showcase .product-grid {
        grid-template-columns: repeat(2, 1fr); /* 改为每行两个 */
        gap: 10px; /* 减小间距 */
    }

    /* 调整产品卡片在移动端的样式 */
    .products-showcase .product-card {
        padding: 8px;
    }

    .products-showcase .product-card img {
        height: 120px; /* 减小图片高度 */
        border-radius: 6px !important; /* 强制保持圆角 */
        width: 100%;
        object-fit: contain;
    }

    .products-showcase .product-card h3 {
        font-size: 12px;
    }

    .products-showcase .product-card .brand {
        font-size: 11px;
    }

    .products-showcase .product-card .price {
        font-size: 14px;
    }

    .products-showcase .product-card .rfq-btn {
        font-size: 11px;
        padding: 3px 6px;
    }
}

/* 移除原有的 480px 断点，保持两列布局 */
@media (max-width: 480px) {
    .products-showcase .product-grid {
        grid-template-columns: repeat(2, 1fr); /* 保持两列 */
    }

    .products-showcase .product-card img {
        border-radius: 6px !important; /* 确保在更小屏幕上也保持圆角 */
    }
}

.products-showcase .product-card {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--light-gray);
    padding: 10px;
}

.products-showcase .product-card img {
    width: 100%;
    height: 150px;
    object-fit: contain;
    border-radius: 8px;
} 