/*
 * 前台定制样式（零侵入旁路：由 search-gateway 网关注入，不修改官方任何文件/镜像）。
 * 删除 nginx 里的 sub_filter 注入即完全恢复官方原样，官方升级不受影响。
 *
 * 作用：禁用前台深色/浅色（黑白）主题切换。
 *   - :has() 在现代浏览器首屏即隐藏切换按钮，避免闪现；
 *   - 不支持 :has() 的旧浏览器由 frontend.js 兜底隐藏。
 */

/* 1) 隐藏主题切换按钮（太阳 lucide-sun / 月亮 lucide-moon），无论它出现在顶部还是“更多”菜单里 */
button:has(svg.lucide-sun),
button:has(svg.lucide-moon),
[role="button"]:has(svg.lucide-sun),
[role="button"]:has(svg.lucide-moon) {
  display: none !important;
}

/* 1b) 隐藏简/繁/英语言切换按钮（地球 lucide-languages）；语言菜单由它触发，按钮隐藏后无法打开 */
button:has(svg.lucide-languages),
[role="button"]:has(svg.lucide-languages) {
  display: none !important;
}

/* 2) 锁定浅色：原生控件/滚动条按浅色呈现（页面配色由 frontend.js 在首绘前去 dark class 保证） */
html {
  color-scheme: light !important;
}

/* 3) 禁用独立“商品中心”入口：隐藏所有指向商品中心列表页的链接
   （顶部导航“商品中心/商品”、移动端底部导航“商品”、页脚“商品中心”、Banner 中“查看全部商品”链接等）。
   仅精确匹配列表路径；商品详情 /products/<slug> 不是该值，不受影响。
   纯 CSS 按 href 命中，官方 Vue 重新渲染/路由切换后依然生效；网关 302 与 home.js 点击拦截再作兜底。 */
a[href="/products"],
a[href="/products/"],
a[href^="/products?"] {
  display: none !important;
}
/* 页脚“商品中心”通常包在 <li> 里：连空列表项一起隐藏，避免留空行 */
footer li:has(> a[href="/products"]),
footer li:has(> a[href="/products/"]) {
  display: none !important;
}
