/* ============================================================
   葫芦大集 - 现代统一样式
   ============================================================ */
:root {
    --color-primary: #e85d04;
    --color-primary-dark: #c44d00;
    --color-primary-light: #fff3eb;
    --color-accent: #2d6a4f;
    --color-accent-light: #d8f3dc;
    --color-text: #2b2d42;
    --color-text-muted: #6c757d;
    --color-border: #e9ecef;
    --color-bg: #f8f9fa;
    --color-white: #ffffff;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 999px;
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    --header-h: 88px;
    --max-w: 1100px;
}

*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: var(--font-sans);
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ---- Header ---- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-h);
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border);
    z-index: 1000;
    box-shadow: var(--shadow-sm);
    padding: 0;
}

.header-container {
    max-width: var(--max-w);
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    position: relative;
    width: 100%;
}

.logo {
    flex-shrink: 0;
    width: auto;
}

.logo img {
    width: auto !important;
    height: 56px;
    max-height: calc(var(--header-h) - 16px);
    display: block;
}

.navbar {
    display: flex;
    gap: 6px;
    align-items: center;
}

.navbar a {
    padding: 10px 16px;
    border-radius: var(--radius-full);
    font-size: 16px;
    font-weight: 500;
    color: var(--color-text-muted);
    transition: all 0.2s;
    white-space: nowrap;
}

.navbar a:hover {
    color: var(--color-primary);
    background: var(--color-primary-light);
}

.navbar a.active {
    color: var(--color-white);
    background: var(--color-primary);
}

.nav-toggle {
    display: none;
    background: var(--color-primary-light);
    border: none;
    cursor: pointer;
    color: var(--color-primary);
    padding: 10px;
    margin-left: auto;
    width: 42px;
    height: 42px;
    border-radius: var(--radius-sm);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    flex-shrink: 0;
    z-index: 1002;
    transition: background 0.2s;
}

.nav-toggle:hover {
    background: #ffe0cc;
}

.nav-toggle-bar {
    display: block;
    width: 18px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.2s ease;
}

.nav-toggle.is-active .nav-toggle-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle.is-active .nav-toggle-bar:nth-child(2) {
    opacity: 0;
}

.nav-toggle.is-active .nav-toggle-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.nav-backdrop {
    display: none;
}

body.nav-menu-open {
    overflow: hidden;
}

/* ---- Page body ---- */
.page-body {
    padding-top: var(--header-h);
    min-height: calc(100vh - 120px);
}

.site-container {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 20px;
}

