/* style.css - 完整版 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f9f9f9;
}
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}
header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}
.logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: #0056b3;
    text-decoration: none;
}
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
}
.main-nav ul {
    display: flex;
    list-style: none;
    gap: 1.5rem;
}
.main-nav a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.2s;
}
.main-nav a:hover {
    color: #0056b3;
}
.breadcrumb {
    background: #eee;
    padding: 0.75rem 0;
    font-size: 0.9rem;
}
.breadcrumb a {
    color: #0056b3;
    text-decoration: none;
}
.breadcrumb span {
    color: #666;
}
main {
    padding: 2rem 0;
    min-height: 60vh;
}
/* 详情头部样式 */
.detail-header {
    background: #f5f7fa;
    border-radius: 12px;
    padding: 1.5rem 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.detail-header h1 {
    margin-bottom: 0.5rem;
}
.detail-meta {
    color: #666;
    font-size: 0.9rem;
}
/* 左右两栏布局（侧边栏在左） */
.detail-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
    margin: 2rem 0;
}
/* 侧边栏在右侧（用于类型详情页） */
.detail-layout.sidebar-right {
    grid-template-columns: 1fr 280px;
}
.detail-sidebar {
    background: #fff;
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    border: 1px solid #eee;
    align-self: start;
    position: sticky;
    top: 80px;
}
.detail-sidebar h3 {
    font-size: 1.1rem;
    margin: 0 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #0056b3;
    color: #0056b3;
}
.sidebar-nav {
    list-style: none;
    margin: 0;
    padding: 0;
}
.sidebar-nav li {
    margin-bottom: 0.3rem;
}
.sidebar-nav a {
    text-decoration: none;
    color: #333;
    display: block;
    padding: 0.3rem 0.5rem;
    border-radius: 6px;
    transition: all 0.2s;
}
.sidebar-nav a:hover, .sidebar-nav a.current {
    background: #0056b3;
    color: #fff;
}
.nav-group {
    margin-left: 1rem;
}
.group-title {
    font-weight: 600;
    margin: 0.5rem 0 0.2rem;
    padding: 0.3rem 0.5rem;
    background: #f0f0f0;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.group-title .toggle-icon {
    font-size: 0.8rem;
    transition: transform 0.2s;
}
.group-title.collapsed .toggle-icon {
    transform: rotate(-90deg);
}
.sub-nav {
    margin-left: 1rem;
    overflow: hidden;
    transition: max-height 0.3s ease;
}
.sub-nav.collapsed {
    display: none;
}
.mobile-sidebar-toggle {
    display: none;
    margin-bottom: 1rem;
    background: #0056b3;
    color: #fff;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
}
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}
.card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid #f0f0f0;
}
.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 20px rgba(0,0,0,0.1);
}
.card-image {
    width: 100%;
    height: 120px;
    background-size: cover;
    background-position: center;
    background-color: #f5f5f5;
}
.card-content {
    padding: 0.8rem 1rem 1rem;
}
.card-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0 0 0.4rem;
    color: #1e2a3a;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.card-meta {
    font-size: 0.7rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.card-desc {
    font-size: 0.75rem;
    color: #555;
    margin-bottom: 0.8rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.btn {
    display: inline-block;
    background: #0056b3;
    color: #fff;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.75rem;
    transition: background 0.2s;
    text-align: center;
}
.btn:hover {
    background: #003d82;
}
.btn-large {
    font-size: 1.1rem;
    padding: 0.8rem 2rem;
    background: #ffc107;
    color: #333;
}
.btn-outline {
    background: transparent;
    border: 1px solid #0056b3;
    color: #0056b3;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.75rem;
}
.btn-outline:hover {
    background: #0056b3;
    color: #fff;
}
.list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
    list-style: none;
    margin: 1rem 0;
}
.list-item {
    background: #fff;
    border-radius: 8px;
    padding: 0.8rem 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.list-item a {
    text-decoration: none;
    color: #0056b3;
    font-weight: 500;
    display: block;
}
.hero {
    background: linear-gradient(135deg, #0056b3 0%, #003d82 100%);
    color: #fff;
    text-align: center;
    padding: 4rem 2rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}
.products-by-type {
    margin: 3rem 0;
}
.type-section {
    margin-bottom: 4rem;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    overflow: hidden;
}
.type-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 1.5rem 2rem;
    border-bottom: 3px solid #0056b3;
}
.type-header h2 {
    font-size: 1.8rem;
    margin: 0 0 0.5rem;
    color: #0056b3;
}
.type-header h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: #ffc107;
    margin-top: 0.5rem;
}
.type-section .card-grid {
    padding: 2rem;
    margin: 0;
}
footer {
    background: #1e2a3a;
    color: #ccc;
    padding: 2rem 0;
    margin-top: 3rem;
}
.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}
.contact-float {
    position: fixed;
    right: 20px;
    bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 1000;
}
.contact-float a {
    background: #0056b3;
    color: #fff;
    padding: 10px 16px;
    border-radius: 40px;
    text-decoration: none;
    font-size: 0.9rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    gap: 6px;
}
.contact-float .contact-qq {
    background: #12b7f5;
}
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 2rem 0;
}
.pagination a {
    display: inline-block;
    padding: 0.5rem 0.8rem;
    background: #fff;
    border: 1px solid #ddd;
    color: #0056b3;
    text-decoration: none;
    border-radius: 4px;
}
.pagination a.active, .pagination a:hover {
    background: #0056b3;
    color: #fff;
}
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        padding: 1rem;
    }
    .main-nav.active {
        display: block;
    }
    .main-nav ul {
        flex-direction: column;
        gap: 0.5rem;
    }
    .detail-layout, .detail-layout.sidebar-right {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .detail-sidebar {
        position: static;
        display: none;
    }
    .detail-sidebar.show {
        display: block;
    }
    .mobile-sidebar-toggle {
        display: inline-block;
    }
    .card-image {
        height: 100px;
    }
}