/* Banner样式 */
.products-banner {
    height: 50vh;
    min-height: 400px;
    background-image: url('../images/products/products-banner.jpg');
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 0;
    width: 100%; /* 确保宽度为100% */
}

.banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.products-banner h1 {
    color: #fff;
    font-size: 48px;
    position: relative;
    z-index: 2;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

/* 调整容器宽度限制 */
.container {
    max-width: 1200px;  /* 从1600px改为1200px，与全局样式保持一致 */
    margin: 0 auto;
    padding: 0 15px;  /* 从30px改为15px，与全局样式保持一致 */
}

/* 产品展示区域样式 */
.products-section {
    padding: 60px 0; /* 从80px改为60px，与全局section样式一致 */
    background: #1a1a1a;
    width: 100%; /* 确保宽度为100% */
}

.products-container {
    display: flex;
    gap: 60px;  /* 增加间距 */
    width: 100%;
}

/* 左侧分类导航 */
.category-nav {
    width: 300px;
    flex-shrink: 0;
    background: rgba(198, 165, 126, 0.1);
    padding: 30px;
    align-self: flex-start;
    position: sticky;
    top: 120px;
    border-radius: 8px; /* 添加8px圆角 */
}

.category-nav h2 {
    color: #C6A57E;
    font-size: 24px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #C6A57E;
}

.category-nav ul {
    list-style: none;
    padding: 0;
}

.category-nav li {
    margin-bottom: 15px;
}

.category-nav a {
    color: #fff;
    text-decoration: none;
    font-size: 16px;
    transition: color 0.3s ease;
}

.category-nav a:hover,
.category-nav li.active a {
    color: #C6A57E;
}

/* 右侧产品网格 */
.products-grid {
    flex: 1;
    min-width: 0;
    align-self: stretch;
}

#productsList {
    display: grid;
    grid-template-columns: repeat(3, minmax(300px, 1fr));  /* 改为3列 */
    gap: 30px;
    width: 100%;
}

/* 产品卡片样式 */
.product-card {
    background: #262626;
    border-radius: 8px; /* 统一为8px圆角 */
    overflow: hidden;
    transition: transform 0.3s ease;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    width: 100%;
    aspect-ratio: 1/1;  /* 保持1:1比例 */
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-card img {
    width: 100%;
    height: 75%;
    object-fit: cover;
}

.product-card h3 {
    color: #fff;
    padding: 15px;  /* 从30px减半到15px */
    margin: 0;
    text-align: center;
    font-size: 16px;  /* 从24px减小到16px */
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 响应式调整 */
@media (max-width: 1600px) {
    #productsList {
        grid-template-columns: repeat(3, minmax(250px, 1fr));  /* 保持3列 */
    }
}

@media (max-width: 1200px) {
    #productsList {
        grid-template-columns: repeat(2, minmax(200px, 1fr));  /* 中等屏幕2列 */
    }
}

@media (max-width: 992px) {
    #productsList {
        grid-template-columns: repeat(2, minmax(300px, 1fr));  /* 平板2列 */
    }
    .category-nav {
        position: static;
        width: 100%;
    }
}

@media (max-width: 768px) {
    #productsList {
        grid-template-columns: 1fr;  /* 移动端1列 */
    }
}

/* 产品详情页 banner */
.product-detail-banner {
    height: 40vh;
    min-height: 300px;
    background-image: url('../images/products/product-detail-banner.jpg');
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 0;
    width: 100%; /* 确保宽度为100% */
}

