/* shared-site.css - 全站通用交互/优化样式 */

/* 0) 全局 reset + 防溢出 */
* {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
html, body { overflow-x: hidden; }
img { max-width: 100%; height: auto; }
h1, h2, h3, h4 { word-wrap: break-word; }

/* 1) 滚动淡入动画 - 只对产品卡片生效，避免整页闪烁 */
.fx {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .6s cubic-bezier(.22,.61,.36,1), transform .6s cubic-bezier(.22,.61,.36,1);
  will-change: transform, opacity;
}
.fx-on {
  opacity: 1;
  transform: translateY(0);
}
/* 首屏不做动画 */
.hero, .hero.fx, .hero.fx-on,
section:first-of-type, section:first-of-type.fx {
  opacity: 1 !important;
  transform: none !important;
}
/* 整个 section 不做淡入动画（避免闪烁） */
section.fx {
  opacity: 1;
  transform: none;
}

/* 2) 详情页画廊激活态 */
.thumb-active {
  outline: 2px solid currentColor;
  outline-offset: 2px;
  opacity: 1 !important;
  transform: scale(1.02);
}

/* 3) Toast 提示 */
.site-toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(40px);
  padding: 14px 28px;
  background: rgba(20, 20, 20, 0.95);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 1px;
  border-radius: 6px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(16px);
  opacity: 0;
  transition: all .4s cubic-bezier(.22, .61, .36, 1);
  z-index: 9999;
  max-width: 90vw;
  text-align: center;
  pointer-events: none;
}
.site-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.site-toast.success {
  background: rgba(4, 106, 56, 0.95);
  border-left: 4px solid #5BC486;
}
.site-toast.warn {
  background: rgba(180, 50, 50, 0.95);
  border-left: 4px solid #FF6B6B;
}

/* 4) 返回顶部 */
.scroll-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  box-sizing: border-box;
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  border: none;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  font-size: 18px;
  font-weight: 900;
  font-family: inherit;
  cursor: pointer;
  border-radius: 50%;
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transform: translateY(20px);
  transition: all .3s ease;
  z-index: 99;
  pointer-events: none;
  overflow: hidden;
}
.scroll-top.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.scroll-top:hover {
  background: rgba(0, 0, 0, 0.9);
  transform: translateY(-2px);
}

