/* 基础重置 */
* { margin:0; padding:0; box-sizing:border-box; }
body { font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif; color:#333; line-height:1.6; background:#f8f9fa; }
.container { max-width:1200px; margin:0 auto; padding:0 20px; }
a { color:#0066cc; text-decoration:none; }
a:hover { color:#004499; }

/* 头部 */
.site-header { background:#fff; border-bottom:1px solid #e9ecef; padding:15px 0; position:sticky; top:0; z-index:1000; box-shadow:0 2px 8px rgba(0,0,0,0.06); }
.header-inner { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:15px; }
.site-branding h1 { font-size:24px; margin:0; }
.site-branding h1 a { color:#1a1a2e; }
.site-branding img { max-height:80px; width:auto; height:auto; }

/* 搜索框分类下拉融合 */
.header-search { flex:1; max-width:600px; min-width:200px; }
.header-search form {
    display: flex;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.3s;
    background: #fff;
}
.header-search form:focus-within {
    border-color: #0066cc;
}
.search-category-dropdown {
    flex-shrink: 0;
    border-right: 1px solid #e9ecef;
    background: #f8f9fa;
    display: flex;
    align-items: center;
}
.search-category-dropdown select {
    padding: 10px 12px;
    border: none;
    background: transparent;
    font-size: 14px;
    color: #333;
    outline: none;
    cursor: pointer;
    min-width: 120px;
    appearance: auto;
}
.header-search input[type="search"] {
    flex: 1;
    padding: 10px 16px;
    border: none;
    outline: none;
    font-size: 15px;
    background: transparent;
}
.header-search button {
    padding: 10px 20px;
    background: #0066cc;
    color: #fff;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
    flex-shrink: 0;
}
.header-search button:hover {
    background: #004499;
}

.main-navigation .nav-menu { display:flex; list-style:none; gap:25px; }
.main-navigation .nav-menu a { color:#333; font-weight:500; transition:color 0.3s; }
.main-navigation .nav-menu a:hover { color:#0066cc; }
.mobile-menu-toggle { display:none; background:none; border:none; font-size:28px; cursor:pointer; }

/* 产品网格 */
.parts-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(260px,1fr)); gap:24px; margin:30px 0; }
.part-card { background:#fff; border-radius:12px; overflow:hidden; box-shadow:0 2px 12px rgba(0,0,0,0.08); transition:transform 0.3s, box-shadow 0.3s; }
.part-card:hover { transform:translateY(-4px); box-shadow:0 8px 30px rgba(0,0,0,0.12); }
.part-card-link { display:block; color:inherit; }
.part-image { position:relative; aspect-ratio:1/1; background:#f1f3f5; overflow:hidden; }
.part-image img { width:100%; height:100%; object-fit:contain; padding:10px; }
.badge-3d { position:absolute; top:10px; right:10px; background:#0066cc; color:#fff; font-size:12px; font-weight:700; padding:4px 10px; border-radius:20px; }
.badge-new { position:absolute; top:10px; left:10px; background:#ff6b6b; color:#fff; font-size:12px; font-weight:700; padding:4px 10px; border-radius:20px; }
.part-info { padding:16px; }
.part-title { font-size:16px; margin:0 0 6px; font-weight:600; }
.part-title a { color:#333; }
.part-manufacturer { font-size:13px; color:#666; margin-bottom:4px; }
.part-number { font-size:13px; color:#888; margin-bottom:8px; }
.part-excerpt { font-size:14px; color:#555; margin-bottom:10px; }
.part-categories { font-size:12px; color:#0066cc; }

/* 价格与购买 */
.part-purchase { margin-top:10px; display:flex; flex-wrap:wrap; align-items:center; gap:10px; }
.part-price { font-weight:700; color:#0066cc; font-size:16px; }
.add-to-cart-btn, .inquiry-btn { display:inline-block; padding:6px 16px; background:#28a745; color:#fff; border:none; border-radius:4px; font-weight:600; cursor:pointer; transition:background 0.2s; font-size:14px; }
.add-to-cart-btn:hover { background:#1e7e34; }
.inquiry-btn { background:#ffc107; color:#333; }
.inquiry-btn:hover { background:#e0a800; }
.price-unavailable { color:#999; font-size:14px; }
.product-purchase { margin-top:20px; padding:15px 0; border-top:1px solid #eee; }
.add-to-cart-form { display:flex; align-items:center; gap:12px; margin-top:10px; }
.add-to-cart-form input[type="number"] { padding:8px 6px; border:1px solid #ddd; border-radius:4px; font-size:16px; }
.add-to-cart-form button { padding:8px 24px; background:#28a745; color:#fff; border:none; border-radius:4px; font-weight:600; cursor:pointer; font-size:16px; }
.add-to-cart-form button:hover { background:#1e7e34; }
#cart-message { margin-top:8px; font-weight:500; }

/* 筛选栏 */
.filter-bar { display:flex; flex-wrap:wrap; gap:15px; background:#fff; padding:16px 20px; border-radius:10px; margin:20px 0; box-shadow:0 1px 4px rgba(0,0,0,0.06); }
.filter-bar select { padding:8px 14px; border:1px solid #ddd; border-radius:6px; font-size:14px; background:#fff; cursor:pointer; min-width:160px; }

/* 详情页 */
.detail-layout { display:grid; grid-template-columns:1fr 1fr; gap:40px; margin:30px 0; }
@media (max-width:768px) { .detail-layout { grid-template-columns:1fr; } }
.detail-visual { background:#fff; border-radius:12px; padding:20px; min-height:400px; box-shadow:0 2px 12px rgba(0,0,0,0.06); }
#three-canvas { width:100%; height:400px; }
.model-controls { display:flex; gap:10px; margin-top:12px; justify-content:center; }
.model-controls button { padding:6px 16px; border:1px solid #ddd; border-radius:6px; background:#fff; cursor:pointer; font-size:13px; transition:all 0.3s; }
.model-controls button:hover { background:#0066cc; color:#fff; border-color:#0066cc; }
.detail-info { padding:10px 0; }
.product-title { font-size:28px; margin-bottom:12px; }
.product-manufacturer, .product-part-number { font-size:15px; color:#555; margin-bottom:6px; }
.product-description { margin:16px 0; color:#444; }
.technical-specs { margin:20px 0; }
.technical-specs h3 { margin-bottom:10px; font-size:18px; }
.specs-table { width:100%; border-collapse:collapse; font-size:14px; }
.specs-table td { padding:8px 12px; border-bottom:1px solid #f1f3f5; }
.specs-table td:first-child { font-weight:600; color:#555; width:40%; }
.btn-download-cad { display:inline-block; padding:14px 32px; background:#28a745; color:#fff; border-radius:8px; font-weight:600; font-size:16px; transition:background 0.3s; margin-top:16px; }
.btn-download-cad:hover { background:#1e7e34; }
.btn-inquiry { display:inline-block; padding:12px 28px; background:#ffc107; color:#333; border-radius:8px; font-weight:600; font-size:16px; transition:background 0.3s; margin-top:10px; }
.btn-inquiry:hover { background:#e0a800; }

/* 首页 */
.front-hero { background:linear-gradient(135deg, #1a1a2e 0%, #16213e 100%); color:#fff; padding:80px 0; text-align:center; }
.front-hero h1 { font-size:42px; margin-bottom:16px; }
.front-hero h1 span { color:#4dabf7; }
.front-hero p { font-size:18px; opacity:0.8; max-width:600px; margin:0 auto 30px; }
.front-hero .hero-search { max-width:600px; margin:0 auto; }
.front-hero .hero-search form { display:flex; border-radius:50px; overflow:hidden; background:#fff; }
.front-hero .hero-search input[type="search"] { flex:1; padding:16px 24px; border:none; outline:none; font-size:16px; }
.front-hero .hero-search button { padding:16px 32px; background:#4dabf7; color:#fff; border:none; font-weight:600; cursor:pointer; font-size:16px; }
.front-hero .hero-search button:hover { background:#339af0; }
.hero-quick-links { margin-top:25px; display:flex; gap:15px; justify-content:center; flex-wrap:wrap; }
.hero-quick-links .btn-outline { display:inline-block; padding:12px 28px; border:2px solid rgba(255,255,255,0.6); color:#fff; border-radius:30px; font-weight:600; transition:all 0.3s; }
.hero-quick-links .btn-outline:hover { background:#fff; color:#1a1a2e; }
.hero-quick-links .btn-primary { background:#4dabf7; color:#fff; padding:12px 28px; border-radius:30px; }
.hero-quick-links .btn-primary:hover { background:#339af0; }
.section-header { text-align:center; margin-bottom:40px; }
.section-header h2 { font-size:32px; margin-bottom:8px; color:#1a1a2e; }
.section-header p { font-size:16px; color:#777; max-width:600px; margin:0 auto; }
.front-featured, .front-latest, .front-categories, .front-brands, .front-advantages, .front-applications, .front-news { padding:60px 0; }
.category-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(180px,1fr)); gap:16px; }
.category-item { display:block; background:#fff; padding:24px 16px; text-align:center; border-radius:10px; box-shadow:0 2px 8px rgba(0,0,0,0.06); transition:all 0.3s; }
.category-item:hover { transform:translateY(-4px); box-shadow:0 6px 20px rgba(0,0,0,0.10); }
.category-item .cat-icon { display:block; font-size:40px; margin-bottom:8px; }
.category-item .cat-name { display:block; font-weight:600; color:#1a1a2e; }
.category-item .cat-count { font-size:13px; color:#888; }
.brands-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(140px,1fr)); gap:20px; margin:20px 0; }
.brand-item { background:#fff; padding:20px; text-align:center; border-radius:10px; box-shadow:0 2px 8px rgba(0,0,0,0.06); transition:transform 0.3s; }
.brand-item:hover { transform:translateY(-4px); }
.brand-name { display:block; font-weight:700; color:#1a1a2e; font-size:16px; }
.brand-tag { font-size:12px; color:#aaa; }
.advantages-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(240px,1fr)); gap:30px; margin:30px 0; }
.advantage-item { background:#fff; padding:30px 20px; text-align:center; border-radius:12px; box-shadow:0 2px 12px rgba(0,0,0,0.06); transition:transform 0.3s; }
.advantage-item:hover { transform:translateY(-6px); }
.advantage-icon { font-size:48px; margin-bottom:15px; }
.advantage-item h3 { font-size:20px; margin-bottom:10px; color:#1a1a2e; }
.advantage-item p { color:#666; font-size:14px; line-height:1.6; }
.apps-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(160px,1fr)); gap:20px; margin:20px 0; }
.app-item { background:#fff; padding:30px 10px; text-align:center; border-radius:10px; box-shadow:0 1px 4px rgba(0,0,0,0.06); }
.app-icon { font-size:36px; margin-bottom:8px; }
.app-item h4 { font-size:16px; color:#333; }
.news-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(260px,1fr)); gap:30px; margin:20px 0; }
.news-item { background:#fff; padding:20px; border-radius:10px; box-shadow:0 2px 8px rgba(0,0,0,0.06); }
.news-item a { color:#333; text-decoration:none; }
.news-item .news-date { font-size:12px; color:#999; margin-bottom:6px; }
.news-item h4 { font-size:17px; margin-bottom:8px; color:#1a1a2e; }
.news-item .news-excerpt { font-size:14px; color:#666; }
.front-cta { background:linear-gradient(135deg, #1a1a2e 0%, #16213e 100%); color:#fff; padding:60px 0; text-align:center; }
.cta-content h2 { font-size:32px; margin-bottom:10px; }
.cta-content p { font-size:18px; opacity:0.8; margin-bottom:25px; }
.cta-content .btn-primary { background:#4dabf7; color:#fff; padding:14px 40px; border-radius:30px; font-weight:600; transition:background 0.3s; }
.cta-content .btn-primary:hover { background:#339af0; }
.view-all { text-align:center; margin-top:30px; }
.btn-primary { display:inline-block; padding:12px 32px; background:#0066cc; color:#fff; border-radius:8px; font-weight:600; transition:background 0.3s; }
.btn-primary:hover { background:#004499; }

/* 页脚 */
.site-footer { background:#1a1a2e; color:rgba(255,255,255,0.7); padding:30px 0; margin-top:40px; }
.footer-inner { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:15px; }
.footer-menu { display:flex; list-style:none; gap:20px; }
.footer-menu a { color:rgba(255,255,255,0.7); }
.footer-menu a:hover { color:#fff; }

/* 响应式 */
@media (max-width:992px) {
    .header-search { max-width:400px; }
    .parts-grid { grid-template-columns:repeat(auto-fill, minmax(220px,1fr)); }
}
@media (max-width:768px) {
    .header-inner { flex-wrap:wrap; }
    .header-search { order:3; max-width:100%; width:100%; }
    .header-search form { flex-wrap:wrap; }
    .search-category-dropdown {
        width:100%;
        border-right:none;
        border-bottom:1px solid #e9ecef;
    }
    .search-category-dropdown select {
        width:100%;
        padding:12px;
    }
    .header-search input[type="search"] { width:100%; }
    .header-search button { width:100%; border-radius:0 0 8px 8px; }
    .main-navigation { display:none; }
    .main-navigation.active { display:block; width:100%; order:4; }
    .main-navigation .nav-menu { flex-direction:column; gap:10px; padding:15px 0; border-top:1px solid #eee; }
    .mobile-menu-toggle { display:block; }
    .front-hero h1 { font-size:28px; }
    .parts-grid { grid-template-columns:repeat(auto-fill, minmax(160px,1fr)); gap:16px; }
    .filter-bar { flex-direction:column; }
    .filter-bar select { width:100%; }
    .section-header h2 { font-size:26px; }
    .advantages-grid { grid-template-columns:1fr 1fr; }
    .apps-grid { grid-template-columns:repeat(3,1fr); }
}
@media (max-width:480px) {
    .parts-grid { grid-template-columns:1fr 1fr; gap:12px; }
    .part-info { padding:10px; }
    .part-title { font-size:14px; }
    .advantages-grid { grid-template-columns:1fr; }
    .apps-grid { grid-template-columns:repeat(2,1fr); }
    .brands-grid { grid-template-columns:repeat(2,1fr); }
    .hero-quick-links .btn-outline, .hero-quick-links .btn-primary { padding:10px 20px; font-size:14px; }
}