/* product-detail.css - 产品详情页面专用样式 */

/* 全局设置 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Arial', 'Microsoft YaHei', sans-serif;
    color: #333;
    line-height: 1.6;
    background-color: #f8f8f8;
}

/* 容器设置 - 最大宽度1200px，居中 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

/* 产品标题区域样式 */
.product-title-section {
    padding: 40px 0;
    background-color: white;
    border-bottom: 1px solid #eaeaea;
}

.title-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.product-title-section h1 {
    color: #163762;
    font-size: 36px;
    margin: 0;
    flex: 1;
}

.sales-contact {
    display: flex;
    align-items: center;
    background-color: #f5f5f5;
    padding: 10px 20px;
    border-radius: 30px;
    margin-left: 20px;
}

.sales-text {
    color: #666;
    margin-right: 10px;
    font-size: 16px;
}

.sales-phone {
    color: #163762;
    font-weight: bold;
    font-size: 18px;
}

/* 产品介绍区域样式 */
.product-intro-section {
    padding: 60px 0;
    background-color: white;
}

.intro-content {
    display: flex;
    gap: 40px;
    align-items: center;
}

.intro-image {
    flex: 1;
    min-width: 0;
    height: 400px; /* 设置固定高度 */
}

/* 修改：主图完全填充容器，不受比例限制 */
.intro-image img {
    width: 100%;
    height: 100%; /* 使用100%高度 */
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    object-fit: fill; /* 改为fill，完全填充容器 */
}

.intro-text {
    flex: 1;
    min-width: 0;
}

.intro-text h2 {
    color: #163762;
    font-size: 24px;
    margin-top: 0;
    margin-bottom: 15px;
}

.intro-text p {
    margin-bottom: 20px;
    color: #555;
    line-height: 1.8;
}

.application-list {
    padding-left: 20px;
    color: #555;
}

.application-list li {
    margin-bottom: 10px;
    position: relative;
}

/* 产品规格表格区域样式 */
.product-spec-section {
    padding: 60px 0;
    background-color: #f8f8f8;
}

.spec-title {
    color: #163762;
    font-size: 28px;
    text-align: center;
    margin-bottom: 40px;
}

.spec-table-container {
    overflow-x: auto;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    background: white;
}

.spec-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

.spec-table th,
.spec-table td {
    padding: 6px 8px;
    text-align: center;
    border: 1px solid #e0e0e0;
}

.spec-table thead th {
    background-color: #163762;
    color: white;
    font-weight: 500;
}

.spec-table tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

.spec-table tbody tr:hover {
    background-color: #f0f7ff;
}

.category-title {
    background-color: #e8f0fe;
    font-weight: bold;
    color: #163762;
    text-align: left;
    padding-left: 15px;
}

.spec-note {
    padding: 15px 20px;
    background-color: #f5f5f5;
    border-top: 1px solid #e0e0e0;
    font-size: 14px;
    color: #666;
}

/* 产品图库区域样式 - 强制4:3比例 */
.product-gallery-section {
    padding: 60px 0;
    background-color: #f8f8f8;
}

.gallery-title {
    color: #163762;
    font-size: 28px;
    text-align: center;
    margin-bottom: 40px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 电脑端4列 */
    gap: 20px;
}

.gallery-item {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    position: relative;
    width: 100%;
}

/* 强制4:3比例容器 */
.gallery-item::before {
    content: '';
    display: block;
    padding-top: 75%; /* 4:3比例 (3/4=0.75) */
}

.gallery-item:hover {
    transform: translateY(-5px);
}

/* 图片强制拉伸填充4:3容器 */
.gallery-item img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: fill; /* 强制拉伸填充 */
    border-radius: 0; /* 移除圆角避免变形 */
}

.image-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 15px;
    text-align: center;
    font-size: 16px;
    font-weight: 500;
    color: white;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    box-sizing: border-box;
    z-index: 2;
}

/* PDF下载区域样式 */
.pdf-section {
    padding: 40px 0 60px;
    background-color: white;
}

.pdf-content {
    text-align: left;
}

.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;
}

.pdf-link:hover {
    background-color: #0e2a4a;
    transform: translateY(-2px);
}

.pdf-link img {
    width: 24px;
    height: 24px;
    margin-right: 10px;
}

/* 渐入动画效果 */
@keyframes gentleAppear {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in-element {
    opacity: 0;
    animation: gentleAppear 0.6s ease-out forwards;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .intro-content {
        gap: 30px;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr); /* 平板端3列 */
    }
    
    .intro-image {
        height: 350px; /* 平板端调整高度 */
    }
}

@media (max-width: 768px) {
    .product-title-section h1 {
        font-size: 28px;
    }
    
    .sales-contact {
        margin-top: 15px;
        margin-left: 0;
        width: 100%;
    }
    
    .intro-content {
        flex-direction: column;
    }
    
    .intro-image, .intro-text {
        width: 100%;
    }
    
    .intro-image {
        height: 300px; /* 手机端调整高度 */
    }
    
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr); /* 手机端2列 */
    }
    
    .product-intro-section, .product-gallery-section, .product-spec-section {
        padding: 40px 0;
    }
    
    .spec-table th,
    .spec-table td {
        padding: 8px 5px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .product-title-section h1 {
        font-size: 24px;
    }
    
    .sales-text {
        font-size: 14px;
    }
    
    .sales-phone {
        font-size: 16px;
    }
    
    .intro-text h2 {
        font-size: 20px;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr; /* 超小屏幕1列 */
    }
    
    .intro-image {
        height: 250px; /* 超小屏幕调整高度 */
    }
    
    .pdf-link {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .image-caption {
        padding: 10px;
        font-size: 14px;
    }
}

/* 确保所有图片完全填充容器 */
.intro-image img,
.gallery-item img {
    object-fit: fill; /* 完全填充容器，不保持比例 */
}