/* ============================================================
 * 分类目录列表页样式（taxonomy-favorites.php）
 *  - 整体宽度：直接复用父主题原生容器 <main class="container is_category my-2 io9-catpage">
 *    （与父主题 archive.php / 首页 / 工具详情页完全一致），宽度 = 后台「内容页宽度」
 *    (main_width，本例 1260px) 并自动居中，不硬编码、不写 inline width（之前硬编码 + is_tax 守卫导致 1900 不生效）。
 *  - 区块圆角跟随主题「内容圆角」(--theme-border-radius)，阴影沿用主题 (--main-shadow)。
 *  - 本页无侧栏：用 .io9-catpage .content-layout{margin-right:0} 抵消父主题给侧栏预留的 325px。
 * 父主题零改动。
 * ============================================================ */

/* ---------- 整体容器：宽度/居中完全交给父主题 .container（与首页一致），这里只设置主题变量与内边距 ---------- */
.io9-catpage {
	--io-radius: var(--theme-border-radius, 12px);     /* = var(--main-radius)，跟随后台「内容圆角」 */
	--io-shadow: 0 5px 20px var(--main-shadow, rgba(0, 0, 0, 0.06));
	padding: 15px;
	box-sizing: border-box;
}

/* ---------- 空态（article / resource 列表共用，统一在此定义；category.css 在加载这些页面时必同时加载） ---------- */
.io9-empty {
	color: #9ca3af;
	text-align: center;
	padding: 24px 0;
	margin: 0;
	grid-column: 1 / -1;
}

/* 本页无侧栏（父主题 archive.php 会调用 get_sidebar()，本页不调用）。
   抵消父主题 .sidebar_right .content-layout{margin-right:325px} 给侧栏预留的空间，
   让内容填满 1260 容器并居中，与首页表现一致（≥992px 才预留侧栏，移动端本就不预留）。 */
.io9-catpage .content-layout {
	margin-right: 0 !important;
}

