/*
Theme Name: 闪收匠
Theme URI: https://www.shanshoujiang.com
Author: 闪收匠团队
Author URI: https://www.shanshoujiang.com
Description: 闪收匠官方 WordPress 主题 - 成都二手数码回收资讯频道。30年通讯行业沉淀，深蓝与金匠橙品牌配色，完美适配 PC/手机/平板。支持自定义分类、自定义 SEO、自动适配结构化数据。
Version: 1.0.0
Requires at least: 5.6
Tested up to: 6.4
Requires PHP: 7.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: shanshoujiang
Tags: 资讯, blog, custom-colors, custom-menu, featured-images, threaded-comments, translation-ready, responsive-layout
*/

/* ================================================================
   闪收匠主题样式 - 完整继承主站风格
   主色调: 金匠橙 #E8A33D + 藏蓝 #1B2A4E
   ================================================================ */

/* ============ CSS 变量 ============ */
:root {
    --color-primary: #E8A33D;
    --color-primary-dark: #C7861F;
    --color-accent: #1B2A4E;
    --color-accent-light: #2C3E6B;
    --color-text: #333;
    --color-text-light: #666;
    --color-text-mute: #999;
    --color-bg: #f8f9fa;
    --color-bg-white: #ffffff;
    --color-border: #e5e7eb;
    --color-success: #10b981;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --radius-sm: 4px;
    --radius: 8px;
    --radius-lg: 12px;
    --container: 1200px;
    --font-base: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

/* ============ 重置 ============ */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--font-base);
    font-size: 16px;
    line-height: 1.7;
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
}
a { color: var(--color-accent); text-decoration: none; transition: color .2s; }
a:hover { color: var(--color-primary); }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4, h5, h6 { font-weight: 700; line-height: 1.4; color: var(--color-accent); }

/* ============ 公告条 ============ */
.topbar {
    background: linear-gradient(135deg, var(--color-accent), var(--color-accent-light));
    color: #fff;
    font-size: 13px;
    padding: 8px 0;
    text-align: center;
}
.topbar i { color: var(--color-primary); margin-right: 4px; }
.topbar a { color: var(--color-primary); font-weight: 600; }

/* ============ 头部导航 ============ */
.site-header {
    background: #fff;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}
.nav-wrap {
    max-width: var(--container);
    margin: 0 auto;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 22px;
    color: var(--color-accent);
}
.brand-icon {
    width: 40px; height: 40px;
    background: var(--color-primary);
    color: #fff;
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 22px;
}
.brand-name { line-height: 1; }
.brand-tag { font-size: 11px; color: var(--color-text-mute); font-weight: 400; margin-top: 2px; }

.nav-menu {
    display: flex;
    gap: 4px;
    list-style: none;
}
.nav-menu li { position: relative; }
.nav-menu a {
    display: block;
    padding: 10px 16px;
    color: var(--color-text);
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: all .2s;
}
.nav-menu a:hover, .nav-menu .current-menu-item a {
    color: var(--color-primary);
    background: rgba(232, 163, 61, .08);
}
.nav-menu .current-menu-item a {
    font-weight: 700;
}
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--color-accent);
    cursor: pointer;
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%; left: 0; right: 0;
        background: #fff;
        flex-direction: column;
        box-shadow: var(--shadow-md);
        padding: 10px;
    }
    .nav-menu.active { display: flex; }
    .menu-toggle { display: block; }
}

/* ============ 页面标题区 ============ */
.page-header {
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-light) 100%);
    color: #fff;
    padding: 50px 20px;
    text-align: center;
}
.page-header h1 {
    color: #fff;
    font-size: 36px;
    margin-bottom: 10px;
}
.page-header p { opacity: .9; font-size: 16px; }
.breadcrumb {
    max-width: var(--container);
    margin: 16px auto 0;
    font-size: 13px;
    opacity: .85;
}
.breadcrumb a { color: var(--color-primary); }

/* ============ 主布局 ============ */
.site-main {
    max-width: var(--container);
    margin: 40px auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 40px;
}
@media (max-width: 992px) {
    .site-main { grid-template-columns: 1fr; }
}

.content-area { min-width: 0; }

/* ============ 文章卡片网格 ============ */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}
@media (max-width: 600px) {
    .posts-grid { grid-template-columns: 1fr; }
}

