/* 轮播Banner组件样式 - 符合banner标准尺寸 */
.banner-carousel {
    position: relative;
    height: 600px; /* 增加高度确保电脑端完整展示背景图片 */
    margin-top: 80px; /* 避免被顶部导航栏覆盖 */
    overflow: hidden;
    width: 100%;
}

/* 响应式高度调整 */
@media (max-width: 768px) {
    .banner-carousel {
        height: 450px; /* 平板端适当降低高度 */
    }
}

@media (max-width: 480px) {
    .banner-carousel {
        height: 350px; /* 移动端进一步优化高度 */
    }
}

.carousel-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 130%;
    opacity: 0;
    transform: scale(1.02);
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    background-size: contain; /* 使用contain确保完整展示全部背景图片，适当留白 */
    background-position: center;
    background-repeat: no-repeat;
    filter: brightness(1) contrast(1.1);
    object-fit: contain; /* 确保图片完整展示不失真 */
    background-color: #f8f9fa; /* 添加浅色背景填充留白区域 */
}

/* 移动端优化的过渡效果 */
@media (max-width: 768px) {
    .carousel-item {
        transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }
}

.carousel-item.active {
    opacity: 1;
    transform: scale(1);
    filter: brightness(1) contrast(1.1) saturate(1.1);
}

/* 为每个轮播项设置对应的背景图片 */
.carousel-item:nth-child(1) {
    background-image: url('../images/banner1.jpg');
}

.carousel-item:nth-child(2) {
    background-image: url('../images/banner2.jpg');
}

.carousel-item:nth-child(3) {
    background-image: url('../images/banner3.jpg');
}

.carousel-item:nth-child(4) {
    background-image: url('../images/banner4.jpg');
}

.carousel-item:nth-child(5) {
    background-image: url('../images/banner5.jpg');
}

.carousel-item.active {
    opacity: 1;
}



.banner-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    position: relative;
    z-index: 2;
}

/* 移除灰色蒙版效果，让图片原始色彩完全显示 */
/* .banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
} */

.banner-content {
    max-width: 1200px;
    color: #FFFFFF;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
    min-height: 200px;
    padding: 0 40px 80px 40px; /* 垂直方向向下调整20像素：60px → 80px */
    width: 100%;
    box-sizing: border-box;
}

.banner-title {
    font-size: 48px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
    text-align: center;
}

.banner-desc {
    font-size: 18px;
    line-height: 1.5;
    margin-bottom: 30px;
    opacity: 0.9;
    text-align: center;
}

.banner-actions {
    display: flex;
    gap: 20px;
    justify-content: flex-start; /* 按钮靠左对齐 */
    align-items: center;
    flex-wrap: wrap; /* 在小屏幕上允许换行 */
    margin-top: 20px;
}

.banner-image {
    flex: 1;
    max-width: 600px;
    margin-left: 40px;
    z-index: 2;
}

.banner-image img {
    width: 100%;
    height: auto;
}

/* 轮播控制按钮样式 */
.carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    /* 增加触摸区域 */
    padding: 10px;
    box-sizing: content-box;
}

.carousel-control:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-50%) scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.carousel-control.prev {
    left: 30px;
}

.carousel-control.next {
    right: 30px;
}

.carousel-control .icon {
    width: 24px;
    height: 24px;
    color: #333;
}

/* 响应式控制按钮调整 */
@media (max-width: 768px) {
    .carousel-control {
        width: 50px;
        height: 50px;
    }
    
    .carousel-control.prev {
        left: 15px;
    }
    
    .carousel-control.next {
        right: 15px;
    }
    
    .carousel-control .icon {
        width: 20px;
        height: 20px;
    }
}

@media (max-width: 480px) {
    .carousel-control {
        width: 45px;
        height: 45px;
    }
    
    .carousel-control.prev {
        left: 15px;
    }
    
    .carousel-control.next {
        right: 15px;
    }
    
    .carousel-control .icon {
        width: 18px;
        height: 18px;
    }
}

/* 产品分类展示区 - 方形卡片式设计 */
.product-categories {
    padding: 80px 0;
    background-color: #FFFFFF;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.category-card {
    background-color: #FFFFFF;
    border: none;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* 增强卡片阴影效果 - 符合WCAG对比度要求 */
.category-card {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.08);
}

