﻿/* ================================================================
   林氏毛织厂 · components.css
   按钮 / 卡片 / Tab / 流程 / 表单 / FAQ / 微信浮动 / 博客文章
   ================================================================ */

/* ── 按钮 ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 24px; font-size: 14px; font-weight: 600;
  border-radius: var(--r); border: 1.5px solid transparent;
  transition: background var(--ease), transform .22s cubic-bezier(.34,1.56,.64,1), box-shadow var(--ease);
  white-space: nowrap; line-height: 1;
}
.btn:hover  { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--orange); color: #fff; box-shadow: 0 3px 12px rgba(224,107,26,.25); }
.btn-primary:hover { background: var(--orange-dk); box-shadow: 0 6px 20px rgba(224,107,26,.35); }
.btn-navy   { background: var(--navy); color: #fff; }
.btn-navy:hover { background: #243f66; }
.btn-outline { background: transparent; color: #fff; border-color: rgba(255,255,255,.45); }
.btn-outline:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.8); }
.btn-ghost  { background: var(--white); color: var(--t1); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--navy); color: var(--navy); }
.btn-lg     { padding: 13px 32px; font-size: 15px; border-radius: var(--r-md); }

/* ── 产品卡片 ── */
.pcard {
  background: var(--white); border-radius: var(--r-md);
  border: 1px solid var(--line-lt); overflow: hidden;
  box-shadow: var(--sh);
  transition: transform var(--ease), box-shadow var(--ease);
}
.pcard:hover { transform: translateY(-4px); box-shadow: var(--sh-md); }
.pcard-img  { position: relative; padding-bottom: 151%; background: var(--bg2); overflow: hidden; }
.pcard-img img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; transition: transform .4s;
}
.pcard:hover .pcard-img img { transform: scale(1.04); }
.pcard-badge {
  position: absolute; top: 8px; left: 8px;
  padding: 3px 8px; border-radius: 99px;
  font-size: 10px; font-weight: 700; letter-spacing: .04em;
}
.badge-hot  { background: var(--orange); color: #fff; }
.badge-top  { background: var(--navy);   color: #fff; }
.badge-safe { background: #18a058;       color: #fff; }
.pcard-body { padding: 12px 14px 8px; }
.pcard-cat  { font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--blue); margin-bottom: 4px; font-family: var(--fe); }
.pcard-name { font-size: 14px; font-weight: 700; margin-bottom: 3px; }
.pcard-desc { font-size: 12px; color: var(--t2); line-height: 1.6; }
.pcard-foot { padding: 8px 14px; border-top: 1px solid var(--line-lt); display: flex; align-items: center; justify-content: space-between; }
.pcard-tag  { padding: 2px 8px; border: 1px solid var(--line); color: var(--t3); font-size: 10px; border-radius: 99px; }
.pcard-link { font-size: 12px; color: var(--orange); font-weight: 600; }
.pcard-link:hover { text-decoration: underline; }

/* 产品网格 */
.prod-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 18px; }
@media (max-width: 960px) { .prod-grid { grid-template-columns: repeat(3,1fr); } }
@media (max-width: 640px) { .prod-grid { grid-template-columns: repeat(2,1fr); gap: 10px; } }

/* ── Tab ── */
.tab-bar { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 28px; }
.tb {
  padding: 8px 20px; font-size: 13px; font-weight: 600;
  border-radius: 99px; border: 1.5px solid var(--line);
  color: var(--t2); background: var(--white);
  transition: all .18s; cursor: pointer;
}
.tb:hover { border-color: var(--blue); color: var(--blue); }
.tb.on    { background: var(--navy); color: #fff; border-color: var(--navy); }
.tab-panel      { display: none; }
.tab-panel.show { display: grid; }

/* ── 流程步骤 ── */
.steps { display: grid; grid-template-columns: repeat(5,1fr); gap: 0; position: relative; }
.steps::before {
  content:''; position: absolute;
  top: 22px; left: 10%; right: 10%; height: 2px;
  background: linear-gradient(90deg, var(--orange) 0%, rgba(224,107,26,.1) 100%);
}
.step { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 0 8px; position: relative; z-index: 1; }
.step-n {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--white); border: 2px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--fe); font-size: 17px; font-weight: 800; color: var(--navy);
  margin-bottom: 14px;
  transition: background .22s, border-color .22s, transform .28s cubic-bezier(.34,1.56,.64,1);
}
.step:hover .step-n { background: var(--orange); border-color: var(--orange); color: #fff; transform: scale(1.12); }
.step-title { font-size: 13px; font-weight: 700; margin-bottom: 4px; }
.step-desc  { font-size: 12px; color: var(--t2); line-height: 1.6; }
@media (max-width: 768px) { .steps { grid-template-columns: 1fr 1fr; gap: 24px; } .steps::before { display: none; } }
@media (max-width: 420px) { .steps { grid-template-columns: 1fr; } }

/* ── 表单 ── */
.field       { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 13px; font-weight: 500; color: var(--t1); }
.field label em { color: var(--orange); font-style: normal; }
.inp {
  padding: 10px 13px; border: 1.5px solid var(--line);
  border-radius: var(--r); font-size: 14px; color: var(--t1);
  background: var(--white); width: 100%;
  transition: border-color .18s, box-shadow .18s;
}
.inp:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(59,125,216,.1); }
.inp::placeholder { color: var(--t3); }
textarea.inp { resize: vertical; min-height: 100px; line-height: 1.65; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 540px) { .row2 { grid-template-columns: 1fr; } }
.form-card {
  background: var(--white); border-radius: var(--r-lg);
  padding: 32px; box-shadow: var(--sh-lg); border: 1px solid var(--line-lt);
}
@media (max-width: 540px) { .form-card { padding: 20px; } }