.post-card {
    background: #fff;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all .3s;
    display: flex;
    flex-direction: column;
}
.post-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}
.post-thumb {
    position: relative;
    aspect-ratio: 16/10;
    background: linear-gradient(135deg, var(--color-accent), var(--color-accent-light));
    overflow: hidden;
}
.post-thumb img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .4s;
}
.post-card:hover .post-thumb img { transform: scale(1.06); }
.post-thumb-placeholder {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    color: var(--color-primary);
    font-size: 48px;
}
.post-cat-badge {
    position: absolute;
    top: 12px; left: 12px;
    background: var(--color-primary);
    color: #fff;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}
.post-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.post-title {
    font-size: 19px;
    line-height: 1.4;
    margin-bottom: 10px;
}
.post-title a { color: var(--color-accent); }
.post-title a:hover { color: var(--color-primary); }
.post-excerpt {
    color: var(--color-text-light);
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}
.post-meta {
    display: flex;
    gap: 14px;
    font-size: 13px;
    color: var(--color-text-mute);
    padding-top: 12px;
    border-top: 1px solid var(--color-border);
}
.post-meta i { color: var(--color-primary); margin-right: 4px; }
.post-meta a { color: var(--color-text-mute); }
.post-meta a:hover { color: var(--color-primary); }

/* ============ 文章列表样式（备选） ============ */
.post-list { display: flex; flex-direction: column; gap: 16px; }
.post-list .post-card {
    flex-direction: row;
}
.post-list .post-thumb {
    width: 280px;
    aspect-ratio: 4/3;
    flex-shrink: 0;
}
@media (max-width: 600px) {
    .post-list .post-card { flex-direction: column; }
    .post-list .post-thumb { width: 100%; aspect-ratio: 16/10; }
}

/* ============ 文章详情 ============ */
.single-post {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-sm);
}
@media (max-width: 600px) { .single-post { padding: 24px 18px; } }
.single-title {
    font-size: 30px;
    line-height: 1.4;
    margin-bottom: 18px;
}
@media (max-width: 600px) { .single-title { font-size: 22px; } }
.single-meta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    padding: 14px 0;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 24px;
    font-size: 14px;
    color: var(--color-text-light);
}
.single-meta i { color: var(--color-primary); margin-right: 4px; }
.single-meta .cat a { color: var(--color-primary); font-weight: 600; }

.single-feat-img {
    width: 100%;
    border-radius: var(--radius);
    margin-bottom: 24px;
}
.single-feat-img-placeholder {
    width: 100%;
    aspect-ratio: 16/9;
    background: linear-gradient(135deg, var(--color-accent), var(--color-accent-light));
    border-radius: var(--radius);
    display: flex; align-items: center; justify-content: center;
    color: var(--color-primary);
    font-size: 72px;
    margin-bottom: 24px;
}

.entry-content { font-size: 16px; line-height: 1.85; color: #444; }
.entry-content p { margin: 0 0 18px; }
.entry-content h2 { font-size: 24px; margin: 36px 0 16px; padding-left: 14px; border-left: 4px solid var(--color-primary); }
.entry-content h3 { font-size: 20px; margin: 28px 0 12px; color: var(--color-accent); }
.entry-content h4 { font-size: 17px; margin: 24px 0 10px; }
.entry-content a { color: var(--color-primary); text-decoration: underline; }
.entry-content ul, .entry-content ol { margin: 0 0 18px 28px; }
.entry-content li { margin-bottom: 6px; }
.entry-content blockquote {
    background: #fdf6e9;
    border-left: 4px solid var(--color-primary);
    padding: 16px 20px;
    margin: 24px 0;
    color: var(--color-text-light);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.entry-content blockquote p:last-child { margin-bottom: 0; }
.entry-content pre, .entry-content code {
    background: #1e1e1e;
    color: #d4d4d4;
    border-radius: var(--radius-sm);
    padding: 2px 6px;
    font-family: Consolas, "Courier New", monospace;
    font-size: 14px;
}
.entry-content pre {
    padding: 16px;
    overflow-x: auto;
    margin: 18px 0;
}
.entry-content pre code { padding: 0; background: transparent; }
.entry-content img {
    border-radius: var(--radius);
    margin: 18px 0;
    box-shadow: var(--shadow-sm);
}
.entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 18px 0;
    font-size: 14px;
}
.entry-content table th,
.entry-content table td {
    border: 1px solid var(--color-border);
    padding: 10px 14px;
    text-align: left;
}
.entry-content table th { background: var(--color-bg); font-weight: 700; }

/* ============ 文章底部：标签 + 分享 ============ */
.single-footer {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--color-border);
}
.post-tags { margin-bottom: 16px; }
.post-tags a {
    display: inline-block;
    background: var(--color-bg);
    color: var(--color-text-light);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 13px;
    margin: 0 6px 6px 0;
}
.post-tags a:hover { background: var(--color-primary); color: #fff; }
.post-share {
    display: flex; gap: 10px; align-items: center;
    margin-top: 14px;
}
.post-share-label { font-size: 14px; color: var(--color-text-light); }
.post-share a {
    width: 36px; height: 36px;
    background: var(--color-bg);
    border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    color: var(--color-text);
    transition: all .2s;
}
.post-share a:hover {
    background: var(--color-primary);
    color: #fff;
    transform: translateY(-2px);
}

/* ============ 上下篇导航 ============ */
.post-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 24px;
}
@media (max-width: 600px) { .post-nav { grid-template-columns: 1fr; } }
.post-nav a {
    background: #fff;
    padding: 16px 20px;
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
    transition: all .2s;
}
.post-nav a:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-sm);
}
.post-nav-label {
    font-size: 12px;
    color: var(--color-primary);
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 4px;
}
.post-nav-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--color-accent);
}

