
/* 产品详情页样式 */
.product-detail {
    padding: 30px 0 60px;
}

.product-detail > .container {
    width: min(1400px, calc(100% - 32px));
}

.detail-content {
    display: flex;
    gap: 40px;
    margin-bottom: 30px;
    background-color: #fff;
}

/* 左侧图片区域保持原有尺寸 */
.product-gallery {
    flex: 0 0 auto; /* 不自动伸缩 */
    width: 550px; /* 固定宽度 */
}

/* ------------ 覆盖式放大图样式 ------------ */
/* 主图区域 - 保持原有尺寸，添加触摸优化 */
.main-image-wrapper {
    position: relative;
    width: 100%;
    padding-top: 100%;
    border: 0px solid #fff;
    box-shadow: 0 0 15px rgba(0,0,0,0.1);
    overflow: hidden;
    cursor: crosshair; /* 电脑端鼠标变十字准星 */
    border-radius: 8px;
    touch-action: pan-y; /* 优化移动端触摸事件，避免与滑动切换冲突 */
}

/* 手机端：主图鼠标样式恢复默认，避免十字准星 */
@media (max-width: 768px) {
    .main-image-wrapper {
        cursor: default;
    }
}

.main-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: opacity 0.3s ease; /* 图片切换淡入淡出效果 */
}

.main-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

/* 鼠标选区（放大镜镜头） */
.zoom-lens {
    position: absolute;
    width: 150px;
    height: 150px;
    border: 2px solid #ff6700;
    background-color: rgba(255,255,255,0.3);
    pointer-events: none;
    display: none;
    border-radius: 4px;
}

/* 右侧产品信息区域 - 相对定位作为容器 */
.product-info {
    flex: 1;
    position: relative;
}

/* 右侧放大预览区 - 绝对定位覆盖在文字上方 */
.zoom-preview-container {
    position: absolute; /* 完全脱离文档流 */
    top: 0;
    left: 0;
    width: 84%;
    max-width: 100%;
    padding-top: 84%; /* 正方形比例 */
    border: 0px solid #fff;
    box-shadow: 0 0 15px rgba(0,0,0,0.1);
    overflow: hidden;
    display: none;
    z-index: 10; /* 确保在文字上方 */
    border-radius: 8px;
    background-color: #fff;
}

/* 手机端：强制隐藏放大镜和放大预览区（优先级最高，避免JS误显示） */
@media (max-width: 768px) {
    .zoom-lens,
    .zoom-preview-container {
        display: none !important;
    }
}

/* 产品文字信息区域 - 保持原始位置不变 */
.product-text-info {
    margin: 20px 30px 20px 10px;
}

/* 预览图片 */
.preview-image {
    position: absolute;
    top: 0;
    left: 0;
    object-fit: contain;
}

/* 缩略图切换区 */
.thumbnail-slider {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 10px 0;
    margin-top: 20px;
    scrollbar-width: thin; /* 优化滚动条样式 */
}

    /* 隐藏缩略图滚动条（美观处理） */
    .thumbnail-slider::-webkit-scrollbar {
        height: 6px;
    }

    .thumbnail-slider::-webkit-scrollbar-thumb {
        background-color: #ddd;
        border-radius: 3px;
    }

.thumbnail {
    width: 80px;
    height: 80px;
    border: 2px solid #ddd;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
    flex-shrink: 0;
    border-radius: 4px;
}

    .thumbnail:hover,
    .thumbnail.active {
        border-color: var(--accent-color);
        /*            transform: scale(1.05);*/
    }

    .thumbnail img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.video-thumbnail {
    position: relative;
    background: #111;
}

.video-thumbnail video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

.video-play-icon {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 24px;
    text-shadow: 0 1px 5px rgba(0, 0, 0, .8);
    pointer-events: none;
}

/* ------------ 覆盖式放大图样式结束 ------------ */

