/* 基础样式 */
.banner {
    width: 100%;
    overflow: hidden;
}

.banner-img {
    width: 100%;
    height: 400px;
    display: block;
    object-fit: cover;
    object-position: center;
    margin: 0;
    padding: 0;
}

.product-page {
    width: 100%;
    max-width: none;
    padding: 0;
    margin: 0;
}

.product-tabs {
    margin-bottom: 20px;
    padding: 10px 0;
    background: #efefef;
}

.product-tabs .l1Name {
    margin-top: 7px;
    font-size: 20px;
    font-weight: 600;
    color: #940c11;
    margin-right: 10px;
    padding: 0 50px;
    border-right: 1px solid #646464;
    width: 205px;
    align-content: center;
}

.tab-btn {
    padding: 10px 0;
    border: none;
    cursor: pointer;
    font-size: 20px;
    color: #333;
    flex: 1;
    min-width: 200px;
    transition: all 0.3s;
}

.tab-btn.active,
.tab-btn:hover {
    color: #940c11;
}

.product-content {
    display: none;
    margin-top: 30px;
    text-align: left;
}

.product-content.active {
    display: flex !important;
    gap: 30px;
    flex-wrap: wrap;
    text-align: left;
}

.product-left {
    flex: 0 0 25%;
}

.product-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
}

.product-content p {
    font-size: 18px;
    line-height: 1.8;
    color: #333333;
}

.product-content h6 {
    font-size: 18px;
    line-height: 1.8;
    color: #333333;
    margin-bottom: 15px;
    font-weight: 400;
}

.product-left {
    background-color: white;
}

.product-sub-tabs {
    display: flex;
    flex-direction: column;
}

.sub-tab-btn {
    padding: 25px;
    text-align: center;
    background: white;
    border: 1px solid white;
    border-bottom: 1px solid #e0e0e0;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 20px;
    font-weight: bolder;
    color: #595959;
}

.sub-tab-btn:hover {
    background: white;
    color: #940c11;
    border: 1px solid white;
    border-left: 4px solid #940c11;
    border-bottom: 1px solid #e0e0e0;
}

.sub-tab-btn.active {
    background: white;
    color: #940c11;
    border: 1px solid white;
    border-left: 4px solid #940c11;
    border-bottom: 1px solid #e0e0e0;
}

/* 轮播容器 */
.carousel-container {
    position: relative;
    width: 100%;
    height: 400px;
    margin-bottom: 30px;
}

