/* ==========================================================
   惠隆包装 · 留言表单 / 社交联系方式 / 移动端悬浮咨询
   ========================================================== */

/* ---------------- 表单容器 ---------------- */
.cf-wrap {
  display: grid; grid-template-columns: 1.35fr .85fr; gap: 22px;
  align-items: start; margin-top: 26px;
}
.cf-panel {
  background: var(--white, #fff); border: 1px solid var(--line, #e6e8eb);
  border-radius: 16px; padding: 30px 32px; box-shadow: 0 10px 30px rgba(15, 18, 22, .07);
}
.cf-head h3 { font-size: 19px; font-weight: 800; margin: 0 0 6px; letter-spacing: .5px; }
.cf-head p { font-size: 13.5px; color: var(--muted, #6b7280); margin: 0 0 22px; }

/* ---------------- 表单字段 ---------------- */
.cf-form .form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px 16px; }
.cf-form .form-grid .full { grid-column: 1 / -1; }
.cf-field { position: relative; min-width: 0; }
.cf-form label {
  display: block; font-size: 12.5px; font-weight: 700; color: var(--muted, #6b7280);
  letter-spacing: .6px; margin-bottom: 7px;
}
.cf-form label .opt { font-weight: 500; color: var(--muted-2, #9aa3ad); letter-spacing: 0; }
.cf-form label i { color: #dc2626; font-style: normal; margin-left: 2px; }
.cf-form input, .cf-form select, .cf-form textarea {
  width: 100%; border: 1px solid var(--line, #e6e8eb); border-radius: 9px;
  padding: 11px 14px; font-size: 14px; font-family: inherit; background: #fbfbfc;
  transition: border-color .18s, background .18s, box-shadow .18s;
}
.cf-form input:focus, .cf-form select:focus, .cf-form textarea:focus {
  outline: none; border-color: var(--gold, #bfa05a); background: #fff;
  box-shadow: 0 0 0 3px rgba(191, 160, 90, .14);
}
.cf-form textarea { resize: vertical; min-height: 108px; }

/* ---------------- 联系方式 / 邮箱 / 社交账号：三选一 ---------------- */
.cf-reach {
  background: var(--gold-soft, #fdf8ee);
  border: 1px solid rgba(191, 160, 90, .30);
  border-radius: 13px; padding: 15px 17px 12px; margin-bottom: 18px;
}
.cf-reach-h { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.cf-reach-h b {
  font-size: 12.5px; font-weight: 800; color: #8a6d2f; letter-spacing: .6px;
}
.cf-reach-h span { font-size: 11.5px; color: var(--muted-2, #9aa3ad); }
.cf-reach .form-grid { grid-template-columns: repeat(3, 1fr); gap: 14px; }
.cf-reach .cf-err { margin-top: 9px; }

/* ---------------- 行内错误提示 ---------------- */
.cf-err {
  display: block; font-style: normal; font-size: 12px; line-height: 1.5;
  color: #dc2626; margin-top: 6px; min-height: 0;
}
.cf-err:empty { display: none; }
.cf-err.on { animation: cfErrIn .22s ease both; }
@keyframes cfErrIn { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: none; } }
.cf-form input.cf-bad, .cf-form select.cf-bad, .cf-form textarea.cf-bad {
  border-color: #dc2626; background: #fff6f6;
}
.cf-form input.cf-bad:focus, .cf-form select.cf-bad:focus, .cf-form textarea.cf-bad:focus {
  border-color: #dc2626; background: #fff;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, .14);
}
.cf-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 22px; }
.cf-actions .btn { cursor: pointer; }
.cf-actions .btn:disabled { opacity: .6; cursor: default; }
.cf-msg { font-size: 13px; color: var(--muted, #6b7280); }
.cf-msg.ok { color: #16a34a; font-weight: 600; }
.cf-msg.err { color: #dc2626; font-weight: 600; }
.cf-form .form-tip { font-size: 12.5px; color: var(--muted-2, #9aa3ad); margin: 12px 0 0; }

/* ---------------- 提交按钮「发送询价」
   —— 电脑端：深墨底 + 金字的高级宽幅按钮
   —— 手机端 / 弹层：橙色渐变通栏按钮（两套样式不同） ---------------- */
.cf-submit {
  position: relative; overflow: hidden; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-width: 250px; height: 58px; padding: 0 34px;
  border: 1px solid rgba(191, 160, 90, .50); border-radius: 10px; cursor: pointer;
  background: linear-gradient(135deg, #262c33 0%, #171b20 55%, #101316 100%);
  color: #f0e3c6; font-family: inherit; font-size: 15px; font-weight: 700; letter-spacing: 3.5px;
  box-shadow: 0 16px 34px rgba(10, 12, 15, .30), inset 0 1px 0 rgba(255, 255, 255, .07);
  transition: transform .18s ease, box-shadow .22s ease, border-color .2s ease, color .2s ease;
  -webkit-tap-highlight-color: transparent;
}
/* 顶部柔光 */
.cf-submit::before {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 54%; z-index: -1;
  background: linear-gradient(180deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, 0));
  pointer-events: none;
}
/* 底部金色细线：hover 时从左铺到右 */
.cf-submit::after {
  content: ''; position: absolute; left: 0; bottom: 0; height: 2px; z-index: 1;
  width: 36%; background: linear-gradient(90deg, var(--gold), var(--gold-2));
  transition: width .34s cubic-bezier(.22, .9, .3, 1);
}
.cf-submit:hover {
  transform: translateY(-2px); border-color: var(--gold); color: #fff6e2;
  box-shadow: 0 22px 44px rgba(10, 12, 15, .38), inset 0 1px 0 rgba(255, 255, 255, .1);
}
.cf-submit:hover::after { width: 100%; }
.cf-submit:active { transform: translateY(0) scale(.99); }
.cf-submit:focus-visible { outline: 3px solid rgba(191, 160, 90, .40); outline-offset: 3px; }
.cf-submit-tx { position: relative; z-index: 1; line-height: 1; }

/* 提交中：转圈 + 不可点 */
.cf-submit.is-busy { pointer-events: none; filter: saturate(.85); }
.cf-submit.is-busy::after {
  content: ''; position: relative; z-index: 1; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(240, 227, 198, .34); border-top-color: #f0e3c6;
  animation: cfSpin .7s linear infinite;
}
.cf-submit:disabled { opacity: .92; cursor: default; transform: none; }

/* 成功态：变绿 + 对勾 */
.cf-submit.done {
  background: linear-gradient(135deg, #1f7a45 0%, #14663a 100%);
  border-color: rgba(120, 220, 160, .45); color: #eafff1;
  box-shadow: 0 16px 34px rgba(16, 120, 66, .32), inset 0 1px 0 rgba(255, 255, 255, .12);
}
.cf-submit.done .cf-submit-tx::before {
  content: '✓'; display: inline-block; margin-right: 9px; font-weight: 800; letter-spacing: 0;
}
@keyframes cfSpin { to { transform: rotate(360deg); } }

/* ---------------- 手机端：橙色渐变通栏（与电脑端完全不同的视觉） ---------------- */
@media (max-width: 640px) {
  .cf-submit {
    width: 100%; min-width: 0; height: 54px; padding: 0 18px;
    border: none; border-radius: 14px;
    background: linear-gradient(135deg, #fb9a45 0%, #ef7a28 44%, #cf5b11 100%);
    color: #fff; font-size: 15.5px; letter-spacing: 2px;
    box-shadow: 0 10px 22px rgba(201, 93, 29, .28),
                inset 0 1px 0 rgba(255, 255, 255, .42),
                inset 0 -3px 0 rgba(146, 57, 6, .26);
  }
  .cf-submit::before { content: none; }
  /* 底部居中一小段白条，通栏气质 */
  .cf-submit::after {
    content: ''; position: absolute; left: 50%; bottom: 6px; transform: translateX(-50%);
    width: 32px; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .45);
  }
  .cf-submit:hover { transform: none; box-shadow: 0 10px 22px rgba(201, 93, 29, .28), inset 0 1px 0 rgba(255, 255, 255, .42), inset 0 -3px 0 rgba(146, 57, 6, .26); }
  .cf-submit:hover::after { width: 32px; }
}

/* ---------------- 弹层内（PC / 手机通用）：紧凑橙色版 ---------------- */
.hl-sheet .cf-submit {
  width: 100%; min-width: 0; height: 52px; padding: 0 18px;
  border: none; border-radius: 13px;
  background: linear-gradient(135deg, #fb9a45 0%, #ef7a28 44%, #cf5b11 100%);
  color: #fff; font-size: 15px; letter-spacing: 2px;
  box-shadow: 0 10px 22px rgba(201, 93, 29, .26),
              inset 0 1px 0 rgba(255, 255, 255, .42),
              inset 0 -3px 0 rgba(146, 57, 6, .24);
}
.hl-sheet .cf-submit::before { content: none; }
.hl-sheet .cf-submit::after {
  content: ''; position: absolute; left: 50%; bottom: 5px; transform: translateX(-50%);
  width: 30px; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .40);
}
.hl-sheet .cf-submit:hover {
  transform: none; color: #fff;
  box-shadow: 0 10px 22px rgba(201, 93, 29, .26), inset 0 1px 0 rgba(255, 255, 255, .42), inset 0 -3px 0 rgba(146, 57, 6, .24);
}
.hl-sheet .cf-submit:hover::after { width: 30px; }
.hl-sheet .cf-submit.done {
  background: linear-gradient(135deg, #4fcb7f 0%, #16a34a 100%);
  box-shadow: 0 10px 22px rgba(22, 163, 74, .26), inset 0 1px 0 rgba(255, 255, 255, .3);
}
.hl-sheet .cf-submit.is-busy::after {
  position: relative; left: auto; bottom: auto; transform: none;
  width: 16px; height: 16px; border-radius: 50%; background: none;
  border: 2px solid rgba(255, 255, 255, .38); border-top-color: #fff;
}

/* 移动端：提示语另起一行居中（按钮样式见上方「手机端橙色通栏」） */
@media (max-width: 640px) {
  .cf-actions { flex-direction: column; align-items: stretch; gap: 11px; }
  .cf-msg { text-align: center; }
}

/* ---------------- 社交联系方式（国内 / 国外） ---------------- */
.social-split { display: grid; gap: 12px; }
.social-col {
  background: var(--white, #fff); border: 1px solid var(--line, #e6e8eb);
  border-radius: 14px; padding: 20px 22px; box-shadow: 0 6px 20px rgba(15, 18, 22, .05);
}
.social-col h4 {
  font-size: 12.5px; font-weight: 800; letter-spacing: 1.6px; text-transform: uppercase;
  color: var(--gold, #bfa05a); margin: 0 0 14px; padding-bottom: 10px;
  border-bottom: 1px solid var(--line, #e6e8eb);
}
.social-item {
  display: flex; align-items: center; gap: 11px; padding: 9px 0;
  font-size: 13.5px; color: var(--ink, #1a1d21); text-decoration: none;
  border-bottom: 1px dashed var(--line, #e6e8eb);
}
.social-item:last-child { border-bottom: none; }
.social-item i {
  width: 30px; height: 30px; flex: 0 0 30px; border-radius: 9px;
  background: #f6f1e5; color: #8a6d2f; font-style: normal; font-weight: 800;
  font-size: 13px; display: flex; align-items: center; justify-content: center;
  font-family: var(--serif, serif);
}
.social-item span { color: var(--muted, #6b7280); font-size: 12.5px; }
.social-item b { margin-left: auto; font-weight: 700; font-size: 13.5px; word-break: break-all; }
.copy-btn {
  border: 1px solid var(--line, #e6e8eb); background: #fff; border-radius: 7px;
  padding: 3px 10px; font-size: 12px; color: var(--muted, #6b7280); cursor: pointer;
  transition: all .16s;
}
.copy-btn:hover { border-color: var(--gold, #bfa05a); color: var(--gold, #bfa05a); }

/* ---------------- 移动端底部操作栏「咨询」按钮 ---------------- */
/* 与左侧「拨打 / 复制」完全同款（同背景色、同描边、同字重），只是文案不同 */
.m-dock-btn.hl-consult,
.mp-nav .m-dock-btn.hl-consult {
  flex: 1;
}
.m-dock-btn.hl-consult:active,
.mp-nav .m-dock-btn.hl-consult:active { background: rgba(26, 29, 33, .78); }

.hl-fab {
  position: fixed; right: 16px; bottom: 84px; z-index: 90;
  display: inline-flex; align-items: center; gap: 8px;
  border: none; border-radius: 999px; padding: 13px 22px;
  background: linear-gradient(140deg, #f88a2b, #c95d1d); color: #fff;
  font-size: 15px; font-weight: 700; letter-spacing: 1px; cursor: pointer;
  box-shadow: 0 12px 28px rgba(201, 93, 29, .42);
  animation: hlFabPulse 2.8s ease-in-out infinite;
}
.hl-fab-ic { font-size: 16px; }
@keyframes hlFabPulse {
  0%, 100% { box-shadow: 0 12px 28px rgba(201, 93, 29, .42); }
  50% { box-shadow: 0 12px 34px rgba(201, 93, 29, .62), 0 0 0 8px rgba(201, 93, 29, .10); }
}
.hl-lock { overflow: hidden; overscroll-behavior: none; }
/* 弹层打开时锁住整页滚动，但**不要**给 html/body 加 position:fixed：
   那样 iOS 会把滚动位置记在 body 上，关闭弹层后整页位置会跳。 */
html.hl-lock, body.hl-lock { overscroll-behavior: none; }

/* ---------------- 底部弹层 ---------------- */
/* BUG 修复（2026-10-23）：手机浏览器（微信/QQ/Safari/Chrome）顶部有地址栏 + 底部有工具栏，
   position:fixed 的 inset:0 量的是「布局视口」，比真正看得见的区域高出一大截。
   面板又写了 max-height:92vh，于是弹层顶端会顶到浏览器头部后面去——
   表现就是「点咨询后，『快速咨询』标题和✕ 关闭按钮被浏览器头部遮住看不见」。
   改用 dvh（动态视口高度 = 当前真正可见区域，含键盘弹起时的高度）：
     · .hl-sheet 用 100dvh，遮罩和面板严格贴合可视区；
     · .hl-sheet-panel 的 max-height 依次写 vh / dvh，支持 dvh 的浏览器自动用后者。 */
.hl-sheet {
  position: fixed; inset: 0; z-index: 120; display: none;
  height: 100vh;          /* 老浏览器兜底 */
  height: 100dvh;         /* 支持 dvh 的浏览器：贴合可视区，不再顶进浏览器头部 */
}
.hl-sheet.on { display: block; }
.hl-sheet-mask { position: absolute; inset: 0; background: rgba(12, 15, 18, .55); backdrop-filter: blur(3px); }
/* BUG 修复（2026-10-23）：手机上「咨询」下拉页滑不动。
   原写法是「面板自己 max-height + overflow-y:auto」。可面板高度本来就由内容撑开，
   内容比max-height 矮时面板不会产生滚动区；加上 92vh/92dvh 在部分手机上大于真正
   可视高度（地址栏还占着一截），于是面板下半截（含提交按钮）跑到屏幕外，
   又因为「没有超出 max-height 所以不滚」——用户看到的就是「完全滑不动」。

   改成可靠的两段式：面板本身固定高度、不滚（overflow:hidden），
   只有中间的内容区 .hl-sheet-body 滚动。拖动条/标题/关闭按钮始终固定可见，
   表单再长也能一路滑到底。这是移动端底部弹层最稳的写法。 */
.hl-sheet-panel {
  position: absolute; left: 0; right: 0; bottom: 0;
  max-height: 92vh;
  max-height: 92dvh;                 /* 以可视区为准，标题行不会被浏览器头部吃掉 */
  display: flex; flex-direction: column;
  overflow: hidden;
  background: #fff; border-radius: 18px 18px 0 0;
  padding: 10px 18px calc(18px + env(safe-area-inset-bottom));
  animation: hlSheetUp .26s cubic-bezier(.22, .9, .3, 1);
}
.hl-sheet-bar, .hl-sheet-head { flex: none; }
.hl-sheet-body {
  flex: 1 1 auto;
  min-height: 0;                     /* flex 子项要能缩到内容以下，否则撑破父级就不滚了 */
  overflow-y: auto;
  -webkit-overflow-scrolling: touch; /* iOS 惯性滚动 */
  overscroll-behavior: contain;      /* 弹层内滚到底不连带滚整页 */
  touch-action: pan-y;               /* 明确允许竖向滑动，别被横向手势吃掉 */
}
@keyframes hlSheetUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.hl-sheet-bar { display: flex; justify-content: center; padding: 6px 0 10px; }
.hl-sheet-bar i { width: 42px; height: 4px; border-radius: 2px; background: #dfe3e7; }
.hl-sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.hl-sheet-head h3 { font-size: 17px; font-weight: 800; margin: 0; }
.hl-sheet-x {
  border: none; background: #f2f4f6; border-radius: 50%; width: 32px; height: 32px;
  font-size: 15px; color: #6b7280; cursor: pointer;
}
.hl-sheet-body .cf-panel { border: none; box-shadow: none; padding: 12px 0 0; }
.hl-sheet-body .cf-head p { display: none; }

/* ---------------- 提示条 ---------------- */
.hl-toast {
  position: fixed; left: 50%; bottom: 92px; transform: translateX(-50%);
  background: #15181c; color: #fff; padding: 12px 22px; border-radius: 999px;
  font-size: 13.5px; z-index: 200; box-shadow: 0 10px 30px rgba(0, 0, 0, .28);
  max-width: 88vw; text-align: center; display: none;
}
.hl-toast.err { background: #dc2626; }

/* ---------------- 响应式 ---------------- */
@media (max-width: 1000px) {
  .cf-wrap { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .cf-panel { padding: 20px 16px; border-radius: 14px; }
  /* 手机上保持两列，不要一行只显示一个 */
  .cf-form .form-grid { grid-template-columns: 1fr 1fr; gap: 11px 10px; }
  .cf-form .form-grid .full { grid-column: 1 / -1; }
  .cf-form input, .cf-form select, .cf-form textarea { padding: 10px 11px; font-size: 13.5px; border-radius: 8px; }
  .cf-form textarea { min-height: 96px; }
  .cf-form label { font-size: 12px; margin-bottom: 5px; }
  .cf-form label .opt { display: none; }          /* 「(选填)」在手机上省略，省空间 */
  /* 联系方式三选一：手机两列，社交账号占整行 */
  .cf-reach { padding: 13px 13px 11px; margin-bottom: 15px; border-radius: 11px; }
  .cf-reach .form-grid { grid-template-columns: 1fr 1fr; gap: 11px 10px; }
  .cf-reach .cf-field:nth-child(3) { grid-column: 1 / -1; }
  .cf-reach-h { margin-bottom: 10px; gap: 6px; }
  .cf-reach-h b { font-size: 12px; }
  .cf-reach-h span { font-size: 11px; }
  .cf-head h3 { font-size: 17px; }
  .cf-head p { margin-bottom: 16px; }
  .hl-fab { bottom: 78px; right: 12px; padding: 12px 18px; font-size: 14px; }
  .hl-toast { bottom: 140px; }
  .hl-sheet-panel { padding: 8px 14px calc(22px + env(safe-area-inset-bottom)); }
}