/* ---- Hero ---- */
.hero {
    background: linear-gradient(135deg, #fff8f0 0%, #ffe8d6 50%, #d8f3dc 100%);
    padding: 48px 20px 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(232,93,4,0.08) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-inner {
    max-width: 640px;
    margin: 0 auto;
    position: relative;
}

.hero h1 {
    font-size: 32px;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.hero p {
    font-size: 16px;
    color: var(--color-text-muted);
    margin-bottom: 24px;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 24px;
    border-radius: var(--radius-full);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-primary {
    background: var(--color-primary);
    color: #fff;
    box-shadow: 0 4px 14px rgba(232,93,4,0.35);
}

.btn-primary:hover {
    background: var(--color-primary-dark);
    color: #fff;
    transform: translateY(-1px);
}

.btn-outline {
    background: var(--color-white);
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

.btn-outline:hover {
    background: var(--color-primary-light);
    color: var(--color-primary);
}

/* ---- Section ---- */
.section {
    padding: 40px 0;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.section-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--color-text);
    position: relative;
    padding-left: 14px;
}

.section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 22px;
    background: var(--color-primary);
    border-radius: 2px;
}

.section-more {
    font-size: 14px;
    color: var(--color-primary);
    font-weight: 500;
}

.section-more:hover { text-decoration: underline; }

/* ---- Cards grid ---- */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
}

.card-grid-3 {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

/* ---- Product card ---- */
.product-card {
    background: var(--color-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s, transform 0.2s;
}

a.product-card-link {
    text-decoration: none;
    color: inherit;
}

a.product-card-link:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.product-card-img {
    position: relative;
    padding-top: 75%;
    overflow: hidden;
    background: #f0f0f0;
}

.product-card-img img {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-card-body {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-card-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card-meta {
    font-size: 12px;
    color: var(--color-text-muted);
    margin-bottom: 12px;
}

.product-card-footer {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.product-card-footer-center {
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.product-card-footer-center .product-price {
    text-align: center;
}

.product-card-footer-center .btn-view {
    margin: 0 auto;
}

.product-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-primary);
}

.btn-sm {
    padding: 6px 16px;
    font-size: 13px;
}

/* 查看按钮：统一尺寸与文字居中 */
.btn-view {
    max-width: 100px;
    max-height: 37px;
    width: 100px;
    height: 37px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1;
    box-sizing: border-box;
    flex-shrink: 0;
}

/* ---- News card ---- */
.news-card {
    display: flex;
    gap: 16px;
    background: var(--color-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s;
    text-decoration: none;
    color: inherit;
}

.news-card:hover {
    box-shadow: var(--shadow-md);
}

.news-card-img {
    width: 140px;
    min-height: 100px;
    flex-shrink: 0;
    overflow: hidden;
}

.news-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-card-body {
    padding: 16px 16px 16px 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.news-card-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card-date {
    font-size: 12px;
    color: var(--color-text-muted);
}

.news-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ---- QA card ---- */
.qa-card {
    background: var(--color-white);
    border-radius: var(--radius-md);
    padding: 20px 24px;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s;
}

.qa-card:hover { box-shadow: var(--shadow-md); }

.qa-card-q {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--color-text);
}

.qa-card-q a { color: inherit; }
.qa-card-q a:hover { color: var(--color-primary); }

.qa-card-a {
    font-size: 14px;
    color: var(--color-text-muted);
    line-height: 1.6;
}

/* ---- Topic card (enhanced) ---- */
.topic-card-v2 {
    display: block;
    background: var(--color-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.25s, box-shadow 0.25s;
    text-decoration: none;
    color: inherit;
}

.topic-card-v2:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.topic-card-v2-img {
    height: 180px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--color-primary-light), var(--color-accent-light));
}

.topic-card-v2-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.topic-card-v2:hover .topic-card-v2-img img { transform: scale(1.06); }

.topic-card-v2-body { padding: 20px; }

.topic-card-v2-body h2 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 6px;
}

.topic-card-v2-sub {
    color: var(--color-primary);
    font-size: 13px;
    margin-bottom: 8px;
}

.topic-card-v2-intro {
    font-size: 13px;
    color: var(--color-text-muted);
    line-height: 1.6;
    margin-bottom: 12px;
}

.topic-badge {
    display: inline-block;
    padding: 3px 10px;
    background: var(--color-primary-light);
    color: var(--color-primary);
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 500;
}

/* ---- Article detail ---- */
.article-page {
    padding: 32px 0 48px;
}

.article-wrap {
    max-width: 760px;
    margin: 0 auto;
    background: var(--color-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 40px 48px;
}

.article-title {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.4;
    text-align: center;
    margin-bottom: 16px;
    color: var(--color-text);
}

.article-meta {
    display: flex;
    justify-content: center;
    gap: 20px;
    font-size: 13px;
    color: var(--color-text-muted);
    padding-bottom: 24px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--color-border);
}

.article-content {
    font-size: 16px;
    line-height: 1.9;
    color: #444;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
    margin: 16px 0;
}

.article-content p { margin-bottom: 16px; }

/* ---- QA detail (enhanced) ---- */
.qa-detail-page {
    padding: 32px 0 48px;
}

.qa-detail-card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 36px 40px;
    margin-bottom: 32px;
}

.qa-detail-card .qa-detail-title {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 16px;
    padding-left: 16px;
    border-left: 4px solid var(--color-accent);
}

.qa-detail-meta {
    display: flex;
    gap: 16px;
    align-items: center;
    font-size: 13px;
    color: var(--color-text-muted);
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--color-border);
}

.qa-tag {
    display: inline-block;
    padding: 3px 12px;
    background: var(--color-accent-light);
    color: var(--color-accent);
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 500;
}

.qa-detail-answer {
    font-size: 16px;
    line-height: 1.9;
    color: #444;
}

.qa-detail-answer p { margin-bottom: 14px; }

.qa-detail-answer img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
    margin: 12px 0;
}

.qa-detail-answer ul,
.qa-detail-answer ol {
    margin: 12px 0 12px 1.5em;
}

.qa-detail-answer li { margin-bottom: 8px; }

.qa-detail-answer h2,
.qa-detail-answer h3,
.qa-detail-answer h4 {
    margin: 20px 0 12px;
    font-weight: 600;
    line-height: 1.4;
}

.qa-detail-answer blockquote {
    margin: 16px 0;
    padding: 12px 16px;
    border-left: 4px solid var(--color-accent);
    background: #fafafa;
    color: #666;
}

.related-qa {
    background: var(--color-white);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.related-qa h3 {
    font-size: 18px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--color-primary-light);
}

.related-qa li {
    padding: 10px 0;
    border-bottom: 1px dashed var(--color-border);
}

.related-qa li:last-child { border-bottom: none; }

.related-qa a {
    font-size: 15px;
    color: var(--color-text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.related-qa a::before {
    content: 'Q';
    display: inline-flex;
    width: 22px;
    height: 22px;
    background: var(--color-accent-light);
    color: var(--color-accent);
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.related-qa a:hover { color: var(--color-primary); }

/* ---- Topic list page ---- */
.page-hero-sm {
    background: linear-gradient(135deg, #1b4332, #2d6a4f);
    color: #fff;
    padding: 48px 20px;
    text-align: center;
}

.page-hero-sm h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
}

.page-hero-sm p {
    font-size: 15px;
    opacity: 0.85;
}

/* ---- Topic detail enhancements ---- */
.zt-page { padding-bottom: 40px; }

.zt-banner {
    min-height: 240px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.zt-banner-overlay {
    background: linear-gradient(to top, rgba(0,0,0,0.65), rgba(0,0,0,0.2));
    width: 100%;
    padding: 60px 20px;
    text-align: center;
}

.zt-banner h1, .zt-banner-overlay h1 {
    font-size: 34px;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.zt-subtitle {
    font-size: 16px;
    color: rgba(255,255,255,0.9);
    margin-top: 8px;
}

.zt-banner-plain {
    background: linear-gradient(135deg, #fff8f0, #ffe8d6);
    padding: 56px 20px;
    text-align: center;
}

.zt-container {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 32px 20px;
}

.zt-intro {
    background: var(--color-white);
    padding: 24px 28px;
    border-radius: var(--radius-md);
    margin-bottom: 32px;
    line-height: 1.8;
    color: #555;
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--color-primary);
}

.zt-section {
    background: var(--color-white);
    border-radius: var(--radius-md);
    padding: 28px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.zt-section-title {
    font-size: 20px;
    font-weight: 700;
    padding-bottom: 14px;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--color-primary-light);
    color: var(--color-text);
}

/* ---- Ad banner ---- */
.ad-banner {
    margin: 24px auto;
    max-width: var(--max-w);
    padding: 0 20px;
}

.ad-banner a {
    display: block;
    line-height: 0;
}

.ad-banner img {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    object-fit: cover;
}

/* 广告与下方板块间距与上方导航保持一致 */
.ad-banner + .site-container > .section {
    padding-top: 0;
}

/* ---- Category pills ---- */
.category-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.category-pill {
    padding: 8px 18px;
    border-radius: var(--radius-full);
    background: var(--color-white);
    border: 1px solid var(--color-border);
    font-size: 14px;
    color: var(--color-text-muted);
    transition: all 0.2s;
    text-decoration: none;
}

.category-pill:hover,
.category-pill.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
}

/* ---- Breadcrumb ---- */
.breadcrumb {
    font-size: 13px;
    color: var(--color-text-muted);
    margin-bottom: 20px;
    padding: 12px 0;
}

.breadcrumb a { color: var(--color-text-muted); }
.breadcrumb a:hover { color: var(--color-primary); }

/* ---- Popup ---- */
.popup-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.popup-overlay.show { display: flex; }

.popup-box {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    padding: 32px;
    text-align: center;
    max-width: 320px;
    width: 90%;
    box-shadow: var(--shadow-lg);
}

.popup-box img {
    width: 200px;
    height: 200px;
    margin-bottom: 16px;
}

.popup-box p {
    color: var(--color-text-muted);
    margin-bottom: 20px;
    font-size: 14px;
}

.popup-close {
    padding: 8px 32px;
    background: var(--color-bg);
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    font-size: 14px;
    color: var(--color-text-muted);
}

.popup-close:hover { background: var(--color-border); }

/* ---- Footer ---- */
.site-footer {
    background: #1b2631;
    color: rgba(255,255,255,0.6);
    text-align: center;
    padding: 32px 20px;
    margin-top: 0;
    font-size: 13px;
}

.site-footer a { color: rgba(255,255,255,0.5); }
.site-footer a:hover { color: #fff; }

.footer-links { margin-top: 8px; }

.footer-sep {
    margin: 0 10px;
    color: rgba(255,255,255,0.25);
}

/* ---- Pagination ---- */
.pagination-wrap {
    margin-top: 40px;
    padding-top: 28px;
    border-top: 1px solid var(--color-border);
    display: flex;
    justify-content: center;
}

.pagination-nav {
    width: 100%;
    display: flex;
    justify-content: center;
}

.pagination-list {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    list-style: none;
    padding: 6px;
    margin: 0;
    flex-wrap: wrap;
    justify-content: center;
    background: var(--color-white);
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
}

.pagination-item {
    list-style: none;
    margin: 0;
    padding: 0;
}

.pagination-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    border-radius: var(--radius-full);
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text-muted);
    background: transparent;
    border: none;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    line-height: 1;
    box-sizing: border-box;
}

a.pagination-link:hover {
    background: var(--color-primary-light);
    color: var(--color-primary);
}

.pagination-item--active .pagination-link {
    background: var(--color-primary);
    color: #fff;
    box-shadow: 0 4px 12px rgba(232, 93, 4, 0.35);
    font-weight: 600;
    cursor: default;
}

.pagination-item--disabled .pagination-link {
    opacity: 0.38;
    cursor: not-allowed;
    pointer-events: none;
}

.pagination-link--prev,
.pagination-link--next {
    padding: 0 14px;
    font-size: 13px;
}

.pagination-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    color: var(--color-text-muted);
    font-size: 14px;
    letter-spacing: 2px;
}

/* 兼容旧版 bootstrap-4 / default 分页结构 */
.pagination-wrap .pagination,
.pagination-wrap ul.pagination {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    list-style: none;
    padding: 6px;
    margin: 0;
    flex-wrap: wrap;
    justify-content: center;
    background: var(--color-white);
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
}

.pagination-wrap .pagination .page-item,
.pagination-wrap .pagination > li {
    list-style: none;
    margin: 0;
}

.pagination-wrap .pagination .page-link,
.pagination-wrap .pagination li a,
.pagination-wrap .pagination li span {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 12px !important;
    border-radius: var(--radius-full) !important;
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text-muted) !important;
    background: transparent !important;
    border: none !important;
    text-decoration: none;
    transition: all 0.2s ease;
    line-height: 1;
    box-sizing: border-box;
    width: auto !important;
}

.pagination-wrap .pagination li a:hover {
    background: var(--color-primary-light) !important;
    color: var(--color-primary) !important;
}

.pagination-wrap .pagination .page-item.active .page-link,
.pagination-wrap .pagination li.active span {
    background: var(--color-primary) !important;
    border-color: var(--color-primary) !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(232, 93, 4, 0.35);
    font-weight: 600;
}

.pagination-wrap .pagination .page-item.disabled .page-link,
.pagination-wrap .pagination li.disabled span {
    opacity: 0.38;
    cursor: not-allowed;
    background: transparent !important;
}

@media (max-width: 576px) {
    .pagination-link--prev span,
    .pagination-link--next span {
        display: none;
    }

    .pagination-link--prev,
    .pagination-link--next {
        padding: 0;
        min-width: 38px;
    }

    .pagination-list {
        gap: 4px;
        padding: 4px;
    }

    .pagination-link {
        min-width: 34px;
        height: 34px;
        font-size: 13px;
    }
}

/* ---- Buy card ---- */
.buy-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: var(--color-white);
    border-radius: var(--radius-md);
    padding: 20px 24px;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s;
}

.buy-card:hover {
    box-shadow: var(--shadow-md);
}

.buy-card-body {
    flex: 1;
    min-width: 0;
}

.buy-card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 8px;
    line-height: 1.5;
}

.buy-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 13px;
    color: var(--color-text-muted);
    align-items: center;
}