.product-detail-banner .banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.product-detail-banner h1 {
    color: #fff;
    font-size: 48px;
    position: relative;
    z-index: 2;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

/* 产品详情页样式 */
.product-detail-section {
    padding: 60px 0; /* 从80px改为60px，与全局section样式一致 */
    background: #1a1a1a;  /* 添加深色背景 */
    min-height: 100vh;
    width: 100%; /* 确保宽度为100% */
}

/* 产品详情容器样式 */
.product-detail-container {
    display: flex;
    gap: 60px;
    margin-bottom: 60px;
    color: #fff;  /* 确保文字颜色为白色 */
}

/* 左侧信息区域 */
.product-info {
    width: 50%;  /* 调整宽度比例 */
    color: #fff;
    order: 1;    /* 将信息区域放在左边 */
}

/* 右侧图片区域 */
.product-images {
    width: 50%;  /* 调整宽度比例 */
    order: 2;    /* 将图片区域放在右边 */
}

.main-image {
    margin-bottom: 30px;
    width: 100%;
}

.main-image img {
    width: 100%;
    max-height: 400px;  /* 限制图片最大高度 */
    object-fit: contain;  /* 保持图片比例 */
}

.structure-image {
    width: 100%;
    max-height: 300px;  /* 限制结构图最大高度 */
    object-fit: contain;  /* 保持图片比例 */
    display: block;  /* 确保图片作为块级元素 */
    margin: 0 auto;  /* 居中显示 */
}

.product-info h1 {
    font-size: 32px;
    margin-bottom: 30px;
    color: #C6A57E;
}

.info-group {
    margin-bottom: 30px;
}

.info-item {
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
}

.info-item:last-child {
    margin-bottom: 0;
}

.info-item label {
    color: #C6A57E;
    width: 120px;
    flex-shrink: 0;
}

/* 规格表部分样式 */
.specifications-section {
    margin-top: 60px;
    background: #1a1a1a;  /* 确保规格表部分也是深色背景 */
}

.specifications-section h2 {
    color: #C6A57E;
    margin-bottom: 30px;
    text-align: center;
}

.specifications-table {
    width: 100%;
    border-collapse: separate; /* 改为separate才能应用边框圆角 */
    border-spacing: 0;
    border-radius: 8px; /* 添加8px圆角 */
    overflow: hidden; /* 确保内容不溢出圆角 */
}

.specifications-table th,
.specifications-table td {
    padding: 15px;
    text-align: left;
    border: 1px solid rgba(198, 165, 126, 0.2);
    color: #fff;
}

.specifications-table th {
    color: #C6A57E;
}

/* 响应式调整 */
@media (max-width: 992px) {
    .product-detail-container {
        flex-direction: column;
        gap: 40px;
    }

    .product-images,
    .product-info {
        width: 100%;
    }

    .main-image img,
    .structure-image {
        max-height: none;  /* 移动端不限制图片高度 */
    }
}

@media (max-width: 768px) {
    .product-detail-banner {
        height: 30vh;
        min-height: 200px;
    }

    .product-detail-banner h1 {
        font-size: 36px;
    }

    .product-detail-container {
        padding: 40px 0 50px;
    }

    .info-item {
        flex-direction: column;
    }

    .info-item label {
        margin-bottom: 5px;
    }
}

/* 添加新的标题区域样式 */
.title-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.title-section h1 {
    margin-bottom: 0;
    margin-right: 20px;
}

.back-link {
    color: #C6A57E;
    text-decoration: none;
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    transition: color 0.3s ease;
    white-space: nowrap;
}

.back-link:hover {
    color: #fff;
}

.back-link i {
    margin-right: 10px;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .title-section {
        flex-direction: column-reverse;
        align-items: flex-start;
        gap: 15px;
    }

    .back-link {
        align-self: flex-start;
    }
}

/* 返回按钮样式 */
.back-to-products {
    margin-bottom: 40px;
}

.back-to-products a {
    display: inline-flex;
    align-items: center;
    padding: 12px 25px;
    background-color: #C6A57E;
    color: #fff;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid #C6A57E;
    border-radius: 8px; /* 添加8px圆角 */
}

.back-to-products a:hover {
    background-color: transparent;
    color: #C6A57E;
}

.back-to-products i {
    margin-right: 10px;
} 