/* ========================================
   产品页面样式
   ======================================== */

/* 左侧分类导航 */
.category-sidebar {
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 5px 30px rgba(0,0,0,0.08);
    overflow: hidden;
    position: sticky;
    top: 90px;
}

.sidebar-title {
    background: var(--gradient-primary);
    color: #fff;
    padding: 18px 20px;
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
}

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

.category-item {
    border-bottom: 1px solid #f0f0f0;
}

.category-item:last-child {
    border-bottom: none;
}

.category-link-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    transition: all 0.3s ease;
}

.category-link-wrap:hover,
.category-item.active > .category-link-wrap {
    background: rgba(30, 82, 146,0.05);
}

.category-link {
    color: var(--secondary-color);
    font-weight: 600;
    font-size: 0.95rem;
    flex: 1;
}

.category-link:hover,
.category-item.active .category-link {
    color: var(--primary-color);
}

.toggle-btn {
    cursor: pointer;
    color: #999;
    transition: all 0.3s ease;
    font-size: 1rem;
    margin-left: 10px;
    padding: 8px 12px;
}

.toggle-btn:hover {
    color: var(--primary-color);
    background: rgba(30, 82, 146,0.1);
    border-radius: 5px;
}

.category-item.active .toggle-btn {
    color: var(--primary-color);
}

/* 展开时图标旋转 */
.subcategory-list.show + .toggle-btn,
.category-item .subcategory-list.show ~ .toggle-btn {
    transform: rotate(180deg);
}

.subcategory-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: none;
    background: #fafafa;
}

.subcategory-list.show {
    display: block;
}

.subcategory-list li a {
    display: block;
    padding: 10px 20px 10px 35px;
    color: #666;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.subcategory-list li a:hover,
.subcategory-list li.active a {
    color: var(--primary-color);
    background: rgba(30, 82, 146,0.08);
    border-left-color: var(--primary-color);
}

/* 右侧产品列表 */
.products-content {
    background: #fff;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 30px rgba(0,0,0,0.08);
}

.products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
    margin-bottom: 25px;
}

.products-header h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin: 0;
}

.products-header h3 span {
    font-weight: 400;
    color: var(--text-muted);
    font-size: 1rem;
}

.products-sort {
    display: flex;
    align-items: center;
    gap: 10px;
}

