/* ============================================================
 * 全站列表卡片统一每行 4 个（最后加载，防止被其他样式文件覆盖）
 * 作用范围：分类/标签/日期归档(.archive)、搜索结果、课程中心、论坛外全部列表容器
 * 断点：桌面 4 列 / ≤1100px 3 列 / ≤768px 2 列（首页 .gc-cards 由 home.css 管理，不在此列）
 * ============================================================ */
.archive .posts-row,
.search .posts-row,
.search-page-ajaxpager,
.gc-courses-row {
	display: grid !important;
	grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
	gap: 16px;
}

@media (max-width: 1100px) {
	.archive .posts-row,
	.search .posts-row,
	.search-page-ajaxpager,
	.gc-courses-row {
		grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
	}
}

@media (max-width: 768px) {
	.archive .posts-row,
	.search .posts-row,
	.search-page-ajaxpager,
	.gc-courses-row {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
		gap: 12px;
	}
}

/* ============================================================
 * gc-c17 卡片底部对齐：价签行统一沉底
 * 标题 1 行/2 行时卡片底部留白不一致 → 卡片拉伸为 flex 列，
 * info 占满剩余空间，价格行 margin-top:auto 沉到卡片底
 * 作用范围：全站所有 gc-c17 卡片（列表/搜索/课程中心/首页）
 * ============================================================ */
.gc-c17 {
	display: flex;
	flex-direction: column;
}

.gc-c17-link {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
}

.gc-c17-info {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
}

.gc-c17-row {
	margin-top: auto;
}
/* ============================================================
 * 配套资源条（正文顶部）：夸克网盘公开下载，购买资源在侧栏付费盒
 * ============================================================ */
.gcg-resbar {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 16px;
	padding: 12px 16px;
	background: #fff;
	border: 1px solid rgba(23, 23, 25, .10);
	border-radius: 12px;
	font-size: 13px;
}

.gcg-resbar-label {
	font-weight: 700;
	color: #171719;
	white-space: nowrap;
}

.gcg-resbar-note {
	flex: 1;
	color: rgba(23, 23, 25, .55);
}

.gcg-resbar-btn {
	padding: 6px 14px;
	border-radius: 8px;
	background: #2f9e63;
	color: #fff !important;
	font-weight: 600;
	white-space: nowrap;
	text-decoration: none;
	transition: opacity .2s;
}

.gcg-resbar-btn:hover {
	opacity: .85;
}

/* 游客：未登录时的下载按钮（服务端已移除 href，这里只做视觉区分） */
.gcg-resbar-btn--locked,
.gcg-resbar-locked {
	display: inline-block;
	padding: 6px 14px;
	border: 1px solid rgba(23, 23, 25, .12);
	border-radius: 8px;
	background: #f4f3ee;
	color: rgba(23, 23, 25, .62) !important;
	font-weight: 600;
	white-space: nowrap;
	text-decoration: none;
	transition: background .2s, color .2s, border-color .2s;
}

.gcg-resbar-btn--locked:hover {
	border-color: rgba(47, 158, 99, .45);
	background: #eef7e4;
	color: #1f7a4a !important;
}

@media (max-width: 640px) {
	.gcg-resbar {
		flex-wrap: wrap;
	}

	.gcg-resbar-note {
		flex: 1 0 100%;
		order: 2;
		font-size: 12px;
	}
}

/* ============================================================
 * 列表页分页器归位：.posts-row 是 CSS Grid，子比的 .ajax-pag
 * 在容器内会被当成网格单元排进卡片行 → 让它横跨整行沉底
 * ============================================================ */
.posts-row .theme-pagination.ajax-pag {
	grid-column: 1 / -1;
}
/* ============================================================
 * 列表页筛选/排序条（V1 绿药丸）：gcgf- 前缀
 * ============================================================ */