.product-title {
    font-size: 1.2rem;
    color: var(--text-dark);
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.product-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
    color: var(--text-light);
    font-size: 0.9rem;
}

    .product-meta span {
        display: flex;
        align-items: center;
    }

    .product-meta i {
        margin-right: 5px;
        color: var(--accent-color);
    }

.product-description {
    margin-bottom: 25px;
    line-height: 1.8;
    color: #666;
}
    .product-description p {
        white-space: pre-line !important;
        word-break: break-all; /* 防止长英文/链接不换行 */
    }

.specifications {
    margin-bottom: 30px;
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
}

.spec-title {
    font-size: 1.2rem;
    color: var(--text-dark);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.spec-table {
    width: 100%;
    border-collapse: collapse;
}

    .spec-table tr {
        border-bottom: 1px solid #eee;
    }

        .spec-table tr:last-child {
            border-bottom: none;
        }

    .spec-table td {
        padding: 12px 10px;
    }

        .spec-table td:first-child {
            font-weight: 500;
            color: var(--text-dark);
            width: 35%;
        }

        .spec-table td:last-child {
            color: #666;
        }

.action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 30px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 25px;
    border-radius: 4px;
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: var(--accent-color);
    color: white;
}

    .btn-primary:hover {
        background: #048;
        transform: translateY(-2px);
    }

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

    .btn-outline:hover {
        background: var(--primary-color);
        color: white;
        transform: translateY(-2px);
    }

.btn i {
    margin-right: 8px;
}

