/* ==========================================================================
   兴发玻璃 - 新增组件样式
   在模板 style.css / common.css 之后加载，只负责模板里没有的组件，
   以及把模板的固定尺寸替换为可自适应的写法。
   ========================================================================== */

:root {
  --brand: #0e4295;
  --brand-dark: #0a3373;
  --text: #333;
  --text-light: #666;
  --text-muted: #999;
  --border: #ececec;
  --radius: 6px;
  --container: 1200px;
}

/* ---------- 文字 Logo（未上传 logo 图片时使用） ---------- */
.logo-text {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  padding: 4px 0;
}
.logo-text b {
  font-size: 30px;
  line-height: 1.1;
  color: var(--brand);
  letter-spacing: 2px;
  font-weight: 700;
}
.logo-text em {
  font-style: normal;
  font-size: 12px;
  color: #8a8f99;
  letter-spacing: 1px;
  margin-top: 4px;
}
.footer-logo-text {
  display: inline-block;
  margin-top: 16px;
  font-size: 26px;
  color: #fff;
  letter-spacing: 2px;
  opacity: 0.5;
}

/* ---------- 轮播文案 ---------- */
.banner__caption {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(1200px, 90vw);
  color: #fff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}
.banner__caption h1,
.banner__caption h2 {
  font-size: 44px;
  line-height: 1.25;
  font-weight: 700;
  /* h1/h2 自带 0.67em 上外边距，会把整块文字往下推、顶到轮播底边，这里显式归零 */
  margin: 0 0 12px;
  /* 手机端窄屏时让浏览器把两行长度分均匀，避免最后只剩一两个字 */
  text-wrap: balance;
}
.banner__caption p {
  font-size: 20px;
  opacity: 0.9;
}

/* ---------- 通用按钮 ---------- */
.btn-primary,
.btn-ghost {
  display: inline-block;
  padding: 0 26px;
  height: 44px;
  line-height: 42px;
  border-radius: var(--radius);
  font-size: 16px;
  border: 2px solid var(--brand);
  transition: all 0.25s ease;
  cursor: pointer;
  text-align: center;
}
.btn-primary {
  background: var(--brand);
  color: #fff;
}
.btn-primary:hover {
  background: var(--brand-dark);
  border-color: var(--brand-dark);
  color: #fff;
}
.btn-ghost {
  color: var(--brand);
  background: transparent;
}
.btn-ghost:hover {
  background: rgba(14, 66, 149, 0.06);
  color: var(--brand);
}
.btn-lg {
  height: 52px;
  line-height: 50px;
  padding: 0 44px;
  font-size: 18px;
}

/* ---------- 列表页补充 ---------- */
.cat-desc {
  color: var(--text-light);
  line-height: 26px;
  padding: 18px 0 0;
}
.empty-item {
  float: none !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 60px 0;
  text-align: center;
  color: var(--text-muted);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  list-style: none;
}
.empty-item a {
  color: var(--brand);
}
.page-lead {
  font-size: 17px;
  color: var(--brand);
  padding: 26px 0 0;
  text-align: center;
}
.article-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  padding: 10px 0 50px;
}

/* ---------- 分页补充 ---------- */
.pglist .is-disabled,
.pglist .page-dots {
  color: #bbb;
  cursor: default;
}
.pglist span.is-disabled {
  background: #fafafa;
  border-color: #f2f2f2;
  color: #bbb;
}

/* ---------- 留言表单 ---------- */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.alert {
  padding: 14px 18px;
  border-radius: var(--radius);
  margin: 0 0 24px;
  line-height: 24px;
  font-size: 15px;
}
.alert--success {
  background: #eef7ee;
  border: 1px solid #cfe8cf;
  color: #2f7a3d;
}
.alert--success a {
  color: var(--brand);
  margin-left: 10px;
}
.alert--error {
  background: #fdf1f1;
  border: 1px solid #f3d4d4;
  color: #c0392b;
}
.form-book {
  max-width: 1000px;
  margin: 0 auto;
  padding-bottom: 40px;
}
.form-row {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}
.form-row .form-item {
  flex: 1 1 320px;
}
.form-item {
  margin-bottom: 22px;
}
.form-item label {
  display: block;
  font-size: 15px;
  color: var(--text);
  margin-bottom: 8px;
}
.form-item label em {
  color: #d64545;
  font-style: normal;
  margin-left: 2px;
}
.form-item input[type='text'],
.form-item input[type='tel'],
.form-item textarea {
  width: 100%;
  border: 1px solid #dcdfe6;
  border-radius: var(--radius);
  padding: 12px 14px;
  font-size: 15px;
  color: var(--text);
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
  outline: none;
}
.form-item textarea {
  line-height: 1.7;
  resize: vertical;
  min-height: 150px;
}
.form-item input:focus,
.form-item textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(14, 66, 149, 0.1);
}
.form-item.has-error input,
.form-item.has-error textarea {
  border-color: #d64545;
}
.form-error {
  color: #d64545;
  font-size: 13px;
  margin-top: 6px;
}
.captcha-box {
  display: flex;
  gap: 12px;
  align-items: center;
}
.captcha-box input {
  flex: 1 1 auto;
  max-width: 220px;
}
.captcha-box img {
  height: 44px;
  width: 120px;
  border: 1px solid #dcdfe6;
  border-radius: var(--radius);
  cursor: pointer;
  display: block;
}
.form-row--submit {
  align-items: flex-end;
  justify-content: space-between;
}
.form-submit {
  padding-bottom: 22px;
}

