/* 产品页面样式 */

:root {
    --primary-color: #0066ff;
    --text-dark: #000;
    --text-gray: #666;
    --border-color: #e5e5e5;
    --bg-light: #fafafa;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hero区域 */
.product-hero {
    position: relative;
    height: 50vh;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #000 0%, #1a1a1a 100%);
    overflow: hidden;
}

.product-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(0,102,255,0.1), transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(0,102,255,0.05), transparent 50%);
}

.product-hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    animation: fadeUp 1s ease;
}

.product-hero-content h1 {
    font-size: clamp(42px, 6vw, 72px);
    font-weight: 900;
    color: #fff;
    margin-bottom: 20px;
    letter-spacing: -2px;
}

.product-hero-content p {
    font-size: clamp(16px, 2vw, 20px);
    color: rgba(255,255,255,0.8);
    letter-spacing: 2px;
}

/* 产品分类导航 */
.product-categories {
    background: #fff;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 100px;
    z-index: 99;
}

.categories-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 80px;
    display: flex;
    gap: 10px;
    overflow-x: auto;
}

.category-item {
    padding: 20px 30px;
    cursor: pointer;
    white-space: nowrap;
    color: var(--text-gray);
    font-size: 15px;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.category-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: var(--primary-color);
    transition: var(--transition);
}

.category-item:hover,
.category-item.active {
    color: var(--primary-color);
}

.category-item.active::after {
    width: 60%;
}

/* 产品列表 */
.products-section {
    padding: 80px 0;
    background: var(--bg-light);
}

.products-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 80px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 40px;
}

/* 产品卡片 */
.product-card {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    transition: var(--transition);
    cursor: pointer;
    border: 1px solid var(--border-color);
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 60px rgba(0,0,0,0.1);
    border-color: var(--primary-color);
}

.product-card-image {
    position: relative;
    width: 100%;
    height: 280px;
    overflow: hidden;
    background: var(--bg-light);
}

.product-card-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: var(--transition);
    padding: 20px;
}

.product-card:hover .product-card-image img {
    transform: scale(1.05);
}

.product-badges {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    gap: 8px;
}

.badge-hot,
.badge-new {
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
}

.badge-hot {
    background: linear-gradient(135deg, #ff6b6b, #ff4757);
}

.badge-new {
    background: linear-gradient(135deg, #0066ff, #00a8ff);
}

.product-card-content {
    padding: 30px;
}

.product-category {
    font-size: 12px;
    color: var(--primary-color);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.product-card-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 15px;
    line-height: 1.4;
}

.product-card-summary {
    font-size: 14px;
    color: var(--text-gray);
    line-height: 1.8;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    gap: 15px;
}

.product-price {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.price-current {
    font-size: 24px;
    font-weight: 900;
    color: red;
}

.price-original {
    font-size: 16px;
    color: var(--text-gray);
    text-decoration: line-through;
}

.product-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-color);
    text-decoration: none;
    background: rgba(0, 102, 255, 0.08);
    border-radius: 8px;
    transition: var(--transition);
    white-space: nowrap;
    flex-shrink: 0;
}

.product-link::after {
    content: '→';
    font-size: 16px;
    transition: var(--transition);
}

.product-link:hover {
    background: var(--primary-color);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 102, 255, 0.3);
}

.product-link:hover::after {
    transform: translateX(3px);
}

/* 加载状态 */
.loading-placeholder {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
    color: var(--text-gray);
}

/* 产品详情页 */
.product-detail-section {
    padding-top: 100px;
    background: #fff;
}

/* 返回按钮 */
.back-button-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 80px 20px;
    position: relative;
    top: 10px;
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-gray);
    text-decoration: none;
    border: 1px solid var(--border-color);
    border-radius: 50px;
    transition: var(--transition);
    background: #fff;
}

.back-button:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateX(-5px);
}

.back-arrow {
    font-size: 18px;
    transition: var(--transition);
}

.back-button:hover .back-arrow {
    transform: translateX(-3px);
}

.detail-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 80px 80px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: start;
}

.detail-image {
    position: relative;
    position: sticky;
    top: 120px;
}

/* 固定尺寸的主图容器 */
.detail-image-main {
    width: 100%;
    height: 500px;
    background: #f8f9fa;
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.1);
    transition: var(--transition);
    position: relative;
}

.detail-image-main:hover {
    box-shadow: 0 25px 70px rgba(0,0,0,0.15);
}

.detail-image img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.detail-image-main:hover img {
    transform: scale(1.05);
}

/* 图片导航按钮 */
.image-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: var(--text-dark);
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10;
    opacity: 0;
}

.detail-image-main:hover .image-nav-btn {
    opacity: 1;
}

.image-nav-btn:hover {
    background: var(--primary-color);
    color: #fff;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 102, 255, 0.4);
}

.image-nav-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.prev-btn {
    left: 20px;
}

.next-btn {
    right: 20px;
}

.image-nav-btn span {
    line-height: 1;
    margin-top: -2px;
}

/* 缩略图容器 */
.detail-thumbnails {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    overflow-x: auto;
    padding: 5px 0;
}

.detail-thumbnails::-webkit-scrollbar {
    height: 6px;
}

