/* ================================
   Index2.css - 简洁三列布局设计
   避免与原有样式冲突
   ================================ */

/* 三列布局区域 - 全宽度背景 */
#banner {
    width: 100%;
    background: #f5f5f5;
    padding: 20px 0;
    margin-bottom: 20px;
}

/* Banner内容容器 */
.banner-wrapper {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    gap: 20px;
    height: 300px;
    box-sizing: border-box;
}

/* ================================
   左列 - 筛选器
   ================================ */
.left-column {
    width: 200px;
    flex-shrink: 0;
}

.filter-box {
    background: #fff;
    padding: 20px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    height: 300px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.filter-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-bottom: 15px;
}

.filter-section:last-child {
    margin-bottom: 0;
}

.filter-box h3 {
    font-size: 14px;
    font-weight: bold;
    color: #333;
    text-align: center;
    margin: 0 0 15px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
}

.filter-group {
    margin-bottom: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.filter-group label {
    display: flex;
    align-items: center;
    font-size: 13px;
    color: #666;
    cursor: pointer;
    min-width: 70px;
    padding: 5px 8px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.filter-group input[type="radio"] {
    margin-right: 6px;
    accent-color: #D42A3C;
}

.filter-group label:hover {
    color: #D42A3C;
}

/* ================================
   中列 - 轮播图和导航
   ================================ */
.center-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.banner-slider {
    flex: 1;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    height: 260px;
}

.slider-content {
    width: 100%;
    height: 100%;
    position: relative;
}

.slider-content img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 导航条 - 作为中间板块的底部 */
.banner-nav {
    background: #fff;
    border-radius: 0 0 6px 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-top: -1px; /* 与轮播图无缝连接 */
}

.banner-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

.banner-nav li {
    flex: 1;
    text-align: center;
}

.banner-nav li a {
    display: block;
    padding: 8px 16px;
    color: #666;
    text-decoration: none;
    font-size: 13px;
    transition: all 0.3s ease;
    border-right: 1px solid #eee;
}

.banner-nav li:last-child a {
    border-right: none;
}

.banner-nav li:hover a,
.banner-nav li.active a {
    background: #D42A3C;
    color: #fff;
}

/* ================================
   右列 - 广告图片
   ================================ */
.right-column {
    width: 240px;
    flex-shrink: 0;
}

.ad-images {
    display: flex;
    flex-direction: column;
    gap: 10px;
    height: 300px;
    justify-content: space-between;
}

.ad-item {
    flex: 1;
    display: block;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    height: calc((100% - 20px) / 3);
}

.ad-item:hover {
    transform: translateY(-2px);
}

.ad-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ================================
   产品列表区域 - 保持原有样式
   ================================ */
#section {
    max-width: 1300px;
    width: 100%;
    min-height: 800px;
    margin: 20px auto;
    padding: 20px;
    box-sizing: border-box;
    border-radius: 6px;
}

#products-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: flex-start;
}

/* 产品卡片样式 */
.alldiv {
    width: 300px;
    height: 280px;
    background: #fff;
    border: 2px solid #f0f0f0;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: hidden;
}

.alldiv:hover {
    border-color: #D42A3C;
    box-shadow: 0 4px 12px rgba(212, 42, 60, 0.2);
    transform: translateY(-2px);
}

.alldiv img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border: 0;
}

#alldiv_ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

#alldiv_ul li {
    padding: 0;
}

#alldiv_ul p {
    margin: 8px 12px 4px 12px;
}

#first_p {
    font-family: "微软雅黑";
    margin: 8px 12px 6px 12px;
    font-size: 15px;
    color: #333;
    font-weight: 500;
    line-height: 1.35;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.alldiv:hover #first_p {
    color: #D42A3C;
}

.alldiv b {
    font-size: 19px;
    color: #D42A3C;
    padding-left: 12px;
    margin-top: 4px;
    float: left;
    font-weight: bold;
}

#last_p {
    display: inline;
    float: right;
    font-size: 12px;
    color: #666;
    margin-top: 8px;
    margin-right: 12px;
    line-height: 1.3;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#dingwei {
    position: relative;
}

#dingwei_child {
    background-color: rgba(0,0,0,0.7);
    width: 100%;
    font-size: 11px;
    text-indent: 10px;
    color: white;
    position: absolute;
    bottom: 0;
    padding: 6px 0;
}

/* 加载状态 */
.loading {
    text-align: center;
    padding: 50px;
    font-size: 16px;
    color: #666;
    width: 100%;
}

/* ================================
   响应式设计
   ================================ */
@media (max-width: 1340px) {
    .banner-wrapper {
        max-width: 1200px;
    }
    
    #products-container {
        justify-content: center;
    }
    
    .alldiv {
        width: 280px;
        height: 260px;
    }
    
    .alldiv img {
        height: 160px;
    }
}

@media (max-width: 1024px) {
    .banner-wrapper {
        flex-direction: column;
        gap: 15px;
    }
    
    .left-column,
    .right-column {
        width: 100%;
    }
    
    .ad-images {
        flex-direction: row;
        height: auto;
    }
    
    .filter-group {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .alldiv {
        width: 45%;
        max-width: 300px;
    }
    
    .banner-nav li a {
        padding: 10px 15px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .alldiv {
        width: 100%;
        max-width: 350px;
    }
    
    .ad-images {
        flex-direction: column;
    }
}