.carousel {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.carousel-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.carousel-item.active {
    opacity: 1;
}

.product-img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* 轮播指示器 */
.carousel-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.indicator {
    width: 12px;
    height: 12px;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator.active {
    background-color: white;
    transform: scale(1.2);
}

/* 产品信息 */
.product-info {
    padding: 20px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.product-info h3 {
    font-size: 24px;
    color: #333;
    margin-bottom: 15px;
}

.divider {
    width: 40px;
    height: 6px;
    background-color: #940c11;
    margin-bottom: 20px;
}

.product-info p {
    font-size: 16px;
    line-height: 1.8;
    color: #555;
    margin-bottom: 30px;
}

.product-container {
    width: 100%;
    position: relative;
    overflow: hidden;
    margin-bottom: 30px;
}

.product {
    position: relative;
    width: 100%;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.product-left {
    position: relative;
    width: 100%;
    height: 100%;
}

.product-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.product-item.active {
    opacity: 1;
}

/* 轮播指示器 */
.product-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.indicator {
    width: 12px;
    height: 12px;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator.active {
    background-color: white;
    transform: scale(1.2);
}

/* 产品信息 */
.product-info h3 {
    font-size: 24px;
    color: #333;
    margin-bottom: 15px;
    border-bottom: 2px solid #940c11;
    padding-bottom: 10px;
}

.divider {
    width: 40px;
    height: 4px;
    background-color: #940c11;
    margin-bottom: 20px;
}

.product-info p {
    font-size: 16px;
    line-height: 1.8;
    color: #555;
    margin-bottom: 30px;
    text-align: justify;
}

.buy-now-btn {
    background-color: rgb(237, 237, 237);
    color: #940c11;
    padding: 20px 30px;
    border: none;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
    display: block;
    margin-left: auto;
    margin-right: 0;
}

.buy-now-btn:hover {
    background-color: #7a0a0e;
    color: white;
}

/* 产品画廊容器 */
.product-gallery {
    display: flex;
    gap: 30px;
    margin-top: 40px;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: #940c11 #f8f9fa;
}

.product-gallery::-webkit-scrollbar {
    height: 8px;
}

.product-gallery::-webkit-scrollbar-track {
    background: #f8f9fa;
    border-radius: 4px;
}

.product-gallery::-webkit-scrollbar-thumb {
    background-color: #940c11;
    border-radius: 4px;
}

/* 画廊项目 */
.gallery-item {
    flex: 0 0 calc(33.333% - 20px);
    min-width: 200px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    cursor: pointer;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* 画廊图片 */
.gallery-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

/* 画廊标题 */
.gallery-caption {
    text-align: center;
    padding: 5px;
    font-size: 16px;
    color: #333;
    background-color: white;
    border-top: 1px solid #eee;
}

/* 规格参数表格容器 */
.specification-table {
    margin: 30px 0;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* 表格标题 */
.specification-table h4 {
    font-size: 18px;
    color: #333;
    margin-bottom: 15px;
    border-bottom: 2px solid #940c11;
    padding-bottom: 10px;
}

/* 规格参数表格 */
.specs-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    color: #f1f1f1;
}

/* 表头 */
.specs-table thead {
    background-color: #940c11;
    color: white;
}

.specs-table th {
    padding: 12px 12px;
    text-align: center;
    font-weight: bold;
    border-bottom: 2px solid #eee;
}

/* 表格行 */
.specs-table tbody tr {
    border-bottom: 1px solid #eee;
    text-align: center;
}

.specs-table tbody tr:hover {
    background-color: #f1f3f5;
}

/* 表格单元格 */
.specs-table td {
    max-width: 500px;
    padding: 8px 5px;
    border: 1px solid #b0b0b0;
    text-align: left
}

td {
    color: #333;
    text-align: center;
}

/* 分类列 - 合并单元格 */
.category-cell {
    color: #333;
    /* font-weight: bold; */
    /* vertical-align: top; */
    padding: 12px 15px;
    border-right: none;
}

/* 产品容器默认隐藏 */
.product-container {
    display: none;
    width: 100%;
}

/* 激活的产品容器显示 */
.product-container.active {
    display: block;
}

/* 确保产品右侧区域正确显示 */
.product-right {
    flex: 1;
    padding: 20px;
}

/* 确保产品左侧区域样式正确 */
.product-left {
    flex: 0 0 25%;
    background-color: white;
    border-right: 1px solid #e0e0e0;
}

/* 确保非钢铁类产品容器的显示/隐藏逻辑正确 */
#fmh,
#glscz,
#kzf,
#sn {
    display: none;
}

#fmh.active,
#glscz.active,
#kzf.active,
#sn.active {
    display: block;
}

/* 移动端自适应样式 */

/* 大平板设备 (1024px 及以下) */
@media (max-width: 1024px) {
    .banner-img {
        height: 350px;
    }

    .product-tabs .l1Name {
        padding: 0 30px;
        width: 180px;
        font-size: 18px;
    }

    .tab-btn {
        font-size: 18px;
        min-width: 180px;
    }

    .sub-tab-btn {
        padding: 20px;
        font-size: 18px;
    }

    .product-content {
        gap: 20px;
        margin-top: 20px;
    }

    .product-info h3 {
        font-size: 22px;
    }

    .product-info p {
        font-size: 15px;
    }

    .buy-now-btn {
        padding: 15px 25px;
        font-size: 15px;
    }

    .gallery-item {
        flex: 0 0 calc(33.333% - 20px);
        min-width: 150px;
    }

    .gallery-img {
        height: 150px;
    }

    .specs-table th,
    .specs-table td {
        padding: 10px 12px;
        font-size: 14px;
    }
}

/* 平板设备 (768px 及以下) */
@media (max-width: 768px) {
    .banner-img {
        height: 300px;
    }

    .product-tabs {
        padding: 8px 0;
        margin-bottom: 15px;
    }

    .product-tabs .l1Name {
        width: auto !important;
        min-width: 150px;
        padding: 0 20px;
        font-size: 18px;
        border-right: 1px solid #646464;
        margin-top: 5px;
        text-align: center;
    }

    .tab-btn {
        min-width: 100%;
        text-align: center;
        padding: 10px 0;
        font-size: 18px;
        margin-bottom: 5px;
    }

    .product-content {
        flex-direction: column;
        gap: 20px;
        margin-top: 20px;
    }

    .product-content.active {
        flex-direction: column;
    }

    .product-left {
        flex: 0 0 100%;
        margin-bottom: 20px;
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
        padding-bottom: 20px;
    }

    .product-right {
        flex: 0 0 100%;
        padding: 0;
    }

    .sub-tab-btn {
        padding: 15px;
        font-size: 16px;
    }

    .product-info h3 {
        font-size: 20px;
    }

    .product-info p {
        font-size: 14px;
        line-height: 1.6;
    }

    .buy-now-btn {
        padding: 12px 20px;
        font-size: 14px;
    }

    .product-gallery {
        gap: 15px;
        margin-top: 20px;
    }

    .gallery-item {
        flex: 0 0 calc(50% - 10px);
        min-width: 120px;
    }

    .gallery-img {
        height: 120px;
    }

    .gallery-caption {
        padding: 10px;
        font-size: 14px;
    }

    .specification-table {
        padding: 15px;
        margin: 20px 0;
    }

    .specification-table h4 {
        font-size: 16px;
    }

    .specs-table th,
    .specs-table td {
        padding: 8px 10px;
        font-size: 12px;
    }

    .carousel-container {
        height: 300px;
        margin-bottom: 20px;
    }
}

/* 小屏幕手机 (480px 及以下) */
@media (max-width: 480px) {
    .banner-img {
        height: 250px;
    }

    .product-tabs .l1Name {
        font-size: 16px;
        padding: 0 15px;
        min-width: 120px;
    }

    .tab-btn {
        font-size: 16px;
        padding: 8px 0;
    }

    .product-content h6 {
        font-size: 15px;
    }

    .product-content p {
        font-size: 14px;
        line-height: 1.5;
    }

    .sub-tab-btn {
        padding: 12px;
        font-size: 15px;
    }

    .product-info h3 {
        font-size: 18px;
    }

    .product-info p {
        font-size: 13px;
    }

    .buy-now-btn {
        padding: 10px 15px;
        font-size: 13px;
    }

    .product-gallery {
        gap: 10px;
    }

    .gallery-item {
        flex: 0 0 calc(50% - 8px);
        min-width: 100px;
    }

    .gallery-img {
        height: 100px;
    }

    .gallery-caption {
        padding: 8px;
        font-size: 12px;
    }

    .specification-table h4 {
        font-size: 14px;
    }

    .specs-table th,
    .specs-table td {
        padding: 6px 8px;
        font-size: 11px;
    }

    .carousel-container {
        height: 250px;
    }
}

/* 超小屏幕手机 (320px 及以下) */
@media (max-width: 320px) {
    .banner-img {
        height: 200px;
    }

    .product-tabs .l1Name {
        font-size: 14px;
        padding: 0 10px;
        min-width: 100px;
    }

    .tab-btn {
        font-size: 14px;
        padding: 6px 0;
    }

    .product-content h6 {
        font-size: 14px;
    }

    .product-content p {
        font-size: 13px;
    }

    .sub-tab-btn {
        padding: 10px;
        font-size: 14px;
    }

    .product-info h3 {
        font-size: 16px;
    }

    .product-info p {
        font-size: 12px;
    }

    .buy-now-btn {
        padding: 8px 12px;
        font-size: 12px;
    }

    .gallery-item {
        flex: 0 0 100%;
    }

    .gallery-img {
        height: 80px;
    }

    .gallery-caption {
        padding: 6px;
        font-size: 11px;
    }

    .specs-table th,
    .specs-table td {
        padding: 4px 6px;
        font-size: 10px;
    }

    .carousel-container {
        height: 200px;
    }
}

/* 通用移动端优化 */
@media (max-width: 768px) {
    .product-tabs .l1Name {
        width: 2% !important;
        border-right: none !important;
        margin: 0 0 10px 0 !important;
        text-align: center;
    }

    .product-tabs .column.flex {
        flex-direction: row !important;
        flex-wrap: wrap !important;
        width: 100% !important;
        gap: 10px;
    }

    .product-tabs .tab-btn {
        flex: 0 0 calc(50% - 5px) !important;
        min-width: auto !important;
        margin: 0 !important;
        text-align: center;
    }
}

/* 修复移动端表格超出问题 */
@media (max-width: 768px) {

    /* 调整规格参数表格样式 */
    .specification-table {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 20px 0;
        padding: 15px;
        background-color: #f8f9fa;
        border-radius: 8px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }

    /* 确保表格宽度适配容器 */
    .specs-table {
        width: 100%;
        min-width: 300px;
        border-collapse: collapse;
        margin: 0;
        color: #333;
        table-layout: fixed;
        /* 固定表格布局 */
    }

    /* 表头样式调整 */
    .specs-table thead {
        background-color: #940c11;
        color: white;
    }

    .specs-table th {
        padding: 10px 12px;
        text-align: center;
        font-weight: bold;
        border-bottom: 2px solid #eee;
        white-space: nowrap;
        font-size: 14px;
    }

    /* 表格行样式调整 */
    .specs-table tbody tr {
        border-bottom: 1px solid #eee;
        text-align: center;
    }

    /* 表格单元格样式调整 */
    .specs-table td {
        padding: 8px 12px;
        border: 1px solid #b0b0b0;
        text-align: center;
        word-break: break-all;
        white-space: normal;
        font-size: 13px;
    }

    /* 分类列样式调整 */
    .category-cell {
        color: #333;
        padding: 10px 12px;
        border-right: none;
        white-space: normal;
    }

    /* 产品信息区域调整 */
    .product-info {
        padding: 15px 0;
    }

    .product-info h3 {
        font-size: 18px;
        margin-bottom: 12px;
    }

    .product-info p {
        font-size: 14px;
        line-height: 1.6;
        margin-bottom: 20px;
    }

    /* 画廊项目调整 */
    .gallery-item {
        flex: 0 0 calc(50% - 10px);
        min-width: 120px;
    }

    .gallery-img {
        height: 120px;
    }

    /* 按钮样式调整 */
    .buy-now-btn {
        padding: 12px 20px;
        font-size: 14px;
    }
}

/* 小屏幕手机 (480px 及以下) */
@media (max-width: 480px) {
    .specification-table {
        padding: 12px;
        margin: 15px 0;
    }

    .specs-table {
        min-width: 250px;
    }

    .specs-table th,
    .specs-table td {
        padding: 6px 8px;
        font-size: 12px;
    }

    .product-info h3 {
        font-size: 16px;
    }

    .product-info p {
        font-size: 13px;
    }

    .buy-now-btn {
        padding: 10px 15px;
        font-size: 13px;
    }

    .gallery-item {
        flex: 0 0 100%;
    }

    .gallery-img {
        height: 100px;
    }
}

/* 超小屏幕手机 (320px 及以下) */
@media (max-width: 320px) {
    .specification-table {
        padding: 10px;
        margin: 10px 0;
    }

    .specs-table {
        min-width: 200px;
    }

    .specs-table th,
    .specs-table td {
        padding: 4px 6px;
        font-size: 11px;
    }

    .product-info h3 {
        font-size: 14px;
    }

    .product-info p {
        font-size: 12px;
    }

    .buy-now-btn {
        padding: 8px 12px;
        font-size: 12px;
    }

    .gallery-item {
        flex: 0 0 100%;
    }

    .gallery-img {
        height: 80px;
    }
}