/* ===========================================
   jijunqi.com Template Style
   集菌仪官网 - 蓝白配色 Bootstrap 风格
   =========================================== */

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 14px; }
body {
    font-family: "Microsoft YaHei", "PingFang SC", Arial, Helvetica, sans-serif;
    color: #656464;
    margin: 0;
    padding: 0;
    background: #fff;
    line-height: 1.6;
}
a { color: #333; text-decoration: none; transition: all 0.3s; }
a:hover { color: #2186CF; }
img { max-width: 100%; height: auto; vertical-align: middle; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4, h5, h6 { margin: 0; font-weight: normal; }
p { margin: 0; }

/* Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}
@media (min-width: 768px) {
    .container { padding: 0 20px; }
}

/* ============== TOP BAR ============== */
.top-bar {
    background: #222629;
    color: #E4E4E4;
    font-size: 12px;
    height: 36px;
    line-height: 36px;
}
.top-bar .container {
    display: flex;
    justify-content: space-between;
}
.top-phone { color: #ccc; }

/* ============== HEADER / NAV ============== */
#header {
    background: #fff;
    box-shadow: 0 3px 4px rgba(0,0,0,0.1);
    position: relative;
    z-index: 100;
}
.header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}
.logo a { display: flex; align-items: center; }
.logo img { max-height: 60px; max-width: 350px; }
.logo h1 { font-size: 22px; color: #2186CF; white-space: nowrap; }

/* Desktop Navigation */
.nav-list {
    display: flex;
    gap: 0;
}
.nav-list > li {
    position: relative;
}
.nav-list > li > a {
    display: block;
    padding: 28px 16px;
    color: #333;
    font-size: 15px;
    transition: all 0.3s;
    white-space: nowrap;
}
.nav-list > li > a:hover,
.nav-list > li.active > a {
    color: #2186CF;
    background: #f5f5f5;
}
.nav-list > li.active > a {
    color: #fff;
    background: #2186CF;
}

/* Sub Menu (dropdown) */
.sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    min-width: 160px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    z-index: 999;
    border-radius: 0 0 4px 4px;
    padding: 5px 0;
}
.sub-menu li a {
    display: block;
    padding: 8px 18px;
    color: #555;
    font-size: 13px;
    border-bottom: 1px solid #f0f0f0;
}
.sub-menu li:last-child a { border-bottom: none; }
.sub-menu li a:hover { background: #2186CF; color: #fff; }
.nav-list > li:hover .sub-menu { display: block; }

/* Nav Toggle (mobile) */
.nav-toggle {
    display: none;
    background: none;
    border: 1px solid #2186CF;
    color: #2186CF;
    font-size: 22px;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
}

/* ============== BANNER ============== */
.banner-section { width: 100%; overflow: hidden; background: #f0f0f0; }
.banner-slider { position: relative; width: 100%; max-height: 500px; overflow: hidden; }
.slider-wrapper { position: relative; }
.slide { display: none; width: 100%; }
.slide.active { display: block; }
.slide img { width: 100%; display: block; }

/* Slider Dots */
.slider-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}
.slider-dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
}
.slider-dots span.active { background: #fff; }

/* Slider Arrows */
.slider-arrows { position: absolute; top: 50%; width: 100%; transform: translateY(-50%); z-index: 10; pointer-events: none; }
.slider-prev, .slider-next {
    position: absolute;
    pointer-events: all;
    background: rgba(0,0,0,0.3);
    color: #fff;
    width: 40px;
    height: 60px;
    line-height: 60px;
    text-align: center;
    font-size: 28px;
    cursor: pointer;
    transition: background 0.3s;
}
.slider-prev { left: 0; border-radius: 0 4px 4px 0; }
.slider-next { right: 0; border-radius: 4px 0 0 4px; }
.slider-prev:hover, .slider-next:hover { background: rgba(0,0,0,0.6); }

/* Page Banner (inner pages) */
.page-banner {
    background: #2186CF;
    color: #fff;
    text-align: center;
    padding: 50px 20px;
    margin-bottom: 0;
}
.page-banner h2 { font-size: 28px; font-weight: 300; }

/* ============== SECTIONS ============== */
.section { padding: 40px 0; }
.section-title {
    text-align: center;
    margin-bottom: 30px;
}
.section-title h2 {
    font-size: 24px;
    color: #2186CF;
    display: inline-block;
    margin-bottom: 5px;
}
.section-title span {
    display: block;
    color: #999;
    font-size: 13px;
    font-weight: bold;
    text-transform: uppercase;
}

/* ============== INTRO GRID ============== */
.intro-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
.intro-item {
    text-align: center;
    padding: 25px 15px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 4px;
    transition: all 0.3s;
}
.intro-item:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.1); border-color: #2186CF; }
.intro-icon { font-size: 32px; color: #2186CF; margin-bottom: 10px; }
.intro-item h3 { font-size: 16px; color: #333; margin-bottom: 8px; }
.intro-item p { font-size: 13px; color: #888; line-height: 1.7; }

/* ============== CATEGORY GRID ============== */
.cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 15px;
}
.cat-item {
    background: #f8f8f8;
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    text-align: center;
    padding: 25px 15px;
    transition: all 0.3s;
}
.cat-item:hover { background: #2186CF; border-color: #2186CF; }
.cat-item a { display: block; }
.cat-item h3 { font-size: 16px; color: #333; margin-bottom: 8px; }
.cat-item span { font-size: 12px; color: #999; }
.cat-item:hover h3,
.cat-item:hover span { color: #fff; }

/* ============== PRODUCT GRID ============== */
.section-products { background: #F4F4F4; }
.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
.product-item {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 4px;
    overflow: hidden;
    transition: all 0.3s;
}
.product-item:hover { box-shadow: 0 4px 15px rgba(0,0,0,0.1); }
.product-img {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #fafafa;
    padding: 10px;
}
.product-img img { max-height: 180px; }
.product-img .no-img { color: #ccc; font-size: 14px; text-align: center; padding: 20px; }
.product-title {
    text-align: center;
    padding: 12px 10px;
    font-size: 13px;
    color: #656464;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.product-item:hover .product-title { color: #2186CF; }
.product-title a { color: inherit; }

/* ============== ABOUT SECTION ============== */
.section-about {
    text-align: center;
    color: #fff;
    padding: 60px 20px;
    background-color: #1A1A1A;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}
.section-about.has-bg {
    position: relative;
}
.section-about.has-bg::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
}
.section-about .container { position: relative; z-index: 1; }
.section-about h2 { font-size: 32px; font-weight: 300; margin-bottom: 20px; }
.section-about p { font-size: 14px; line-height: 1.8; max-width: 800px; margin: 0 auto 25px; opacity: 0.9; }
.btn-more {
    display: inline-block;
    padding: 10px 30px;
    color: #fff;
    border: 1px solid #fff;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.3s;
}
.btn-more:hover { color: #fff; box-shadow: 0 0 20px rgba(255,255,255,0.5); }

/* ============== BOTTOM SECTION (News + Contact) ============== */
.bottom-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 40px;
}
.bottom-grid h3 {
    font-size: 20px;
    color: #152437;
    padding-bottom: 10px;
    border-bottom: 2px solid #2186CF;
    margin-bottom: 15px;
}
.news-list ul li {
    padding: 10px 0;
    border-bottom: 1px dashed #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.news-list ul li a { color: #555; font-size: 14px; flex: 1; }
.news-list ul li a:hover { color: #2186CF; }
.news-date { color: #999; font-size: 12px; white-space: nowrap; margin-left: 10px; }
.news-list ul li.empty { color: #999; border: none; }
.contact-info p { margin-bottom: 6px; color: #555; font-size: 14px; }
.contact-info p strong { color: #333; }

/* ============== FRIEND LINKS ============== */
.section-links {
    padding: 15px 0;
    border-top: 1px solid #eee;
    font-size: 12px;
}
.links-label { color: #888; }
.section-links a { color: #666; margin: 0 8px; }
.section-links a:hover { color: #2186CF; }

/* ============== PAGE LAYOUT (inner) ============== */
.page-layout {
    display: flex;
    gap: 30px;
    padding: 30px 0;
}
.page-layout .sidebar {
    width: 260px;
    flex-shrink: 0;
}

/* Sidebar box */
.side-box {
    margin-bottom: 20px;
}
.side-box h3 {
    font-size: 16px;
    color: #152437;
    padding: 8px 0;
    border-bottom: 2px solid #2186CF;
    margin-bottom: 10px;
}

/* Sidebar nav */
.side-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}
.side-nav-item {
    padding: 8px 15px;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.3s;
    background: transparent;
}
.side-nav-item a {
    color: #555;
    font-size: 14px;
    display: block;
    text-decoration: none;
}
.side-nav-item a:hover { color: #2186CF; }
/* Sidebar search */
.side-search {
    display: flex;
    gap: 5px;
}
.side-search-input {
    flex: 1;
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 0;
    font-size: 13px;
    outline: none;
}
.side-search-input:focus {
    border-color: #2186CF;
}
.side-search-btn {
    padding: 6px 12px;
    background: #2186CF;
    color: #fff;
    border: none;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s;
}
.side-search-btn:hover {
    background: #034F86;
}

/* Sidebar sub-categories (article page) */
.side-sub {
    list-style: none;
    padding: 0;
    margin: 0;
}
.side-sub li {
    padding: 5px 0 5px 15px;
    border-bottom: 1px dashed #f0f0f0;
}
.side-sub li a {
    color: #777;
    font-size: 13px;
}
.side-sub li a:hover { color: #2186CF; }

/* Old sidebar compat (for page and backward) */
.side-nav li {
    border-bottom: 1px solid #f0f0f0;
    padding: 8px 12px;
    transition: all 0.3s;
}
.side-nav li a { color: #555; font-size: 14px; display: block; }
.side-nav li a:hover { color: #2186CF; }
.side-nav li.active { background: #d6d6d6; }
.side-nav li.active a { color: #333; }

.page-layout .main-content {
    flex: 1;
    min-width: 0;
}

/* Breadcrumb */
.breadcrumb {
    font-size: 12px;
    color: #999;
    padding: 8px 0;
    border-bottom: 1px solid #f2f2f2;
    margin-bottom: 20px;
}
.breadcrumb a { color: #666; }
.breadcrumb a:hover { color: #2186CF; }

/* Content List */
.content-list .content-item {
    padding: 15px 0;
    border-bottom: 1px dashed #e8e8e8;
}
.content-item h3 { font-size: 16px; margin-bottom: 6px; }
.content-item h3 a { color: #303c4b; }
.content-item h3 a:hover { color: #2186CF; }
.content-item .meta { font-size: 12px; color: #999; margin-bottom: 6px; }
.content-item .meta span { margin-right: 15px; }
.content-item .summary { font-size: 13px; color: #888; line-height: 1.6; }

/* Pagination */
.pagination { text-align: center; padding: 20px 0; }
.pagination a,
.pagination span {
    display: inline-block;
    padding: 6px 12px;
    margin: 0 2px;
    border: 1px solid #dbdbdb;
    color: #31363c;
    font-size: 13px;
    transition: all 0.3s;
}
.pagination a:hover,
.pagination .current {
    background: #31363c;
    color: #fff;
    border-color: #000;
}

/* ============== ARTICLE DETAIL ============== */
.article-detail h1 {
    font-size: 20px;
    color: #145ca1;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px dotted #ccc;
}
.article-meta {
    font-size: 13px;
    color: #888;
    margin-bottom: 20px;
    line-height: 1.8;
}
.article-meta span { margin-right: 15px; }
.article-meta a { color: #2186CF; }
.article-cover { margin-bottom: 20px; text-align: center; }
.article-cover img { max-height: 400px; border: 1px solid #eee; border-radius: 4px; }
.article-content { font-size: 14px; line-height: 1.9; color: #444; margin-bottom: 25px; overflow: hidden; }
.article-content p { margin-bottom: 12px; }
.article-content img { max-width: 100%; height: auto; margin: 10px 0; border: 1px solid #eee; border-radius: 4px; }

/* Article Nav */
.article-nav {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    padding: 12px 0;
    margin-bottom: 20px;
}
.article-nav a { color: #2186CF; }
.article-nav a:hover { text-decoration: underline; }

/* Related */
.related-section h3 {
    font-size: 16px;
    color: #152437;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #2186CF;
}
.related-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}
.related-item {
    border: 1px solid #eee;
    padding: 10px;
    text-align: center;
    border-radius: 4px;
}
.related-item a { color: #555; font-size: 13px; }
.related-item a:hover { color: #2186CF; }

/* ============== PAGE SINGLE ============== */
.page-detail { font-size: 14px; line-height: 1.9; color: #444; }
.page-detail p { margin-bottom: 12px; }
.page-detail img { max-width: 100%; height: auto; margin: 10px 0; }

/* ============== ERROR PAGE ============== */
.error-page { text-align: center; padding: 80px 20px; min-height: 400px; }
.error-page h1 { font-size: 72px; color: #2186CF; margin-bottom: 10px; }
.error-page h2 { font-size: 24px; color: #333; margin-bottom: 15px; }
.error-page p { color: #888; margin-bottom: 10px; }
.error-page .jump-hint { font-size: 12px; color: #aaa; }

/* ============== FOOTER ============== */
#footer {
    background: #222629;
    color: #E4E4E4;
    padding: 30px 0;
    text-align: center;
    font-size: 13px;
    margin-top: 0;
}
#footer a { color: #aaa; }
#footer a:hover { color: #fff; }
#footer .footer-info p { margin-bottom: 5px; }
#footer .footer-links { margin-top: 8px; }

/* ============== RESPONSIVE ============== */
@media (max-width: 992px) {
    .intro-grid { grid-template-columns: repeat(2, 1fr); }
    .product-grid { grid-template-columns: repeat(3, 1fr); }
    .page-layout { flex-direction: column; }
    .page-layout .sidebar { width: 100%; }
    .bottom-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .top-bar .container {
        flex-direction: column;
        text-align: center;
        height: auto;
        line-height: 1.8;
        padding: 4px 15px;
    }
    .header-row { height: auto; padding: 10px 0; flex-wrap: wrap; }
    .logo h1 { font-size: 18px; }
    .nav-toggle { display: block; }
    .nav-list {
        display: none;
        width: 100%;
        flex-direction: column;
        background: #fff;
        border-top: 1px solid #eee;
        max-height: 400px;
        overflow-y: auto;
    }
    .nav-list.open { display: flex; }
    .nav-list > li > a { padding: 12px 15px; border-bottom: 1px solid #f0f0f0; }
    .sub-menu { position: static; box-shadow: none; display: none; padding-left: 15px; }
    .nav-list > li.open > .sub-menu { display: block; }
    .product-grid { grid-template-columns: repeat(2, 1fr); }
    .intro-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .intro-item { padding: 15px 10px; }
    .related-grid { grid-template-columns: repeat(2, 1fr); }
    .page-banner { padding: 30px 15px; }
    .page-banner h2 { font-size: 22px; }
}

@media (max-width: 480px) {
    .product-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .product-img { height: 150px; }
    .product-title { font-size: 12px; padding: 8px 5px; }
    .cat-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .section { padding: 25px 0; }
    .news-list ul li { flex-direction: column; align-items: flex-start; }
    .news-date { margin-left: 0; margin-top: 4px; }
}