/* ---------- 搜索页 ---------- */
.search-box {
  display: flex;
  gap: 12px;
  max-width: 720px;
  margin: 34px 0 10px;
}
.search-box input {
  flex: 1 1 auto;
  height: 48px;
  padding: 0 18px;
  border: 1px solid #dcdfe6;
  border-radius: var(--radius);
  font-size: 15px;
  outline: none;
  background: #fff;
}
.search-box input:focus {
  border-color: var(--brand);
}
.search-box .btn-primary {
  height: 48px;
  line-height: 46px;
  padding: 0 32px;
  flex: 0 0 auto;
}
.search-summary {
  color: var(--text-light);
  padding: 6px 0 18px;
}
.search-summary b {
  color: var(--brand);
}
.sitemap-wrap {
  padding: 30px 0 60px;
}

/* ---------- 联系我们 ---------- */
.contact-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  padding: 40px 0 10px;
}
.contact-card {
  background: #f7f8fa;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
  transition: all 0.25s ease;
}
.contact-card:hover {
  border-color: var(--brand);
  box-shadow: 0 6px 18px rgba(14, 66, 149, 0.08);
  transform: translateY(-2px);
}
.contact-card__ico {
  display: block;
  font-style: normal;
  font-size: 26px;
  color: var(--brand);
  margin-bottom: 10px;
}
.contact-card p {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 8px;
}
.contact-card a,
.contact-card span {
  display: block;
  color: var(--text);
  font-size: 17px;
  line-height: 1.5;
  word-break: break-all;
}
.contact-card a:hover {
  color: var(--brand);
}
.contact-main {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  padding: 40px 0 70px;
  align-items: start;
}
.contact-info h2 {
  font-size: 26px;
  color: var(--text);
  margin-bottom: 10px;
}
.contact-info__lead {
  color: var(--text-muted);
  margin-bottom: 18px;
}
.contact-list li {
  line-height: 32px;
  color: var(--text-light);
  border-bottom: 1px dashed var(--border);
}
.contact-list li:last-child {
  border-bottom: none;
}
.contact-info .context,
.contact-info p {
  line-height: 28px;
  color: var(--text-light);
}
.contact-actions {
  display: flex;
  gap: 14px;
  margin-top: 26px;
}
.contact-card .is-empty {
  color: #b8bec8;
  font-size: 15px;
}
.company-info {
  margin: 8px 0 20px;
  border-top: 1px solid var(--border);
}
.company-info li {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 15px;
  line-height: 1.7;
}
.company-info__k {
  flex: 0 0 108px;
  color: var(--text-muted);
}
.company-info__v {
  flex: 1;
  min-width: 0;
  color: var(--text);
  word-break: break-word;
  unicode-bidi: plaintext;
}
a.company-info__v:hover {
  color: var(--brand);
}
.company-info__v.is-empty {
  color: #b8bec8;
}
.company-info li.company-info__qr {
  align-items: center;
}
.company-info__qr img {
  width: 120px;
  height: 120px;
  padding: 6px;
  box-sizing: border-box;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
}
.company-info__qr .qr-empty {
  display: inline-flex;
  width: 120px;
  height: 120px;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--border);
  border-radius: 6px;
  color: #b8bec8;
  font-size: 13px;
}
.contact-map {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fafbfc;
}
.baidu-map {
  width: 100%;
  height: 420px;
}
.map-placeholder {
  height: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 30px;
  background: repeating-linear-gradient(45deg, #f7f8fa, #f7f8fa 12px, #f2f4f8 12px, #f2f4f8 24px);
}
.map-placeholder__pin {
  font-size: 44px;
  color: var(--brand);
  line-height: 1;
  margin-bottom: 16px;
}
.map-placeholder__addr {
  font-size: 17px;
  color: var(--text);
  margin-bottom: 10px;
}
.map-placeholder__tip {
  font-size: 13px;
  color: var(--text-muted);
  max-width: 380px;
  line-height: 1.7;
}

/* ---------- 404 ---------- */
.error-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 120px 20px 140px;
  text-align: center;
}
.error-page__code {
  font-size: 96px;
  line-height: 1;
  font-weight: 700;
  color: rgba(14, 66, 149, 0.12);
  letter-spacing: 4px;
}
.error-page__title {
  font-size: 24px;
  color: var(--text);
  margin: 18px 0 12px;
}
.error-page__tip {
  color: var(--text-muted);
  margin-bottom: 30px;
}
.error-page__actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- 移动端底部操作条（桌面隐藏） ---------- */
.m-bar {
  display: none;
}

