/* ==================== 产品分类 ==================== */
.product-categories {
    background: var(--bg-dark-secondary);
    padding: 60px 0;
    position: relative;
    z-index: 2;
}

.category-tabs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px 20px;
    max-width: 1000px;
    margin: 0 auto;
}

/* 图片占位符和加载动画样式 */
.image-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(0,0,0,0.05) 0%, rgba(0,240,255,0.05) 100%);
    z-index: 1;
}

.image-placeholder .spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(0,240,255,0.2);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.product-image img.loaded {
    opacity: 1;
    z-index: 2;
}

.product-image img {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tab-btn {
    padding: 14px 24px;
    font-size: 15px;
    font-weight: 600;
    background: var(--bg-glass-light);
    border: 1px solid rgba(0, 240, 255, 0.2);
    border-radius: 30px;
    color: var(--text-tertiary);
    cursor: pointer;
    transition: var(--transition-smooth);
    backdrop-filter: blur(10px);
    text-align: center;
    white-space: nowrap;
}

.tab-btn:hover {
    background: rgba(0, 240, 255, 0.15);
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.3);
}

.tab-btn.active {
    background: var(--gradient-primary);
    border-color: transparent;
    color: #fff;
    box-shadow: var(--shadow-glow);
}

/* ==================== 产品列表 ==================== */
.products-list {
    background: var(--bg-dark-tertiary);
    padding: 80px 0;
}

.products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding: 20px 30px;
    background: var(--bg-glass);
    border-radius: 16px;
    border: var(--border-glow);
    backdrop-filter: blur(10px);
}

.products-count,
.products-showing {
    color: var(--text-tertiary);
    font-size: 16px;
    font-weight: 500;
}

.products-count span,
.products-showing span {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 18px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 35px;
    margin-bottom: 50px;
}

.product-card {
    background: var(--bg-glass);
    border-radius: 24px;
    overflow: hidden;
    transition: var(--transition-smooth);
    border: var(--border-glow);
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-card);
    position: relative;
}

.product-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: var(--shadow-glow), var(--shadow-xl);
    border-color: var(--primary-color);
    background: rgba(15, 24, 36, 0.98);
}

.product-image {
    height: 200px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

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

.product-image::after {
    content: '🔍';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 32px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.product-card:hover .product-image::after {
    opacity: 0.8;
}

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

.product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition-smooth);
}

.product-card:hover .product-overlay {
    opacity: 1;
}

.product-info {
    padding: 24px;
    position: relative;
}

.product-tag {
    display: inline-block;
    padding: 4px 12px;
    background: var(--gradient-primary);
    color: var(--text-primary);
    font-size: 12px;
    font-weight: 600;
    border-radius: 16px;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 0 12px rgba(0, 240, 255, 0.3);
}

.product-info h3 {
    font-size: 20px;
    margin-bottom: 16px;
    color: var(--text-secondary);
    font-weight: 700;
    line-height: 1.3;
}

.product-desc {
    color: var(--text-muted);
    margin-bottom: 18px;
    line-height: 1.7;
    font-size: 15px;
}

.product-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.spec-item {
    padding: 6px 14px;
    background: rgba(0, 240, 255, 0.08);
    border: 1px solid rgba(0, 240, 255, 0.2);
    border-radius: 20px;
    color: var(--text-tertiary);
    font-size: 13px;
    font-weight: 500;
}

.product-link {
    color: var(--primary-dark);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition-smooth);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.product-link:hover {
    color: var(--primary-color);
    gap: 12px;
}

.product-link::after {
    content: '→';
    transition: var(--transition-smooth);
}

/* ==================== 产品详细信息 - 简化版 ==================== */
.product-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(0, 240, 255, 0.1);
}

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

.detail-label {
    font-size: 13px;
    color: var(--text-tertiary);
    font-weight: 500;
    min-width: 45px;
}

.detail-value {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 600;
    flex: 1;
}

/* 查看详情按钮 - 修改为跳转联系页面 */
.product-action {
    margin-top: auto;
}

.load-more-container {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
}

.load-more-container .btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 48px;
    font-size: 16px;
    font-weight: 600;
    transition: var(--transition-smooth);
}

.load-more-container .btn-primary:hover {
    transform: translateY(-2px);
    gap: 14px;
}

.load-more-container .btn-icon {
    display: flex;
    align-items: center;
    transition: transform 0.3s ease;
}

.load-more-container .btn-primary:hover .btn-icon {
    transform: translateY(2px);
}

.load-more-container .btn-primary.loading {
    opacity: 0.6;
    cursor: not-allowed;
}

.load-more-container .btn-primary.loading:hover {
    transform: none;
}

/* 加载中动画 */
.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 30px;
}

.loading-spinner.hidden {
    display: none;
}

.loading-spinner .spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 240, 255, 0.2);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-spinner span {
    color: var(--text-tertiary);
    font-size: 14px;
    font-weight: 500;
}

