/* ==========================================================================
   PHP 站点专有样式（手写，非生成）
   作用：补上前端 Vue 版由「组件状态」控制的显示/隐藏行为
   生成型样式在 base.css / nav.css / footer.css / float.css / home.css /
   products.css / product.css / pages.css / videos.css 里，不要在这里重复写
   ========================================================================== */

/* ---- 顶部导航：产品下拉（前端由 JS 状态控制） ---- */
.nav .has-drop .dropdown { display: none; }
.nav .has-drop:hover .dropdown,
.nav .has-drop:focus-within .dropdown { display: block; }

/* ---- 移动端菜单：默认收起，仅 .menu-open 时展开 ---- */
.nav .mobile-menu { display: none; }
.nav.menu-open .mobile-menu { display: flex; }

/* ---- 浮动在线咨询：hover 或 .open 时展开 ---- */
.cf .cf-panel { display: none; }
.cf:hover .cf-panel,
.cf.open .cf-panel {
  display: block;
  animation: cf-panel-in 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes cf-panel-in {
  from { opacity: 0; transform: translateY(-50%) translateX(12px); }
  to   { opacity: 1; transform: translateY(-50%); }
}

/* ---- 首屏轮播：轨道位移由 site.js 设置内联 transform ---- */
.hero-carousel .track { will-change: transform; }

/* ---- 内容容器：无 JS 时的降级（不依赖 <noscript>） ---- */
.site-main { min-height: 60vh; }

/* ---- 联系页：服务端校验失败时的提示（前端版是 alert，PHP 版改为页内提示） ---- */
.form-error {
  background: #fdecef;
  border: 1px solid rgba(200, 16, 46, 0.28);
  color: var(--brand);
  font-size: 14px;
  padding: 10px 14px;
  border-radius: 6px;
  margin-bottom: 18px;
}

/* ---- 视频页：筛选后隐藏的卡片（用 hidden 属性，避免额外 class） ---- */
.vcard[hidden] { display: none; }

/* ---- 弹层：作者样式里的 display:flex 会盖掉 [hidden] 的 display:none，
       所以弹层必须显式补一条 [hidden] 规则，否则一进页面就全屏遮住 ---- */
.lightbox[hidden],
.mask[hidden] { display: none !important; }

/* ---- 产品详情图集：多个媒体项叠放在主图区，由 product.js 切换显示 ----
       直接让媒体项铺满，避免它作为 flex 子项参与尺寸计算导致图片被压扁 */
.page-product .main .media-item { position: absolute; inset: 0; }
.page-product .main .media-item[hidden] { display: none; }

/* ---- 404 页：pages.css 里的 .empty 是按各页面作用域生成的，404 用不到，这里补一份 ---- */
.page-404 .empty { text-align: center; color: var(--gray-light); padding: 60px 0; }

/* ==========================================================================
   站内搜索（/search）与 404 页的搜索入口
   2026-09-14 新增：原来 404 只有「返回首页」，客户从一个失效链接进来就只能关掉走人
   ========================================================================== */

.search-bar {
  display: flex;
  gap: 10px;
  max-width: 720px;
  margin: 0 auto 34px;
}
.search-bar input[type=search] {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  font-size: 15px;
  font-family: inherit;
  color: var(--ink);
  background: #fff;
  transition: border-color 0.2s;
}
.search-bar input[type=search]:focus { border-color: var(--brand); outline: none; }
.search-bar .btn { flex: none; }

.search-count { text-align: center; color: var(--gray); font-size: 14px; margin-bottom: 26px; }
.search-count b { color: var(--brand); font-size: 17px; }

/* 命中的系列 / 分类胶囊 */
.search-series, .cat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 34px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 15px;
  border: 1px solid var(--line);
  border-radius: 20px;
  font-size: 13.5px;
  color: var(--ink);
  background: #fff;
  transition: all 0.2s ease;
}
.chip:hover { border-color: var(--brand); color: var(--brand); transform: translateY(-1px); }
.chip .n {
  font-size: 11.5px;
  color: var(--brand);
  background: var(--brand-soft);
  border-radius: 10px;
  padding: 1px 7px;
  font-weight: 600;
}

.search-none { text-align: center; padding: 20px 0 10px; }
.search-none .hint { color: var(--gray); font-size: 14px; max-width: 560px; margin: 0 auto; }
.search-hot { margin-top: 10px; }
.search-hot > h3 { text-align: center; font-size: 20px; margin-bottom: 26px; }

/* 404：快捷入口 + 热门产品 */
.page-404 .quick-links {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 40px;
}
.page-404 .hot-title { text-align: center; font-size: 20px; margin: 0 0 24px; }
.page-404 .hot-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.page-404 .hot-card { display: block; overflow: hidden; }
.page-404 .hot-thumb {
  position: relative;
  aspect-ratio: 4 / 3;
  background: #fff;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.page-404 .hot-thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
.page-404 .hot-thumb .thumb { position: absolute; inset: 0; }
.page-404 .hot-body { padding: 16px 18px 20px; }
.page-404 .hot-body .model {
  display: inline-block;
  font-size: 12px;
  color: var(--brand);
  font-weight: 600;
  letter-spacing: 1px;
  margin-bottom: 6px;
}
.page-404 .hot-body h4 { font-size: 15.5px; }

@media (max-width: 900px) {
  .page-404 .hot-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .page-404 .hot-grid { grid-template-columns: 1fr; }
  .search-bar { flex-direction: column; }
}

/* ==========================================================================
   联系表单：蜜罐 / 必填标记 / 隐私声明
   ========================================================================== */

/* 蜜罐字段：真人看不见，但会被自动填表机器人填上 → 据此判定垃圾提交。
   用绝对定位移出视口而不是 display:none —— 后者部分机器人会跳过不填。 */
.hp-field {
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.page-contact .req { color: var(--brand); font-weight: 700; }
.page-contact .agree {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 12.5px;
  color: var(--gray);
  line-height: 1.65;
  margin: 4px 0 20px;
}
.page-contact .agree input { margin-top: 2px; width: 15px; height: 15px; accent-color: var(--brand); flex: none; }
.page-contact .form-tip { font-size: 12.5px; color: var(--gray-light); margin-top: 12px; }
.page-contact .info-item p a { color: var(--gray); }
.page-contact .info-item p a:hover { color: var(--brand); }

/* ---- 页脚：备案信息 + 可点联系方式 ---- */
.site-footer .contact-list a { color: inherit; }
.site-footer .contact-list a:hover { color: #fff; }
.site-footer .filing { display: inline-flex; align-items: center; gap: 8px; }
.site-footer .filing a:hover { color: #fff; }
.site-footer .filing i { font-style: normal; opacity: 0.5; }

/* ---- 文章正文排版（详情页复用，Frontend 走 v-html，PHP 直接输出 HTML） ---- */
.article-body { color: var(--ink); }
.article-body h2 { font-size: 22px; margin: 28px 0 12px; }
.article-body h3 { font-size: 18px; margin: 22px 0 10px; }
.article-body p  { color: var(--gray); margin-bottom: 14px; line-height: 1.9; }
.article-body ul, .article-body ol { margin: 0 0 16px 20px; }
.article-body ul li { list-style: disc; color: var(--gray); margin-bottom: 6px; }
.article-body ol li { list-style: decimal; color: var(--gray); margin-bottom: 6px; }
.article-body img { border-radius: var(--radius-sm); margin: 12px 0; }
.article-body a { color: var(--brand); text-decoration: underline; }