/* ---------- 浮动客服侧边栏：链接按钮填满整块、颜色继承 ---------- */
.toolbar dd > a {
  display: block;
  width: 100%;
  height: 100%;
  color: #fff;
  text-decoration: none;
}

/* ---------- 列表页栏目条滚动容器 ---------- */
.sub_nav .fr ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 0;
}

/* ---------- 列表页分支内搜索框（产品/案例，位于标题与分类筛选之间） ---------- */
.sub_nav--search {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 20px;
  height: auto;
  line-height: 1.4;
}
.sub_nav--search .fl {
  flex: 0 0 auto;
}
.sub_nav--search .fr {
  flex: 0 1 auto;
  min-width: 0;
  margin-left: 0;
}
.sub_nav--search .sub-search {
  flex: 1 1 240px;
  min-width: 200px;
  max-width: 360px;
}
.sub-search form {
  position: relative;
  width: 100%;
}
.sub-search input {
  width: 100%;
  height: 38px;
  line-height: 38px;
  padding: 0 42px 0 16px;
  border: 1px solid #e2e5ea;
  border-radius: 19px;
  font-size: 13px;
  color: #333;
  background: #f7f8fa;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.sub-search input:focus {
  border-color: #0e4295;
  background: #fff;
}
.sub-search button {
  position: absolute;
  top: 0;
  right: 0;
  width: 40px;
  height: 38px;
  border: none;
  background: #0e4295;
  border-radius: 0 19px 19px 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}
.sub-search button:hover {
  background: #0a3373;
}
.sub-search button svg {
  width: 16px;
  height: 16px;
}

/* ---------- 移动端导航（桌面隐藏） ---------- */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 1px solid #e2e5ea;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  box-sizing: border-box;
}
.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--brand);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease;
}
body.nav-open .nav-toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
body.nav-open .nav-toggle span:nth-child(2) {
  opacity: 0;
}
body.nav-open .nav-toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: none;
}
.mobile-nav.is-open {
  display: block;
}
.mobile-nav__mask {
  position: absolute;
  inset: 0;
  background: rgba(12, 18, 28, 0.5);
  backdrop-filter: blur(2px);
}
.mobile-nav__panel {
  position: absolute;
  top: 0;
  left: 0;
  width: min(82vw, 340px);
  height: 100%;
  background: #fff;
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform 0.28s ease;
  overflow-y: auto;
}
.mobile-nav.is-open .mobile-nav__panel {
  transform: translateX(0);
}
.mobile-nav__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  font-size: 17px;
  font-weight: 700;
  color: var(--brand);
}
.mobile-nav__close {
  border: 0;
  background: none;
  font-size: 26px;
  line-height: 1;
  color: #888;
  cursor: pointer;
  padding: 0 4px;
}
.mobile-nav__list {
  flex: 1 1 auto;
}
.mobile-nav__list > li {
  border-bottom: 1px solid #f2f4f7;
}
.mobile-nav__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.mobile-nav__row > a {
  flex: 1 1 auto;
  padding: 15px 18px;
  font-size: 16px;
  color: var(--text);
}
.mobile-nav__row > a.is-active {
  color: var(--brand);
  font-weight: 700;
}
.mobile-nav__toggle {
  position: relative;
  width: 52px;
  height: 50px;
  border: 0;
  background: none;
  cursor: pointer;
}
.mobile-nav__toggle::before,
.mobile-nav__toggle::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 1.5px;
  background: #9aa1ad;
  transition: transform 0.25s ease;
}
.mobile-nav__toggle::before {
  transform: translate(-50%, -50%) rotate(0deg) translateY(0);
}
.mobile-nav__toggle::after {
  transform: translate(-50%, -50%) rotate(90deg);
}
.mobile-nav__toggle[aria-expanded='true']::after {
  transform: translate(-50%, -50%) rotate(0deg);
}
.mobile-nav__sub {
  display: none;
  padding: 0 18px 12px;
  background: #fafbfc;
}
.mobile-nav__sub.is-open {
  display: block;
}
.mobile-nav__sub li a {
  display: block;
  padding: 11px 0 11px 14px;
  font-size: 14px;
  color: var(--text-light);
  border-bottom: 1px dashed #eceef2;
}
.mobile-nav__sub li:last-child a {
  border-bottom: none;
}
.mobile-nav__foot {
  padding: 18px;
  border-top: 1px solid var(--border);
}
.mobile-nav__tel {
  display: block;
  text-align: center;
  padding: 13px 0;
  border-radius: 6px;
  background: var(--brand);
  color: #fff;
  font-size: 16px;
}
body.nav-open {
  overflow: hidden;
}

