/* 全局样式 */
body {
    font-family: 'Roboto', 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif; /* 更现代的字体栈 */
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa; /* 浅灰色背景 */
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 产品页面样式 */
.product-container {
    max-width: 1400px; /* 从1100px增加到1400px */
    margin: 60px auto; /* 增加上下外边距 */
    margin-top: 100px; /* 让主内容整体继续下移 */
    padding: 0 25px; /* 调整左右内边距 */
}

.product-container h1 {
    text-align: center;
    font-size: 2.8rem; /* 调整字体大小 */
    color: #2c3e50; /* 标题颜色 */
    margin-bottom: 40px; /* 增加与产品网格的间距 */
    letter-spacing: 1px;
    position: relative;
    padding-bottom: 15px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 35px; /* 增加更大间距 */
    padding: 0;
}

.product-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease-out, opacity 0.7s cubic-bezier(0.4,0,0.2,1), transform 0.7s cubic-bezier(0.4,0,0.2,1);
    position: relative;
    opacity: 0;
    transform: translateY(40px);
    text-decoration: none; /* 移除链接下划线 */
    color: inherit; /* 继承文字颜色 */
    display: block; /* 确保链接占满整个卡片 */
    height: 420px; /* 增加卡片高度 */
    display: flex;
    flex-direction: column;
}

.product-card.card-animate {
    opacity: 1;
    transform: translateY(0);
}

.product-card:hover {
    transform: translateY(-8px); /* 悬停上浮更多 */
    border-color: #3498db; /* 保持悬停边框变色 */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1); /* 添加轻微阴影 */
    text-decoration: none; /* 确保悬停时也没有下划线 */
    color: inherit; /* 确保悬停时文字颜色不变 */
}

.product-image {
    height: 250px; /* 调整图片高度 */
    background: #f0f2f5; /* 调整背景色 */
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0; /* 防止图片区域被压缩 */
}

.product-image img {
    max-width: 90%; /* 稍微收缩图片 */
    max-height: 90%; /* 稍微收缩图片 */
    object-fit: contain;
    padding: 0; /* 移除内边距 */
    transition: transform 0.3s ease-out;
}

.product-card:hover .product-image img {
    transform: scale(1.05); /* 悬停缩放 */
}

.product-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(52, 152, 219, 0.08); /* 调整叠加层透明度 */
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.product-card:hover .product-image::after {
    opacity: 1;
}

.product-info {
    padding: 22px; /* 调整内边距 */
    background: linear-gradient(180deg, #ffffff 0%, #fafbfd 100%); /* 更柔和的渐变 */
    text-align: center;
    flex: 1; /* 让信息区域占据剩余空间 */
    display: flex;
    flex-direction: column;
    justify-content: center; /* 垂直居中内容 */
    min-height: 170px; /* 增加信息区域最小高度 */
}

.product-info h3 {
    color: #2c3e50;
    font-size: 1.35rem; /* 调整字体大小 */
    margin-bottom: 8px; /* 调整间距 */
    position: relative;
    padding-bottom: 8px;
    line-height: 1.3; /* 调整行高 */
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 2.6em; /* 设置最小高度而不是固定高度 */
    max-height: 3.9em; /* 设置最大高度为3行 */
    overflow: hidden;
    word-break: break-word;
    text-overflow: ellipsis; /* 超出时显示省略号 */
}

.product-desc {
    color: #666;
    font-size: 1rem;
    margin: 8px 0 0 0;
    line-height: 1.7;
    letter-spacing: 0.2px;
    min-height: 24px;
}

/* 响应式调整 */
@media (max-width: 992px) {
    .product-container {
        margin: 40px auto;
        padding: 0 20px;
    }
    .product-grid {
        gap: 25px;
    }
    .product-card {
        height: 400px; /* 调整高度 */
    }
}

@media (max-width: 768px) {
    /* 移动端面包屑导航优化 */
    .breadcrumb {
        margin-top: 100px; /* 增加margin-top避免与头部重叠 */
        margin-bottom: 15px;
        font-size: 0.9rem;
        padding: 0 15px; /* 添加左右padding */
    }

    .breadcrumb-container {
        overflow-x: auto; /* 允许水平滚动 */
        -webkit-overflow-scrolling: touch; /* iOS滚动优化 */
        scrollbar-width: none; /* 隐藏滚动条 */
    }

    .breadcrumb-container::-webkit-scrollbar {
        display: none; /* 隐藏webkit滚动条 */
    }

    .breadcrumb a,
    .breadcrumb span {
        flex-shrink: 0; /* 防止文字被压缩 */
    }

    .breadcrumb-sep {
        margin: 0 4px; /* 增加分隔符间距 */
    }

    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); /* 更小的卡片宽度 */
        gap: 20px;
        padding: 15px 0;
    }
    
    .product-card {
        height: 380px; /* 调整高度 */
    }
    
    .product-image {
        height: 200px;
    }
    
    .product-info {
        padding: 18px;
        min-height: 140px; /* 调整最小高度 */
    }
    
    .product-info h3 {
        font-size: 1.2rem;
        min-height: 2.6em; /* 保持最小高度 */
        max-height: 3.9em; /* 保持最大高度 */
    }
}

@media (max-width: 480px) {
    .product-grid {
        grid-template-columns: 1fr; /* 单列布局 */
        gap: 15px;
    }
    .product-container {
        padding: 0 15px;
    }
    .product-card {
        height: 360px; /* 调整高度 */
    }
    .product-image {
        height: 180px;
    }
    .product-info {
        min-height: 120px; /* 调整最小高度 */
    }
}

/* 小屏幕手机适配 */
@media (max-width: 480px) {
    .breadcrumb {
        margin-top: 70px; /* 小屏幕进一步调整 */
        margin-bottom: 12px;
        font-size: 0.8rem;
        padding: 0 10px;
    }

    .breadcrumb a,
    .breadcrumb span {
        font-size: 0.8rem;
    }

    .breadcrumb-sep {
        margin: 0 2px;
        font-size: 0.8rem;
    }
}

/* 超小屏幕设备适配 */
@media (max-width: 360px) {
    .breadcrumb {
        margin-top: 65px;
        margin-bottom: 10px;
        font-size: 0.75rem;
        padding: 0 8px;
    }

    .breadcrumb a,
    .breadcrumb span {
        font-size: 0.75rem;
    }

    .breadcrumb-sep {
        margin: 0 1px;
        font-size: 0.75rem;
    }
}

.breadcrumb {
    font-size: 1rem;
    color: #888;
    margin-bottom: 18px;
    margin-top: 100px; /* 为固定header留出空间 */
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap; /* 防止换行 */
    overflow-x: auto; /* 如果内容过长，允许水平滚动 */
    white-space: nowrap; /* 防止文字换行 */
}
.breadcrumb a {
    color: #3498db;
    text-decoration: none;
    transition: color 0.2s;
}
.breadcrumb a:hover {
    color: #217dbb;
    text-decoration: underline;
}
.breadcrumb-sep {
    color: #bbb;
    margin: 0 2px;
}