/* ========================================
   产品详情页样式 - Product Detail Page
   与主样式表变量保持一致
   ======================================== */

/* 面包屑导航 */
.breadcrumb-wrapper {
    padding-top: 100px;
    background: var(--bg-deep);
    border-bottom: 1px solid var(--border);
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 0;
    font-size: 0.875rem;
}

.breadcrumb a {
    color: var(--text-secondary);
    transition: color var(--transition);
}

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

.breadcrumb-separator {
    color: var(--text-muted);
}

.breadcrumb-current {
    color: var(--text-primary);
    font-weight: 500;
}

/* 产品Hero区域 */
.product-hero {
    padding: 64px 0;
    background: linear-gradient(180deg, var(--bg-deep) 0%, var(--bg-dark) 100%);
}

.product-hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: start;
}

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

.gallery-main {
    position: relative;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.03) 0%, rgba(245, 158, 11, 0.03) 100%);
    border-radius: var(--radius-xl);
    overflow: hidden;
    border: 1px solid var(--border);
    aspect-ratio: 4/3;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 24px;
    transition: transform var(--transition-slow);
}

.gallery-main:hover img {
    transform: scale(1.02);
}

.gallery-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    padding: 6px 16px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 50px;
    z-index: 2;
}

.gallery-thumbs {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
}

.gallery-thumb {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition);
    background: var(--bg-card);
}

.gallery-thumb:hover {
    border-color: var(--primary);
}

.gallery-thumb.active {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 4px;
}

/* 产品信息面板 */
.product-info-panel {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.product-header {
    border-bottom: 1px solid var(--border);
    padding-bottom: 24px;
}

.product-category-tag {
    display: inline-block;
    padding: 6px 16px;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.08), rgba(245, 158, 11, 0.08));
    color: var(--primary-light);
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 50px;
    margin-bottom: 16px;
    border: 1px solid rgba(14, 165, 233, 0.15);
}

.product-name {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
    line-height: 1.2;
}

.product-short-desc {
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* 规格预览 */
.product-specs-preview {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.spec-preview-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: all var(--transition);
    backdrop-filter: blur(10px);
}

.spec-preview-item:hover {
    border-color: rgba(14, 165, 233, 0.2);
    box-shadow: var(--shadow-md);
}

.spec-preview-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.08), rgba(245, 158, 11, 0.08));
    border-radius: var(--radius-sm);
    color: var(--primary-light);
    flex-shrink: 0;
}

.spec-preview-content {
    display: flex;
    flex-direction: column;
}

.spec-preview-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.spec-preview-value {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* 操作面板 */
.product-actions-panel {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.download-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all var(--transition);
    backdrop-filter: blur(10px);
}

.download-btn:hover {
    border-color: var(--primary);
    color: var(--primary-light);
    box-shadow: var(--shadow-md);
}

.download-btn svg {
    color: var(--primary-light);
}

/* 产品元信息 */
.product-meta {
    display: flex;
    gap: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.meta-item svg {
    color: var(--primary-light);
    flex-shrink: 0;
}

/* 产品标签页 */
.product-tabs-wrapper {
    position: sticky;
    top: 60px;
    background: var(--bg-dark);
    border-bottom: 1px solid var(--border);
    z-index: 100;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
}

.product-tabs {
    display: flex;
    gap: 8px;
    padding: 12px 0;
}

.product-tab {
    padding: 12px 24px;
    background: none;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition);
    position: relative;
    white-space: nowrap;
}

.product-tab:hover {
    color: var(--primary-light);
    background: rgba(14, 165, 233, 0.04);
}

.product-tab.active {
    color: var(--primary-light);
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.08), rgba(245, 158, 11, 0.08));
    font-weight: 600;
}

/* 标签页内容 */
.product-tab-panels {
    background: var(--bg-dark);
    min-height: 400px;
}

.product-tab-panel {
    display: none;
    padding: 64px 0;
    animation: fadeIn 0.4s ease;
}

.product-tab-panel.active {
    display: block;
}

/* 产品概述 */
.overview-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

.overview-content .section-title {
    text-align: left;
    margin-bottom: 24px;
}

.overview-text {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 32px;
}

.overview-text p {
    margin-bottom: 16px;
}

.overview-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.overview-feature {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: all var(--transition);
    backdrop-filter: blur(10px);
}

.overview-feature:hover {
    border-color: rgba(14, 165, 233, 0.2);
    box-shadow: var(--shadow-md);
}