/* ---- Topic card extras ---- */
.topic-card-placeholder {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--color-primary);
    opacity: 0.4;
    font-weight: 600;
}

.topic-card-tags {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 8px;
    flex-wrap: wrap;
}

.topic-badge-geo {
    background: var(--color-accent-light) !important;
    color: var(--color-accent) !important;
}

.section-header h1.section-title {
    margin: 0;
}

/* ---- Empty ---- */
.empty-tip {
    text-align: center;
    padding: 60px 20px;
    color: var(--color-text-muted);
    font-size: 15px;
}

/* ---- Two column layout (homepage) ---- */
.home-layout {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 24px;
    align-items: start;
}

.sidebar-card {
    background: var(--color-white);
    border-radius: var(--radius-md);
    padding: 16px;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: calc(var(--header-h) + 16px);
}

.sidebar-card h3 {
    font-size: 14px;
    font-weight: 700;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--color-border);
}

.sidebar-card ul li a {
    display: block;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--color-text);
    transition: all 0.15s;
}

.sidebar-card ul li a:hover,
.sidebar-card ul li a.active {
    background: var(--color-primary-light);
    color: var(--color-primary);
}

/* ---- Product detail ---- */
.product-detail-page {
    padding-top: 24px;
}

.product-detail-card {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 28px;
    background: var(--color-white);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 36px;
}