/* ── FAQ ── */
.faq-item { border-bottom: 1px solid var(--line); }
.faq-q {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 0; font-size: 15px; font-weight: 600; color: var(--t1);
  cursor: pointer; gap: 12px; transition: color .15s;
}
.faq-q:hover { color: var(--blue); }
.faq-icon { font-size: 18px; color: var(--t3); transition: transform .25s; flex-shrink: 0; }
.faq-item.open .faq-icon { transform: rotate(45deg); color: var(--blue); }
.faq-a { font-size: 14px; color: var(--t2); line-height: 1.85; padding: 0 0 16px; display: none; }
.faq-item.open .faq-a { display: block; }

/* ── 微信浮动 + 电话浮动 + 回顶 ── */
/* 微信按钮（最下） */
.wc-float { position: fixed; bottom: 24px; right: 16px; z-index: 100; display: flex; flex-direction: column; align-items: center; gap: 5px; }
.wc-btn   { width: 48px; height: 48px; background: var(--green); border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 14px rgba(7,193,96,.35); cursor: pointer; transition: transform .3s cubic-bezier(.34,1.56,.64,1); }
.wc-btn:hover { transform: scale(1.1); }
.wc-btn svg   { width: 22px; height: 22px; fill: #fff; }
.wc-tip   { font-size: 10px; color: var(--t2); background: #fff; padding: 2px 8px; border-radius: 99px; box-shadow: var(--sh); white-space: nowrap; }

/* 电话按钮（在微信上方） */
.tel-float { position: fixed; bottom: 96px; right: 16px; z-index: 100; width: 48px; height: 48px; background: var(--orange); border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 14px rgba(224,107,26,.4); transition: transform .3s cubic-bezier(.34,1.56,.64,1); animation: telPulse 2s ease-in-out infinite; }
.tel-float:hover { transform: scale(1.1); animation: none; }
.tel-float svg { width: 22px; height: 22px; fill: #fff; }
@keyframes telPulse {
  0%, 100% { box-shadow: 0 4px 14px rgba(224,107,26,.4); }
  50%      { box-shadow: 0 4px 14px rgba(224,107,26,.4), 0 0 0 8px rgba(224,107,26,.15); }
}

/* 微信弹出二维码（位置上调，避开电话按钮） */
.wc-popup { position: fixed; bottom: 156px; right: 14px; z-index: 101; background: #fff; border-radius: 14px; padding: 16px; box-shadow: 0 10px 36px rgba(0,0,0,.14); width: 180px; display: none; flex-direction: column; align-items: center; gap: 8px; }
.wc-popup.on { display: flex; }
.wc-popup img    { width: 136px; height: 136px; border-radius: 6px; }
.wc-popup strong { font-size: 13px; font-weight: 700; color: var(--t1); }
.wc-popup p      { font-size: 11px; color: var(--t2); text-align: center; line-height: 1.6; }
.wc-x { position: absolute; top: 9px; right: 11px; font-size: 16px; color: var(--t3); cursor: pointer; }
.wc-x:hover { color: var(--t1); }

/* 回顶按钮（在电话按钮上方） */
.to-top { position: fixed; bottom: 156px; right: 22px; z-index: 100; width: 36px; height: 36px; background: var(--navy); color: #fff; border-radius: 50%; font-size: 15px; display: flex; align-items: center; justify-content: center; box-shadow: var(--sh-md); cursor: pointer; opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; }
.to-top.on { opacity: 1; pointer-events: auto; }
.to-top:hover { transform: translateY(-3px); }

/* 手机端浮动按钮位置微调 */
@media (max-width: 560px) {
  .wc-float { bottom: 16px; right: 12px; }
  .tel-float { bottom: 80px; right: 12px; }
  .wc-popup { bottom: 140px; right: 10px; }
  .to-top { bottom: 140px; right: 18px; }
  .wc-tip { display: none; }   /* 手机端隐藏文字提示，节省空间 */
}

/* ── 博客文章排版（blog-article 类） ── */
.blog-article { max-width: 920px; margin: 0 auto; font-size: 18px; line-height: 1.9; color: var(--t2); }
.blog-article p  { font-size: 18px; line-height: 1.9; margin: 20px 0; color: var(--t2); }
.blog-article h2 { font-size: 30px; font-weight: 700; margin: 48px 0 18px; color: var(--t1); line-height: 1.35; }
.blog-article h3 { font-size: 22px; font-weight: 700; margin: 28px 0 12px; color: var(--t1); }
.blog-article img { margin: 36px 0; border-radius: 12px; box-shadow: var(--sh); }
.blog-article ul  { padding-left: 22px; margin: 16px 0; }
.blog-article li  { margin: 8px 0; }
.blog-article blockquote { border-left: 4px solid var(--blue); padding: 12px 18px; background: var(--blue-soft); margin: 24px 0; border-radius: 6px; }
.blog-article strong { color: var(--navy); font-weight: 600; }
.blog-article hr { border: none; height: 1px; background: var(--line); margin: 40px 0; }

/* 流程网格 */
.process-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 24px; margin-top: 30px; }
.process-item { background: #fff; padding: 22px; border-radius: 12px; border: 1px solid var(--line); box-shadow: var(--sh); transition: transform .2s, box-shadow .2s; }
.process-item:hover { transform: translateY(-3px); box-shadow: var(--sh-md); }
.process-item h3 { font-size: 18px; margin-bottom: 8px; color: var(--navy); }
.process-item p  { font-size: 16px; line-height: 1.8; color: var(--t2); }

/* 文章内 CTA */
.article-cta { margin-top: 50px; padding: 32px; background: var(--bg); border-radius: 14px; border: 1px solid var(--line); }
.article-cta h3 { font-size: 22px; margin-bottom: 10px; color: var(--t1); }
.article-cta p  { font-size: 16px; margin-bottom: 18px; }

@media (max-width: 768px) {
  .blog-article { font-size: 16px; }
  .blog-article p  { font-size: 16px; }
  .blog-article h2 { font-size: 24px; }
  .process-grid { grid-template-columns: 1fr; }
}

/* ================================================================
   联系方式卡片（contact.html / custom.html 共用）
   ================================================================ */
.contact-cards-sec { background: var(--bg); }
.cc-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
@media(max-width: 900px) { .cc-grid { grid-template-columns: repeat(2, 1fr); } }
@media(max-width: 500px)  { .cc-grid { grid-template-columns: 1fr; } }
.cc-card {
  background: var(--white);
  border-radius: 18px;
  padding: 24px 20px;
  border: 1.5px solid var(--line-lt);
  box-shadow: var(--sh);
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.cc-card::after {
  content: '';
  position: absolute; inset: 0;
  border-radius: 18px;
  opacity: 0;
  transition: opacity .22s;
}
.cc-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--sh-lg);
  border-color: var(--blue);
}
.cc-card--phone::after  { background: linear-gradient(135deg,rgba(59,125,216,.04),transparent); }
.cc-card--email::after  { background: linear-gradient(135deg,rgba(59,125,216,.04),transparent); }
.cc-card--addr::after   { background: linear-gradient(135deg,rgba(27,58,92,.03),transparent); }
.cc-card--wechat::after { background: linear-gradient(135deg,rgba(7,193,96,.05),transparent); }
.cc-icon-wrap {
  width: 48px; height: 48px;
  border-radius: 14px;
  background: var(--navy);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.cc-icon-wrap svg { width: 22px; height: 22px; fill: #7BB8FF; }
.cc-qr-wrap {
  width: 80px; height: 80px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg);
  border: 1px solid var(--line);
  flex-shrink: 0;
}
.cc-qr-wrap img { width: 100%; height: 100%; object-fit: cover; }
.cc-label {
  font-size: 11px; font-weight: 700;
  letter-spacing: .08em;
  color: var(--t3);
  text-transform: uppercase;
  margin-bottom: 4px;
}
.cc-value     { font-size: 17px; font-weight: 700; color: var(--t1); line-height: 1.2; }
.cc-value--sm { font-size: 14px; }
.cc-sub       { font-size: 12px; color: var(--t2); margin-top: 4px; }
.cc-arrow {
  position: absolute; right: 18px; top: 50%;
  transform: translateY(-50%);
  font-size: 18px; color: var(--blue);
  opacity: 0; transition: opacity .2s, right .2s;
}
.cc-card:hover .cc-arrow { opacity: 1; right: 14px; }
.cc-hours {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--white);
  border: 1px solid var(--line-lt);
  border-radius: 12px;
  padding: 14px 20px;
  font-size: 13px; color: var(--t2);
}
.cc-hours strong  { color: var(--navy); }
.cc-hours-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(7,193,96,.2);
  flex-shrink: 0;
}
.cc-sep { color: var(--line); }

/* 移动端底部固定联系栏（contact.html） */
@media (max-width: 768px) {
  #mobFixed {
    display: flex !important; gap: 10px;
    position: fixed; bottom: 0; left: 0; right: 0;
    padding: 12px 16px;
    background: #fff; border-top: 1px solid var(--line);
    z-index: 150; box-shadow: 0 -4px 16px rgba(0,0,0,.08);
  }
  .ft         { padding-bottom: 80px; }
  .sec        { padding-bottom: 80px; }
}

/* ================================================================
   联系卡片组件 · contact.html / custom.html 共用
   ================================================================ */

.contact-cards-sec { background: var(--bg); }

.cc-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
@media (max-width: 900px) { .cc-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 500px)  { .cc-grid { grid-template-columns: 1fr; } }

.cc-card {
  background: var(--white);
  border-radius: 18px;
  padding: 24px 20px;
  border: 1.5px solid var(--line-lt);
  box-shadow: var(--sh);
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.cc-card::after {
  content: '';
  position: absolute; inset: 0;
  border-radius: 18px;
  opacity: 0;
  transition: opacity .22s;
}
.cc-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--sh-lg);
  border-color: var(--blue);
}
.cc-card:hover::after { opacity: 1; }
.cc-card--phone::after  { background: linear-gradient(135deg,rgba(59,125,216,.04),transparent); }
.cc-card--email::after  { background: linear-gradient(135deg,rgba(59,125,216,.04),transparent); }
.cc-card--addr::after   { background: linear-gradient(135deg,rgba(27,58,92,.03),transparent); }
.cc-card--wechat::after { background: linear-gradient(135deg,rgba(7,193,96,.05),transparent); }
.cc-card:hover .cc-arrow { opacity: 1; right: 14px; }

.cc-icon-wrap {
  width: 48px; height: 48px;
  border-radius: 14px;
  background: var(--navy);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.cc-icon-wrap svg { width: 22px; height: 22px; fill: #7BB8FF; }

.cc-qr-wrap {
  width: 80px; height: 80px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg);
  border: 1px solid var(--line);
  flex-shrink: 0;
}
.cc-qr-wrap img { width: 100%; height: 100%; object-fit: cover; }

.cc-label {
  font-size: 11px; font-weight: 700;
  letter-spacing: .08em;
  color: var(--t3);
  text-transform: uppercase;
  margin-bottom: 4px;
}
.cc-value { font-size: 17px; font-weight: 700; color: var(--t1); line-height: 1.2; }
.cc-value--sm { font-size: 14px; }
.cc-sub  { font-size: 12px; color: var(--t2); margin-top: 4px; }
.cc-arrow {
  position: absolute; right: 18px; top: 50%;
  transform: translateY(-50%);
  font-size: 18px; color: var(--blue);
  opacity: 0; transition: opacity .2s, right .2s;
}

.cc-hours {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--white);
  border: 1px solid var(--line-lt);
  border-radius: 12px;
  padding: 14px 20px;
  font-size: 13px; color: var(--t2);
}
.cc-hours strong { color: var(--navy); }
.cc-hours-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(7,193,96,.2);
  flex-shrink: 0;
}
.cc-sep { color: var(--line); }

