/* ========================================
   机械模板 - copy-jixie style.css
   对齐源站 fkjxsb66.jz.fkw.com 视觉风格
   PHP 5.6 / NAI_Template 兼容
   ======================================== */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; -webkit-text-size-adjust: 100%; }
body { font-family: "Microsoft YaHei", "微软雅黑", "Helvetica Neue", Arial, sans-serif; color: #222222; line-height: 1.6; background: #fff; }
a { color: #222222; text-decoration: none; transition: color 0.3s; }
a:hover { color: #c40000; }
img { max-width: 100%; height: auto; vertical-align: middle; }
ul, ol { list-style: none; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 15px; }
.section { padding: 60px 0; }
.section-header { text-align: center; margin-bottom: 40px; }
.section-header h2 { font-size: 28px; color: #222; margin-bottom: 10px; position: relative; }
.section-header h2::after { content: ''; display: block; width: 60px; height: 3px; background: #c40000; margin: 12px auto 0; }
.section-header p { color: #888; font-size: 14px; }

/* --- Header Top (Logo + Search + Phone) --- */
.header { width: 100%; }
.header-top { background: #fff; border-bottom: 1px solid #eee; }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 80px; }
.logo h1 { font-size: 24px; color: #222; font-weight: 700; white-space: nowrap; }
.logo img { max-height: 60px; }

/* Search */
.header-search form { display: flex; border: 1px solid #ddd; border-radius: 4px; overflow: hidden; }
.search-input { border: none; padding: 8px 14px; font-size: 13px; width: 220px; outline: none; font-family: "Microsoft YaHei", "微软雅黑"; }
.search-btn { background: #c40000; color: #fff; border: none; padding: 8px 18px; cursor: pointer; font-size: 13px; font-family: "Microsoft YaHei", "微软雅黑"; }
.search-btn:hover { background: #ab0404; }

/* Phone */
.header-phone { white-space: nowrap; }
.phone-label { font-size: 13px; color: #888; }
.phone-num { font-size: 20px; color: #c40000; font-weight: 700; font-family: Arial, sans-serif; }

/* --- Navigation Bar --- */
.header-navbar { background: #c40000; width: 100%; height: 50px; }
.nav { width: 100%; height: 50px; position: relative; }
.nav ul { display: flex; margin: 0; padding: 0; list-style: none; height: 50px; }
.nav li { position: relative; height: 50px; }
.nav li a { display: block; padding: 0 24px; line-height: 50px; font-size: 16px; color: #ffffff; font-family: "Microsoft YaHei", "微软雅黑"; text-decoration: none; white-space: nowrap; transition: none; }
.nav li a:hover { color: #c40000; }
.nav li:hover,
.nav li.active { background: #ffffff; }
.nav li:hover > a,
.nav li.active > a { color: #c40000; }

/* Sub Navigation */
.sub-nav { display: none; position: absolute; top: 50px; left: 0; background: #c40000; min-width: 140px; z-index: 100; margin-top: 0; }
.sub-nav ul { display: block; height: auto; }
.sub-nav li { height: 40px; background: #c40000; border: none; }
.sub-nav li a { line-height: 40px; padding: 0 20px; font-size: 14px; color: #ffffff; height: 40px; text-align: center; border: none; }
.sub-nav li:hover { background: rgba(171,4,4,1); }
.sub-nav li:hover > a { color: #ffffff; }
.nav li:hover .sub-nav { display: block; }

/* Menu Toggle (mobile) */
.menu-toggle { display: none; flex-direction: column; gap: 4px; cursor: pointer; padding: 15px; position: absolute; right: 0; top: 0; }
.menu-toggle span { width: 22px; height: 2px; background: #fff; border-radius: 1px; }

/* --- Breadcrumb --- */
.breadcrumb { background: #f5f5f5; padding: 12px 0; font-size: 13px; color: #888; }
.breadcrumb .container a { color: #888; }
.breadcrumb .container a:hover { color: #c40000; }
.breadcrumb .sep { margin: 0 8px; color: #ccc; }

/* --- Banner --- */
.banner { position: relative; overflow: hidden; }
.banner-slider { position: relative; height: 450px; background: #f0f0f0; }
.banner-slide { position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 0.8s; }
.banner-slide.active { opacity: 1; }
.banner-slide img { width: 100%; height: 100%; object-fit: cover; }
.banner-dots { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; }
.banner-dots .dot { width: 12px; height: 12px; border-radius: 50%; background: rgba(255,255,255,0.5); cursor: pointer; border: 2px solid rgba(255,255,255,0.8); }
.banner-dots .dot.active { background: #c40000; border-color: #c40000; }

/* --- Feature --- */
.section-feature { background: #f8f9fa; }
.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; }
.feature-item { text-align: center; padding: 30px 20px; background: #fff; border-radius: 8px; box-shadow: 0 2px 12px rgba(0,0,0,0.06); transition: transform 0.3s; }
.feature-item:hover { transform: translateY(-4px); }
.feature-icon { width: 64px; height: 64px; margin: 0 auto 16px; background: #c40000; color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 28px; }
.feature-item h3 { font-size: 18px; margin-bottom: 10px; color: #222; }
.feature-item p { font-size: 13px; color: #888; line-height: 1.7; }

/* --- About --- */
.about-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; }
.about-text h2 { font-size: 28px; margin-bottom: 20px; color: #222; }
.about-text p { color: #666; margin-bottom: 15px; font-size: 14px; line-height: 1.8; }
.about-contact { margin: 20px 0; padding: 15px 20px; background: #f8f9fa; border-left: 3px solid #c40000; }
.about-contact p { margin: 0; font-size: 16px; color: #c40000; font-weight: 700; }
.btn-primary { display: inline-block; padding: 12px 30px; background: #c40000; color: #fff; border-radius: 4px; font-size: 15px; border: none; cursor: pointer; font-family: "Microsoft YaHei", "微软雅黑"; transition: background 0.3s; }
.btn-primary:hover { background: #ab0404; color: #fff; }
.about-image img { width: 100%; border-radius: 8px; box-shadow: 0 4px 20px rgba(0,0,0,0.1); }

/* --- Product Layout (Left Sidebar + Right Grid) --- */
.section-products { background: #fff; }
.product-layout { display: flex; gap: 30px; }
.product-sidebar { width: 220px; flex-shrink: 0; }
.product-cat-list { background: #f8f9fa; border-radius: 8px; overflow: hidden; }
.product-cat-list li { border-bottom: 1px solid #eee; }
.product-cat-list li:last-child { border-bottom: none; }
.product-cat-list li a { display: block; padding: 12px 16px; font-size: 14px; color: #333; transition: all 0.3s; }
.product-cat-list li a:hover { background: #c40000; color: #fff; padding-left: 22px; }
.product-main { flex: 1; min-width: 0; }
.product-show-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.product-show-item { background: #fff; border: 1px solid #eee; border-radius: 8px; overflow: hidden; text-align: center; transition: box-shadow 0.3s; }
.product-show-item:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.08); }
.product-show-item img { width: 100%; height: 180px; object-fit: cover; transition: transform 0.4s; }
.product-show-item:hover img { transform: scale(1.05); }
.product-show-title { padding: 10px; font-size: 13px; color: #555; }

/* --- Tabs --- */
.section-tabs { background: #f8f9fa; }
.tab-header { display: flex; justify-content: center; gap: 0; margin-bottom: 30px; }
.tab-btn { padding: 12px 40px; font-size: 15px; border: 1px solid #ddd; background: #fff; color: #666; cursor: pointer; font-family: "Microsoft YaHei", "微软雅黑"; transition: all 0.3s; }
.tab-btn:first-child { border-radius: 4px 0 0 4px; }
.tab-btn:last-child { border-radius: 0 4px 4px 0; }
.tab-btn.active { background: #c40000; color: #fff; border-color: #c40000; }
.tab-body { position: relative; }
.tab-content { display: none; }
.tab-content.active { display: block; }
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.photo-card { border-radius: 8px; overflow: hidden; }
.photo-card img { width: 100%; height: 224px; object-fit: cover; transition: transform 0.4s; }
.photo-card:hover img { transform: scale(1.05); }

/* --- News --- */
.news-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 25px; }
.news-card { display: flex; gap: 20px; padding: 20px; background: #fff; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,0.05); transition: box-shadow 0.3s; }
.news-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.1); }
.news-date { min-width: 70px; padding: 6px 12px; background: #c40000; color: #fff; border-radius: 4px; text-align: center; font-size: 13px; font-weight: 700; align-self: flex-start; }
.news-info h3 { font-size: 16px; margin-bottom: 8px; }
.news-info h3 a { color: #222; }
.news-info h3 a:hover { color: #c40000; }
.news-cat { display: inline-block; padding: 2px 10px; background: #f0f0f0; color: #888; font-size: 12px; border-radius: 3px; margin-bottom: 8px; }
.news-info p { font-size: 13px; color: #888; line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* --- Footer --- */
.footer { background: #222; color: #ccc; padding: 50px 0 0; }
.footer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; }
.footer-col h4 { color: #fff; font-size: 16px; margin-bottom: 20px; position: relative; padding-bottom: 10px; }
.footer-col h4::after { content: ''; position: absolute; bottom: 0; left: 0; width: 30px; height: 2px; background: #c40000; }
.footer-col p { margin-bottom: 8px; font-size: 13px; color: #aaa; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { color: #aaa; font-size: 13px; }
.footer-col ul li a:hover { color: #c40000; }
.footer-bottom { margin-top: 40px; padding: 20px 0; border-top: 1px solid rgba(255,255,255,0.1); text-align: center; }
.footer-bottom p { font-size: 12px; color: #888; margin: 4px 0; }

/* --- Pagination --- */
.pagination { display: flex; justify-content: center; gap: 5px; margin-top: 30px; }
.pagination a, .pagination span { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border: 1px solid #ddd; border-radius: 4px; font-size: 13px; color: #666; }
.pagination a:hover { border-color: #c40000; color: #c40000; }
.pagination span.current { background: #c40000; color: #fff; border-color: #c40000; }

/* --- List Page --- */
.page-layout { display: flex; gap: 30px; }
.sidebar { width: 260px; flex-shrink: 0; }
.main-content { flex: 1; min-width: 0; }
.sidebar-box { background: #f8f9fa; border-radius: 8px; padding: 20px; }
.sidebar-title { font-size: 16px; color: #222; margin-bottom: 15px; padding-bottom: 10px; border-bottom: 2px solid #c40000; }
.sidebar-menu li { margin-bottom: 4px; }
.sidebar-menu li a { display: block; padding: 8px 12px; border-radius: 4px; font-size: 13px; color: #555; background: #fff; border: 1px solid #eee; transition: all 0.3s; }
.sidebar-menu li a:hover { background: #c40000; color: #fff; border-color: #c40000; }
.page-title { font-size: 20px; color: #222; margin-bottom: 25px; padding-bottom: 12px; border-bottom: 2px solid #eee; }
.content-list { display: flex; flex-direction: column; gap: 20px; }
.content-item { display: flex; gap: 20px; padding: 20px; background: #fff; border: 1px solid #eee; border-radius: 8px; transition: box-shadow 0.3s; }
.content-item:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.06); }
.content-thumb { width: 180px; flex-shrink: 0; }
.content-thumb img { width: 100%; height: 130px; object-fit: cover; border-radius: 4px; }
.content-info { flex: 1; }
.content-info h2 { font-size: 16px; margin-bottom: 8px; }
.content-info h2 a { color: #222; }
.content-info h2 a:hover { color: #c40000; }
.content-info .meta { color: #999; font-size: 12px; margin-bottom: 8px; }
.content-info .meta span { margin-right: 15px; }
.content-info .summary { font-size: 13px; color: #888; line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* --- Article Detail --- */
.article-page { padding: 40px 0; }
.article-wrapper { max-width: 900px; margin: 0 auto; }
.article-title { font-size: 24px; color: #222; margin-bottom: 16px; line-height: 1.4; }
.article-meta { color: #999; font-size: 13px; padding-bottom: 20px; border-bottom: 1px solid #eee; margin-bottom: 30px; }
.article-meta span { margin-right: 20px; }
.article-content { font-size: 15px; line-height: 1.9; color: #444; }
.article-content img { max-width: 100%; height: auto; margin: 20px 0; border-radius: 4px; }
.article-content p { margin-bottom: 15px; }
.article-content h2, .article-content h3 { margin: 25px 0 12px; color: #222; }
.prev-next { margin-top: 40px; padding-top: 20px; border-top: 1px solid #eee; display: flex; justify-content: space-between; font-size: 13px; }
.related-section { margin-top: 40px; padding-top: 20px; border-top: 1px solid #eee; }
.related-section h3 { font-size: 16px; margin-bottom: 12px; color: #222; }
.related-section ul li { margin-bottom: 8px; }
.related-section ul li a { font-size: 13px; color: #555; }
.related-section ul li a:hover { color: #c40000; }

/* --- Single Page --- */
.page-single { padding: 40px 0; }
.page-content { font-size: 15px; line-height: 1.9; color: #444; }
.page-content p { margin-bottom: 15px; }
.page-content img { max-width: 100%; height: auto; margin: 20px 0; }

/* --- 404 & Empty State --- */
.empty-state { text-align: center; padding: 60px 20px; color: #999; }

/* --- Responsive --- */
@media (max-width: 992px) {
    .feature-grid { grid-template-columns: repeat(2, 1fr); }
    .about-layout { grid-template-columns: 1fr; }
    .news-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
    .photo-grid { grid-template-columns: repeat(2, 1fr); }
    .banner-slider { height: 300px; }
    .page-layout { flex-direction: column; }
    .sidebar { width: 100%; }
    .content-thumb { width: 140px; }
    .product-layout { flex-direction: column; }
    .product-sidebar { width: 100%; }
    .product-cat-list { display: flex; flex-wrap: wrap; }
    .product-cat-list li { border-bottom: none; }
    .product-show-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .header-inner { flex-wrap: wrap; height: auto; padding: 12px 15px; gap: 10px; }
    .header-search form { width: 100%; }
    .search-input { width: 100%; }
    .nav { position: relative; }
    .nav ul { display: none; flex-direction: column; position: absolute; top: 50px; left: 0; right: 0; background: #c40000; z-index: 100; height: auto; }
    .nav.active ul { display: flex; }
    .nav li { height: auto; }
    .nav li a { line-height: 44px; padding: 0 20px; border-bottom: 1px solid rgba(255,255,255,0.1); }
    .menu-toggle { display: flex; }
    .feature-grid { grid-template-columns: 1fr 1fr; gap: 15px; }
    .footer-grid { grid-template-columns: 1fr; }
    .photo-grid { grid-template-columns: 1fr; }
    .banner-slider { height: 200px; }
    .section { padding: 40px 0; }
    .section-header h2 { font-size: 22px; }
    .content-item { flex-direction: column; }
    .content-thumb { width: 100%; }
    .content-thumb img { height: 180px; }
    .product-show-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
    .feature-grid { grid-template-columns: 1fr; }
    .product-show-grid { grid-template-columns: 1fr; }
}
