* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background-color: #f0f4f9;
    color: #1a2a3a;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 16px 20px;
}

header {
    text-align: center;
    padding: 16px 0 20px;
    border-bottom: 2px solid #dce3ec;
    margin-bottom: 24px;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

header h1 {
    font-size: 26px;
    font-weight: 600;
    color: #0f1a2e;
    letter-spacing: 2px;
    margin: 0;
}

.header-link-btn {
    background: #FF4606;
    color: white;
    padding: 8px 22px;
    border-radius: 30px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    display: inline-block;
    box-shadow: 0 2px 12px rgba(231, 76, 60, 0.45);
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    letter-spacing: 0.5px;
}

.header-link-btn:hover {
    background: #c0392b;
    transform: scale(1.05);
    box-shadow: 0 4px 20px rgba(231, 76, 60, 0.55);
    text-decoration: none;
}

.header-link-btn:active {
    background: #a93226;
    transform: scale(0.96);
    box-shadow: 0 1px 6px rgba(231, 76, 60, 0.3);
}

/* ===== 主布局 ===== */
.main-layout {
    display: flex;
    gap: 28px;
    align-items: flex-start;
}

/* ===== 侧边栏 ===== */
.sidebar {
    flex: 0 0 180px;
    background: #ffffff;
    border-radius: 14px;
    padding: 18px 14px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 16px;
}

.sidebar h3 {
    font-size: 15px;
    color: #4a5a6e;
    margin-bottom: 14px;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.sidebar ul {
    list-style: none;
}

.sidebar ul li {
    margin-bottom: 6px;
}

.sidebar ul li a {
    display: block;
    padding: 9px 12px;
    color: #4a5a6e;
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s;
}

.sidebar ul li a:hover {
    background: #eef3f9;
    color: #0f1a2e;
}

.sidebar ul li a.active {
    background: #0f1a2e;
    color: #fff;
    font-weight: 500;
}

/* ===== 九宫格 ===== */
.product-grid-wrapper {
    flex: 1;
    min-width: 0;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.product-card {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: transform 0.2s, box-shadow 0.25s;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.10);
}

.product-card a {
    display: block;
    text-decoration: none;
    color: inherit;
    padding: 14px;
}

.product-image {
    width: 100%;
    aspect-ratio: 1/1;
    background: #f7f9fc;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-image img {
    max-width: 88%;
    max-height: 88%;
    object-fit: contain;
}

.product-name {
    margin-top: 10px;
    font-size: 15px;
    font-weight: 600;
    color: #0f1a2e;
    text-align: center;
}

.product-brands {
    margin-top: 3px;
    font-size: 13px;
    color: #7a8a9e;
    text-align: center;
}

/* ===== 分页 ===== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 28px;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    border-radius: 8px;
    font-size: 14px;
    text-decoration: none;
    color: #4a5a6e;
    background: #fff;
    border: 1px solid #dce3ec;
    transition: all 0.2s;
}

.pagination a:hover {
    background: #eef3f9;
    border-color: #b0c0d0;
}

.pagination .current {
    background: #0f1a2e;
    color: #fff;
    border-color: #0f1a2e;
    font-weight: 500;
}

.pagination .ellipsis {
    border: none;
    background: transparent;
}

/* ===== 详情页 ===== */
.detail-container {
    max-width: 780px;
    margin: 0 auto;
    background: #fff;
    border-radius: 16px;
    padding: 36px 40px;
    box-shadow: 0 2px 14px rgba(0,0,0,0.06);
}

.back-link {
    display: inline-block;
    margin-bottom: 20px;
    color: #0f1a2e;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.back-link:hover {
    text-decoration: underline;
}

.detail-product-image {
    width: 180px;
    height: 180px;
    margin: 0 auto 16px;
    background: #f7f9fc;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.detail-product-image img {
    max-width: 88%;
    max-height: 88%;
    object-fit: contain;
}

.detail-container h2 {
    text-align: center;
    font-size: 22px;
    color: #0f1a2e;
    margin-bottom: 20px;
}

.detail-table {
    width: 100%;
    border-collapse: collapse;
}

.detail-table tr {
    border-bottom: 1px solid #edf2f7;
}

.detail-table tr:last-child {
    border-bottom: none;
}

.detail-table th {
    text-align: left;
    padding: 10px 14px 10px 0;
    font-weight: 500;
    color: #5a6a7e;
    width: 32%;
    font-size: 14px;
}

.detail-table td {
    padding: 10px 0;
    font-size: 14px;
    color: #0f1a2e;
    word-break: break-word;
}

/* ===== 页脚 ===== */
footer {
    text-align: center;
    padding: 26px 0 8px;
    color: #aab8c8;
    font-size: 13px;
    border-top: 1px solid #dce3ec;
    margin-top: 36px;
}

/* ===== 响应式 ===== */
@media (max-width: 1024px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .main-layout {
        flex-direction: column;
    }

    .sidebar {
        flex: auto;
        position: static;
        width: 100%;
        padding: 14px 16px;
    }

    .sidebar ul {
        display: flex;
        gap: 6px;
        flex-wrap: wrap;
    }

    .sidebar ul li {
        margin-bottom: 0;
    }

    .sidebar ul li a {
        padding: 6px 14px;
        font-size: 13px;
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }

    .detail-container {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .product-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .product-card a {
        padding: 10px;
    }

    .product-name {
        font-size: 13px;
    }

    .detail-table th,
    .detail-table td {
        font-size: 13px;
        padding: 8px 0;
    }

    .detail-product-image {
        width: 130px;
        height: 130px;
    }
}

/* ===== 系列筛选复选框 ===== */
.series-filter-hint {
    font-size: 12px;
    color: #8a9aae;
    margin-bottom: 12px;
    padding: 6px 10px;
    background: #f0f4f9;
    border-radius: 6px;
    text-align: center;
}

.series-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.series-list li {
    margin-bottom: 4px;
}

.series-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 14px;
    color: #4a5a6e;
    user-select: none;
}

.series-checkbox:hover {
    background: #eef3f9;
}

.series-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #1a2a3a;
    cursor: pointer;
    flex-shrink: 0;
}

.series-checkbox .checkmark {
    display: none;
}

.sidebar-tip {
    font-size: 12px;
    color: #aab8c8;
    margin-top: 12px;
    padding: 6px 10px;
    background: #f7f9fc;
    border-radius: 6px;
    text-align: center;
    border: 1px dashed #dce3ec;
}

/* ===== 筛选提示 ===== */
.filter-hint {
    background: #f0f4f9;
    padding: 10px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
    color: #4a5a6e;
    border-left: 4px solid #1a2a3a;
}

.no-products {
    text-align: center;
    padding: 60px 20px;
    font-size: 16px;
    color: #aab8c8;
    background: #f7f9fc;
    border-radius: 12px;
}