/* ---------- 通用区块卡片（圆角 = 后台「内容圆角」，阴影沿用主题；边框用极淡色，对齐详情页风格） ---------- */
.io9-block {
	background: var(--main-bg-color, #fff);
	border: 1px solid rgba(0, 0, 0, 0.06);          /* 不用 --muted-color（父主题 #93959a 在某些环境偏深） */
	border-radius: var(--io-radius);
	box-shadow: var(--io-shadow);
	padding: 16px;
	margin-bottom: 16px;
	box-sizing: border-box;
}

/* ---------- 1) Banner ---------- */
.io9-banner {
	/* 渐变背景（参考 HTML：indigo-50 -> blue-50），圆角/阴影继承区块 */
	background: linear-gradient(135deg, #eef2ff 0%, #eff6ff 100%);
	border: 1px solid #e0e7ff;
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	justify-content: space-between;
	gap: 8px;
}
.io9-banner-main { flex: 1 1 360px; min-width: 0; }
.io9-banner-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap;margin-bottom:15px; }

/* ---------- 1.1) 面包屑（位于 banner 版块外面，复用父主题 text-xs / crumbs / vc-theme 类，风格与详情页一致） ---------- */
.io9-banner-ico {
	width: 35px; height: 35px; flex: 0 0 35px;
	border-radius: var(--io-radius);
	background: #fff;
	display: flex; align-items: center; justify-content: center;
	overflow: hidden; box-shadow: var(--io-shadow);
}
.io9-banner-ico img { width: 100%; height: 100%; object-fit: cover; }
.io9-banner-ico--default { background: var(--theme-color, #4f46e5); }
.io9-banner-ico--default i { color: #fff; font-size: 20px; }
.io9-banner-titlerow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; }
.io9-banner h1 {
	font-size: 1.25rem;            /* text-xl，参考 HTML */
	font-weight: 700;
	line-height: 1.25;
	margin: 0;
	color: var(--main-color, #1f2937);
}
.io9-banner-stats { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.io9-stat {
	display: inline-flex; align-items: center; gap: 4px;
	font-size: 0.78rem;            /* text-xs */
	color: #4b5563;
	background: rgba(255, 255, 255, 0.7);
	padding: 2px 10px;
	border-radius: 999px;
}
.io9-stat i { font-size: 12px; color: var(--theme-color, #4f46e5); }
.io9-banner-desc {
	font-size: 0.9rem;           /* 10px，再压一档，避免描述抢走 Banner 视觉重心 */
	line-height: 1.5;
	color: #6b7280;
	margin: 8px 0 0;
	max-width: 60ch;
	
}

.io9-banner-desc p {
margin-bottom: 0px;
	
}

/* ---------- 2)+3) 工具分类 + 筛选 合并区块 ---------- */
.io9-filter-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.io9-filter-row--cats { margin-bottom: -8px; margin-top:0!important; }
.io9-filter-row--filters {
	padding-top: 10px;
	/* 显式 rgba，不用 var(--muted-color)（父主题 #93959a 在某些主题色下不显）。
	   0.1 比 0.06 更明显一档，确保浅色背景下也能看到分隔线。 */
	border-top: 1px solid rgba(0, 0, 0, 0.1);
	margin-bottom: -5px;
}
.io9-row-label {
	font-size: 0.8rem;
	color: #374151;
	margin-right: 2px;
	white-space: nowrap;
}

/* 子分类 chips（行高与筛选行 .io9-ms-display 的 min-height:30px 对齐） */
.io9-subcats { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.io9-chip {
	display: inline-flex; align-items: center;
	min-height: 22px;               /* 与筛选行高度一致 */
	box-sizing: border-box;
	padding: 0 0.75rem;
	font-size: 0.8rem;
	line-height: 1.2;
	color: #4b5563;
	background: #f3f4f6;
	border-radius: 10px;
	text-decoration: none;
	transition: background 0.2s, color 0.2s;
}
.io9-chip:hover { background: #e5e7eb; color: #374151; }
.io9-chip.active {
	background: var(--theme-color, #4f46e5);
	color: #fff;
}

/* 单选下拉（紧凑，参考 HTML multi-select）。
   box-sizing:border-box + 0 上下 padding，确保总高 = min-height = 30px，与 .io9-chip 一致。 */
.io9-mselect { position: relative; min-width: 132px; user-select: none; }
.io9-ms-display {
	display: flex; align-items: center; justify-content: space-between;
	box-sizing: border-box;
	padding: 0 0.55rem;
	border: 1px solid #e5e7eb;
	border-radius: 6px;
	background: #fff;
	cursor: pointer;
	font-size: 0.76rem;
	color: #1f2937;
	min-height: 30px;
	gap: 4px;
	transition: border-color 0.2s;
}
.io9-ms-display:hover { border-color: #9ca3af; }
/* 占位文字不截断：让"免费模式""国内可用性""适合谁"完整显示。
   关键：去掉 ellipsis 三件套，flex: 0 1 auto 让 placeholder 自动撑开（不强制占满）；
   selected 后 placeholder 仍占位（色变深），靠 .io9-mselect 整体宽度自适应。 */
.io9-ms-ph { color: #9ca3af; white-space: nowrap; overflow: visible; text-overflow: clip; flex: 0 1 auto; }
.io9-ms-display.has-value .io9-ms-ph { color: #1f2937; font-weight: 500; }
/* 关键词相关图标（替代纯朝下箭头） */
.io9-ms-display > i.io9-ms-ico { flex-shrink: 0; color: #9ca3af; font-size: 12px; margin-right: 2px; }
.io9-ms-display.has-value > i.io9-ms-ico { color: var(--theme-color, #4f46e5); }
.io9-ms-arrow { flex-shrink: 0; margin-left: 2px; color: #9ca3af; font-size: 10px; transition: transform 0.2s; }
.io9-mselect.open .io9-ms-arrow { transform: rotate(180deg); }
.io9-ms-panel {
	display: none;
	position: absolute; top: calc(100% + 2px); left: 0; right: 0;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 6px;
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
	padding: 4px 0;
	z-index: 60;
	max-height: 200px; overflow-y: auto; min-width: 140px;
}
.io9-mselect.open .io9-ms-panel { display: block; }
.io9-opt {
	padding: 0.25rem 0.7rem; cursor: pointer; font-size: 0.8rem; color: #1f2937;
	transition: background 0.15s; white-space: nowrap;
}
.io9-opt:hover { background: #f3f4f6; }
.io9-opt.selected { color: var(--theme-color, #4f46e5); font-weight: 600; }
.io9-opt--clear { color: #9ca3af; }

/* 右侧：搜索 + 排序 */
.io9-filter-right {
	display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
	margin-left: auto;
}
.io9-search {
	display: flex; align-items: center;
	border: 1px solid #e5e7eb; border-radius: 8px;
	padding: 0 8px; background: #fff; min-height: 30px;
	flex: 1; min-width: 0;
}
.io9-search i { color: #9ca3af; font-size: 12px; }
.io9-search input {
	border: 0; outline: 0; background: transparent;
	padding: 4px 6px; font-size: 0.78rem;  color: #1f2937;
}
.io9-sorts { display: flex; align-items: center; gap: 6px; }
.io9-sort-label { font-size: 0.8rem; font-weight: 600; color: #374151; }
.io9-sort {
	display: inline-flex; align-items: center; justify-content: center;
	padding: 0.2rem 0.7rem;
	border-radius: 999px;
	font-size: 0.78rem; line-height: 1;
	cursor: pointer;
	transition: all 0.2s;
	border: 1px solid transparent;
	background: #f3f4f6;
	color: #6b7280;
}
.io9-sort:hover { background: #e5e7eb; color: #374151; }
.io9-sort.active {
	background: var(--theme-color, #4f46e5);
	color: #fff;
	border-color: var(--theme-color, #4f46e5);
}

/* ---------- 区块标题 ---------- */
.io9-sec-title {
	display: flex; align-items: center;
	font-size: 1.2rem; font-weight: 700;
	margin: 0 0 12px;
	color: var(--main-color, #1f2937);
}
.io9-sec-bar {
	width: 4px; height: 18px; border-radius: 2px;
	background: var(--theme-color, #4f46e5);
	margin-right: 8px; flex: 0 0 auto;
}

/* ---------- 卡片网格 ---------- */
.io9-grid { display: grid; gap: 12px; }
.io9-grid--featured { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.io9-grid--all { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.io9-grid--other { grid-template-columns: repeat(6, minmax(0, 1fr)); }

.io9-tool-card {
	display: flex; flex-direction: column;
	background: var(--main-bg-color, #fff);
	border: 1px solid rgba(0, 0, 0, 0.06);          /* 不用 --muted-color（父主题 #93959a 在某些环境偏深） */
	border-radius: var(--io-radius);
	box-shadow: var(--io-shadow);
	padding: 12px 12px 5px 12px;
	overflow: hidden;
	transition: transform 0.25s, box-shadow 0.25s;
}
.io9-tool-card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px var(--main-shadow, rgba(0, 0, 0, 0.1)); }
/* 客户端筛选/分页隐藏（class 切换；避免 jQuery display tracking 在 fragment 重排后失效） */
.io9-tool-card.is-hidden { display: none; }

/* 头部：图标 + 名称（整体为详情页链接） */
.io9-tc-head { display: flex; align-items: center; gap: 8px; text-decoration: none; min-width: 0; }
.io9-tc-ico {
	width: 28px; height: 28px; flex: 0 0 28px;   /* 比参考略小，整卡更紧凑 */
	border-radius: 6px; overflow: hidden;
	background: #f3f4f6; display: flex; align-items: center; justify-content: center;
}
.io9-tc-ico img { width: 100%; height: 100%; object-fit: cover; display: block; }
.io9-tc-ico--letter {
	background: var(--theme-color, #4f46e5); color: #fff;
	font-size: 14px; font-weight: 700;
}
.io9-tc-title { display: flex; align-items: center; gap: 6px; min-width: 0; flex: 1; }
.io9-tc-name {
	font-size: 1rem; font-weight: 600; color: var(--main-color, #1f2937);
	margin: 0; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.io9-tc-featured {
	flex: 0 0 auto;
	font-size: 0.62rem; font-weight: 600;
	background: #fef3c7; color: #b45309;
	padding: 1px 6px; border-radius: 4px;
}

.io9-tc-desc {
	font-size: 0.8rem; line-height: 1.5; color: #6b7280;
	margin: 8px 0 8px;
	display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
	overflow: hidden; flex: 1 1 auto;
}

/* 标签行：国内可用性(前) + 特色徽章(后)，单行截断 */
.io9-tc-tags {
	display: flex; flex-wrap: nowrap; overflow: hidden; align-items: center;
	gap: 4px; margin-bottom: 8px;
}
.io9-tag {
	flex-shrink: 0; white-space: nowrap;
	max-width: 84px; overflow: hidden; 
	font-size: 0.7rem; line-height: 1.4;
	padding: 1px 7px; border-radius: 4px;
}
.io9-tag--avail { background: #eff6ff; color: #2563eb; }
.io9-tag--badge {
	background: color-mix(in srgb, var(--c, #4f46e5) 12%, #fff);
	color: var(--c, #4f46e5);
	border: 1px solid color-mix(in srgb, var(--c, #4f46e5) 35%, #fff);
}
.io9-tag--free { background: #ecfdf5; color: #059669; }

/* 底部：免费权益（左） + 直达（右） */
.io9-tc-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 1px; border-top: 1px solid rgba(0, 0, 0, 0.05);padding-top:5px}
.io9-tc-free { display: flex; flex-wrap: wrap; gap: 4px; min-width: 0; }
.io9-tc-free .io9-tag { max-width: 120px; }
.io9-tc-go {
	flex: 0 0 auto;
	width: 28px; height: 28px; border-radius: 3px;
	display: inline-flex; align-items: center; justify-content: center;

	text-decoration: none; transition: background 0.2s;
}
.io9-tc-go:hover { color:#98c2e2; }
.io9-tc-go i { font-size: 14px; }

/* ---------- 你可能还需要 ---------- */
.io9-grid--other { gap: 10px; }
.io9-other-card {
	display: flex; flex-direction: column; align-items: center; text-align: center;
	background: var(--main-bg-color, #fff);
	border: 1px solid rgba(0, 0, 0, 0.06);          /* 不用 --muted-color（父主题 #93959a 在某些环境偏深） */
	border-radius: var(--io-radius);
	box-shadow: var(--io-shadow);
	padding: 12px 8px; text-decoration: none;
	transition: transform 0.25s, box-shadow 0.25s;
}
.io9-other-card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px var(--main-shadow, rgba(0, 0, 0, 0.1)); }
.io9-other-ico {
	width: 40px; height: 40px; border-radius: 8px;
	display: flex; align-items: center; justify-content: center;
	background: #eef2ff; color: var(--theme-color, #4f46e5);
	margin-bottom: 6px; overflow: hidden;
}
.io9-other-ico img { width: 100%; height: 100%; object-fit: cover; }
.io9-other-ico i { font-size: 20px; }
.io9-other-name { font-size: 0.8rem; color: #374151; }

/* ---------- 分页 ---------- */
.io9-pager { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 16px; flex-wrap: wrap; }
.io9-pg {
	min-width: 32px; height: 32px; padding: 0 8px;
	border: 1px solid var(--muted-color, #e5e7eb); border-radius: 6px;
	background: var(--main-bg-color, #fff); color: #4b5563;
	font-size: 0.85rem; cursor: pointer; transition: all 0.2s;
}
.io9-pg:hover:not(:disabled) { border-color: var(--theme-color, #4f46e5); color: var(--theme-color, #4f46e5); }
.io9-pg.active { background: var(--theme-color, #4f46e5); border-color: var(--theme-color, #4f46e5); color: #fff; }
.io9-pg:disabled { opacity: 0.45; cursor: not-allowed; }
.io9-ellipsis { color: #9ca3af; padding: 0 2px; }

/* ---------- 响应式 ---------- */
@media (max-width: 1200px) {
	.io9-grid--all { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.io9-grid--other { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 992px) {
	.io9-grid--featured { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.io9-grid--all { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.io9-filter-right { margin-left: 0; width: 100%; justify-content: space-between; }
}
@media (max-width: 576px) {
	.io9-grid--featured,
	.io9-grid--all { grid-template-columns: repeat(1, minmax(0, 1fr)); }
	.io9-grid--other { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.io9-banner h1 { font-size: 1.1rem; }
}