.category-card:first-child {
    z-index: 3; /* 确保第一个在最上层 */
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.category-card:last-child {
    z-index: 2; /* 确保最后一个在中层 */
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.category-card:hover,
.category-card.card-hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
    z-index: 4; /* 悬停时提升层级 */
}

/* 为触摸设备优化卡片交互 */
@media (hover: none) and (pointer: coarse) {
    .category-card:active {
        transform: translateY(-5px);
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
    }
}

.category-link {
    display: flex;
    flex-direction: column;
    color: inherit;
    text-decoration: none;
    height: 100%;
    transition: all 0.3s ease;
}

.category-link:hover {
    color: inherit;
}

.category-image {
    height: 200px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 优化移动端触摸体验 */
@media (max-width: 768px) {
    .category-link {
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
        tap-highlight-color: rgba(0, 0, 0, 0.1);
    }
}

.category-image .main-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
    object-position: center;
}

.category-card:hover .category-image .main-image {
    transform: scale(1.05);
}

.category-info {
    padding: 20px;
    text-align: center;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.category-title {
    font-size: 20px;
    font-weight: 600;
    color: #1D2129;
    margin-bottom: 10px;
}

.category-desc {
    font-size: 14px;
    color: #4E5969;
    line-height: 1.5;
    margin-bottom: 20px;
    flex: 1;
}

.category-more {
    font-size: 16px;
    color: #00A67E;
    font-weight: 500;
    transition: color 0.3s ease;
}

.category-link:hover .category-more {
    color: #008A67;
}

/* 产品中心副标题样式 - 方案1: 默认方案 */
.section-desc {
    font-size: 20px;
    color: #666;
    text-align: center;
    margin-top: 15px;
    margin-bottom: 50px;
    line-height: 1.6;
}

/* 产品中心副标题样式 - 方案2: 稍大字体方案 */
.section-desc.scheme-large {
    font-size: 18px;
    font-weight: 500;
    color: #4E5969;
    line-height: 1.6;
}

/* 产品中心副标题样式 - 方案3: 更大字体方案 */
.section-desc.scheme-xlarge {
    font-size: 20px;
    font-weight: 500;
    color: #1D2129;
    line-height: 1.5;
}

/* 响应式副标题调整 */
@media (max-width: 768px) {
    .section-desc {
        font-size: 18px;
        margin-bottom: 40px;
    }
}

@media (max-width: 576px) {
    .section-desc {
        font-size: 16px;
        margin-bottom: 30px;
        margin-top: 10px;
        padding: 0 10px;
    }
}

.centered {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.section-title {
    font-size: 32px;
    font-weight: 700;
    color: #1D2129;
    margin-bottom: 15px;
    text-align: center;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .banner-carousel {
        height: 500px;
    }
    
    .banner-title {
        font-size: 36px;
    }
    
    .section-title {
        font-size: 28px;
    }
    
    .category-image {
        height: 180px;
    }
    
    .categories-grid {
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .section-title {
        font-size: 26px;
    }
}

@media (max-width: 576px) {
    .section-title {
        font-size: 24px;
        margin-bottom: 10px;
    }
}

@media (max-width: 768px) {
    .banner-carousel {
        height: 400px;
    }
    
    .banner-container {
        flex-direction: column;
        text-align: center;
        padding-top: 60px;
    }
    
    .banner-content {
        max-width: 100%;
        text-align: center;
        align-items: center;
        justify-content: flex-end;
        padding: 0 20px 40px 20px;
    }
    
    .banner-title {
        font-size: 28px;
    }
    
    .banner-image {
        margin-left: 0;
        margin-top: 30px;
    }
    
    .banner-actions {
        justify-content: center;
    }
    
    .category-image {
        height: 180px;
    }
    
    .categories-grid {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 0 15px;
    }
    
    .category-card {
        max-width: 100%;
        margin: 0;
    }
    
    .category-info {
        padding: 25px 20px;
    }
    
    .category-title {
        font-size: 20px;
    }
    
    .category-desc {
        font-size: 15px;
    }
}

@media (max-width: 576px) {
    .banner-carousel {
        height: 350px;
    }
    
    .banner-title {
        font-size: 24px;
    }
    
    .banner-desc {
        font-size: 16px;
    }
    
    .banner-actions {
        flex-direction: column;
        gap: 15px;
    }
    
    .btn {
        width: 100%;
    }
    
    .carousel-control {
        width: 40px;
        height: 40px;
    }
    
    .carousel-control.prev {
        left: 15px;
    }
    
    .carousel-control.next {
        right: 15px;
    }
    
    .category-image {
        height: 160px;
    }
    
    .category-info {
        padding: 20px 15px;
    }
    
    .category-title {
        font-size: 18px;
    }
    
    .category-desc {
        font-size: 14px;
        line-height: 1.6;
    }
    
    .category-more {
        font-size: 15px;
    }
}

/* 针对更小屏幕设备的优化 */
@media (max-width: 480px) {
    .product-categories {
        padding: 60px 0;
    }
    
    .categories-grid {
        gap: 25px;
        padding: 0 10px;
    }
    
    .category-image {
        height: 140px;
    }
    
    .category-info {
        padding: 15px 12px;
    }
    
    .category-title {
        font-size: 17px;
        margin-bottom: 8px;
    }
    
    .category-desc {
        font-size: 13px;
        margin-bottom: 15px;
    }
    
    .category-more {
        font-size: 14px;
    }
}