.products-sort span {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.products-sort .form-select {
    width: auto;
    border-radius: 8px;
}

/* 产品网格 */
.products-grid-page {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.product-card-page {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.product-card-page:hover {
    border-color: var(--primary-color);
    box-shadow: 0 10px 30px rgba(30, 82, 146,0.1);
    transform: translateY(-5px);
}

.product-card-page a {
    display: block;
    text-decoration: none;
}

.product-img {
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: #f8f9fa;
}

.product-img img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.product-card-page:hover .product-img img {
    transform: scale(1.05);
}

.product-info {
    padding: 15px 0px;
    text-align: center;
}

.product-info h5 {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 5px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.product-model {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0;
}



/* ========================================
   产品详情页样式
   ======================================== */

/* 面包屑 - 简洁风格 */
.breadcrumb-section {
    background: #fff;
    padding: 18px 0;
    margin-top: 82px;
    border-bottom: 1px solid #eee;
}

.breadcrumb-section .breadcrumb {
    margin: 0;
    background: none;
}

.breadcrumb-section .breadcrumb-item a {
    color: #888;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.breadcrumb-section .breadcrumb-item a:hover {
    color: var(--primary-color);
}

.breadcrumb-section .breadcrumb-item.active {
    color: var(--primary-color);
    font-weight: 500;
}

.breadcrumb-section .breadcrumb-item + .breadcrumb-item::before {
    color: #ccc;
    content: ">";
    font-size: 0.8rem;
}

/* 产品详情区域 */
.product-detail-section {
    padding: 50px 0;
    background: #fff;
}

/* 产品图片画廊 */
.product-gallery {
    position: sticky;
    top: 100px;
}

/* 右侧缩略图布局 */
.product-gallery-right {
    display: flex;
    gap: 15px;
}

.gallery-main-wrapper {
    flex: 1;
}

.main-image {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 30px;
    text-align: center;
}

.main-image img {
    max-width: 100%;
    max-height: 550px;
    object-fit: contain;
}

/* 默认缩略图布局（水平） */
.thumbnail-list {
    display: flex;
    gap: 10px;
}

/* 右侧缩略图布局（垂直） */
.thumbnail-list-right {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 90px;
    flex-shrink: 0;
}

.thumbnail {
    width: 80px;
    height: 80px;
    border: 2px solid #eee;
    border-radius: 10px;
    padding: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.thumbnail:hover,
.thumbnail.active {
    border-color: var(--primary-color);
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* 产品信息 */
.product-info-detail {
    padding-left: 0px;
}

.product-info-detail h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.product-model-detail {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.product-desc {
    margin-bottom: 25px;
}

.product-desc p {
    color: #555;
    line-height: 1.8;
    font-size: 0.95rem;
}

.product-features-list {
    list-style: none;
    padding: 0;
    margin: 0 0 30px 0;
}

.product-features-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 0;
    color: #555;
    font-size: 0.95rem;
    line-height: 1.6;
}

.product-features-list li i {
    color: var(--primary-color);
    font-size: 1rem;
    margin-top: 3px;
    flex-shrink: 0;
}

.product-features-list li strong {
    white-space: nowrap;
    flex-shrink: 0;
}

.product-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.product-actions .btn {
    padding: 12px 30px;
    border-radius: 8px;
    font-weight: 600;
}

/* 产品详情TAB */
.product-tabs-section {
    padding: 50px 0;
    background: #f8f9fa;
}

.detail-tabs {
    background: #fff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 30px rgba(0,0,0,0.08);
}

.detail-tabs-nav {
    display: flex;
    border-bottom: 2px solid #f0f0f0;
}

.detail-tab-btn {
    padding: 18px 35px;
    font-size: 1rem;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
}

.detail-tab-btn:hover {
    color: var(--primary-color);
}

.detail-tab-btn.active {
    color: #fff;
    background: var(--gradient-primary);
    border-bottom-color: var(--primary-color);
}

.detail-tabs-content {
    padding: 30px;
}

.detail-tab-panel {
    display: none;
}

.detail-tab-panel.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* 技术参数表格 */
.specs-table {
    width: 100%;
    border-collapse: collapse;
}

.specs-table tr {
    border-bottom: 1px solid #f0f0f0;
}

.specs-table th,
.specs-table td {
    padding: 15px 20px;
    text-align: left;
    
}

.specs-table th {
    width: 200px;
    background: #f8f9fa;
    color: var(--secondary-color);
    font-weight: 600;
    font-size: 0.95rem;
}

.specs-table td {
    color: #555;
    font-size: 0.95rem;
    border-right: 1px solid #f3f3f3;
}

/* 使用手册 */
.manual-content h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.manual-content p {
    color: #555;
    line-height: 1.8;
    margin-bottom: 10px;
    padding-left: 15px;
}

/* 尺寸图 */
.size-diagram {
    text-align: center;
}

.size-diagram img {
    max-width: 100%;
    max-height: 400px;
    border-radius: 10px;
}

/* 下载容器 */
.download-container {
    padding: 0;
}

.download-container .download-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* 下载列表 */
.download-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* 无下载文件提示 */
.no-download {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.no-download i {
    font-size: 3rem;
    color: #ddd;
    display: block;
    margin-bottom: 15px;
}

.no-download p {
    font-size: 1rem;
    color: #999;
    margin: 0;
}

.download-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 18px 25px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #eee;
    transition: all 0.3s ease;
}

.download-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 8px 30px rgba(30, 82, 146,0.1);
    transform: translateY(-2px);
}

.download-icon {
    width: 50px;
    height: 50px;
    background: #1976d2;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.download-icon i {
    font-size: 1.6rem;
    color: #fff;
}

.download-info {
    flex: 1;
    min-width: 0;
}

.download-info h5 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 6px;
}

.download-meta {
    display: flex;
    gap: 15px;
}

.download-meta span {
    font-size: 0.8rem;
    color: #999;
    display: flex;
    align-items: center;
    gap: 4px;
}

.download-meta i {
    font-size: 0.85rem;
}

.btn-download {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 65px;
    height: 50px;
    background: var(--gradient-primary);
    border-radius: 8px;
    color: #fff;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.btn-download i {
    font-size: 1.1rem;
}

.btn-download span {
    font-size: 0.7rem;
    margin-top: 2px;
}

.btn-download:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(30, 82, 146,0.35);
    color: #fff;
}

.download-info p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0;
}

/* 相关产品 */
.related-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 3px solid red;
    display: inline-block;
}

/* 响应式 */
@media (max-width: 1200px) {
    .products-grid-page {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 991px) {
    .category-sidebar {
        position: static;
        margin-bottom: 30px;
    }
    
    .products-grid-page {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .product-info-detail {
        padding-left: 0;
        margin-top: 30px;
    }
    
    .detail-tabs-nav {
        flex-wrap: wrap;
    }
    
    .detail-tab-btn {
        padding: 12px 20px;
        font-size: 0.9rem;
    }
    
    /* 移动端缩略图回到底部 */
    .product-gallery-right {
        flex-direction: column;
        margin-bottom: 90px;
    }
    
    .thumbnail-list-right {
        flex-direction: row;
        width: 100%;
        overflow-x: auto;
    }
}

@media (max-width: 576px) {
    .products-grid-page {
        grid-template-columns: 1fr;
    }
    
    .products-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .product-info-detail h1 {
        font-size: 1.4rem;
    }
    
    .specs-table th {
        width: 120px;
        padding: 10px;
    }
    
    .specs-table td {
        padding: 10px;
    }
}


/* ========================================
   图片放大镜功能
   ======================================== */
.product-gallery {
    position: relative;
}

.main-image {
    position: relative;
    cursor: crosshair;
}

.main-image img {
    display: block;
}

.zoom-lens {
    position: absolute;
    width: 120px;
    height: 120px;
    background: rgba(30, 82, 146, 0.25);
    border: 2px solid var(--primary-color);
    border-radius: 5px;
    opacity: 0;
    pointer-events: none;
    z-index: 10;
    transition: opacity 0.2s ease;
}

.zoom-result {
    position: fixed;
    width: 450px;
    height: 450px;
    background-repeat: no-repeat;
    background-color: #fff;
    border: 2px solid #eee;
    border-radius: 15px;
    box-shadow: 0 15px 50px rgba(0,0,0,0.2);
    opacity: 0;
    z-index: 9999;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.main-image:hover .zoom-lens {
    opacity: 1;
}

.zoom-result.active {
    opacity: 1;
}

@media (max-width: 1400px) {
    .zoom-result {
        width: 350px;
        height: 350px;
    }
}

@media (max-width: 991px) {
    .zoom-lens,
    .zoom-result {
        display: none !important;
    }
    
    .main-image {
        cursor: default;
    }
}


/* 视频介绍 */
.video-container {
    padding: 20px 0;
}

.video-wrapper {
    max-width: 900px;
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
}

.video-wrapper video {
    display: block;
    width: 100%;
    height: auto;
}

.no-video {
    text-align: center;
    padding: 80px 20px;
    color: #999;
}

.no-video i {
    font-size: 4rem;
    margin-bottom: 20px;
    display: block;
}

.no-video p {
    font-size: 1.1rem;
    margin: 0;
}

/* 数字化平台卡片样式 */
.platform-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 20px;
}

.platform-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px;
    background: #fff;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border: 1px solid #ebebeb;
}

.platform-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(30, 82, 146, 0.1);
    border-color: #1e5292;
}

.platform-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #1e5292 0%, #153d6e 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.platform-icon i {
    font-size: 1.8rem;
    color: #fff;
}

.platform-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.platform-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1d3557;
}

.platform-desc {
    font-size: 0.95rem;
    color: #6c757d;
}

.platform-section-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1e5292;
    margin-bottom: 20px;
    padding-left: 15px;
    border-left: 4px solid #1e5292;
}
