/* ===== 全局样式 ===== */
:root {
    --primary: #e65100;
    --primary-dark: #bf360c;
    --primary-light: #ff8f00;
    --zx7: #1a73e8;
    --tig: #e65100;
    --nbc: #0d9488;
    --cut: #7c3aed;
    --bg: #f5f5f5;
    --white: #ffffff;
    --text: #212121;
    --text-secondary: #616161;
    --border: #e0e0e0;
    --shadow: 0 2px 12px rgba(0,0,0,0.08);
    --shadow-hover: 0 8px 30px rgba(0,0,0,0.12);
    --radius: 12px;
    --radius-sm: 8px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ===== 顶部导航 ===== */
.header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 700;
    color: var(--primary);
}

.logo-icon {
    font-size: 28px;
}

.nav-links {
    display: flex;
    gap: 4px;
}

.nav-links a {
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
    background: #fff3e0;
    color: var(--primary);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text);
    padding: 4px 8px;
}

.mobile-menu {
    display: none;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 8px 20px;
    gap: 4px;
}

.mobile-menu a {
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--text-secondary);
}

.mobile-menu a:hover {
    background: #fff3e0;
    color: var(--primary);
}

.mobile-menu.show {
    display: flex;
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .mobile-menu-btn { display: block; }
}

/* ===== 主横幅 ===== */
.hero {
    position: relative;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-content {
    position: relative;
    z-index: 1;
    padding: 60px 20px;
    max-width: 700px;
}

.hero-content h1 {
    font-size: 42px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 16px;
    letter-spacing: 2px;
}

.hero-content p {
    font-size: 16px;
    color: rgba(255,255,255,0.7);
    margin-bottom: 36px;
    line-height: 1.8;
}

.hero-search {
    max-width: 560px;
    margin: 0 auto;
}

.hero-search-wrapper {
    display: flex;
    gap: 0;
    box-shadow: 0 4px 24px rgba(0,0,0,0.3);
    border-radius: 50px;
    overflow: hidden;
}

.hero-search-input {
    flex: 1;
    padding: 16px 24px;
    border: none;
    font-size: 16px;
    outline: none;
    color: var(--text);
}

.hero-search-input::placeholder {
    color: #999;
}

.hero-search-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 28px;
    background: var(--primary);
    color: #fff;
    border: none;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}

.hero-search-btn:hover {
    background: var(--primary-dark);
}

.hero-search-results {
    background: #fff;
    border-radius: var(--radius);
    margin-top: 8px;
    box-shadow: var(--shadow-hover);
    max-height: 360px;
    overflow-y: auto;
    text-align: left;
}

@media (max-width: 768px) {
    .hero-content h1 { font-size: 28px; }
    .hero-content p { font-size: 14px; }
    .hero-search-wrapper { flex-direction: column; border-radius: var(--radius); }
    .hero-search-input { border-radius: var(--radius) var(--radius) 0 0; }
    .hero-search-btn { border-radius: 0 0 var(--radius) var(--radius); justify-content: center; }
}

/* ===== 搜索区域 ===== */
.search-section {
    padding: 32px 0;
}

.search-bar-wrapper {
    display: flex;
    align-items: center;
    background: var(--white);
    border: 2px solid var(--border);
    border-radius: 50px;
    padding: 4px 8px;
    transition: border-color 0.2s, box-shadow 0.2s;
    max-width: 600px;
    margin: 0 auto;
}

.search-bar-wrapper:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(230,81,0,0.1);
}

.search-icon {
    margin-left: 12px;
    flex-shrink: 0;
}

.search-input {
    flex: 1;
    padding: 12px 16px;
    border: none;
    font-size: 16px;
    outline: none;
    background: transparent;
}

.search-clear {
    background: none;
    border: none;
    font-size: 18px;
    color: #999;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 50%;
    transition: background 0.2s;
}

.search-clear:hover {
    background: #f0f0f0;
    color: #333;
}

.search-results {
    max-width: 600px;
    margin: 12px auto 0;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-hover);
    max-height: 360px;
    overflow-y: auto;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background 0.15s;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: #fff3e0;
}

.search-result-item .model-badge {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    flex-shrink: 0;
}

.search-result-item .model-name {
    font-weight: 600;
    font-size: 15px;
}

.search-result-item .model-cat {
    font-size: 12px;
    color: var(--text-secondary);
}

.search-no-result {
    padding: 24px;
    text-align: center;
    color: var(--text-secondary);
}

/* ===== 分类卡片 ===== */
.categories-section {
    padding: 32px 0 48px;
}

.section-title {
    text-align: center;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 32px;
    color: var(--text);
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 36px 20px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
    text-align: center;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
}

.category-card.zx7::before { background: var(--zx7); }
.category-card.tig::before { background: var(--tig); }
.category-card.nbc::before { background: var(--nbc); }
.category-card.cut::before { background: var(--cut); }

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.category-icon {
    width: 80px;
    height: 80px;
    margin-bottom: 16px;
}

.category-icon svg {
    width: 100%;
    height: 100%;
}

.category-card.zx7 .category-icon svg { color: var(--zx7); }
.category-card.tig .category-icon svg { color: var(--tig); }
.category-card.nbc .category-icon svg { color: var(--nbc); }
.category-card.cut .category-icon svg { color: var(--cut); }