.overview-feature svg {
    color: var(--primary-light);
    flex-shrink: 0;
    margin-top: 2px;
}

.overview-feature span {
    font-size: 0.875rem;
    color: var(--text-primary);
    font-weight: 500;
}

.overview-image {
    border-radius: var(--radius-xl);
    overflow: hidden;
    border: 1px solid var(--border);
    aspect-ratio: 4/3;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.03) 0%, rgba(245, 158, 11, 0.03) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.overview-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 24px;
}

/* 规格参数表 */
.specs-table-wrapper {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.specs-table {
    width: 100%;
    border-collapse: collapse;
}

.specs-table tr {
    border-bottom: 1px solid var(--border);
    transition: background var(--transition);
}

.specs-table tr:hover {
    background: rgba(14, 165, 233, 0.02);
}

.specs-table tr:last-child {
    border-bottom: none;
}

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

.specs-table th {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.04), rgba(245, 158, 11, 0.04));
    font-weight: 600;
    color: var(--text-primary);
    width: 30%;
    border-right: 1px solid var(--border);
}

.specs-table td {
    color: var(--text-secondary);
}

/* 应用场景 */
.applications-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.application-card {
    padding: 32px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: all var(--transition);
    text-align: center;
    backdrop-filter: blur(10px);
}

.application-card:hover {
    border-color: rgba(14, 165, 233, 0.2);
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.application-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.08), rgba(245, 158, 11, 0.08));
    border-radius: var(--radius-md);
    color: var(--primary-light);
    margin: 0 auto 24px;
}

.application-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.application-card p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* 资料下载 */
.downloads-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.download-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: all var(--transition);
    backdrop-filter: blur(10px);
}

.download-item:hover {
    border-color: rgba(14, 165, 233, 0.2);
    box-shadow: var(--shadow-md);
}

.download-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.download-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.08), rgba(245, 158, 11, 0.08));
    border-radius: var(--radius-md);
    color: var(--primary-light);
    flex-shrink: 0;
}

.download-meta h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.download-meta span {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.download-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: all var(--transition);
    flex-shrink: 0;
}

.download-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(14, 165, 233, 0.3);
}

/* 相关产品 */
.related-products {
    padding: 64px 0;
    background: var(--bg-deep);
    border-top: 1px solid var(--border);
}

.related-products .section-header {
    margin-bottom: 32px;
}

/* 相关产品卡片 - 使用Bento风格 */
.related-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.related-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
}

.related-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    opacity: 0;
    transition: opacity var(--transition);
    z-index: 2;
}

.related-card:hover {
    border-color: rgba(14, 165, 233, 0.25);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    transform: translateY(-4px);
}

.related-card:hover::before {
    opacity: 1;
}

.related-link-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.related-image-wrapper {
    position: relative;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.03) 0%, rgba(245, 158, 11, 0.02) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 20px;
    flex-shrink: 0;
    min-height: 140px;
    max-height: 180px;
}

.related-image-wrapper img {
    width: 100%;
    height: auto;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
    transition: transform var(--transition-slow);
}

.related-card:hover .related-image-wrapper img {
    transform: scale(1.03);
}

.related-content {
    padding: 16px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    position: relative;
    z-index: 1;
}

.related-content h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
}

.related-content p {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    line-height: 1.5;
    flex: 1;
}

.related-tag {
    display: inline-block;
    padding: 3px 10px;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.9), var(--primary-dark));
    color: #fff;
    font-size: 0.6875rem;
    font-weight: 600;
    border-radius: 50px;
    width: fit-content;
}

.related-tag.device {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.9), #d97706);
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .product-hero-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .product-gallery {
        position: relative;
        top: 0;
    }

    .overview-grid {
        grid-template-columns: 1fr;
    }

    .overview-image {
        order: -1;
    }

    .applications-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .product-tabs-wrapper {
        top: 56px;
    }

    .product-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .product-specs-preview {
        grid-template-columns: 1fr;
    }

    .overview-features {
        grid-template-columns: 1fr;
    }

    .applications-grid {
        grid-template-columns: 1fr;
    }

    .product-meta {
        flex-direction: column;
        gap: 12px;
    }

    .download-item {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

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

    .specs-table th,
    .specs-table td {
        padding: 12px;
        font-size: 0.875rem;
    }

    .gallery-thumbs {
        gap: 8px;
    }

    .gallery-thumb {
        width: 60px;
        height: 60px;
    }

    .related-grid {
        grid-template-columns: 1fr;
    }
}