.detail-thumbnails::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.detail-thumbnails::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.detail-thumbnails::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.thumbnail-item {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.thumbnail-item:hover {
    border-color: #0066ff;
    transform: translateY(-2px);
}

.thumbnail-item.active {
    border-color: #0066ff;
    box-shadow: 0 4px 12px rgba(0, 102, 255, 0.3);
}

.thumbnail-item img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* 图片预览模态框 */
.image-preview-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    animation: fadeIn 0.3s ease;
}

.image-preview-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-content {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    animation: zoomIn 0.3s ease;
}

.preview-close {
    position: absolute;
    top: 30px;
    right: 50px;
    color: #fff;
    font-size: 50px;
    font-weight: 300;
    cursor: pointer;
    transition: var(--transition);
    z-index: 10000;
}

.preview-close:hover {
    color: var(--primary-color);
    transform: rotate(90deg);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes zoomIn {
    from { 
        opacity: 0;
        transform: scale(0.8);
    }
    to { 
        opacity: 1;
        transform: scale(1);
    }
}

.detail-badges {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
}

.detail-category {
    font-size: 14px;
    color: var(--primary-color);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 15px;
}

.detail-title {
    font-size: 48px;
    font-weight: 900;
    color: var(--text-dark);
    margin-bottom: 20px;
    line-height: 1.2;
}

.detail-code {
    font-size: 14px;
    color: var(--text-gray);
    margin-bottom: 30px;
}

.detail-summary {
    font-size: 18px;
    color: var(--text-gray);
    line-height: 1.8;
    margin-bottom: 40px;
}

.detail-price {
    background: var(--bg-light);
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
}

.price-current {
    display: flex;
    align-items: baseline;
    gap: 15px;
    margin-bottom: 10px;
}

.price-label {
    font-size: 14px;
    color: var(--text-gray);
}

.price-value {
    font-size: 42px;
    font-weight: 900;
    color: red;
}

.price-original {
    font-size: 18px;
    color: var(--text-gray);
    text-decoration: line-through;
}

.detail-meta {
    display: flex;
    gap: 30px;
    margin-bottom: 40px;
    padding: 20px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    color: var(--text-gray);
}

.meta-icon {
    font-size: 20px;
}

.detail-actions {
    display: flex;
    gap: 15px;
}

.btn-primary,
.btn-secondary {
    padding: 18px 40px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 50px;
    transition: var(--transition);
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: var(--primary-color);
    color: #fff;
}

.btn-primary:hover {
    background: #0052cc;
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0,102,255,0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: #fff;
}

/* 详细描述区域 */
.detail-description-section {
    background: var(--bg-light);
    padding: 80px 0;
}

.description-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 80px;
}

.description-container h2 {
    font-size: 36px;
    font-weight: 900;
    margin-bottom: 40px;
    color: var(--text-dark);
}

.description-content {
    background: #fff;
    padding: 50px;
    border-radius: 20px;
    margin-bottom: 60px;
    line-height: 2;
    color: var(--text-gray);
}

.features-section,
.specifications-section,
.applications-section {
    margin-bottom: 60px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.feature-item {
    background: #fff;
    padding: 30px;
    border-radius: 15px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.feature-item:hover {
    border-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.feature-icon {
    font-size: 32px;
    margin-bottom: 15px;
}

.feature-text {
    font-size: 16px;
    color: var(--text-dark);
    font-weight: 600;
}

.specifications-content,
.applications-content {
    background: #fff;
    padding: 40px;
    border-radius: 20px;
    line-height: 2;
    color: var(--text-gray);
}

.video-section {
    margin-bottom: 60px;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 20px;
    background: #000;
}

.video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* 相关产品 */
.related-products-section {
    padding: 80px 0;
    background: #fff;
}

.related-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 80px;
}

.related-container h2 {
    font-size: 36px;
    font-weight: 900;
    margin-bottom: 50px;
    text-align: center;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

/* 响应式 */
@media (max-width: 1024px) {
    .detail-container {
        grid-template-columns: 1fr;
        gap: 50px;
    }
    
    .detail-image {
        position: relative;
        top: 0;
    }
    
    .detail-image-main {
        height: 400px;
    }
    
    .back-button-container {
        padding: 0 50px 20px;
    }
}

@media (max-width: 768px) {
    .products-container,
    .description-container,
    .related-container,
    .detail-container {
        padding: 0 30px;
    }
    
    .back-button-container {
        padding: 0 30px 20px;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .categories-container {
        padding: 0 30px;
    }
    
    .detail-image-main {
        height: 300px;
    }
    
    .thumbnail-item {
        width: 60px;
        height: 60px;
    }
    
    .detail-title {
        font-size: 32px;
    }
    
    .detail-actions {
        flex-direction: column;
    }
    
    .btn-primary,
    .btn-secondary {
        width: 100%;
    }
    
    /* 移动端图片导航按钮 */
    .image-nav-btn {
        width: 40px;
        height: 40px;
        font-size: 24px;
        opacity: 1;
    }
    
    .prev-btn {
        left: 10px;
    }
    
    .next-btn {
        right: 10px;
    }
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