/* ==================== 产品咨询 ==================== */
.product-consult {
    background: var(--gradient-dark);
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

.product-consult::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, rgba(0, 240, 255, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.consult-content {
    text-align: center;
    position: relative;
    z-index: 1;
}

.consult-content h2 {
    font-size: 42px;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.consult-content p {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 40px;
    line-height: 1.8;
}

/* ==================== 响应式设计 ==================== */
@media (max-width: 1024px) {
    .products-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
        padding: 20px;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }

    .category-tabs {
        grid-template-columns: repeat(4, 1fr);
        gap: 12px 16px;
    }

    .tab-btn {
        padding: 12px 20px;
        font-size: 14px;
    }

    .load-more-container .btn-primary {
        padding: 12px 40px;
        font-size: 15px;
    }

    /* 移动端禁用backdrop-filter提升性能 */
    .product-card,
    .tab-btn,
    .products-header {
        backdrop-filter: none !important;
        background: rgba(15, 24, 36, 0.95);
    }
}

@media (max-width: 768px) {
    .products-header {
        padding: 15px;
    }

    .products-count,
    .products-showing {
        font-size: 14px;
    }

    .products-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .category-tabs {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px 12px;
        max-width: 100%;
    }

    .tab-btn {
        padding: 10px 16px;
        font-size: 13px;
    }

    .product-specs {
        flex-direction: column;
        gap: 8px;
    }

    .consult-content h2 {
        font-size: 32px;
    }

    .consult-content p {
        font-size: 16px;
    }

    .load-more-container .btn-primary {
        width: 100%;
        justify-content: center;
        padding: 12px 32px;
    }

    /* 移动端禁用backdrop-filter提升性能 */
    .product-card,
    .tab-btn,
    .products-header {
        backdrop-filter: none !important;
        background: rgba(15, 24, 36, 0.95);
    }

    .product-card {
        contain: layout style paint;
    }
}

@media (max-width: 480px) {
    .products-list {
        padding: 60px 0;
    }

    .products-grid {
        gap: 20px;
    }

    .product-card {
        border-radius: 20px;
    }

    .product-image {
        height: 160px;
    }

    .product-info {
        padding: 24px;
    }

    .product-info h3 {
        font-size: 20px;
    }

    .product-desc {
        font-size: 14px;
    }

    .spec-item {
        font-size: 12px;
        padding: 5px 12px;
    }

    .category-tabs {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px 10px;
    }

    .tab-btn {
        padding: 8px 12px;
        font-size: 12px;
    }

    .consult-content h2 {
        font-size: 28px;
    }

    .consult-content p {
        font-size: 15px;
    }
}

/* ==================== 产品图片放大模态框 ==================== */
.product-image-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 40px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-image-modal.active {
    display: flex;
    opacity: 1;
}

.product-image-modal .modal-content {
    position: relative;
    width: 100%;
    max-width: 90vw;
    max-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image-modal .modal-image-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    cursor: grab;
}

.product-image-modal .modal-image-wrapper:active {
    cursor: grabbing;
}

.product-image-modal .modal-image-wrapper img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    transform-origin: center center;
    transition: transform 0.3s ease;
}

.product-image-modal .close-btn {
    position: absolute;
    top: -50px;
    right: -50px;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: #ffffff;
    font-size: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.product-image-modal .close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: rotate(90deg);
}

/* 缩放控制按钮 */
.product-image-modal .zoom-controls {
    position: absolute;
    bottom: -60px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 30px;
    padding: 8px 20px;
    z-index: 10;
}

.product-image-modal .zoom-btn {
    width: 36px;
    height: 36px;
    background: rgba(0, 240, 255, 0.2);
    border: 1px solid rgba(0, 240, 255, 0.4);
    border-radius: 50%;
    color: #00f0ff;
    font-size: 24px;
    font-weight: 300;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.product-image-modal .zoom-btn:hover {
    background: rgba(0, 240, 255, 0.4);
    border-color: rgba(0, 240, 255, 0.6);
    transform: scale(1.1);
}

.product-image-modal .zoom-btn:active {
    transform: scale(0.95);
}

.product-image-modal .zoom-level {
    min-width: 60px;
    text-align: center;
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    font-weight: 600;
    user-select: none;
}

@media (max-width: 768px) {
    .product-image-modal {
        padding: 20px;
    }

    .product-image-modal .modal-content {
        max-width: 95vw;
        max-height: 80vh;
    }

    .product-image-modal .modal-image-wrapper img {
        max-height: 70vh;
    }

    .product-image-modal .close-btn {
        top: -40px;
        right: -40px;
        width: 38px;
        height: 38px;
        font-size: 24px;
    }

    .product-image-modal .zoom-controls {
        bottom: -55px;
        padding: 6px 16px;
        gap: 10px;
    }

    .product-image-modal .zoom-btn {
        width: 32px;
        height: 32px;
        font-size: 22px;
    }

    .product-image-modal .zoom-level {
        min-width: 55px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .product-image-modal {
        padding: 10px;
    }

    .product-image-modal .modal-content {
        max-width: 100%;
        max-height: 75vh;
    }

    .product-image-modal .modal-image-wrapper img {
        max-height: 65vh;
        max-width: 100%;
    }

    .product-image-modal .close-btn {
        top: -35px;
        right: 0;
        width: 36px;
        height: 36px;
        font-size: 22px;
    }

    .product-image-modal .zoom-controls {
        bottom: -50px;
        padding: 5px 14px;
        gap: 8px;
    }

    .product-image-modal .zoom-btn {
        width: 30px;
        height: 30px;
        font-size: 20px;
    }

    .product-image-modal .zoom-level {
        min-width: 50px;
        font-size: 12px;
    }
}
