/* ============================================
   昆虫饲养指南主题 - 森系自然风格
   Theme: theme575  Primary: #4a7c59
   ============================================ */

/* ---- CSS 变量 ---- */
:root {
    --color-primary: #4a7c59;
    --color-primary-dark: #2d5a3f;
    --color-primary-light: #f0f7f2;
    --color-text-dark: #1a1a1a;
    --color-text-muted: #666;
    --color-text-light: #999;
    --color-bg-gray: #f5f5f5;
    --color-bg-warm: #f8f9f5;
    --color-border: #e5e5e5;
    --color-border-dark: #d0d0d0;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 20px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.1);
    --font-family: "Noto Sans SC", -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
    --transition: all 0.25s ease;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
body { font-family: var(--font-family); color: var(--color-text-dark); background: #fafaf8; line-height: 1.7; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; transition: var(--transition); }
a:hover { color: var(--color-primary); text-decoration: none; }
img { max-width: 100%; }
ul { list-style: none; padding: 0; margin: 0; }

/* ---- Skip Link (A11y) ---- */
.skip-link { position: absolute; top: -50px; left: 8px; z-index: 9999; padding: 10px 18px; background: var(--color-primary); color: #fff !important; border-radius: 0 0 6px 6px; font-size: 14px; transition: top 0.2s ease-out; }
.skip-link:focus { top: 0; outline: 3px solid #fff; outline-offset: 1px; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; border-radius: 3px; }

/* ---- Header ---- */
.site-header { background: #fff; box-shadow: 0 1px 8px rgba(0,0,0,0.06); position: sticky; top: 0; z-index: 999; }
.site-header .container { display: flex; align-items: center; justify-content: space-between; padding: 0 15px; height: 64px; }
.site-logo img { height: 40px; }
.site-logo-text { display: inline-block; font-size: 20px; font-weight: 700; color: var(--color-primary-dark); letter-spacing: 1px; line-height: 1.3; }
.site-footer .site-logo-text { color: #fff; font-size: 20px; display: block; margin-bottom: 12px; }
.mobile-toggle { display: none; background: none; border: none; padding: 6px; }
.mobile-toggle .icon-bar { display: block; width: 22px; height: 2px; background: #333; margin: 4px 0; border-radius: 1px; }

/* Nav */
.main-nav { background: #fff; border-top: 1px solid var(--color-border); }
.main-menu { display: flex; margin: 0; }
.main-menu > li > a { display: block; padding: 12px 20px; color: #444; font-size: 15px; font-weight: 500; }
.main-menu > li.active > a,
.main-menu > li > a:hover { color: var(--color-primary); }
.main-menu .dropdown:hover .dropdown-menu { display: block; }
.dropdown-menu { border: none; border-radius: var(--radius-sm); box-shadow: var(--shadow-md); padding: 6px 0; min-width: 140px; }
.dropdown-menu > li > a { padding: 8px 18px; color: #555; font-size: 14px; }
.dropdown-menu > li > a:hover { color: var(--color-primary); background: var(--color-primary-light); }

/* ---- Hero ---- */
.hero-section { padding: 80px 0; text-align: center; color: #fff; }
.hero-title { font-size: 42px; font-weight: 700; margin-bottom: 16px; letter-spacing: 2px; }
.hero-subtitle { font-size: 18px; opacity: 0.9; margin-bottom: 32px; font-weight: 300; }
.hero-actions { display: flex; justify-content: center; gap: 16px; }
.btn-primary { display: inline-block; padding: 12px 36px; background: #fff; color: var(--color-primary-dark); border-radius: 999px; font-size: 16px; font-weight: 600; transition: var(--transition); }
.btn-primary:hover { background: var(--color-primary-light); color: var(--color-primary-dark); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-secondary { display: inline-block; padding: 12px 36px; border: 2px solid rgba(255,255,255,0.6); color: #fff; border-radius: 999px; font-size: 16px; font-weight: 500; transition: var(--transition); }
.btn-secondary:hover { background: rgba(255,255,255,0.15); color: #fff; }

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

/* ---- Block ---- */
.block { margin-bottom: 40px; }
.block-head { display: flex; justify-content: space-between; align-items: center; padding-bottom: 16px; border-bottom: 2px solid var(--color-primary); margin-bottom: 20px; }
.block-head h3 { font-size: 20px; font-weight: 700; color: var(--color-text-dark); margin: 0; padding-left: 12px; border-left: 4px solid var(--color-primary); }
.block-head .more { font-size: 13px; color: var(--color-text-muted); }
.block-head .more:hover { color: var(--color-primary); }

/* ---- Card Grid (4 cols) ---- */
.card-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.card { background: #fff; border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-sm); transition: var(--transition); display: block; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); color: var(--color-text-dark); }
.card-cover { position: relative; padding-top: 75%; overflow: hidden; background: var(--color-bg-gray); }
.card-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.card:hover .card-cover img { transform: scale(1.05); }
.card-body { padding: 14px 16px; }
.card-title { font-size: 14px; font-weight: 600; line-height: 1.5; margin: 0 0 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-intro { font-size: 12px; color: var(--color-text-muted); }
.card-date { font-size: 12px; color: var(--color-text-light); }

/* ---- Article List (首页) ---- */
.article-list { background: #fff; border-radius: var(--radius-md); overflow: hidden; }
.article-row { border-bottom: 1px solid #f0f0f0; }
.article-row:last-child { border-bottom: none; }
.article-row a { display: flex; gap: 16px; padding: 16px 20px; align-items: center; }
.article-row a:hover { background: var(--color-primary-light); }
.article-row img { width: 120px; height: 80px; object-fit: cover; border-radius: var(--radius-sm); flex-shrink: 0; }
.article-row div { flex: 1; min-width: 0; }
.article-row h4 { font-size: 15px; font-weight: 600; margin: 0 0 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.article-row span { font-size: 12px; color: var(--color-text-light); }
.article-row span i { margin-left: 12px; }

/* ---- Page Banner ---- */
.page-banner { background: linear-gradient(135deg, #4a7c59, #2d5a3f); padding: 40px 0; color: #fff; }
.page-banner-title { font-size: 28px; font-weight: 700; margin: 0 0 8px; }
.breadcrumb-inline { font-size: 13px; opacity: 0.85; }
.breadcrumb-inline a { color: #fff; }
.breadcrumb-inline i { margin: 0 8px; font-size: 10px; }
.page-container { padding-top: 30px; padding-bottom: 60px; }

/* ---- List Toolbar ---- */
.list-toolbar { display: flex; align-items: center; gap: 16px; padding: 12px 20px; background: #fff; border-radius: var(--radius-sm); margin-bottom: 16px; box-shadow: var(--shadow-sm); }
.toolbar-title { font-size: 14px; color: var(--color-text-muted); flex-shrink: 0; }
.toolbar-order { display: flex; gap: 8px; }
.toolbar-order li a { padding: 5px 14px; border-radius: 999px; font-size: 13px; color: var(--color-text-muted); }
.toolbar-order li a.active,
.toolbar-order li a:hover { background: var(--color-primary-light); color: var(--color-primary); }

/* ---- Article Card List ---- */
.article-card-list { display: flex; flex-direction: column; gap: 16px; }
.article-card { display: flex; background: #fff; border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-sm); transition: var(--transition); }
.article-card:hover { box-shadow: var(--shadow-md); }
.article-cover { width: 240px; flex-shrink: 0; overflow: hidden; }
.article-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.article-card:hover .article-cover img { transform: scale(1.05); }
.article-body { flex: 1; min-width: 0; padding: 20px 24px; display: flex; flex-direction: column; }
.article-title { font-size: 18px; font-weight: 700; margin: 0 0 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.article-intro { font-size: 13px; color: var(--color-text-muted); line-height: 1.7; margin: 0 0 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.article-meta { margin-top: auto; font-size: 12px; color: var(--color-text-light); display: flex; gap: 14px; align-items: center; }
.meta-cat { display: inline-block; padding: 2px 10px; background: var(--color-primary-light); color: var(--color-primary); border-radius: 999px; font-size: 11px; font-weight: 500; }

/* ---- Text List (栏目封面) ---- */
.channel-block { margin-bottom: 32px; }
.text-list-item { display: flex; align-items: center; justify-content: space-between; padding: 12px 20px; background: #fff; border-bottom: 1px solid #f5f5f5; transition: var(--transition); }
.text-list-item:first-child { border-radius: var(--radius-sm) var(--radius-sm) 0 0; }
.text-list-item:last-child { border-radius: 0 0 var(--radius-sm) var(--radius-sm); border-bottom: none; }
.text-list-item:hover { background: var(--color-primary-light); }
.text-list-title { flex: 1; min-width: 0; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-right: 16px; }
.text-list-meta { font-size: 12px; color: var(--color-text-light); display: flex; gap: 14px; flex-shrink: 0; }
.text-list-date { min-width: 44px; text-align: right; }

/* ---- Images Grid ---- */
.images-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.image-tile { background: #fff; border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-sm); transition: var(--transition); display: block; }
.image-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); color: inherit; }
.image-tile-cover { padding-top: 100%; position: relative; overflow: hidden; background: var(--color-bg-gray); }
.image-tile-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.image-tile:hover .image-tile-cover img { transform: scale(1.05); }
.image-tile-body { padding: 12px 14px; }
.image-tile-title { font-size: 13px; font-weight: 600; margin: 0 0 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.image-tile-view { font-size: 11px; color: var(--color-text-light); }

/* ---- Article Detail ---- */
.article-detail { background: #fff; border-radius: var(--radius-md); padding: 40px; box-shadow: var(--shadow-sm); }
.article-detail-head { margin-bottom: 30px; padding-bottom: 20px; border-bottom: 1px solid var(--color-border); }
.article-detail-title { font-size: 28px; font-weight: 700; line-height: 1.4; margin: 0 0 14px; }
.article-detail-meta { font-size: 13px; color: var(--color-text-light); display: flex; gap: 14px; align-items: center; }
.detail-cat { display: inline-block; padding: 3px 12px; background: var(--color-primary-light); color: var(--color-primary); border-radius: 999px; font-size: 12px; }
.article-detail-content { font-size: 16px; line-height: 1.9; color: #333; max-width: 720px; margin: 0 auto; }
.article-detail-content h2 { font-size: 22px; margin: 32px 0 16px; padding-bottom: 8px; border-bottom: 2px solid var(--color-primary-light); }
.article-detail-content h3 { font-size: 18px; margin: 24px 0 12px; }
.article-detail-content img { border-radius: var(--radius-md); margin: 16px 0; }
.article-detail-content p { margin-bottom: 16px; }
.article-detail-content ul, .article-detail-content ol { padding-left: 24px; margin-bottom: 16px; }
.article-detail-content ul { list-style: disc; }
.article-detail-content li { margin-bottom: 6px; }

/* ---- Article Summary + A11y ---- */
.article-summary {
    --as-primary: var(--color-primary);
    --as-bg: var(--color-bg-warm);
    --as-border: var(--color-border-dark);
    --as-text: var(--color-text-dark);
    --as-muted: var(--color-text-muted);
    --as-radius: var(--radius-sm);
    margin: 30px 0;
    padding: 20px 24px;
    background: var(--as-bg);
    border-left: 4px solid var(--as-primary);
    border-radius: var(--as-radius);
}
.article-summary-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.summary-deco { color: var(--as-primary); flex-shrink: 0; }
.article-summary-title { font-size: 16px; margin: 0; color: var(--as-text); font-weight: 600; }
.article-summary-text { color: var(--as-text); font-size: 14px; line-height: 1.8; margin: 0 0 12px; }
.article-summary-cite { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding-top: 10px; border-top: 1px dashed var(--as-border); font-size: 12px; color: var(--as-muted); }
.cite-label { font-weight: 600; flex-shrink: 0; }
.cite-text { flex: 1; min-width: 0; font-family: Menlo, Monaco, Consolas, monospace; background: #fff; padding: 4px 8px; border-radius: 3px; color: var(--as-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- Detail Nav ---- */
.article-detail-nav { display: flex; gap: 16px; margin-top: 30px; }
.detail-nav-item { flex: 1; min-width: 0; padding: 16px 20px; background: var(--color-bg-warm); border-radius: var(--radius-sm); transition: var(--transition); }
.detail-nav-item:hover { background: var(--color-primary-light); color: var(--color-text-dark); }
.detail-nav-label { display: block; font-size: 12px; color: var(--color-text-light); margin-bottom: 4px; }
.detail-nav-title { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.detail-nav-next { text-align: right; }

/* ---- Related Section ---- */
.related-section { margin-top: 40px; }
.related-section h3 { font-size: 20px; font-weight: 700; margin-bottom: 16px; padding-left: 12px; border-left: 4px solid var(--color-primary); }
.related-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.related-card { display: block; background: #fff; border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-sm); transition: var(--transition); }
.related-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); color: inherit; }
.related-cover { padding-top: 66%; position: relative; overflow: hidden; background: var(--color-bg-gray); }
.related-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.related-body { padding: 10px 14px; }
.related-body h4 { font-size: 13px; font-weight: 600; margin: 0 0 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.related-body span { font-size: 11px; color: var(--color-text-light); }

/* ---- Product Grid ---- */
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.product-card { background: #fff; border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-sm); transition: var(--transition); }
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.product-cover { display: block; padding-top: 100%; position: relative; overflow: hidden; background: var(--color-bg-gray); }
.product-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.product-card:hover .product-cover img { transform: scale(1.05); }
.product-body { padding: 14px 16px; }
.product-title { font-size: 14px; font-weight: 600; margin: 0 0 10px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-meta { display: flex; align-items: center; justify-content: space-between; }
.product-price { font-size: 18px; font-weight: 700; color: #e8553d; }
.product-btn { display: inline-block; padding: 5px 14px; background: var(--color-primary); color: #fff; border-radius: 999px; font-size: 12px; }
.product-btn:hover { background: var(--color-primary-dark); color: #fff; }

/* ---- Product Detail ---- */
.product-detail-main { background: #fff; border-radius: var(--radius-md); padding: 30px; box-shadow: var(--shadow-sm); }
.product-detail-title { font-size: 22px; font-weight: 700; margin: 0 0 16px; }
.product-price-box { padding: 16px 20px; background: #fff8f7; border-radius: var(--radius-sm); margin-bottom: 16px; font-size: 14px; }
.product-price-box .price { font-size: 28px; font-weight: 700; color: #e8553d; margin-left: 16px; }
.product-params { margin-bottom: 20px; }
.param-row { display: flex; padding: 8px 0; border-bottom: 1px dashed var(--color-border); }
.param-key { width: 80px; flex-shrink: 0; color: var(--color-text-muted); font-size: 13px; }
.param-val { flex: 1; min-width: 0; font-size: 13px; }
.product-actions button { padding: 10px 32px; background: var(--color-primary); color: #fff; border: none; border-radius: 999px; font-size: 15px; cursor: pointer; transition: var(--transition); }
.product-actions button:hover { background: var(--color-primary-dark); }

/* PC Slide (product images) */
.pc-slide .view { border: 1px solid var(--color-border); margin-bottom: 10px; }
.pc-slide .preview { position: relative; }
.pc-slide .preview .swiper-slide { cursor: pointer; opacity: 0.5; border: 2px solid transparent; transition: var(--transition); }
.pc-slide .preview .active-nav { opacity: 1; border-color: var(--color-primary); }
.pc-slide .arrow-left, .pc-slide .arrow-right { position: absolute; top: 50%; transform: translateY(-50%); z-index: 5; width: 24px; height: 24px; background: rgba(0,0,0,0.4); border-radius: 50%; }
.pc-slide .arrow-left { left: 0; }
.pc-slide .arrow-right { right: 0; }
.product-detail-content { margin-top: 30px; }
.product-detail-content .nav-tabs { border-bottom: 2px solid var(--color-border); margin-bottom: 16px; }
.product-detail-content .nav-tabs > li.active > a { border-bottom: 2px solid var(--color-primary); color: var(--color-primary); font-weight: 700; }
.detail-content-body { font-size: 15px; line-height: 1.8; }

/* ---- Single Page ---- */
.single-main { background: #fff; border-radius: var(--radius-md); padding: 30px 40px; box-shadow: var(--shadow-sm); }
.single-content { font-size: 15px; line-height: 1.8; }
.single-content h2 { font-size: 24px; margin: 32px 0 16px; }
.single-content h3 { font-size: 18px; margin: 24px 0 12px; }
.single-content ul { list-style: disc; padding-left: 24px; margin-bottom: 16px; }
.single-content li { margin-bottom: 8px; }
.subnav { margin-bottom: 20px; }
.subnav ul { display: flex; flex-wrap: wrap; gap: 8px; }
.subnav li a { display: block; padding: 8px 20px; background: #f5f5f5; border-radius: 999px; font-size: 13px; }
.subnav li.active a { background: var(--color-primary); color: #fff; }

/* ---- Contact Form ---- */
.contact-form-wrap { margin-top: 30px; padding-top: 30px; border-top: 1px solid var(--color-border); }
.contact-form-title { font-size: 20px; font-weight: 700; margin-bottom: 20px; }
.form-row { display: flex; gap: 16px; margin-bottom: 14px; }
.form-row > label { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; }
.form-row label span { font-size: 13px; color: var(--color-text-muted); white-space: nowrap; }
.form-row .inp { flex: 1; min-width: 0; height: 38px; padding: 0 12px; border: 1px solid var(--color-border); border-radius: var(--radius-sm); font-size: 13px; }
.mes { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 14px; }
.mes span { font-size: 13px; color: var(--color-text-muted); padding-top: 8px; white-space: nowrap; }
.mes textarea { flex: 1; min-width: 0; height: 120px; padding: 10px 12px; border: 1px solid var(--color-border); border-radius: var(--radius-sm); resize: vertical; font-size: 13px; }
.msgbtn-box { text-align: center; }
.btn-contact { padding: 10px 40px; background: var(--color-primary); color: #fff; border: none; border-radius: 999px; font-size: 15px; cursor: pointer; margin-right: 10px; transition: var(--transition); }
.btn-contact:hover { background: var(--color-primary-dark); }
.btn-contact-reset { padding: 10px 30px; background: #f5f5f5; color: var(--color-text-muted); border: 1px solid var(--color-border); border-radius: 999px; font-size: 15px; cursor: pointer; }

/* ---- Breadcrumb ---- */
.breadcrumb-box { padding: 12px 0; font-size: 13px; color: var(--color-text-muted); }
.breadcrumb-box a { color: var(--color-text-muted); }
.breadcrumb-box a:hover { color: var(--color-primary); }
.breadcrumb-box i { margin: 0 8px; font-size: 10px; }

/* ---- Sidebar Widget ---- */
.widget { background: #fff; border-radius: var(--radius-md); margin-bottom: 20px; box-shadow: var(--shadow-sm); overflow: hidden; }
.widget-head { padding: 14px 18px; border-bottom: 1px solid #f0f0f0; }
.widget-title { font-size: 16px; font-weight: 700; margin: 0; color: var(--color-text-dark); }
.widget-title i { color: var(--color-primary); margin-right: 4px; }
.widget-body { padding: 12px 0; }

/* Nav list */
.nav-list .nav-item { border-bottom: 1px solid #f8f8f8; }
.nav-list .nav-item:last-child { border-bottom: none; }
.nav-list .nav-item a { display: block; padding: 10px 20px; font-size: 14px; color: #555; }
.nav-list .nav-item.active a,
.nav-list .nav-item a:hover { color: var(--color-primary); background: var(--color-primary-light); }
.nav-sub { padding-left: 20px; }
.nav-sub .nav-item a { font-size: 13px; padding: 8px 20px; color: #777; }

/* Rank list */
.rank-list { padding: 0 12px; }
.rank-item { display: flex; align-items: center; gap: 10px; padding: 9px 8px; border-bottom: 1px dashed #f0f0f0; }
.rank-item:last-child { border-bottom: none; }
.rank-num { width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; background: #e5e5e5; color: #999; border-radius: 4px; flex-shrink: 0; }
.rank-top { background: var(--color-primary); color: #fff; }
.rank-content { flex: 1; min-width: 0; }
.rank-title { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; margin-bottom: 2px; }
.rank-meta { font-size: 11px; color: var(--color-text-light); }

/* Latest list */
.latest-list { padding: 0 12px; }
.latest-item { display: flex; gap: 10px; padding: 10px 8px; border-bottom: 1px dashed #f0f0f0; }
.latest-item:last-child { border-bottom: none; }
.latest-thumb { width: 72px; height: 54px; flex-shrink: 0; border-radius: 4px; overflow: hidden; }
.latest-thumb img { width: 100%; height: 100%; object-fit: cover; }
.latest-info { flex: 1; min-width: 0; }
.latest-title { font-size: 12px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.latest-date { font-size: 11px; color: var(--color-text-light); display: block; margin-top: 2px; }

/* Ad widget */
.widget-ad img { width: 100%; border-radius: var(--radius-sm); }

/* ---- Pagination ---- */
.pagination-box { text-align: center; margin-top: 30px; }
.pagination { display: inline-flex; list-style: none; padding: 0; margin: 0; gap: 6px; }
.pagination li a,
.pagination li span { display: inline-block; min-width: 38px; height: 38px; line-height: 36px; padding: 0 14px; border: 1px solid var(--color-border); background: #fff; text-align: center; border-radius: 999px; }
.pagination li a:hover { border-color: var(--color-primary); color: var(--color-primary); }
.pagination .active a,
.pagination .active span { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }

/* ---- Footer ---- */
.site-footer { background: #2d3436; color: #b2bec3; padding: 40px 0 24px; }
.footer-main { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 32px; padding-bottom: 28px; border-bottom: 1px solid rgba(255,255,255,0.1); margin-bottom: 20px; }
.footer-brand { flex: 1.4 1 240px; min-width: 220px; }
.footer-brand p { font-size: 13px; line-height: 1.8; color: #b2bec3; margin: 0; max-width: 340px; }
.footer-col { flex: 1 1 160px; min-width: 150px; }
.footer-col b { display: block; color: #dfe6e9; font-size: 14px; font-weight: 600; margin-bottom: 12px; }
.footer-col a { display: block; color: #b2bec3; font-size: 13px; padding: 4px 0; line-height: 1.6; }
.footer-col a:hover { color: #fff; }
.footer-col p { font-size: 12px; color: #b2bec3; line-height: 1.7; }
.footer-copyright { text-align: center; font-size: 12px; color: #636e72; }
.footer-copyright a { color: #636e72; }
@media (max-width: 767px) { .footer-main { flex-direction: column; gap: 24px; } }

/* ---- Float Button ---- */
#floatbtn { position: fixed; right: 20px; bottom: 80px; z-index: 99; }
#back-to-top { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; background: var(--color-primary); color: #fff; border-radius: 50%; box-shadow: var(--shadow-md); font-size: 18px; opacity: 0.85; transition: var(--transition); }
#back-to-top:hover { opacity: 1; color: #fff; transform: translateY(-2px); }

/* ---- Responsive ---- */
@media (max-width: 1199px) {
    .card-grid, .product-grid, .images-grid, .related-grid { grid-template-columns: repeat(3, 1fr); }
    .article-cover { width: 200px; }
}
@media (max-width: 991px) {
    .card-grid, .product-grid, .images-grid, .related-grid { grid-template-columns: repeat(2, 1fr); }
    .hero-title { font-size: 32px; }
    .hero-section { padding: 60px 0; }
    .article-card { flex-direction: column; }
    .article-cover { width: 100%; height: 180px; }
    .article-detail { padding: 24px; }
    .article-detail-title { font-size: 22px; }
    .form-row { flex-direction: column; gap: 12px; }
    .site-header .container { height: 56px; }
    .mobile-toggle { display: block; }
    .main-nav .container { padding: 0; }
    .main-menu { flex-direction: column; }
    .main-menu > li > a { padding: 10px 20px; }
    .navbar-collapse.collapse { display: none !important; }
    .navbar-collapse.collapse.in { display: block !important; }
}
@media (max-width: 767px) {
    .card-grid, .product-grid, .images-grid, .related-grid { grid-template-columns: 1fr; }
    .hero-title { font-size: 26px; }
    .hero-subtitle { font-size: 15px; }
    .hero-section { padding: 40px 0; }
    .article-cover { height: 160px; }
    body { font-size: 14px; }
    .block-head h3 { font-size: 17px; }
    .article-detail-content { font-size: 15px; }
    .single-main { padding: 20px; }
    .product-detail-main { padding: 16px; }
}
.pagination-box { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 30px; }
.pagination-box a, .pagination-box span { display: inline-flex; align-items: center; justify-content: center; min-width: 38px; height: 38px; padding: 0 12px; background: #fff; border: 1px solid var(--color-border, #e0e0e0); border-radius: 6px; font-size: 13px; color: #555; }
.pagination-box a:hover, .pagination-box .current { color: #fff; background: var(--color-primary); border-color: var(--color-primary); }
.empty { text-align: center; padding: 60px 0; color: #999; }
.detail-cat { display: inline-block; padding: 3px 12px; background: #eef6ef; color: var(--color-primary-dark); font-size: 12px; border-radius: 12px; margin-bottom: 12px; }
.detail-nav { display: flex; justify-content: space-between; gap: 16px; margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--color-border, #e0e0e0); }
.dn-item { flex: 1; min-width: 0; max-width: 50%; display: flex; flex-direction: column; overflow: hidden; color: #666; }
.dn-label { display: block; font-size: 12px; color: var(--color-primary); margin-bottom: 4px; }
.dn-title { display: block; font-size: 14px; color: #333; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dn-item:hover .dn-title { color: var(--color-primary); }
.dn-next { align-items: flex-end; text-align: right; }