.gcgf-bar { margin: 0 0 18px; }
.gcgf-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.gcgf-row + .gcgf-row { margin-top: 12px; }
.gcgf-label { font-size: 12px; font-weight: 700; color: rgba(23, 23, 25, .55); white-space: nowrap; }
.gcgf-flex { flex: 1; }
.gcgf-chips { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; }
.gcgf-chips::-webkit-scrollbar { height: 6px; }
.gcgf-chips::-webkit-scrollbar-thumb { background: rgba(23, 23, 25, .18); border-radius: 3px; }
.gcgf-chip { display: inline-flex; align-items: center; gap: 7px; padding: 9px 18px; border-radius: 999px; border: 1px solid rgba(23, 23, 25, .10); background: #fff; font-size: 13.5px; font-weight: 600; color: #171719; text-decoration: none; white-space: nowrap; transition: all .18s; }
.gcgf-chip .n { font-size: 11.5px; color: rgba(23, 23, 25, .55); font-weight: 600; }
.gcgf-chip:hover { border-color: rgba(23, 23, 25, .3); transform: translateY(-1px); }
.gcgf-chip.on { background: #B5E853; border-color: #B5E853; box-shadow: 0 4px 14px rgba(181, 232, 83, .45); }
.gcgf-chip.on .n { color: rgba(23, 23, 25, .62); }
.gcgf-sort { display: inline-flex; align-items: center; border: 1px solid rgba(23, 23, 25, .10); background: #fff; border-radius: 999px; padding: 4px; gap: 2px; margin-left: auto; }
.gcgf-sort-btn { padding: 8px 16px; border-radius: 999px; font-size: 13px; font-weight: 600; color: #171719; text-decoration: none; white-space: nowrap; transition: all .18s; }
.gcgf-sort-btn:hover { background: rgba(23, 23, 25, .06); }
.gcgf-sort-btn.on { background: #171719; color: #fff; }
@media (max-width: 768px) { .gcgf-sort { margin-left: 0; } }

/* ============================================================
 * 内容区宽度与首页 .gc-shell 对齐（1380/100%-138 → ≤1100:64 → ≤850:36）
 * 作用于所有非首页页面（归档/文章/页面/搜索）的 main.container
 * ============================================================ */
main.stage-zibll-main.container {
	width: min(1380px, 100% - 138px);
	max-width: none;
	margin-inline: auto;
	padding-inline: 0;
}
@media (max-width: 1100px) {
	main.stage-zibll-main.container {
		width: calc(100% - 64px);
	}
}
@media (max-width: 850px) {
	main.stage-zibll-main.container {
		width: calc(100% - 36px);
	}
}

/* ============================================================
 * 列表卡片与首页卡片同尺寸：清掉 8px 左右边距（margin 导致每张卡
 * 比轨道窄 16px），网格间距 18px→16px 与首页 .gc-cards 一致
 * ============================================================ */
.posts-row .gc-c17.ajax-item,
.gc-courses-row .gc-c17.ajax-item {
	margin-left: 0;
	margin-right: 0;
}

/* ============================================================
 * 归零子比的 margin 式卡片间距（负外边距 + 子项 8px 边距，
 * 与 grid gap 叠加导致卡片比首页窄 16px）——统一走 grid gap 16px
 * ============================================================ */
.archive .posts-row,
.search .posts-row,
.gc-courses-row {
	margin-left: 0 !important;
	margin-right: 0 !important;
}
.archive .posts-row > :not(.post_ajax_loader),
.search .posts-row > :not(.post_ajax_loader),
.gc-courses-row > :not(.post_ajax_loader) {
	margin-left: 0 !important;
	margin-right: 0 !important;
}

/* ============================================================
 * 首页 Hero 轮播：6 屏堆叠切换（is-active 可见）
 * ============================================================ */
.gc-hero-stage { position: relative; }
.gc-hero-stage .gc-hero-slide { display: none; }
.gc-hero-stage .gc-hero-slide.is-active { display: block; animation: gcHeroIn .4s ease; }
@keyframes gcHeroIn {
	from { opacity: 0; transform: translateY(8px); }
	to { opacity: 1; transform: none; }
}

/* ============================================================
 * 搜索页对齐：宽度/间距与全站一致，隐藏商城与论坛搜索范围
 * ============================================================ */
.search-page-ajaxpager { margin-left: 0 !important; margin-right: 0 !important; }
.search-page-ajaxpager > :not(.post_ajax_loader) { margin-left: 0 !important; margin-right: 0 !important; }
.search-page-ajaxpager .gc-c17 { margin-left: 0; margin-right: 0; }
/* 隐藏商城/论坛搜索类型（站点无商城内容，论坛走导航） */
.search-drop [data-for="type"][data-value="product"],
.search-drop [data-for="type"][data-value="plate"],
.search-drop [data-for="type"][data-value="forum"],
.search-tab-filter a[href*="type=product"],
.search-tab-filter a[href*="type=plate"],
.search-tab-filter a[href*="type=forum"],
.search-filter-orderby a[href*="orderby=sales_volume"] { display: none !important; }
/* 热门搜索词胶囊化（与全站 chips 风格一致） */
.search-keywords a { display: inline-block; margin: 0 8px 8px 0; padding: 6px 14px; border: 1px solid rgba(23, 23, 25, .10); border-radius: 999px; background: #fff; font-size: 12.5px; font-weight: 600; color: #171719; text-decoration: none; transition: all .18s; }
.search-keywords a:hover { border-color: #B5E853; background: rgba(181, 232, 83, .18); }
.page-search-box { border-radius: 18px; }

/* ============================================================
 * 搜索结果页签头：横跨整行 + 全站筛选条样式（子比原为网格第一格白卡）
 * ============================================================ */
.search-page-ajaxpager > .ajax-item-header.type-post {
	grid-column: 1 / -1;
	margin: 0 0 16px !important;
}
.search-page-ajaxpager .search-tab-header {
	background: transparent;
	border: 0;
	box-shadow: none;
	padding: 0;
	border-radius: 0;
}
.search-page-ajaxpager .search-tab-header > div {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
}
.search-page-ajaxpager .search-tab-header .list-inline {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
	overflow: visible;
}
.search-page-ajaxpager .search-tab-header .list-inline li {
	list-style: none;
}
.search-page-ajaxpager .search-tab-header .list-inline li a {
	display: inline-flex;
	align-items: center;
	padding: 9px 18px;
	border-radius: 999px;
	border: 1px solid rgba(23, 23, 25, .10);
	background: #fff;
	font-size: 13.5px;
	font-weight: 600;
	color: #171719;
	text-decoration: none;
	transition: all .18s;
}
.search-page-ajaxpager .search-tab-header .list-inline li a:hover {
	border-color: rgba(23, 23, 25, .3);
}
.search-page-ajaxpager .search-tab-header .list-inline li.active a {
	background: #B5E853;
	border-color: #B5E853;
	box-shadow: 0 4px 14px rgba(181, 232, 83, .45);
}
.search-page-ajaxpager .search-tab-header .search-filter-item.search-filter-orderby {
	display: inline-flex;
	align-items: center;
	gap: 2px;
	border: 1px solid rgba(23, 23, 25, .10);
	background: #fff;
	border-radius: 999px;
	padding: 4px;
}
.search-page-ajaxpager .search-tab-header .search-filter-orderby a {
	padding: 8px 16px;
	border-radius: 999px;
	font-size: 13px;
	font-weight: 600;
	color: #171719;
	text-decoration: none;
}
.search-page-ajaxpager .search-tab-header .search-filter-orderby a:hover {
	background: rgba(23, 23, 25, .06);
}
.search-page-ajaxpager .search-tab-header .search-filter-orderby a.focus-color {
	background: #171719;
	color: #fff;
}

/* ============================================================
 * 搜索页：隐藏 文章/用户 类型页签（不需要用户搜索），
 * 排序条与分类页 gcgf 同款（标签左 + 黑胶囊组右）
 * ============================================================ */
.search-page-ajaxpager .search-tab-header .list-inline { display: none !important; }
.search-page-ajaxpager .search-tab-header > div { justify-content: flex-end; }
.search-page-ajaxpager .search-tab-header > div::before {
	content: '排序';
	font-size: 12px;
	font-weight: 700;
	color: rgba(23, 23, 25, .55);
	white-space: nowrap;
}

/* 子比原生"排序"小标签（与胶囊内重复）隐藏 */
.search-tab-header span.opacity5 { display: none; }

/* ============================================================
 * "没有更多内容了"提示：横跨网格整行（否则占一个卡片格）
 * ============================================================ */
.ajaxpager .no-more,
.gc-courses-row .no-more {
	grid-column: 1 / -1;
}

/* ============================================================
 * 首页 Hero 导航：左右玻璃质感圆形箭头 + 底部圆点（选中变长条）
 * ============================================================ */
.gc-hero-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 44px;
	height: 44px;
	border-radius: 50%;
	border: 1px solid rgba(255, 255, 255, .28);
	background: rgba(255, 255, 255, .12);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	color: #fff;
	font-size: 15px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background .2s, transform .2s;
}
.gc-hero-nav:hover {
	background: rgba(255, 255, 255, .26);
	transform: translateY(-50%) scale(1.06);
}
.gc-hero-nav.prev { left: 20px; }
.gc-hero-nav.next { right: 20px; }
.gc-hero-dots {
	position: absolute;
	bottom: 22px;
	left: 50%;
	transform: translateX(-50%);
	display: flex;
	align-items: center;
	gap: 8px;
}
.gc-hero-dots button {
	width: 8px;
	height: 8px;
	border-radius: 999px;
	border: 0;
	padding: 0;
	background: rgba(255, 255, 255, .35);
	cursor: pointer;
	transition: all .25s;
}
.gc-hero-dots button:hover { background: rgba(255, 255, 255, .6); }
.gc-hero-dots button.on { width: 26px; background: #B5E853; }

.gc-hero-dots { z-index: 6; }

/* ============================================================
 * 课程页购买须知卡片（gcg-notice，参考通函样式微调站内风格）
 * ============================================================ */
.gcg-notice { background: #fff; border: 1px solid rgba(23, 23, 25, .10); border-radius: 14px; overflow: hidden; margin: 0 0 18px; }
.gcg-notice-head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; background: linear-gradient(120deg, rgba(181, 232, 83, .28), rgba(181, 232, 83, .08)); }
.gcg-notice-ico { flex: 0 0 auto; width: 26px; height: 26px; border-radius: 8px; background: #171719; color: #B5E853; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.gcg-notice-tt { flex: 1; line-height: 1.3; }
.gcg-notice-tt b { display: block; font-size: 15px; font-weight: 800; }
.gcg-notice-tt i { font-style: normal; font-size: 10.5px; letter-spacing: .14em; color: rgba(23, 23, 25, .45); font-weight: 700; }
.gcg-notice-btn { font-size: 12px; font-weight: 700; padding: 6px 14px; border-radius: 999px; background: #171719; color: #fff !important; text-decoration: none; white-space: nowrap; }
.gcg-notice-list { padding: 4px 18px 8px; }
.gcg-notice-item { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px dashed rgba(23, 23, 25, .08); }
.gcg-notice-item:last-child { border-bottom: 0; }
.gcg-notice-num { flex: 0 0 auto; width: 26px; height: 26px; border-radius: 8px; background: rgba(181, 232, 83, .4); color: #171719; font-weight: 800; font-size: 12px; display: flex; align-items: center; justify-content: center; }
.gcg-notice-item p { margin: 0; font-size: 13.5px; line-height: 1.8; color: rgba(23, 23, 25, .82); }
.gcg-notice-em { color: #d4380d; font-weight: 700; }

/* ============================================================
 * 登录注册页（/user-sign）对齐全站：子比该页主容器为 absolute
 * 全屏覆盖设计，会压住页头并让页脚透出——回归正常文档流
 * ============================================================ */
.page-template-user-sign main.stage-zibll-main {
	position: static !important;
}
.page-template-user-sign .sign-page .sign-col {
	margin: 40px auto 60px;
	float: none;
}

/* ===== 归档页：清除子比原生旧排序条与空占位 div（与新排序条重复、挤占第一行卡位） ===== */
body.archive .posts-row > .ajax-option.ajax-replace,
body.archive .posts-row > div:not([class]) { display: none !important; }