.category-card h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 6px;
}

.category-card p {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.model-count {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
}

.category-card.zx7 .model-count { background: var(--zx7); }
.category-card.tig .model-count { background: var(--tig); }
.category-card.nbc .model-count { background: var(--nbc); }
.category-card.cut .model-count { background: var(--cut); }

@media (max-width: 768px) {
    .category-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .category-card { padding: 24px 14px; }
    .category-card h3 { font-size: 17px; }
}

/* ===== 热门型号 ===== */
.featured-section {
    padding: 32px 0 60px;
}

.model-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.model-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: all 0.3s;
    cursor: pointer;
}

.model-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.model-card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #bbb;
    font-size: 48px;
}

.model-card-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 20px;
}

.model-card-body {
    padding: 16px;
}

.model-card-cat {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 8px;
}

.model-card-cat.zx7 { background: var(--zx7); }
.model-card-cat.tig { background: var(--tig); }
.model-card-cat.nbc { background: var(--nbc); }
.model-card-cat.cut { background: var(--cut); }

.model-card h4 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 4px;
}

.model-card .desc {
    font-size: 13px;
    color: var(--text-secondary);
}

.model-card-footer {
    padding: 12px 16px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--text-secondary);
}

/* ===== 分类页 ===== */
.category-header {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    padding: 48px 20px;
    text-align: center;
    color: #fff;
}

.category-header.zx7 { background: linear-gradient(135deg, #0d47a1, #1565c0); }
.category-header.tig { background: linear-gradient(135deg, #bf360c, #e65100); }
.category-header.nbc { background: linear-gradient(135deg, #004d40, #0d9488); }
.category-header.cut { background: linear-gradient(135deg, #4a148c, #7c3aed); }

.category-header h1 {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 8px;
}

.category-header p {
    font-size: 16px;
    opacity: 0.8;
}

.category-page {
    padding: 40px 0;
}

.category-page .model-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

/* ===== 面包屑 ===== */
.breadcrumb {
    padding: 16px 0;
    font-size: 14px;
    color: var(--text-secondary);
}

.breadcrumb a {
    color: var(--primary);
}

.breadcrumb span {
    margin: 0 6px;
}

/* ===== 详情页 ===== */
.detail-page {
    padding: 32px 0 60px;
}

.detail-header {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 32px;
    margin-bottom: 24px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

.detail-gallery {
    position: relative;
}

.detail-main-img {
    width: 100%;
    aspect-ratio: 4/3;
    border-radius: var(--radius-sm);
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.detail-main-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 16px;
}

.detail-thumbnails {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    overflow-x: auto;
}

.detail-thumb {
    width: 72px;
    height: 56px;
    border-radius: 6px;
    background: #f0f0f0;
    flex-shrink: 0;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.2s;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.detail-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-thumb.active {
    border-color: var(--primary);
}

.detail-info h1 {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 12px;
}

.detail-info .cat-badge {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 16px;
}

.cat-badge.zx7 { background: var(--zx7); }
.cat-badge.tig { background: var(--tig); }
.cat-badge.nbc { background: var(--nbc); }
.cat-badge.cut { background: var(--cut); }

.detail-info .detail-desc {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 24px;
}

.detail-actions {
    display: flex;
    gap: 12px;
}

.btn {
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--border);
    color: var(--text);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* 参数表 */
.params-section {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 32px;
    margin-bottom: 24px;
}

.params-section h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border);
}

.params-table {
    width: 100%;
    border-collapse: collapse;
}

.params-table th,
.params-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}

.params-table th {
    background: #fafafa;
    font-weight: 600;
    color: var(--text-secondary);
    width: 180px;
}

.params-table td {
    color: var(--text);
}

/* 图片集 */
.images-section {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 32px;
}

.images-section h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border);
}

.images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
}

.image-card {
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: #f5f5f5;
    cursor: pointer;
    transition: transform 0.2s;
    aspect-ratio: 4/3;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-card:hover {
    transform: scale(1.02);
}

.image-card img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 12px;
}

/* 灯箱 */
.lightbox {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.9);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.lightbox.show {
    display: flex;
}

.lightbox img {
    max-width: 90vw;
    max-height: 80vh;
    border-radius: 4px;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 32px;
    color: #fff;
    cursor: pointer;
    background: none;
    border: none;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 36px;
    color: #fff;
    cursor: pointer;
    background: rgba(255,255,255,0.1);
    border: none;
    padding: 16px 12px;
    border-radius: 4px;
}

.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

.lightbox-caption {
    color: #fff;
    margin-top: 16px;
    font-size: 14px;
}

@media (max-width: 768px) {
    .detail-header {
        grid-template-columns: 1fr;
        padding: 20px;
    }
    .params-section,
    .images-section {
        padding: 20px;
    }
    .params-table th {
        width: 120px;
    }
    .images-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

/* ===== 页脚 ===== */
.footer {
    background: #1a1a2e;
    color: rgba(255,255,255,0.6);
    text-align: center;
    padding: 32px 20px;
    font-size: 14px;
}

.footer p {
    margin-bottom: 4px;
}

/* ===== 滚动条 ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #ccc; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #aaa; }

/* ===== 动画 ===== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-in {
    animation: fadeInUp 0.4s ease forwards;
}
