/* alumina.css - 氧化铝产品页面专用样式（4:3比例图片版本） */

/* 全局防溢出设置 */
body, html {
    max-width: 100%;
    overflow-x: clip;
}

/* 容器设置 */
.container {
    width: 100%;
    max-width: 1200px;
    padding: 0 15px;
    margin: 0 auto;
    box-sizing: border-box;
}

/* 产品介绍区域样式 */
.alumina-intro {
    padding: 20px 0;
    background-color: white;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}

.alumina-intro h1 {
    color: #163762;
    font-size: 36px;
    margin-bottom: 20px;
}

.alumina-intro p {
    max-width: 800px;
    margin: 0 auto 20px;
    color: #555;
    line-height: 1.8;
    padding: 0 15px;
    box-sizing: border-box;
    text-align: left;
}

/* PDF下载链接样式 */
.pdf-download {
    margin-top: 30px;
}

.pdf-link {
    display: inline-flex;
    align-items: center;
    padding: 12px 25px;
    background-color: #163762;
    color: white;
    text-decoration: none;
    border-radius: 30px;
    font-size: 16px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.pdf-link:hover {
    background-color: #0e2a4a;
    transform: translateY(-2px);
}

.pdf-link img {
    width: 24px;
    height: 24px;
    margin-right: 10px;
}

/* 分类标题链接样式 */
.category-title-link {
    text-decoration: none;
    color: inherit;
    display: inline-block;
}

.category-title-link h2 {
    transition: color 0.3s ease;
}

.category-title-link:hover h2 {
    color: #0e2a4a;
    text-decoration: underline;
}

/* 产品分类样式 */
.product-category {
    padding: 40px 0;
    background-color: white;
    width: 100%;
    box-sizing: border-box;
}

.product-category:nth-child(even) {
    background-color: #f8f8f8;
}

.category-content {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    width: 100%;
    box-sizing: border-box;
}

.category-info {
    flex: 1;
    padding: 0 15px;
    box-sizing: border-box;
}

.category-info h2 {
    color: #163762;
    font-size: 28px;
    margin-bottom: 15px;
}

.product-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 15px 0;
}

.tag {
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 12px;
    background: #f0f0f0;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.tag.medical { background: #e3f7e8; color: #006b21; }
.tag.aerospace { background: #e3f0f7; color: #163762; }
.tag.electronics { background: #f0e3f7; color: #5e006b; }
.tag.semiconductor { background: #e3ecf7; color: #003c8b; }
.tag.led { background: #e3f7f4; color: #006b5d; }
.tag.industrial { background: #f7f0e3; color: #8b5a00; }
.tag.chemical { background: #f7e3e3; color: #8b0000; }

.product-features {
    margin-top: 15px;
    padding-left: 20px;
    color: #555;
}

.product-features li {
    margin-bottom: 8px;
}

/* 产品网格布局 */
.category-products {
    flex: 1;
    width: 100%;
    padding: 0 15px;
    box-sizing: border-box;
}

.product-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    max-width: 100%;
    margin: 0 auto;
    width: 100%;
    padding: 0;
    box-sizing: border-box;
}

/* 产品项样式 - 4:3比例强制拉伸 */
.product-item {
    display: block;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    text-decoration: none;
    background: white;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    /* 设置4:3比例 */
    aspect-ratio: 4/3;
    position: relative;
}

.product-item:hover {
    transform: translateY(-5px);
}

/* 图片样式 - 强制拉伸填充4:3容器 */
.product-item img {
    width: 100%;
    height: 100%;
    object-fit: fill; /* 改为fill，强制拉伸填充容器 */
    object-position: center;
    display: block;
    transition: transform 0.3s ease;
}

.product-item:hover img {
    transform: scale(1.05);
}

.product-caption {
    padding: 12px;
    text-align: center;
    font-size: 15px;
    font-weight: 500;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .category-content {
        flex-direction: column;
    }
    .product-grid {
        max-width: 100%;
    }
}

@media (max-width: 992px) {
    .category-content {
        flex-direction: column;
        gap: 20px;
    }
    
    .category-info, 
    .category-products {
        width: 100%;
    }
    
    .product-grid {
        margin-top: 0;
    }
    
    .category-info {
        padding-bottom: 20px;
        border-bottom: 1px solid #eee;
    }
}

@media (max-width: 768px) {
    .product-grid {
        max-width: 100%;
        padding: 0;
    }
    .alumina-intro {
        padding: 40px 0;
    }
    .alumina-intro h1 {
        font-size: 28px;
    }
    .category-content {
        padding: 0 10px;
    }
    
    /* 移动端保持4:3比例 */
    .product-item {
        aspect-ratio: 4/3;
    }
    
    .product-item img {
        object-fit: fill; /* 保持强制拉伸效果 */
    }
}

@media (max-width: 480px) {
    .alumina-intro h1 {
        font-size: 24px;
    }
    .pdf-link {
        padding: 10px 20px;
        font-size: 14px;
    }
    .category-info h2 {
        font-size: 24px;
    }
    .product-grid {
        grid-template-columns: 1fr;
    }
    .product-tags {
        gap: 6px;
    }
    .tag {
        font-size: 11px;
        padding: 2px 8px;
    }
    
    .product-item {
        aspect-ratio: 4/3; /* 移动端也保持4:3 */
    }
    
    .product-item img {
        object-fit: fill; /* 强制拉伸 */
    }
}

/* 渐入动画效果 */
@keyframes gentleAppear {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in-element {
    opacity: 0;
    animation: gentleAppear 0.6s ease-out forwards;
}

/* 为不支持aspect-ratio的浏览器提供备用方案 */
@supports not (aspect-ratio: 4/3) {
    .product-item {
        position: relative;
        width: 100%;
    }
    
    .product-item::before {
        content: '';
        display: block;
        padding-bottom: 75%; /* 4:3 比例备用 (3/4 = 0.75 = 75%) */
    }
    
    .product-item img {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: fill; /* 强制拉伸 */
    }
}

/* 确保所有产品图片容器统一为4:3比例 */
.category-products .product-grid .product-item {
    aspect-ratio: 4/3;
}

/* 备用方案：使用传统方法设置4:3比例 */
.product-item.fixed-ratio {
    position: relative;
    width: 100%;
}

.product-item.fixed-ratio::before {
    content: '';
    display: block;
    padding-top: 75%; /* 4:3比例 */
}

.product-item.fixed-ratio img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: fill; /* 强制拉伸 */
}