/* ============ 侧边栏 ============ */
.widget-area { display: flex; flex-direction: column; gap: 24px; }
.widget {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 22px;
    box-shadow: var(--shadow-sm);
}
.widget-title {
    font-size: 17px;
    color: var(--color-accent);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--color-primary);
    display: inline-block;
}
.widget ul { list-style: none; }
.widget ul li {
    padding: 8px 0;
    border-bottom: 1px dashed var(--color-border);
    font-size: 14px;
}
.widget ul li:last-child { border-bottom: none; }
.widget ul li a { color: var(--color-text); display: flex; justify-content: space-between; gap: 10px; }
.widget ul li a:hover { color: var(--color-primary); }
.widget .post-count { color: var(--color-text-mute); font-size: 12px; }

/* 热门文章 */
.widget-popular li {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}
.widget-popular .pop-thumb {
    width: 70px; height: 70px;
    flex-shrink: 0;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: linear-gradient(135deg, var(--color-accent), var(--color-accent-light));
}
.widget-popular .pop-thumb img {
    width: 100%; height: 100%; object-fit: cover;
}
.widget-popular .pop-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    margin-bottom: 4px;
}
.widget-popular .pop-meta { font-size: 12px; color: var(--color-text-mute); }

/* 联系卡片 */
.widget-contact {
    background: linear-gradient(135deg, var(--color-accent), var(--color-accent-light));
    color: #fff;
}
.widget-contact .widget-title {
    color: #fff;
    border-color: var(--color-primary);
}
.widget-contact p { font-size: 14px; margin: 8px 0; opacity: .9; }
.widget-contact .phone {
    font-size: 22px;
    font-weight: 800;
    color: var(--color-primary);
    margin: 12px 0;
}
.widget-contact .cta-btn {
    display: block;
    text-align: center;
    background: var(--color-primary);
    color: #fff;
    padding: 10px;
    border-radius: var(--radius-sm);
    margin-top: 12px;
    font-weight: 600;
}
.widget-contact .cta-btn:hover { background: var(--color-primary-dark); color: #fff; }

/* 标签云 */
.tagcloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.tagcloud a {
    background: var(--color-bg);
    color: var(--color-text-light);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 13px;
}
.tagcloud a:hover { background: var(--color-primary); color: #fff; }

/* ============ 分页 ============ */
.pagination {
    margin: 40px 0 0;
    display: flex;
    gap: 6px;
    justify-content: center;
    flex-wrap: wrap;
}
.pagination a, .pagination span {
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-text);
    font-weight: 500;
    transition: all .2s;
}
.pagination a:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}
.pagination .current {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}

/* ============ 评论区 ============ */
.comments-area {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 32px;
    margin-top: 24px;
    box-shadow: var(--shadow-sm);
}
.comments-title {
    font-size: 20px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--color-primary);
    display: inline-block;
}
.comment-list { list-style: none; }
.comment-body {
    padding: 16px 0;
    border-bottom: 1px solid var(--color-border);
}
.comment-author {
    display: flex; gap: 12px; align-items: center;
    margin-bottom: 8px;
}
.comment-author img {
    width: 40px; height: 40px;
    border-radius: 50%;
}
.comment-author .fn { font-weight: 700; color: var(--color-accent); }
.comment-author .says { display: none; }
.comment-metadata {
    font-size: 12px;
    color: var(--color-text-mute);
    margin-left: auto;
}
.comment-content { font-size: 15px; line-height: 1.7; color: var(--color-text); padding-left: 52px; }
.reply { margin-left: 52px; margin-top: 6px; font-size: 13px; }
.reply a { color: var(--color-primary); }
.children { list-style: none; margin-left: 30px; }