/* ---------- 模板细节修正 ---------- */

/* 页尾链接在深色背景上的对比度 */
.bottom_main .bott_nav .right a,
.bottom_main .txt .box3 a,
.bottom_main .txt .box2 a {
  color: #999;
}
.bottom_main .bott_nav .right a:hover,
.bottom_main .txt .box3 a:hover,
.bottom_main .txt .box2 a:hover {
  color: #fff;
}

/* 列表卡片标题更清晰 */
.case li .p p {
  color: #222;
  font-weight: 600;
}
.case li .p span.left {
  color: #8a8f99;
}
.case li:hover .p p {
  color: var(--brand);
}

/* 产品详情：右侧信息区不再被固定高度撑出大片空白 */
.showPro .showimgCon .txtcon {
  min-height: 260px;
  height: auto;
}
.showPro .showimgCon .txtcon .txt .item {
  max-height: none;
  line-height: 1.9;
}

/* 详情页返回按钮组间距 */
.article-actions .btn-ghost,
.article-actions .btn-primary {
  min-width: 132px;
}

/* 首页 HOT 搜索词排版 */
.search .hot .left a {
  white-space: nowrap;
}

/* 搜索框与热搜词布局修正（各语言通用，避免重叠与按钮溢出）
   问题1：模板 .search .hot .right .input 用 height:20px + padding:9px 撑高，
   但浏览器对 input[type=search] 默认 box-sizing:border-box，导致总高被压成 20px，
   而 38px 高的搜索按钮溢出输入框。此处显式设高度与盒模型。
   问题2：搜索框的 input/btn 均为绝对定位，.right 容器宽度为 0，float 不占位，
   热搜词（尤其英文较长）会延伸到搜索框下方重叠。给 .right 设宽度占位，
   热搜词 .left 限制最大宽度，超宽自动换行，与搜索框互不遮挡。 */
.search .hot {
  height: auto;
  min-height: 40px;
}
.search .hot .right {
  width: 278px;
  height: 38px;
}
.search .hot .right .input {
  box-sizing: border-box;
  width: 100%;
  height: 38px;
  line-height: 38px;
  padding: 0 46px 0 20px;
}
.search .hot .right .btn {
  top: 0;
  right: 8px;
}
.search .hot .left {
  display: block;
  overflow: hidden;
  max-width: calc(100% - 300px);
  white-space: normal;
  line-height: 30px;
  padding: 4px 0;
}

/* 移动端联系标题字号 */
@media screen and (max-width: 768px) {
  .contact .box3 h1 {
    font-size: 24px;
  }
  .contact .box3 p {
    font-size: 14px;
    padding-bottom: 24px;
  }
  .search .hot .left {
    line-height: 2.1;
    font-size: 13px;
  }
  .search .hot .left a {
    padding: 0 6px;
    font-size: 13px;
  }
}

/* 移动端产品详情：静态大图（桌面端隐藏） */
.showimg-static {
  display: none;
}
.showimg-static img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 6px;
  border: 1px solid #e6e9f0;
}

/* ---------- 移动端抽屉：语言切换 ---------- */
.mobile-lang {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
}
.mobile-lang__item {
  flex: 1 1 0;
  padding: 8px 0;
  text-align: center;
  border: 1px solid #e2e6ee;
  border-radius: 5px;
  font-size: 13px;
  color: var(--text-light);
}
.mobile-lang__item.is-on {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
  font-weight: 600;
}

/* 修正：模板全局 a 颜色覆盖了抽屉底部电话按钮的白字 */
.mobile-nav__foot .mobile-nav__tel,
.mobile-nav__foot a.mobile-nav__tel {
  color: #fff !important;
}