/* 5) 全站通知条 */
.site-notice {
  background: linear-gradient(90deg, #8B0000 0%, #C41E3A 50%, #8B0000 100%);
  color: #fff;
  font-size: 14px;
  letter-spacing: 1.2px;
  text-align: center;
  padding: 10px 20px;
  position: relative;
  z-index: 200;
  box-shadow: 0 2px 12px rgba(0,0,0,.15);
  border-bottom: 1px solid rgba(255,255,255,.15);
  animation: noticeSlide .6s cubic-bezier(.22,.61,.36,1);
}
/* 确保 sticky header 在通知条下面 */
header[class*="site-header"], header[class*="head"], header[class*="topnav"],
.site-header, .masthead, .gfh, .head, .topnav, .hbbh, .bph, .ppfh, .hdr, .jfh {
  z-index: 50 !important;
}
@keyframes noticeSlide {
  from { transform: translateY(-100%); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
.site-notice b { color: #FFD700; font-weight: 700; }
.site-notice .notice-icon {
  display: inline-block;
  margin-right: 8px;
  color: #FFD700;
  animation: pulse 2s infinite;
}
.site-notice .notice-link {
  color: #FFD700;
  font-weight: 700;
  text-decoration: none;
  margin: 0 8px;
  padding: 4px 10px;
  background: rgba(255,215,0,.12);
  border-radius: 20px;
  transition: all .2s ease;
  display: inline-block;
}
.site-notice .notice-link:hover {
  background: #FFD700;
  color: #8B0000;
  transform: translateY(-1px);
}
.site-notice-inner {
  max-width: 1400px;
  margin: 0 auto;
  line-height: 1.6;
}
@keyframes pulse { 50% { opacity: .3; } }

/* 7) 右侧常驻微信二维码面板（全站可见，无需点击） */
.wx-rail {
  position: fixed;
  top: 50%;
  right: 20px;
  transform: translateY(-50%);
  z-index: 100;
}
.wx-rail-card {
  width: 232px;
  padding: 14px 8px 14px;
  background: #fff;
  border: 1px solid #ececec;
  border-radius: 14px;
  box-shadow: 0 18px 50px rgba(0,0,0,.15), 0 4px 12px rgba(0,0,0,.06);
  text-align: center;
  position: relative;
  animation: wxRailIn .5s cubic-bezier(.22,.61,.36,1);
}
@keyframes wxRailIn {
  from { opacity: 0; transform: translateX(30px); }
  to   { opacity: 1; transform: translateX(0); }
}
.wx-rail-close {
  position: absolute;
  top: 4px;
  right: 6px;
  width: 22px;
  height: 22px;
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  color: #bbb;
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  border-radius: 50%;
  transition: background .2s ease, color .2s ease;
  line-height: 1;
}
.wx-rail-close:hover { background: #f3f3f3; color: #333; }
.wx-rail-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: #07c160;
  letter-spacing: 2px;
  margin-bottom: 10px;
  padding: 5px 12px;
  background: rgba(7,193,96,.08);
  border-radius: 20px;
}
.wx-rail-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #07c160;
  box-shadow: 0 0 0 0 rgba(7,193,96,.6);
  animation: wxPulse 1.8s infinite;
}
@keyframes wxPulse {
  0%   { box-shadow: 0 0 0 0 rgba(7,193,96,.5); }
  70%  { box-shadow: 0 0 0 8px rgba(7,193,96,0); }
  100% { box-shadow: 0 0 0 0 rgba(7,193,96,0); }
}
.wx-rail-qr {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
  border: none;
  cursor: zoom-in;
  transition: transform .25s ease;
}
.wx-rail-qr:hover { transform: scale(1.02); }
.wx-rail-nick {
  font-size: 15px;
  font-weight: 700;
  color: #111;
  margin-top: 12px;
  letter-spacing: .5px;
}
.wx-rail-id {
  font-size: 13px;
  color: #666;
  margin-top: 4px;
  letter-spacing: .3px;
}
.wx-rail-id b { color: #07c160; font-weight: 700; letter-spacing: 1px; }
.wx-rail-tip {
  display: none;
}

/* 收起状态：变成一个小按钮（上下排列：添加 / 微信）*/
.wx-rail-mini {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  padding: 8px 16px;
  background: linear-gradient(135deg, #07c160 0%, #05a050 100%);
  color: #fff;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  line-height: 1.25;
  border: none;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  border-radius: 999px;
  box-shadow: 0 8px 18px rgba(7,193,96,.3);
  cursor: pointer;
  transition: transform .25s ease, box-shadow .25s ease;
  white-space: nowrap;
}
.wx-rail-mini span {
  display: block;
  margin: 0;
  padding: 0;
}
.wx-rail-mini:hover {
  transform: translateX(-3px);
  box-shadow: 0 12px 30px rgba(7,193,96,.5);
}
.wx-rail.collapsed .wx-rail-card { display: none; }
.wx-rail.collapsed .wx-rail-mini { display: inline-flex; }

/* 扫码加微信（contact 页 section） */
.wx-scan {
  padding: 60px 20px;
  background: #f7f7f7;
  border-top: 1px solid #ececec;
}
.wx-scan-wrap {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}
.wx-scan-kicker {
  font-size: 12px;
  letter-spacing: 3px;
  color: #999;
  margin-bottom: 10px;
  font-weight: 700;
}
.wx-scan-title {
  font-size: 28px;
  font-weight: 800;
  color: #1a1a1a;
  margin: 0 0 8px 0;
  letter-spacing: 1px;
}
.wx-scan-desc {
  font-size: 14px;
  color: #666;
  margin: 0 0 28px 0;
  line-height: 1.7;
}
.wx-scan-card {
  display: inline-block;
  padding: 28px 32px 22px;
  background: #fff;
  border: 1px solid #ececec;
  border-radius: 14px;
  box-shadow: 0 14px 40px rgba(0,0,0,.06);
  text-align: center;
}
.wx-scan-card .wx-pop-head {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: flex-start;
  margin-bottom: 18px;
}
.wx-scan-card .wx-avatar {
  width: 42px;
  height: 42px;
  border-radius: 7px;
  background: radial-gradient(circle at 50% 30%, #e6f4ff 0%, #72c6ff 45%, #0073d6 100%);
  flex: none;
  box-shadow: inset 0 -6px 12px rgba(0,0,0,.08);
}
.wx-scan-card .wx-info { text-align: left; line-height: 1.3; }
.wx-scan-card .wx-nick {
  font-size: 16px;
  font-weight: 700;
  color: #111;
  letter-spacing: .5px;
}
.wx-scan-card .wx-id {
  font-size: 12px;
  color: #888;
  margin-top: 3px;
  letter-spacing: .5px;
}
.wx-scan-card .wx-qr {
  display: block;
  width: 300px;
  height: 300px;
  object-fit: contain;
  margin: 0 auto;
  border-radius: 6px;
  border: 1px solid #f0f0f0;
  cursor: zoom-in;
  transition: transform .25s ease;
}
.wx-scan-card .wx-qr:hover { transform: scale(1.02); }
.wx-scan-card .wx-tip {
  font-size: 12px;
  color: #999;
  text-align: center;
  margin-top: 14px;
  letter-spacing: .3px;
}

/* 6) 移动端适配 */
@media (max-width: 1100px) {
  .wx-rail-card { width: 220px; padding: 14px; }
}
@media (max-width: 900px) {
  .wx-rail { top: auto; bottom: 20px; right: 16px; transform: none; }
  .wx-rail-card { width: 200px; padding: 12px; }
  .wx-rail-title { font-size: 12px; letter-spacing: 1px; padding: 4px 10px; }
  .wx-rail-nick { font-size: 14px; margin-top: 10px; }
  .wx-rail-id { font-size: 12px; }
  .wx-rail-tip { display: none; }
}
@media (max-width: 600px) {
  .scroll-top { width: 40px; height: 40px; font-size: 16px; bottom: 20px; right: 18px; }
  .site-toast { bottom: 20px; font-size: 13px; padding: 12px 22px; }
  .site-notice { font-size: 12px; padding: 8px 10px; letter-spacing: .5px; }
  .site-notice .notice-link { display: block; margin: 6px auto 0; width: fit-content; }
  .wx-rail { bottom: 18px; right: 14px; }
  .wx-rail-card { width: 180px; padding: 10px; }
  .wx-rail-title { font-size: 11px; }
  .wx-rail-nick { font-size: 13px; margin-top: 8px; }
  .wx-rail-id { font-size: 11px; }
  .wx-scan { padding: 44px 16px; }
  .wx-scan-title { font-size: 22px; }
  .wx-scan-card { padding: 22px 22px 18px; }
  .wx-scan-card .wx-qr { width: 240px; height: 240px; }
}

/* 8) 二维码放大浮层（lightbox） */
.wx-lightbox {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(10, 12, 16, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease;
  z-index: 9998;
}
.wx-lightbox.show { opacity: 1; visibility: visible; }
.wx-lightbox-card {
  position: relative;
  max-width: 420px;
  width: 100%;
  padding: 26px 14px 22px;
  background: #fff;
  border-radius: 16px;
  text-align: center;
  box-shadow: 0 30px 80px rgba(0,0,0,.4);
  transform: scale(.92);
  transition: transform .28s cubic-bezier(.22,.61,.36,1);
}
.wx-lightbox.show .wx-lightbox-card { transform: scale(1); }
.wx-lightbox-close {
  position: fixed;
  top: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  border: none;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255,255,255,.12);
  color: #fff;
  font-size: 20px;
  font-family: inherit;
  cursor: pointer;
  border-radius: 50%;
  transition: background .2s ease, transform .2s ease;
  z-index: 9999;
}
.wx-lightbox-close:hover {
  background: rgba(255,255,255,.22);
  transform: rotate(90deg);
}
.wx-lightbox-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #07c160;
  letter-spacing: 3px;
  margin-bottom: 14px;
  padding: 6px 14px;
  background: rgba(7,193,96,.08);
  border-radius: 20px;
}
.wx-lightbox-qr {
  display: block;
  width: 100%;
  max-width: 320px;
  height: auto;
  margin: 0 auto;
  border-radius: 8px;
  border: none;
}
.wx-lightbox-nick {
  font-size: 20px;
  font-weight: 800;
  color: #111;
  margin-top: 18px;
  letter-spacing: 1px;
}
.wx-lightbox-id {
  font-size: 15px;
  color: #555;
  margin-top: 6px;
  letter-spacing: .5px;
}
.wx-lightbox-id b { color: #07c160; font-weight: 800; letter-spacing: 2px; font-size: 17px; }
.wx-lightbox-tip {
  display: none;
}

@media (max-width: 600px) {
  .wx-lightbox-card { padding: 24px 20px 20px; }
  .wx-lightbox-qr { max-width: 300px; }
  .wx-lightbox-nick { font-size: 18px; margin-top: 14px; }
  .wx-lightbox-id { font-size: 14px; }
  .wx-lightbox-close { top: 16px; right: 16px; width: 40px; height: 40px; font-size: 18px; }
}

/* 9) 移动端汉堡菜单（所有厂共用） */
.js-mnav-toggle {
  display: none;
  position: fixed;
  top: 14px;
  right: 14px;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  margin: 0;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  border: none;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(0,0,0,.78);
  color: #fff;
  font-family: inherit;
  cursor: pointer;
  border-radius: 10px;
  box-shadow: 0 6px 16px rgba(0,0,0,.25);
  z-index: 200;
  transition: background .2s ease, transform .2s ease;
}
.js-mnav-toggle:hover { background: rgba(0,0,0,.9); }
.js-mnav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform .25s ease, opacity .25s ease;
}
.js-mnav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.js-mnav-toggle.is-open span:nth-child(2) { opacity: 0; }
.js-mnav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.js-mnav-drawer {
  position: fixed;
  inset: 0;
  background: rgba(12,12,16,.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s ease, visibility .3s ease;
  z-index: 190;
  padding: 80px 24px 40px;
  overflow-y: auto;
}
body.mnav-open .js-mnav-drawer {
  opacity: 1;
  visibility: visible;
}
.js-mnav-drawer-inner {
  max-width: 480px;
  margin: 0 auto;
}
.js-mnav-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.js-mnav-list a {
  display: block;
  padding: 18px 4px;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 2px;
  color: rgba(255,255,255,.88);
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,.1);
  transition: color .2s ease, padding-left .2s ease;
}
.js-mnav-list a:hover,
.js-mnav-list a.on {
  color: #FFD27F;
  padding-left: 12px;
}
body.mnav-open { overflow: hidden; }

@media (max-width: 900px) {
  .js-mnav-toggle { display: flex; }
  /* 防止在导航被 display:none 的移动端，汉堡按钮与 header 内 logo 重叠 */
  body.mnav-open header { z-index: 100 !important; }
}