.product-detail-main-img {
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--color-bg);
    aspect-ratio: 1 / 1;
}

.product-detail-main-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.product-detail-thumbs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.product-thumb {
    width: 68px;
    height: 68px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    background: var(--color-bg);
}

.product-thumb.active,
.product-thumb:hover {
    border-color: var(--color-primary);
}

.product-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.product-detail-title {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.35;
    margin: 0 0 12px;
}

.product-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    color: var(--color-text-muted);
    font-size: 13px;
    margin-bottom: 16px;
}

.product-detail-price {
    margin-bottom: 16px;
}

.product-detail-price .product-price {
    font-size: 28px;
}

.product-detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.product-tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    background: var(--color-primary-light);
    color: var(--color-primary);
    font-size: 13px;
}

.product-detail-desc,
.product-detail-contact {
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid var(--color-border);
}

.product-detail-desc h3,
.product-detail-contact h3 {
    font-size: 16px;
    margin: 0 0 10px;
}

.product-detail-desc p {
    margin: 0;
    white-space: pre-wrap;
    color: var(--color-text);
    line-height: 1.7;
}

.product-detail-contact ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.product-detail-contact li {
    display: flex;
    gap: 12px;
    padding: 8px 0;
    font-size: 14px;
    border-bottom: 1px dashed var(--color-border);
}