/* 产品详情选项卡 */
.product-tabs {
    background: white;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.tabs-header {
    display: flex;
    border-bottom: 1px solid var(--border-color);
}

.tab-btn {
    padding: 15px 25px;
    font-weight: 500;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    border-bottom: 3px solid transparent;
    background: transparent;
    border: none;
    font-size: 1rem;
    position: relative;
}

    .tab-btn.active {
        color: var(--accent-color);
        border-bottom-color: var(--accent-color);
        text-decoration: underline;
        text-underline-offset: 18px;
        text-decoration-thickness: 2px;
        transform: translateY(0);
    }

    .tab-btn:not(.active):hover {
        color: var(--primary-color);
        transform: translateY(-2px);
    }

    /* 点击波纹效果 */
    .tab-btn:after {
        content: '';
        display: block;
        position: absolute;
        width: 100%;
        height: 100%;
        top: 0;
        left: 0;
        pointer-events: none;
        background-image: radial-gradient(circle, #000 10%, transparent 10.01%);
        background-repeat: no-repeat;
        background-position: 50%;
        transform: scale(10, 10);
        opacity: 0;
        transition: transform 0.5s, opacity 0.8s;
    }

    .tab-btn:active:after {
        transform: scale(0, 0);
        opacity: 0.3;
        transition: 0s;
    }

.tab-content {
    display: none;
    padding: 30px;
    animation: fadeIn 0.5s ease-out forwards;
}

    .tab-content.active {
        display: block;
    }

.tab-content {
    overflow-x: auto;
}

    .tab-content H2 {
        margin-bottom: 10px;
        color: var(--text-dark);
        font-size: 1.2em;
    }

    .tab-content .c2 {
        margin-bottom: 25px;
        float:left;
    }

        .tab-content .c2 P {
            line-height: 25px;
            margin:8px;
        }

        .tab-content .c2 img {
            max-width: 100%;
        }

    .tab-content table {
        border-collapse: collapse;
        width: 100%;
    }

        .tab-content table tbody tr:nth-child(odd) {
            background: #f6f6f6;
        }

        .tab-content table tbody tr:nth-child(even) {
            background: #fff;
        }

        .tab-content table tbody tr:nth-child(1) {
            background: var(--primary-color);
        }

            .tab-content table tbody tr:nth-child(1) td {
                color: #fff;
            }

                .tab-content table tbody tr:nth-child(1) td p {
                    color: #fff;
                }

        .tab-content table tbody tr td {
            border: 1px solid #ddd;
            padding: 0 10px;
            font-size: 14px;
            color: #4c4c4c;
            /*text-align: center;*/
            word-break: normal;
            /* padding-left: 20px;*/
            line-height: 32px;
        }

/* 内容淡入动画 */
@keyframes fadeIn {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.features-grid {
    display: grid;
    /*            grid-template-columns: repeat(2, 1fr);*/
    gap: 30px;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.feature-icon {
    width: 50px;
    height: 50px;
    background: var(--light-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

    .feature-icon i {
        color: var(--accent-color);
        font-size: 1.2rem;
    }

.feature-content h4 {
    margin-bottom: 8px;
    color: var(--text-dark);
}

.feature-content p {
    color: #666;
    line-height: 1.6;
}

/* 相关产品 */
.related-products {
    margin-top: 60px;
}

.related-title {
    font-size: 1.2rem;
    color: var(--text-dark);
    margin-bottom: 30px;
    position: relative;
    display: inline-block;
}

    .related-title:after {
        content: '';
        position: absolute;
        bottom: -10px;
        left: 0;
        width: 60px;
        height: 3px;
        background-color: var(--accent-color);
    }

.related-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.related-item {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    transition: var(--transition);
}

    .related-item:hover {
        transform: translateY(-5px);
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.12);
    }

.product-link {
    display: block;
    text-decoration: none;
}

.related-image {
    position: relative;
    width: 100%;
    padding-top: 100%;
    overflow: hidden;
}

    .related-image img {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: var(--transition);
    }

.related-item:hover .related-image img {
    transform: scale(1.05);
}

.related-info {
    padding: 15px;
}

    .related-info h3 {
        font-size: 1rem;
        color: var(--text-dark);
        margin-bottom: 5px;
    }

/* 详细规格表格样式 */
.full-specs {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

    .full-specs th,
    .full-specs td {
        padding: 12px 15px;
        text-align: left;
        border-bottom: 1px solid #eee;
    }

    .full-specs th {
        background-color: #f9f9f9;
        color: var(--text-dark);
        width: 25%;
    }

    .full-specs tr:hover {
        background-color: rgba(0, 0, 0, 0.02);
    }

/* 资料下载区域样式 */
.downloads-list {
    margin-top: 20px;
}

.download-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border-radius: 5px;
    background-color: #f9f9f9;
    margin-bottom: 15px;
    transition: var(--transition);
}

    .download-item:hover {
        background-color: var(--light-color);
    }

.download-icon {
    width: 40px;
    height: 40px;
    background-color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    color: var(--accent-color);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.download-info {
    flex: 1;
}

    .download-info h4 {
        color: var(--text-dark);
        margin-bottom: 3px;
        font-size: 1rem;
    }

    .download-info p {
        color: #666;
        font-size: 0.85rem;
    }

.download-link {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
}

    .download-link i {
        margin-left: 5px;
        transition: var(--transition);
    }

    .download-link:hover i {
        transform: translateX(3px);
    }

/* 响应式设计 */
@media (max-width: 1200px) {
    .product-gallery {
        width: 450px;
    }

    .zoom-preview-container {
        max-width: 450px;
    }
}

@media (max-width: 992px) {
    .detail-content {
        flex-direction: column;
    }

    .product-gallery {
        width: 100%;
        max-width: 550px;
        margin: 0 auto;
    }

    .zoom-preview-container {
        position: relative; /* 在小屏幕上改为相对定位 */
        display: block;
        max-width: 100%;
        margin-bottom: 20px;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .action-buttons {
        flex-direction: column;
    }

    .related-grid {
        /*                grid-template-columns: 1fr;*/
        grid-template-columns: repeat(2, 1fr);
    }

    .tabs-header {
        overflow-x: auto;
        white-space: nowrap;
    }

    .zoom-lens {
        width: 120px;
        height: 120px;
    }

    .full-specs {
        font-size: 0.9rem;
    }

        .full-specs th,
        .full-specs td {
            padding: 8px 10px;
        }
}