/* 评论表单 */
.comment-respond {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid var(--color-border);
}
.comment-respond .required { color: #dc3545; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: inherit;
}
.comment-form input:focus, .comment-form textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(232, 163, 61, .15);
}
.comment-form p { margin-bottom: 14px; }
.comment-form label { display: block; font-weight: 600; margin-bottom: 6px; }
.comment-form .submit {
    background: var(--color-primary);
    color: #fff;
    padding: 10px 28px;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 600;
}
.comment-form .submit:hover { background: var(--color-primary-dark); }

/* ============ 搜索框 ============ */
.search-form {
    display: flex;
    gap: 8px;
}
.search-form input[type="search"] {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 14px;
}
.search-form input[type="search"]:focus {
    outline: none;
    border-color: var(--color-primary);
}
.search-form button {
    background: var(--color-primary);
    color: #fff;
    border: none;
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    cursor: pointer;
}
.search-form button:hover { background: var(--color-primary-dark); }

/* ============ 底部 ============ */
.site-footer {
    background: var(--color-accent);
    color: #fff;
    padding: 50px 20px 20px;
    margin-top: 60px;
}
.footer-wrap {
    max-width: var(--container);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 40px;
}
@media (max-width: 768px) {
    .footer-wrap { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
    .footer-wrap { grid-template-columns: 1fr; }
}
.footer-widget h4 {
    color: #fff;
    font-size: 16px;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--color-primary);
    display: inline-block;
}
.footer-widget ul { list-style: none; }
.footer-widget ul li { margin-bottom: 8px; }
.footer-widget ul li a { color: rgba(255, 255, 255, .85); font-size: 14px; }
.footer-widget ul li a:hover { color: var(--color-primary); }
.footer-about p { font-size: 14px; line-height: 1.7; opacity: .85; margin-bottom: 12px; }
.footer-phone {
    color: var(--color-primary);
    font-size: 20px;
    font-weight: 800;
    margin: 8px 0;
}
.copyright {
    max-width: var(--container);
    margin: 30px auto 0;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, .15);
    text-align: center;
    font-size: 13px;
    opacity: .7;
}
.copyright a { color: var(--color-primary); }

/* ============ 浮动按钮 ============ */
.float-actions {
    position: fixed;
    right: 20px;
    bottom: 100px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 99;
}
.float-btn {
    width: 56px;
    height: 56px;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    box-shadow: var(--shadow-md);
    color: var(--color-text);
    cursor: pointer;
    transition: all .2s;
    font-size: 11px;
    text-decoration: none;
}
.float-btn i { font-size: 22px; margin-bottom: 2px; color: var(--color-primary); }
.float-btn:hover {
    background: var(--color-primary);
    color: #fff;
    transform: scale(1.08);
}
.float-btn:hover i { color: #fff; }
@media (max-width: 600px) {
    .float-actions { bottom: 80px; right: 10px; }
    .float-btn { width: 48px; height: 48px; font-size: 10px; }
    .float-btn i { font-size: 18px; }
}

/* ============ 提示框 ============ */
.notice {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
}
.notice-info { background: #d1ecf1; border-color: #17a2b8; }
.notice p { margin: 0; }

/* ============ 文章作者卡片 ============ */
.author-box {
    display: flex;
    gap: 16px;
    padding: 20px;
    background: var(--color-bg);
    border-radius: var(--radius);
    margin-top: 24px;
}
.author-avatar img { width: 60px; height: 60px; border-radius: 50%; }
.author-name { font-weight: 700; color: var(--color-accent); }
.author-bio { font-size: 14px; color: var(--color-text-light); margin-top: 4px; }

/* ============ 相关推荐 ============ */
.related-posts {
    margin-top: 32px;
}
.related-title {
    font-size: 20px;
    margin-bottom: 16px;
    padding-left: 12px;
    border-left: 4px solid var(--color-primary);
}
.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}
@media (max-width: 768px) { .related-grid { grid-template-columns: 1fr; } }
.related-item {
    background: #fff;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.related-item img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }
.related-item .rel-title {
    padding: 12px 14px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
}

/* ============ 工具类 ============ */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.screen-reader-text {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* ============ 404 页面 ============ */
.error-404 {
    text-align: center;
    padding: 80px 20px;
}
.error-404 h1 {
    font-size: 100px;
    color: var(--color-primary);
    margin-bottom: 20px;
}
.error-404 h2 { font-size: 28px; margin-bottom: 16px; }

/* ============ 文章格式 ============ */
.format-quote .entry-content {
    background: #fdf6e9;
    border-left: 4px solid var(--color-primary);
    padding: 20px;
    border-radius: var(--radius);
}