/* * * 主样式文件 * @package TodoCMS * @version 1.0.0 */

/* 重置样式 */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Arial', sans-serif; font-size: 16px; color: #666; }
a, .alink { color: #333; text-decoration: none; cursor: pointer; }
a:hover, .alink:hover { color: #0060aa; text-decoration: underline; }
.blink { color: #0060aa; text-decoration: none; cursor: pointer; }
.blink:hover { text-decoration: underline; }
a.btn { text-decoration: none; }
ul, li { list-style: none; }
/* 重要：国际无障碍与防换行标准 */
.screen-reader-text { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
.icon { flex-shrink: 0; vertical-align: middle; fill: currentColor; overflow: hidden; }
.dec { margin-top: 5px; color: #a0a0aa; font-size: 13px; font-style: italic; word-break: break-all; }

/* 动画箭头 */
.arrow { margin: 5px; width: 8px; height: 8px; box-sizing: border-box; overflow: visible !important; transform: rotate(45deg); }
.arrow::before { content: ''; width: 100%; height: 100%; border-width: 1px 1px 0 0; border-style: solid; border-color: inherit; opacity: 0.3; display: block; transform-origin: 100% 0; }
.arrow::after { content: ''; float: left; position: relative; top: -7.8px; right: 0.5px; width: 100%; height: 0%; border-width: 0 1px 0 0; border-style: solid; border-color: inherit; opacity: 0.3; transform: rotate(45deg); transform-origin: 100% 0; transition: .2s ease; }
.arrow:hover::before { opacity: 1; border-width: 2px 2px 0 0; }
.arrow:hover::after { opacity: 1; border-width: 0 2px 0 0; height: 120%; }
a:hover .arrow::before { opacity: 1; border-width: 2px 2px 0 0; }
a:hover .arrow::after { opacity: 1; border-width: 0 2px 0 0; height: 150%; }
.sca-img img { transition: transform 0.3s ease; }
.sca-img:hover img { transform: scale(1.05); }

/* 头部 */
.site-header { background-color: #fff; }
.site-logo-wrap { font-size: 0; line-height: 0; }
.custom-logo-link { display: inline-flex; align-items: center; margin-top: 2px; margin-inline-end: 10px; }
.custom-logo-link img { max-height: 45px; height: 45px; width: auto; object-fit: contain; }
.site-title { font-size: 24px; font-weight: 500; }
.site-description { font-size: 14px; }

/* 导航 */
.main-navigation { background-color: #0073aa; }
.navigation { display: flex; }
.navigation nav { margin: 0; margin-inline-end: auto; }
.navigation ul:not(.sub-menu) { height: 100%; list-style: none; display: flex; padding: 0; }
.navigation li { position: relative; display: flex; align-items: center; }
.navigation li.current-menu-item > a { background-color: rgba(0, 0, 0, 0.3); text-decoration: none; }
.navigation a { display: flex; gap: 5px; align-items: center; height: 100%; padding: 15px 20px; color: #fff; }
.navigation a i:last-child { margin-inline-end: -5px; font-size: 12px; }
.navigation a:hover { background-color: rgba(0, 0, 0, 0.2); text-decoration: none; }
.navigation ul.sub-menu { display: none; position: absolute; top: 100%; left: 0; z-index: 10; background-color: #333; }
.navigation ul.sub-menu li { min-width: 200px; }
.navigation ul.sub-menu li a { flex: 1; color: #fff; text-decoration: none; }
.navigation ul.sub-menu li a:hover { background-color: #005177; text-decoration: none; }
.navigation .has-children:hover ul.sub-menu { display: block; }

.breadcrumb-list { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 15px auto; font-size: 14px; }
.breadcrumb-list li.active { color: #666; }
.breadcrumb-list li span.breadcrumb-separator { margin-inline-start: 5px; color: #c5cdd1; }
.breadcrumb-list li a:not(:hover) { color: #999; }


/* 首页/通用文章列 */
.posts-list-wrap .post { padding: 20px 0; margin-bottom: 24px; border-bottom: 1px solid #eee; }
.posts-list-wrap .post-thumbnail { margin-bottom: 12px; max-height: 280px; display: flex; }
.posts-list-wrap .post-thumbnail a { display: inline-block; }
.posts-list-wrap .entry-title { font-size: 18px; margin: 0 0 10px; }
.posts-list-wrap .dec { margin-bottom: 10px; }
.posts-list-wrap .dec span { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.posts-list-wrap .entry-content { font-size: 14px; line-height: 1.6; color: #666; }

/* 分类头部 */
.category-title { font-size: 24px; line-height: normal; margin-top: -5px; }
.category-description { color: #999; }

/* 分页 */
.pagination a { display: flex; align-items: center; }
.pagination a.pagination-btn { text-decoration: none; }
.pagination a.pagination-btn:hover span { text-decoration: underline; }
.pagination-numbers .current { color: #999; }
.pagination-numbers span:not(.dots), .pagination-numbers a { padding: 0 5px; }

/* 文章 */
.document-attributes { display: inline-flex; gap: 5px; margin-bottom: 10px; }
.document-attributes span { font-size: 12px; padding: 2px 5px; background: #f1f1f1; border-radius: 3px; color: #666; font-weight: normal; }
.article-meta { display: flex; justify-content: space-between; align-items: flex-start; margin: 0; flex-wrap: wrap; gap: 15px; }
.article-tags { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.meta-left, .meta-right { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; font-size: 13px; }
.meta-right { gap: 15px; }
.meta-item { display: flex; align-items: center; gap: 5px; font-size: 13px; }
.tag { padding: 3px 8px; background: #f0f0f0; color: #666; text-decoration: none; border-radius: 12px; font-size: 11px; transition: all 0.3s ease; }
.article-summary { background: #f8f9fa; padding: 20px; margin-bottom: 30px; border-radius: 8px; }
.summary-content { font-size: 14px; line-height: 1.6; color: #666; }
.post { padding: 20px; }
.post-title { font-size: 24px; margin-bottom: 10px; }
.post-meta { color: #666; font-size: 14px; margin-bottom: 15px; }
.post-content { margin-bottom: 20px; }
.post-thumbnail { max-width: 50%; }
.thumbhash-lazy { max-width: 100%; height: auto; font-size: 10px; line-height: 16px; text-indent: 5px; color: #333; word-break: break-all; letter-spacing: -0.05rem; }
.code-copy { font-size: 11px; padding: 2px 5px; background: rgba(0, 0, 0, 0.1); color: #999; position: absolute; right: 5px; top: 5px; }
.code-copy:hover { color: #fff; }

/* 相关文章/资源 */
.related-articles { background: white; padding: 20px; border-radius: 5px; margin-bottom: 30px; border: 1px solid #eee; }
.related-articles h2 { font-size: 20px; margin-bottom: 15px; }
.related-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 0 20px; }
.related-item { display: flex; gap: 15px; padding: 15px; border-radius: 6px; transition: all 0.3s ease; }
.related-item:hover { background: #f8f9fa; }
.related-thumb { width: 80px; height: 60px; overflow: hidden; border-radius: 4px; flex-shrink: 0; }
.related-thumb img { width: 100%; height: 100%; object-fit: cover; transition: all 0.3s ease; }
.related-item:hover .related-thumb img { transform: scale(1.1); }
.related-content { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.related-title { margin: 0 0 5px 0; font-size: 14px; line-height: 1.4; }
.related-title a { color: #333; text-decoration: none; }
.related-title a:hover { color: #007cba; }
.related-meta { display: flex; gap: 10px; align-items: center; font-size: 12px; color: #999; }
.related-summary { font-size: 12px; color: #666; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* 上一篇/下一篇导航 */
.article-navigation { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 30px; }
.nav-item { background: white; border: 1px solid #e0e0e0; border-radius: 6px; overflow: hidden; display: flex; justify-content: space-between; align-items: center; }
.nav-item:only-child { grid-column: 1 / -1; }
.nav-label { flex-shrink: 0; display: block; padding: 10px 15px; color: #999; font-size: 13px; }
.nav-link { display: flex; align-items: center; gap: 10px; padding: 15px; color: #333; text-decoration: none; flex: 1; font-size: 14px; }
.nav-link > div { border-radius: 4px; overflow: hidden; }
.nav-link > div img { transition: all 0.3s ease; }
.nav-link:hover { text-decoration: none; color: #007cba; }
.nav-link:hover img { transform: scale(1.1); }
.nav-next .nav-link { justify-content: flex-end; text-align: right; }

/* 侧边栏 */
.widget { background-color: #f7f7f7; border-radius: 5px; margin-bottom: 20px; padding: 15px 20px; }
.widget-title { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 10px; }
.widget-title h4 { font-weight: 500; }
.widget-title a { font-size: 12px; }
.widget ul { list-style: none; padding: 0; }
.widget li { border-bottom: 1px solid #eee; padding: 10px 0; }
.widget li:last-child { border-bottom: none; }
.widget .post-item-title { font-size: 14px; margin: 0 0 4px 0; line-height: 1.4; }
.widget .rank { flex-shrink: 0; width: 20px; height: 20px; line-height: 20px; border-radius: 50px; font-size: 14px; text-align: center; color: #fff; background-color: #dedede; }
.widget .views { display: flex; align-items: center; font-size: 12px; }
.widget .views i { opacity: 0.75; }
.widget .tag-cloud a { padding: 2px 7px; font-size: 12px; line-height: 19px; border-radius: 5px; color: #fff; }
.widget .subcategory-list li { padding: 0; }
.widget .subcategory-list li.current { border-color: transparent; }
.widget .subcategory-list li a { padding: 10px 15px; line-height: normal;text-decoration: none; border-radius: 5px; display: flex; justify-content: space-between; }
.widget .subcategory-list li a span { opacity: 0.3; }
.widget .subcategory-list li.current a { background-color: #0073aa; color: #fff; }
.widget a.archive-link .archive-count { color: #999; }
.widget a.archive-link:hover { text-decoration: none; }
.widget a.archive-link:hover .archive-date { text-decoration: underline; }
.widget .link-item a:hover { text-decoration: none; }
.widget .link-item a:hover .link-title { text-decoration: underline; }

/* 页脚 */
.site-footer { padding: 30px 0; margin-top: 30px; border-top: 1px solid #eee; }
.site-info { text-align: center; font-size: 14px; color: #999; }
.back-to-top { position: fixed; inset-inline-end: 10px; bottom: 40px; height: 40px; width: 40px; border-radius: 0; line-height: 16px; align-items: center; justify-content: center; background-color: rgba(0, 0, 0, 0.75); transition: transform 0.2s ease; transform-origin: bottom; }
.back-to-top:hover { transform: scale(1.1); }
.footer-social-links a { color: #666; display: inline-flex; align-items: center; gap: 3px; text-decoration: none; margin: 10px 0 5px; }
.payment-chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 5px; background: #f5f5f5; border-radius: 4px; font-size: 11px; }
.payment-chip i { font-size: 20px; width: auto; height: auto; }

/* 表单 */
input:not([type="button"]):not([type="reset"]):not([type="submit"]), textarea, select { color: #666; border: 1px solid #eee; border-radius: 3px; padding: 8px 12px; font-size: 16px; }
input:not([type="button"]):not([type="reset"]):not([type="submit"])::placeholder, textarea::placeholder, select::placeholder { color: #a0a0aa; font-size: 13px; }
input:not([type="button"]):not([type="reset"]):not([type="submit"]):focus, textarea:focus, select:focus { color: #111; border-color: #0073aa; outline: none; }
button, input[type="button"], input[type="reset"], input[type="submit"] { background-color: #0073aa; border: none; border-radius: 3px; color: #fff; cursor: pointer; font-size: 16px; padding: 9px 15px; }
button:hover, input[type="button"]:hover, input[type="reset"]:hover, input[type="submit"]:hover { background-color: #005177; }
input[type="number"] { padding: 0 !important; padding-inline-start: 12px !important; height: 37px; line-height: 37px; }
button.button-secondary { background: #fff; color: #666; border: 1px solid #eee; }
button.button-secondary:hover { border-color: #333; color: #333; }

/* 用户中心导航样式 */
.user-center-nav { position: relative; display: flex; align-items: center; color: rgba(255, 255, 255, 0.2); }
.user-center-btn, .login-btn { display: flex; align-items: center; gap: 5px; padding: 15px 20px; text-decoration: none; transition: all 0.3s ease; position: relative; }

/* 用户下拉菜单 */
.user-dropdown { position: absolute; top: 100%; right: 10px; background: white; border-radius: 4px; box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); min-width: 200px; z-index: 1000; opacity: 0; visibility: hidden; overflow: hidden; transform: translateY(-10px); transition: all 0.3s ease; }
.user-dropdown a:not(:hover) { color: #333; }
.user-dropdown a:hover { color: #0060aa; background: none; text-decoration: underline; }
.user-center-nav:hover .user-dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-item { display: flex; align-items: center; gap: 8px; padding: 12px 16px; }
.dropdown-divider { height: 1px; background-color: #e9ecef; }

/* === 超级聚合筛选导航 === */
.super-nav { margin: 16px 0; }
.super-nav-row { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 10px; line-height: 1.6; }
.super-nav-row:last-child { margin-bottom: 0; }
.super-nav-row-label { font-size: 14px; font-weight: 600; color: #333; white-space: nowrap; min-width: 50px; padding-top: 4px; flex-shrink: 0; }
.super-nav-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.super-nav-tag { display: inline-block; padding: 4px 14px; border: 1px solid #dee2e6; border-radius: 4px; font-size: 13px; color: #495057; text-decoration: none; background: #fff; transition: all 0.15s; }
.super-nav-tag:hover { border-color: #adb5bd; color: #212529; background: #f8f9fa; }
.super-nav-tag--active, .super-nav-tag--active:hover { border-color: #333; background: #333; color: #fff; }
.payment-help { display: flex; flex-direction: column; }
.payment-help ul { display: flex; gap: 20px; flex-wrap: wrap; }
.payment-help a:not(:hover) { color: #333; text-decoration: none; }

/* 网站消息 */
.message-container { position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 9999; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 10px; background-color: rgba(0, 0, 0, 0.3); }
.message-content { padding: 20px; display: flex; align-items: center; gap: 10px; border-radius: 20px; background-color: #fff; }
.message-close { border-radius: 20px; background-color: #ccc; color: #333; }

/* 搜索结果页 */
.search-header { margin: 20px auto; padding: 20px; background: #f8f9fa; border-radius: 8px; }
.search-title { font-size: 24px; color: #333; }
.search-info { margin-bottom: 10px; text-align: center; }
.search-info p { margin: 5px 0; color: #666; font-size: 14px; }
.search-form { max-width: 600px; }
.search-input-group { display: flex; border: 2px solid #007cba; border-radius: 25px; overflow: hidden; background: white; }
.search-input { flex: 1; padding: 12px 20px; border: none; outline: none; font-size: 16px; }
.search-btn { padding: 12px 20px; background: #007cba; color: white; border: none; cursor: pointer; }
.search-btn:hover { background: #006ba1; }
.search-filters { display: flex; align-items: center; justify-content: flex-start; margin-bottom: 20px; padding: 15px; background: #f8f9fa; border-radius: 8px; flex-wrap: wrap; gap: 15px; }
.filter-group { display: flex; align-items: center; gap: 8px; }
.filter-group label { font-weight: 500; color: #333; white-space: nowrap; }
.filter-group select { padding: 6px 12px; border: 1px solid #ddd; border-radius: 4px; background: white; min-width: 120px; }
.search-results { display: grid; grid-template-columns: 1fr 1fr; column-gap: 20px; }
.search-item { border: 1px solid #f2f2f2; border-radius: 8px; margin-bottom: 20px; background: white; overflow: hidden; }
.search-item-header { display: flex; justify-content: space-between; align-items: center; padding: 15px 20px 0; }
.content-type-badge { line-height: normal; }
.type-badge { padding: 3px 10px; border-radius: 10px; font-size: 11px; color: white; }
.type-article { background: #007cba; }
.type-product { background: #28a745; }
.type-download { background: #6f42c1; }
.type-images { background: #fd7e14; }
.type-media { background: #dc3545; }
.type-recruit { background: #20c997; }
.type-guestbook { background: #17a2b8; }
.type-other { background: #99a0a7; }
.search-item-meta { font-size: 12px; color: #999; }
.search-item-meta span { margin-inline-start: 15px; }
.search-item-content { display: flex; gap: 20px; padding: 15px 20px; }
.item-thumbnail { flex-shrink: 0; width: 120px; height: 80px; overflow: hidden; border-radius: 3px; }
.item-thumbnail img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.item-info { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.item-title { font-size: 18px; line-height: 1.4; }
.item-title a { color: #333; text-decoration: none; }
.item-title a:hover { color: #007cba; }
.url-link { font-size: 12px; text-decoration: none; }
.search-item-content a:hover img { transform: scale(1.2); }
.no-results { text-align: center; padding: 60px 20px; }
.popular-tags { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.popular-tag { margin-top: 10px; padding: 5px 12px; background: #007cba; color: white; text-decoration: none; border-radius: 15px; font-size: 12px; line-height: 14px; cursor: pointer; }
.popular-tag:hover { color: #fff; background: #006ba1; }

/* 热搜条 */
.hot-searches-bar { display: flex; align-items: flex-start; gap: 8px; margin-top: 10px; }
.hot-label { margin-top: 2px; font-size: 13px; font-weight: 500; white-space: nowrap; }
.hot-search-tag { display: inline-block; padding: 4px 10px 4px; font-size: 12px; color: #666; background: #f0f0f0; border-radius: 12px; text-decoration: none; max-width: 160px; overflow: hidden; line-height: normal; white-space: nowrap; text-overflow: ellipsis; }
.hot-search-tag:hover { background: #007cba; color: #fff; }

/* 高亮搜索关键词 */
.highlight { color: #e77020; }

/* 搜索结果分类筛选 Tab 栏 */
.search-results-heading { font-size: 16px; font-weight: 600; color: #333; }
.search-type-filter-bar { margin: 20px 0 16px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.search-type-tabs { display: flex; flex-wrap: wrap; gap: 0 20px; align-items: center; }
.search-type-tab { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: #ccc; text-decoration: none; line-height: 1.4; transition: all 0.2s ease; user-select: none; }
.search-type-tab:hover { color: #333; text-decoration: none; }
.search-type-tab.active { color: #333; }
.search-type-tab .type-count { display: inline-block; font-size: 11px; line-height: 1.2; color: #6b7280; }

/* 评论区多级嵌套 (TikTok / 现代风) */
.comments-section { margin-top: 40px; margin-bottom: 60px; }
.comment-form from { margin-bottom: 30px; padding: 20px 0; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 15px; margin-bottom: 15px; }
.form-group { margin-bottom: 15px; }
.form-group input, .form-group textarea { width: 100%; padding: 10px; border: 1px solid #ddd; border-radius: 4px; font-size: 14px; box-sizing: border-box; }
.form-group textarea { resize: vertical; min-height: 100px; }
.comments-list { display: flex; flex-direction: column; gap: 20px; margin-top: 20px; }
.comment-item { display: flex; gap: 14px; align-items: flex-start; }
.comment-item .comment-avatar { flex-shrink: 0; }
.comment-item .default-avatar { width: 40px; height: 40px; border-radius: 50%; background-color: #bfbfbf; color: #fff; font-weight: 600; font-size: 16px; display: flex; align-items: center; justify-content: center; }
.comment-content { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.comment-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: 14px; }
.comment-author { font-weight: 600; color: #161823; }
.reply-to-text { margin-inline-end: auto; }
.badge-verified { margin-inline-end: auto; }
.author-badge { background: #ff2c55; color: #fff; font-size: 11px; padding: 1px 6px; border-radius: 10px; line-height: normal; }
.reply-to-tag { font-weight: 500; }
.comment-date { color: #8a8b91; font-size: 12px; }
.comment-text { font-size: 14px; line-height: 1.5; color: #161823; }

/* 评价星级评分样式 */
.rating-form-group { display: flex; align-items: center; gap: 10px; margin-bottom: 15px; }
.rating-label { font-size: 14px; color: #444; font-weight: 500; }
.star-rating-input { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; user-select: none; }
.star-rating-input .star-icon { font-style: normal; font-size: 20px; color: #ddd; transition: color 0.15s ease; }
.star-rating-input .star-icon.active { color: #f39c12; }
.rating-value-text { font-size: 14px; font-weight: 600; color: #f39c12; margin-inline-start: 6px; }

/* 评价列表中显示的星级 */
.comment-rating-stars { display: inline-block; position: relative; font-size: 14px; line-height: 1; margin-inline-start: 6px; vertical-align: middle; }
.stars-outer { color: #e0e0e0; letter-spacing: 2px; }
.stars-inner { color: #f39c12; position: absolute; left: 0; top: 0; overflow: hidden; white-space: nowrap; letter-spacing: 2px; }
.comment-action { opacity: 0.4; background: none; border: none; padding: 0; color: #8a8b91; font-size: 13px; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; transition: color 0.2s ease; }
.comment-action:hover { opacity: 1; background: none; }

/* TikTok 风格子评论缩进与左边框线 */
.comment-replies { margin-top: 15px; display: flex; flex-direction: column; gap: 14px; }
.comment-item.reply .default-avatar { width: 32px; height: 32px; font-size: 14px; color: #9b9b9b; background-color: #e5e5e5; }

/* 公共样式 */
.w-100 { width: 100%; grid-column: 1 / -1; }
.h-100 { height: 100%; }
.m-0 { margin: 0 !important; }
.p-0 { padding: 0 !important; }
.m-b-05 { margin-bottom: 5px; }
.m-b-10 { margin-bottom: 10px; }
.m-b-20 { margin-bottom: 20px; }
.m-b-40 { margin-bottom: 40px; }
.m-t-0 { margin-top: 0; }
.m-t-05 { margin-top: 5px; }
.m-t-10 { margin-top: 10px; }
.m-t-20 { margin-top: 20px; }
.m-t-40 { margin-top: 40px; }
.m-t-auto { margin-top: auto; }
.m-l-05 { margin-inline-start: 5px; }
.m-l-10 { margin-inline-start: 10px; }
.m-l-20 { margin-inline-start: 20px; }
.m-l-40 { margin-inline-start: 40px; }
.m-l-auto { margin-inline-start: auto; }
.m-r-05 { margin-inline-end: 5px; }
.m-r-10 { margin-inline-end: 10px; }
.m-r-20 { margin-inline-end: 20px; }
.m-r-40 { margin-inline-end: 40px; }
.m-r-auto { margin-inline-start: auto; }
.ro45 { transform: rotate(45deg); }
.ro-45 { transform: rotate(-45deg); }
.ro90 { transform: rotate(90deg); }
.ro-90 { transform: rotate(-90deg); }
.ro180 { transform: rotate(180deg); }
.ro225 { transform: rotate(225deg); }
.over-hide { overflow: hidden; }
.over-auto { overflow: auto; }
.hidden { display: none; }
.relative { position: relative; }

/* 容器显示模式 */
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }
.inline-grid { display: inline-grid; }

/* 主轴方向 (flex-direction) /* ==================== */
.flex-row { flex-direction: row; }
.flex-row-reverse { flex-direction: row-reverse; }
.flex-col { flex-direction: column; }
.flex-col-reverse { flex-direction: column-reverse; }

/* 多行对齐 (align-content) /* ==================== */
.content-start { align-content: flex-start; }
.content-end { align-content: flex-end; }
.content-center { align-content: center; }
.content-between { align-content: space-between; }
.content-around { align-content: space-around; }
.content-stretch { align-content: stretch; }

/* 项目自身对齐 (align-self) /* ==================== */
.self-auto { align-self: auto; }
.self-start { align-self: flex-start; }
.self-end { align-self: flex-end; }
.self-center { align-self: center; }
.self-stretch { align-self: stretch; }
.self-baseline { align-self: baseline; }

/* 换行 (flex-wrap) /* ==================== */
.flex-nowrap { flex-wrap: nowrap; }
.flex-wrap { flex-wrap: wrap; }
.flex-wrap-reverse { flex-wrap: wrap-reverse; }

/* 项目伸缩 (flex-grow/flex-shrink/flex-basis) /* ==================== */
.flex-1 { flex: 1 1 0%; }
.flex-auto { flex: 1 1 auto; }
.flex-initial { flex: 0 1 auto; }
.flex-none { flex: none; }

/* 单独控制 grow */
.grow { flex-grow: 1; }
.grow-0 { flex-grow: 0; }

/* 单独控制 shrink */
.shrink { flex-shrink: 1; }
.shrink-0 { flex-shrink: 0; }

/* 项目顺序 (order) /* ==================== */
.order-first { order: -9999; }
.order-last { order: 9999; }
.order-none { order: 0; }
.order-1 { order: 1; }
.order-2 { order: 2; }
.order-3 { order: 3; }
.order-4 { order: 4; }
.order-5 { order: 5; }
.order-6 { order: 6; }
.order-7 { order: 7; }
.order-8 { order: 8; }
.order-9 { order: 9; }
.order-10 { order: 10; }
.order-11 { order: 11; }
.order-12 { order: 12; }

/* 列数预设 */
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.grid-cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }

/* 自动列数 (根据内容自适应) */
.grid-cols-auto { grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); }
.grid-cols-fit { grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }

/* 行数预设 */
.grid-rows-1 { grid-template-rows: repeat(1, minmax(0, 1fr)); }
.grid-rows-2 { grid-template-rows: repeat(2, minmax(0, 1fr)); }
.grid-rows-3 { grid-template-rows: repeat(3, minmax(0, 1fr)); }
.grid-rows-4 { grid-template-rows: repeat(4, minmax(0, 1fr)); }
.grid-rows-5 { grid-template-rows: repeat(5, minmax(0, 1fr)); }
.grid-rows-6 { grid-template-rows: repeat(6, minmax(0, 1fr)); }

/* 列定位 */
.col-auto { grid-column: auto; }
.col-span-1 { grid-column: span 1 / span 1; }
.col-span-2 { grid-column: span 2 / span 2; }
.col-span-3 { grid-column: span 3 / span 3; }
.col-span-4 { grid-column: span 4 / span 4; }
.col-span-5 { grid-column: span 5 / span 5; }
.col-span-6 { grid-column: span 6 / span 6; }
.col-span-full { grid-column: 1 / -1; }

/* 行定位 */
.row-auto { grid-row: auto; }
.row-span-1 { grid-row: span 1 / span 1; }
.row-span-2 { grid-row: span 2 / span 2; }
.row-span-3 { grid-row: span 3 / span 3; }
.row-span-4 { grid-row: span 4 / span 4; }
.row-span-5 { grid-row: span 5 / span 5; }
.row-span-6 { grid-row: span 6 / span 6; }
.row-span-full { grid-row: 1 / -1; }

/* 容器对齐 */
.items-baseline { align-items: baseline; }
.items-start { align-items: start; }
.items-end { align-items: end; }
.items-center { align-items: center; }
.items-stretch { align-items: stretch; }
.justify-start { justify-content: start; }
.justify-end { justify-content: end; }
.justify-center { justify-content: center; }
.justify-stretch { justify-content: stretch; }
.justify-between { justify-content: space-between; }
.justify-around { justify-content: space-around; }
.justify-evenly { justify-content: space-evenly; }

/* 项目自对齐 */
.self-start { align-self: start; }
.self-end { align-self: end; }
.self-center { align-self: center; }
.self-stretch { align-self: stretch; }
.justify-self-start { justify-self: start; }
.justify-self-end { justify-self: end; }
.justify-self-center { justify-self: center; }
.justify-self-stretch { justify-self: stretch; }

/* 全局 gap */
.gap-0 { gap: 0; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-5 { gap: 1.25rem; }
.gap-6 { gap: 1.5rem; }
.gap-7 { gap: 1.75rem; }
.gap-8 { gap: 2rem; }
.gap-9 { gap: 2.25rem; }
.gap-10 { gap: 2.5rem; }
.gap-11 { gap: 2.75rem; }
.gap-12 { gap: 3rem; }

/* 行列独立 gap */
.gap-x-0 { column-gap: 0; }
.gap-x-1 { column-gap: 0.25rem; }
.gap-x-2 { column-gap: 0.5rem; }
.gap-x-3 { column-gap: 0.75rem; }
.gap-x-4 { column-gap: 1rem; }
.gap-x-5 { column-gap: 1.25rem; }
.gap-x-6 { column-gap: 1.5rem; }
.gap-x-7 { column-gap: 1.75rem; }
.gap-x-8 { column-gap: 2rem; }
.gap-x-9 { column-gap: 2.25rem; }
.gap-x-10 { column-gap: 2.5rem; }
.gap-y-0 { row-gap: 0; }
.gap-y-1 { row-gap: 0.25rem; }
.gap-y-2 { row-gap: 0.5rem; }
.gap-y-3 { row-gap: 0.75rem; }
.gap-y-4 { row-gap: 1rem; }
.gap-y-5 { row-gap: 1.25rem; }
.gap-y-6 { row-gap: 1.5rem; }
.gap-y-7 { row-gap: 1.75rem; }
.gap-y-8 { row-gap: 2rem; }
.gap-y-9 { row-gap: 2.25rem; }
.gap-y-10 { row-gap: 2.5rem; }

/* ======================================================== Google Mobile-First & Core Web Vitals 响应式与防CLS适配 ======================================================== */
img, video, canvas, iframe { max-width: 100%; height: auto; }

/* 消除电商列表商品图加载时的布局偏移 (CLS = 0) */
.product-image { position: relative; width: 100%; aspect-ratio: 1 / 1; background-color: #f7f7f7; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.product-image img, .product-image .product-thumb { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 991px) {
  .container { width: 100% !important; max-width: 100% !important; padding-inline-start: 15px; padding-inline-end: 15px; }
  .row { flex-direction: column; }
  .col, main.col { width: 100% !important; max-width: 100% !important; }
  aside, aside.sidebar { width: 100% !important; margin-top: 30px; }
  .hero-slider { width: 100% !important; max-width: 100% !important; }
}
@media (max-width: 768px) {

  /* 头部适配：避免横向溢出 */
  .site-header .container { flex-direction: column; align-items: stretch !important; gap: 12px; }
  .site-header .flex.items-center.justify-between.gap-2 { margin: 10px 0 !important; width: 100%; }
  .site-header .form-input { width: 100% !important; }
  .main-navigation .navigation { overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; }
  .main-navigation ul:not(.sub-menu) { flex-wrap: nowrap; }

  /* 保证 Google 可点击元素间距 (Tap targets >= 44px) */
  .navigation a, .button-secondary, .product-btn, .btn, .btn-cart, .btn-buy { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }

  /* 商品网格响应式：移动端双列自适应 */
  .product-grid { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 15px !important; }
  .product-item { width: 100% !important; }

  /* 网格工具类在移动端折叠 */
  .grid-cols-3, .grid-cols-4, .grid-cols-5, .grid-cols-6 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }

  /* 页脚政策与商家信息 */
  .footer-policy-links, .footer-merchant-info { gap: 10px 20px; }
  .footer-policy-links .sep { display: none; }
}
@media (max-width: 480px) {
  .product-grid { grid-template-columns: 1fr !important; }
  .grid-cols-2 { grid-template-columns: 1fr !important; }
  .site-title { font-size: 20px; }
}

/* Core Web Vitals: CLS 预防与媒体宽高比预留 */
.product-image img, .product-thumb, .article-thumbnail img { aspect-ratio: 1 / 1; object-fit: cover; }
.category-banner img, .category-image-wrap img { aspect-ratio: 16 / 9; object-fit: cover; }