.product-detail-contact li:last-child {
    border-bottom: none;
}

.product-detail-contact .label {
    flex: 0 0 56px;
    color: var(--color-text-muted);
}

.product-detail-contact a {
    color: var(--color-primary);
    font-weight: 600;
}

.related-products {
    margin-top: 8px;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    :root { --header-h: 68px; }

    .header-container {
        justify-content: flex-start;
    }

    .nav-toggle {
        display: inline-flex;
        margin-left: auto;
    }

    .nav-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        top: var(--header-h);
        background: rgba(15, 23, 42, 0.45);
        z-index: 998;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.25s ease;
    }

    .nav-backdrop.show {
        opacity: 1;
        pointer-events: auto;
    }

    .navbar {
        display: flex;
        position: fixed;
        top: var(--header-h);
        right: 0;
        left: auto;
        width: min(300px, 82vw);
        height: calc(100vh - var(--header-h));
        background: linear-gradient(180deg, #ffffff 0%, #fff8f3 100%);
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
        padding: 22px 16px 32px;
        border-left: 1px solid var(--color-border);
        box-shadow: -8px 0 28px rgba(0, 0, 0, 0.12);
        z-index: 999;
        transform: translateX(105%);
        transition: transform 0.28s ease;
        overflow-y: auto;
    }

    .navbar.open {
        display: flex;
        transform: translateX(0);
    }

    .navbar a {
        width: 100%;
        text-align: left;
        padding: 18px 18px;
        border-radius: var(--radius-md);
        font-size: 18px;
        color: var(--color-text);
        background: transparent;
    }

    .navbar a:hover {
        background: var(--color-primary-light);
        color: var(--color-primary);
    }

    .navbar a.active {
        background: var(--color-primary);
        color: var(--color-white);
        box-shadow: 0 6px 16px rgba(232, 93, 4, 0.28);
    }

    .ad-banner {
        margin: 16px auto;
        padding: 0 12px;
    }

    .ad-banner + .site-container > .section {
        padding-top: 0;
    }

    .ad-banner img {
        width: 100%;
        height: auto;
        border-radius: var(--radius-sm);
    }

    .hero h1 { font-size: 24px; }
    .hero p { font-size: 14px; }

    .home-layout {
        grid-template-columns: 1fr;
    }

    .sidebar-card {
        position: static;
    }

    .category-pills { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; }

    .article-wrap { padding: 24px 20px; }
    .article-title { font-size: 22px; }

    .qa-detail-card { padding: 24px 20px; }

    .news-card { flex-direction: column; }
    .news-card-img { width: 100%; height: 160px; }
    .news-card-body { padding: 16px; }

    .card-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .card-grid-3 { grid-template-columns: 1fr; }

    .product-detail-card {
        grid-template-columns: 1fr;
    }
}

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


    /* reset & base — 只作用于卡片内部，不影响外部 */
    .huayue-card * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
    }

    .huayue-card {
      display: block;
      max-width:900px;
      width: 100%;
      background: #ffffff;
      border-radius: 24px;
      box-shadow: 0 12px 28px -8px rgba(0, 0, 0, 0.10);
      padding: 28px 26px 26px;
      border: 1px solid #eae5dd;
      font-family: 'Segoe UI', 'PingFang SC', Roboto, system-ui, -apple-system, sans-serif;
      color: #2d281f;
      line-height: 1.5;
      transition: 0.15s;
    }

    /* 头部 */
    .huayue-card .card-header {
      display: flex;
      justify-content: space-between;
      align-items: baseline;
      flex-wrap: wrap;
      gap: 6px 12px;
      border-bottom: 1px solid #e2dad0;
      padding-bottom: 12px;
      margin-bottom: 16px;
    }

    .huayue-card .brand {
      font-size: 22px;
      font-weight: 600;
      letter-spacing: 1px;
      color: #3b342a;
    }

    .huayue-card .brand small {
      font-size: 15px;
      font-weight: 400;
      color: #8a7b68;
      margin-left: 6px;
      letter-spacing: 0.3px;
    }

    .huayue-card .badge {
      background: #ede8df;
      padding: 4px 14px;
      border-radius: 40px;
      font-size: 13px;
      color: #4d4032;
      border: 1px solid #dad0c2;
      white-space: nowrap;
    }

    /* 简介 */
    .huayue-card .desc {
      font-size: 15.5px;
      line-height: 1.7;
      color: #2d281f;
      margin-bottom: 14px;
      text-align: justify;
    }

    .huayue-card .desc strong {
      color: #6f553b;
      font-weight: 600;
    }

    .huayue-card .desc .highlight {
      background: #f2ece2;
      padding: 0 6px;
      border-radius: 12px;
      color: #5a432e;
      font-weight: 500;
    }

    /* 标签 */
    .huayue-card .tags {
      display: flex;
      flex-wrap: wrap;
      gap: 6px 10px;
      margin: 10px 0 16px;
    }

    .huayue-card .tag {
      background: #f4efe8;
      padding: 4px 14px;
      border-radius: 30px;
      font-size: 13.5px;
      color: #3d3429;
      border: 1px solid #ddd2c2;
      letter-spacing: 0.2px;
    }

    .huayue-card .tag-important {
      background: #e9dfd2;
      border-color: #ccbbaa;
      font-weight: 500;
    }

    /* 联系方式 */
    .huayue-card .contact-block {
      background: #f6f2ec;
      border-radius: 24px;
      padding: 14px 18px;
      margin: 16px 0 6px;
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      justify-content: space-between;
      gap: 12px 10px;
      border: 1px solid #e0d5c7;
    }

    .huayue-card .contact-item {
      display: flex;
      align-items: center;
      gap: 6px 12px;
      flex-wrap: wrap;
    }

    .huayue-card .contact-item .label {
      font-size: 14px;
      color: #5f5140;
      font-weight: 450;
    }

    .huayue-card .contact-item .value {
      font-size: 15px;
      font-weight: 500;
      color: #2b231b;
      background: white;
      padding: 2px 14px;
      border-radius: 60px;
      border: 1px solid #d4c8b8;
    }

    .huayue-card .contact-item .value a {
      text-decoration: none;
      color: #2b231b;
    }

    .huayue-card .contact-item .value a:hover {
      color: #7a6043;
    }

    /* 底部合作 */
    .huayue-card .cta {
      margin-top: 18px;
      padding-top: 14px;
      border-top: 1px solid #e2d9cd;
      display: flex;
      flex-wrap: wrap;
      justify-content: space-between;
      align-items: center;
      gap: 10px;
      font-size: 14.5px;
      color: #3f362b;
    }

    .huayue-card .cta i {
      font-style: normal;
      background: #ddd2c2;
      padding: 0 12px;
      border-radius: 30px;
      color: #3f3223;
      font-weight: 500;
      margin: 0 2px;
    }

    .huayue-card .cta-badge {
      background: #cdbead;
      padding: 4px 16px;
      border-radius: 60px;
      font-size: 13px;
      color: #1f1a14;
      border: 1px solid #b8a690;
      font-weight: 500;
    }

    /* 响应式 */
    @media (max-width: 550px) {
      .huayue-card { padding: 20px 16px; }
      .huayue-card .brand { font-size: 19px; }
      .huayue-card .brand small { font-size: 13px; }
      .huayue-card .contact-block { flex-direction: column; align-items: stretch; }
      .huayue-card .cta { flex-direction: column; align-items: flex-start; }
    }
