/*
Theme Name: 千椅新生官网主题
Theme URI: https://1000rechairs.com
Author: 千椅新生
Description: 千椅新生（1000Rechairs）官方主题。深色工业风，响应式，内置服务/案例/动态/问答内容类型与 SEO 结构化数据。
Version: 1.1.0
License: GNU General Public License v2 or later
Text Domain: qianyi-seo
*/

/* ============ 以下为原站样式的补充与移动端修正 ============ */
/* 原站缺失 viewport 声明导致移动端缩放异常，此处做兜底修正 */

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  overflow-x: hidden;
  word-break: break-word;
}

img {
  max-width: 100%;
  height: auto;
}

/* 移动端导航兜底 */
@media (max-width: 768px) {
  .desktop-nav {
    display: none !important;
  }
  .mobile-cta {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 60;
    display: flex !important;
    /* iPhone 底部安全区（home indicator），viewport-fit=cover 下必须补 */
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  body {
    padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px));
  }
  /* 回到顶部按钮避开底部联系条 + 安全区 */
  #qy-back-to-top {
    bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px));
  }

  /* ---- 移动端点击区放大（iOS HIG 建议 ≥44px） ---- */
  /* 页脚链接：原来只有 24px 高，手指容易点偏 */
  footer ul a {
    display: flex;
    align-items: center;
    min-height: 44px;
  }
  /* 放大后收紧列表间距，避免页脚被拉得过长 */
  footer ul.flex-col,
  footer ul.grid {
    gap: 0;
    row-gap: 0;
  }
  /* 页脚品牌栏的电话 / 邮箱 / 地址 */
  footer .space-y-3 > a,
  footer .space-y-3 > p {
    display: flex;
    align-items: center;
    min-height: 44px;
  }
  footer .space-y-3 { gap: 0; }

  /* 面包屑：原来 16-21px 高 */
  .qy-crumb ol { gap: 2px; }
  .qy-crumb a,
  .qy-crumb li > span {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
  }
}

@media (min-width: 769px) {
  .mobile-cta {
    display: none !important;
  }
}

/* 移动端底部快捷联系条 */
.mobile-cta {
  background: #1a1d21;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.mobile-cta a {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 14px 8px;
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}
.mobile-cta a:first-child {
  border-right: 1px solid rgba(255, 255, 255, 0.12);
}

/* 图片懒加载占位 */
img[loading="lazy"] {
  background-color: #24282d;
}

/* 面包屑导航 */
.qy-crumb {
  margin-bottom: 28px;
}
.qy-crumb ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
}
.qy-crumb li + li::before {
  content: "/";
  margin-right: 8px;
  opacity: 0.4;
}
.qy-crumb a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
}
.qy-crumb a:hover {
  color: #c9a227;
}
.qy-crumb li:last-child span {
  color: #c9a227;
}

/* 折叠问答 */
details > summary::-webkit-details-marker {
  display: none;
}
details[open] > summary {
  border-color: #c9a227;
}

/* 正文排版（专题页用） */
.prose-wrap h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  margin: 2rem 0 1rem;
}
.prose-wrap h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  margin: 1.5rem 0 0.75rem;
}
.prose-wrap p {
  margin-bottom: 1rem;
}
.prose-wrap ul {
  margin: 0 0 1rem 1.25rem;
  list-style: disc;
}
.prose-wrap a {
  color: #c9a227;
  text-decoration: underline;
}

/* 无障碍：焦点可见 */
a:focus-visible,
button:focus-visible {
  outline: 2px solid #c9a227;
  outline-offset: 2px;
}

/* 打印样式 */
@media print {
  .mobile-cta,
  .desktop-nav,
  footer form {
    display: none !important;
  }
}

/* ============================================================
   通用组件补充（首页内联样式之外的页面也需使用）
   ============================================================ */

