/* ========================================
   非凡工造 - 产品中心页面专用样式
   ======================================== */

/* ========== 产品 Hero 区域 ========== */
.products-hero {
    position: relative;
}

/* ========== 搜索栏 ========== */
.product-search-wrap {
    position: relative;
    width: 100%;
}

.search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: #94a3b8;
    pointer-events: none;
    transition: color 0.2s;
}

.product-search-input {
    width: 100%;
    padding: 16px 20px 16px 52px;
    font-size: 15px;
    font-family: var(--font-family);
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(51, 65, 85, 0.1);
    border-radius: var(--radius-full);
    outline: none;
    transition: var(--transition-base);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.product-search-input::placeholder {
    color: #94a3b8;
}

.product-search-input:focus {
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.1), 0 0 0 3px rgba(99, 102, 241, 0.06);
    background: #fff;
}

.product-search-input:focus + .search-icon,
.product-search-wrap:focus-within .search-icon {
    color: #635bff;
}

/* ========== 分类筛选粘性栏 ========== */
.sticky-top-bar {
    position: sticky;
    top: 80px;
    z-index: 40;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    padding: 14px 0;
}

.filter-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    background: rgba(51, 65, 85, 0.04);
    border: 1px solid transparent;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: var(--transition-base);
    white-space: nowrap;
}

.filter-chip:hover {
    background: rgba(99, 102, 241, 0.08);
    color: #4c46d6;
}

.filter-chip.active {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(139, 92, 246, 0.12));
    color: #4c46d6;
    border-color: rgba(99, 102, 241, 0.2);
    font-weight: 600;
}

.filter-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #94a3b8;
    transition: var(--transition-base);
}

.filter-chip.active .filter-dot {
    background: #635bff;
    box-shadow: 0 0 6px rgba(99, 102, 241, 0.4);
}

/* ========== 排序 & 统计 ========== */
.result-count {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.result-count span {
    font-weight: 700;
    color: var(--text-primary);
}

.sort-select-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
}

.sort-label {
    font-size: 13px;
    color: var(--text-tertiary);
}

.sort-select {
    padding: 6px 30px 6px 12px;
    font-size: 13px;
    font-family: var(--font-family);
    color: var(--text-primary);
    background: #fff;
    border: 1px solid rgba(51, 65, 85, 0.1);
    border-radius: var(--radius-sm);
    outline: none;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    transition: var(--transition-base);
}

.sort-select:focus {
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.06);
}

/* ========== 产品网格 ========== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 24px;
}

/* ========== 产品卡片 ========== */
.product-card {
    background: #fff;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    overflow: hidden;
    transition: var(--transition-base);
    cursor: default;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.08);
    border-color: rgba(99, 102, 241, 0.15);
}

.product-card.hidden-card {
    display: none;
}

/* 卡片图片占位区 */
.card-image-area {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
}

.placeholder-img {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.85);
    position: relative;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.product-card:hover .placeholder-img {
    transform: scale(1.03);
}

/* 占位图背景色 - 各分类 */
.hardware-bg {
    background: linear-gradient(135deg, #635bff, #8b5cf6, #a78bfa);
}
.software-bg {
    background: linear-gradient(135deg, #22c55e, #10b981, #34d399);
}
.iot-bg {
    background: linear-gradient(135deg, #f59e0b, #f97316, #fbbf24);
}
.service-bg {
    background: linear-gradient(135deg, #ec4899, #db2777, #f472b6);
}

/* 即将上线角标 */
.coming-soon-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    padding: 4px 12px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: #fff;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(8px);
    border-radius: var(--radius-full);
    text-transform: uppercase;
}

/* 卡片内容区 */
.card-body {
    padding: 22px 24px 24px;
}

.card-tags {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
}

.tag {
    display: inline-block;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
    border-radius: var(--radius-full);
    background: rgba(99, 102, 241, 0.08);
    color: #635bff;
}

.tag-hardware { background: rgba(99, 102, 241, 0.08); color: #635bff; }
.tag-software { background: rgba(34, 197, 94, 0.08); color: #16a34a; }
.tag-iot      { background: rgba(245, 158, 11, 0.1); color: #d97706; }
.tag-service  { background: rgba(236, 72, 153, 0.08); color: #db2777; }
.tag-hot      { background: rgba(239, 68, 68, 0.08); color: #ef4444; }
.tag-new      { background: rgba(59, 130, 246, 0.08); color: #2563eb; }

.card-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    line-height: 1.3;
}

.card-desc {
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 18px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.card-status {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: var(--radius-full);
}

.status-ready { background: rgba(34, 197, 94, 0.1); color: #16a34a; }
.status-dev   { background: rgba(59, 130, 246, 0.1); color: #2563eb; }
.status-soon  { background: rgba(245, 158, 11, 0.1); color: #d97706; }

.card-btn {
    font-size: 13px;
    font-weight: 600;
    color: #635bff;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    transition: var(--transition-base);
}

.card-btn:hover {
    background: rgba(99, 102, 241, 0.08);
    color: #4c46d6;
}

/* ========== 空状态 ========== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

/* ========== CTA 区域 ========== */
.cta-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #f8fafc 0%, #eef2ff 50%, #faf5ff 100%);
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.06), transparent 60%);
    pointer-events: none;
}

.cta-inner {
    position: relative;
    z-index: 1;
    padding: 48px 32px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: var(--radius-xl);
    border: 1px solid rgba(99, 102, 241, 0.1);
    backdrop-filter: blur(10px);
}

/* ========== 页脚链接 ========== */
.footer-link {
    display: block;
    font-size: 14px;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 4px 0;
    transition: var(--transition-base);
}

.footer-link:hover {
    color: #635bff;
    padding-left: 4px;
}

/* ========== 响应式设计 ========== */

@media (max-width: 1024px) {
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .sticky-top-bar {
        top: 72px;
    }

    .product-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .card-body {
        padding: 18px 20px 20px;
    }

    .filter-bar {
        gap: 8px;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 4px;
        -ms-overflow-style: none;
        scrollbar-width: none;
    }

    .filter-bar::-webkit-scrollbar {
        display: none;
    }

    .filter-chip {
        padding: 7px 14px;
        font-size: 13px;
    }

    .cta-section {
        padding: 56px 0;
    }

    .cta-inner {
        padding: 32px 20px;
    }
}

@media (max-width: 480px) {
    .product-search-input {
        padding: 14px 16px 14px 46px;
        font-size: 14px;
    }

    .search-icon {
        left: 14px;
        width: 18px;
        height: 18px;
    }

    .card-title {
        font-size: 16px;
    }

    .sort-select-wrap {
        display: none;
    }
}

/* ========== 卡片动画增强 ========== */
.product-card {
    opacity: 0;
    transform: translateY(30px);
}

.product-card.revealed {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 交错延迟 */
.product-card:nth-child(1) { transition-delay: 0s; }
.product-card:nth-child(2) { transition-delay: 0.08s; }
.product-card:nth-child(3) { transition-delay: 0.16s; }
.product-card:nth-child(4) { transition-delay: 0.24s; }
.product-card:nth-child(5) { transition-delay: 0.32s; }
.product-card:nth-child(6) { transition-delay: 0.4s; }