/* 幽灵边框卡片：与首页 .ghost-border 保持一致 */
.ghost-border { border: 1px solid #E2E8F0; }

/* 内联 SVG 图标 */
.qy-icon { display: inline-block; vertical-align: middle; flex: none; }

/* 正文排版：地域落地页等使用 the_content() 的页面 */
.prose-content h2 {
  font-size: 1.25rem; font-weight: 600; color: #0F172A;
  margin: 1.8em 0 .6em; line-height: 1.4;
}
.prose-content h3 {
  font-size: 1.05rem; font-weight: 600; color: #0F172A;
  margin: 1.4em 0 .5em; line-height: 1.5;
}
.prose-content p { margin-bottom: 1em; }
.prose-content strong { font-weight: 600; color: #0F172A; }
.prose-content a { color: #257878; text-decoration: underline; }
.prose-content ul { margin: 0 0 1em 1.2em; list-style: disc; }
.prose-content li { margin-bottom: .4em; }

/* 无障碍：跳转到主要内容 */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: #0F172A; color: #fff; padding: 10px 18px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* 问答折叠：去掉默认三角 */
details > summary::-webkit-details-marker { display: none; }

/* WordPress 内置无障碍类 */
.screen-reader-text {
  position: absolute !important; width: 1px; height: 1px;
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}

/* ============================================================
   首页 · 公司动态 / 常见问题 区块
   ============================================================ */

/* FAQ 折叠面板：展开时图标 + 变 ×（material-symbols 靠文字映射，需隐藏原字再用伪元素） */
details > summary { list-style: none; }
details > summary::-webkit-details-marker { display: none; }
details[open] > summary { border-bottom: 1px solid #eef2f7; }
details[open] .qy-faq-icon { font-size: 0; line-height: 1; }
details[open] .qy-faq-icon::before {
  content: "remove"; font-size: 24px; font-family: "Material Symbols Outlined";
}

/* FAQ 答案正文（qy_md_lite 输出） */
.qy-faq-body p { margin-bottom: .7em; line-height: 1.8; }
.qy-faq-body p:last-child { margin-bottom: 0; }
.qy-faq-body strong { color: #0f172a; font-weight: 600; }
.qy-faq-body ul.qy-faq-list {
  margin: .3em 0 .7em 1.1em; list-style: disc; line-height: 1.9;
}
.qy-faq-body ul.qy-faq-list li { margin-bottom: .3em; }
.qy-faq-body ul.qy-faq-list strong { color: #0f172a; font-weight: 600; }

/* ============================================================
   FAQ 答案内的小标题
   Tailwind preflight 会把 h1-h6 重置为「继承字号与字重」，
   若不显式还原，FAQ 答案里的分节标题会与普通段落完全一样，
   失去层级感、可读性差。
   ============================================================ */
.qy-faq-h4 {
  font-size: 1rem;
  line-height: 1.5;
  font-weight: 700;
  color: #0f172a;
  margin: 1.25em 0 0.5em;
}
.qy-faq-body > .qy-faq-h4:first-child,
.qy-faq-body > h4:first-child,
.qy-faq-body > h5:first-child {
  margin-top: 0;
}

/* ============================================================
   关键词自动内链 · 兜底样式
   正文内由 .prose-content a 控制；此处覆盖正文容器之外的场景
   （如 FAQ 答案、自定义区块），确保内链始终可见可点。
   ============================================================ */
.qy-interlink {
  color: #257878;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
.qy-interlink:hover {
  color: #1c5f5f;
}

/* 页脚辅助小字 */
.font-body-sm {
  font-family: 'Hanken Grotesk', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-size: 14px;
  line-height: 20px;
}

/* 新闻卡 line-clamp 兜底（Tailwind 3.3+ 已内置，此处仅保险） */
.line-clamp-2 {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.line-clamp-3 {
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ============================================================
   首页 · 库存覆盖品牌 · 横向无缝滚动
   ============================================================ */

.brand-marquee {
  position: relative;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent, black 6%, black 94%, transparent);
          mask-image: linear-gradient(to right, transparent, black 6%, black 94%, transparent);
}
.brand-marquee-track {
  display: flex;
  gap: 1.5rem;
  width: -webkit-max-content;
  width: -moz-max-content;
  width: max-content;
  animation: brand-marquee-scroll 45s linear infinite;
}
.brand-marquee:hover .brand-marquee-track,
.brand-marquee:focus-within .brand-marquee-track {
  animation-play-state: paused;
}
/* 统一尺寸卡片 —— 所有 logo 视觉面积一致，不变形 */
.brand-marquee-item {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16rem;
  height: 6.5rem;
  border-radius: 0.75rem;
  background-color: #ffffff;
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.04), 0 1px 2px -1px rgb(0 0 0 / 0.04);
  filter: grayscale(100%) opacity(0.55);
  transition: filter .4s ease, transform .4s ease, box-shadow .4s ease;
}
.brand-marquee-item:hover,
.brand-marquee a:hover .brand-marquee-item,
.brand-marquee a:focus-visible .brand-marquee-item {
  filter: grayscale(0%) opacity(1);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px -2px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.06);
}
.brand-marquee a {
  display: block;
  text-decoration: none;
  outline: none;
}
.brand-marquee a:focus-visible {
  outline: 2px solid #eab308;
  outline-offset: 2px;
  border-radius: 0.75rem;
}
.brand-marquee-item img {
  max-width: 90%;
  max-height: 85%;
  width: auto;
  height: auto;
  -o-object-fit: contain;
     object-fit: contain;
}
@keyframes brand-marquee-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .brand-marquee-track { animation: none; }
}
/* 移动端适配 */
@media (max-width: 640px) {
  .brand-marquee-item {
    width: 11rem;
    height: 4.5rem;
    border-radius: 0.5rem;
  }
  .brand-marquee-track {
    gap: 1rem;
  }
}

/* ============================================================
   列表分页（新闻 / 案例）
   ============================================================ */
.qy-pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
}
.qy-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.75rem;
  height: 2.75rem;
  padding: 0 0.875rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: #475569;
  text-decoration: none;
  transition: all 0.2s;
}
.qy-pagination .page-numbers:hover {
  border-color: #eab308;
  color: #eab308;
}
.qy-pagination .page-numbers.current {
  background: #eab308;
  border-color: #eab308;
  color: #000;
  cursor: default;
}
.qy-pagination .page-numbers.prev,
.qy-pagination .page-numbers.next {
  font-weight: 500;
  padding: 0 1.25rem;
}
.qy-pagination .page-numbers.dots {
  border: none;
  color: #94a3b8;
  cursor: default;
}
@media (min-width: 768px) {
  .qy-pagination .page-numbers {
    min-width: 3rem;
    height: 3rem;
    font-size: 1.05rem;
  }
}
