/* ==========================================================
   云拾导航 · 服务市场（用户端）样式
   ========================================================== */

.fm-hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #312e81 100%);
  color: #fff;
  margin: 16px 0 20px;
  border-radius: 18px;
  overflow: hidden;
  position: relative;
}
.fm-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at 80% 20%, rgba(79,107,255,.35), transparent 55%),
              radial-gradient(circle at 10% 80%, rgba(122,92,255,.3), transparent 55%);
  pointer-events: none;
}
.fm-hero-inner {
  position: relative;
  z-index: 1;
  padding: 36px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  flex-wrap: wrap;
}
.fm-hero-tag {
  font-size: 11px;
  letter-spacing: 3px;
  color: rgba(255,255,255,.6);
  margin-bottom: 8px;
  gap: 0;
  font-weight: 500;
}
.fm-hero h1 {
  font-size: 32px;
  font-weight: 800;
  margin: 0 0 10px;
  letter-spacing: 1px;
}
.fm-hero p {
  margin: 0;
  font-size: 13.5px;
  color: rgba(255,255,255,.72);
  line-height: 1.9;
}
/* 搜索框 */
.fm-search {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  max-width: 440px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 12px;
  padding: 11px 16px;
  color: rgba(255,255,255,.65);
  transition: all .2s;
}
.fm-search:focus-within {
  background: #fff;
  color: #4f6bff;
  border-color: #4f6bff;
  box-shadow: 0 6px 24px rgba(79,107,255,.35);
}
.fm-search input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  color: #1c2333;
  font-size: 14px;
  font-family: inherit;
}
.fm-search input::placeholder { color: rgba(255,255,255,.55); }
.fm-search:focus-within input::placeholder { color: #9aa3b5; }
.fm-hero-stats {
  display: flex;
  gap: 20px;
}
.fm-stat {
  background: rgba(255,255,255,.1);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 14px;
  padding: 14px 22px;
  text-align: center;
  min-width: 110px;
}
.fm-stat b {
  display: block;
  font-size: 24px;
  font-weight: 800;
}
.fm-stat span {
  display: block;
  font-size: 12px;
  color: rgba(255,255,255,.6);
  margin-top: 3px;
}

/* 服务保障条 */
.fm-guarantee {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: -8px 0 20px;
}
.fm-g-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: 1px solid #eef1f7;
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: 0 2px 6px rgba(16,24,40,.04);
  transition: transform .18s, box-shadow .18s;
}
.fm-g-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(16,24,40,.08);
}
.fm-g-ico {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  background: linear-gradient(135deg, #eef2ff, #f5f3ff);
}
.fm-g-item b {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  color: #1c2333;
}
.fm-g-item i {
  display: block;
  font-style: normal;
  font-size: 11.5px;
  color: #8a94a6;
  margin-top: 2px;
}

/* 分类 Tab */
.fm-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  background: #fff;
  border-radius: 14px;
  padding: 10px;
  border: 1px solid #eef1f7;
  box-shadow: 0 2px 6px rgba(16,24,40,.04);
}
.fmtab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 22px;
  border: 1px solid transparent;
  background: transparent;
  color: #5a6579;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all .15s;
  font-family: inherit;
}
.fmtab:hover { background: #f5f7fb; color: #1c2333; }
.fmtab.active {
  background: linear-gradient(135deg, #4f6bff, #7a5cff);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(79,107,255,.28);
}
.fmtab em {
  font-style: normal;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 600;
  background: #eef1f7;
  color: #5a6579;
}
.fmtab.active em { background: rgba(255,255,255,.25); color: #fff; }

/* 卡片网格 */
.fm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 18px;
  padding-bottom: 12px;
}
.fm-card {
  background: #fff;
  border-radius: 14px;
  border: 1px solid #eef1f7;
  box-shadow: 0 2px 8px rgba(16,24,40,.04);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .2s, box-shadow .2s;
}
.fm-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(16,24,40,.12);
}
.fm-banner {
  position: relative;
  height: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}
.fm-ico-lg{
  width:60px;height:60px;border-radius:14px;
  background:rgba(255,255,255,.25);
  backdrop-filter:blur(4px);
  display:flex;align-items:center;justify-content:center;
  font-size:28px;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,.2));
}
.fm-badge {
  position: absolute;
  top: 10px; right: 10px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}
.fm-badge-on { background: rgba(255,255,255,.22); color: #fff; }
.fm-badge-off { background: rgba(17,24,39,.55); color: #fff; }

.fm-body { padding: 16px 18px 14px; flex: 1; }
.fm-cat {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid transparent;
  margin-bottom: 8px;
  gap: 0;
}
.fm-title {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 700;
  color: #1c2333;
}
.fm-desc {
  margin: 0 0 10px;
  font-size: 12.5px;
  color: #6b7588;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.fm-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.fm-chip {
  font-size: 11px;
  padding: 3px 9px;
  background: #f5f7fb;
  border-radius: 6px;
  color: #5a6579;
}
.fm-price-row {
  display: flex;
  align-items: baseline;
  gap: 4px;
  border-top: 1px dashed #eef1f7;
  padding-top: 10px;
}
.fm-from { font-size: 11px; color: #999; }
.fm-price-num {
  font-size: 22px;
  font-weight: 800;
  color: #e11d48;
  line-height: 1;
}
.fm-price-tail { font-size: 12px; color: #999; margin-left: 4px; }

.fm-card-actions { padding: 0 18px 16px; }
.fm-card-btn {
  width: 100%;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid #4f6bff;
  background: #fff;
  color: #4f6bff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
  font-family: inherit;
}
.fm-card-btn:hover { background: #f0f4ff; }

.fm-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  background: #fff;
  border: 1px dashed #eef1f7;
  border-radius: 14px;
  color: #6b7588;
}
.fm-empty h3 { margin: 8px 0 4px; color: #1c2333; font-weight: 700; }
.fm-empty div { font-size: 40px; }

/* 搜索无结果空状态 */
.fm-empty-hint {
  text-align: center;
  padding: 56px 20px;
  background: #fff;
  border: 1px dashed #eef1f7;
  border-radius: 14px;
  margin-top: 4px;
}
.fm-empty-hint div { font-size: 40px; }
.fm-empty-hint h3 { margin: 10px 0 4px; font-size: 16px; font-weight: 700; color: #1c2333; }
.fm-empty-hint p { margin: 0; font-size: 13px; color: #8a94a6; }

/* 购买须知 */
.fm-notice {
  margin-top: 26px;
  background: #fff;
  border-radius: 14px;
  padding: 18px 22px;
  border: 1px solid #eef1f7;
  font-size: 13px;
  color: #5a6579;
}
.fm-notice h4 { margin: 0 0 10px; font-size: 14px; font-weight: 700; color: #1c2333; }
.fm-notice ul { margin: 0; padding-left: 20px; line-height: 1.9; }
.fm-notice li b { color: #4f6bff; }

/* ======== 产品详情弹层 ======== */
.fmd-mask {
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, .6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 30px 16px;
  animation: fmdIn .2s ease;
}
@keyframes fmdIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.fmd-panel {
  position: relative;
  background: #fff;
  border-radius: 18px;
  width: min(620px, 100%);
  max-height: calc(100vh - 60px);
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(15,23,42,.3);
  display: flex;
  flex-direction: column;
  animation: fmdPanel .22s cubic-bezier(.2,.8,.3,1.2);
}
@keyframes fmdPanel {
  from { transform: translateY(20px) scale(.97); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}
.fmd-close {
  position: absolute;
  top: 14px; right: 14px;
  width: 34px; height: 34px;
  border-radius: 10px;
  border: none;
  background: rgba(255,255,255,.2);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  backdrop-filter: blur(6px);
  z-index: 2;
  transition: background .15s;
}
.fmd-close:hover { background: rgba(255,255,255,.35); }

.fmd-banner {
  height: 130px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  position: relative;
}
.fmd-ico-lg { font-size: 62px; filter: drop-shadow(0 4px 12px rgba(0,0,0,.25)); }
.fmd-banner-tags {
  position: absolute;
  left: 16px; bottom: 14px;
  display: flex; gap: 6px;
}
.fmd-tag {
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid transparent;
}
.fmd-ok { background: rgba(34,197,94,.2); color: #fff; border-color: rgba(255,255,255,.4); }
.fmd-no { background: rgba(239,68,68,.2); color: #fff; border-color: rgba(255,255,255,.4); }

.fmd-body {
  padding: 22px 24px;
  overflow-y: auto;
  flex: 1;
}
.fmd-title { margin: 0 0 8px; font-size: 20px; font-weight: 800; color: #1c2333; }
.fmd-desc { margin: 0 0 16px; font-size: 13.5px; color: #5a6579; line-height: 1.7; }

.fmd-specs {
  background: #f8faff;
  border: 1px solid #e6eaf2;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 20px;
  display: grid;
  gap: 8px;
}
.fmd-spec { display: flex; justify-content: space-between; font-size: 13px; }
.fmd-spec-k { color: #8a94a6; }
.fmd-spec-v { color: #1c2333; font-weight: 500; }

.fmd-section-head {
  font-size: 13px;
  font-weight: 700;
  color: #1c2333;
  margin-bottom: 12px;
}
.fmd-periods {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}
.fmd-period {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 14px 16px;
  border-radius: 10px;
  border: 2px solid #eef1f7;
  background: #fff;
  cursor: pointer;
  font-family: inherit;
  transition: all .15s;
}
.fmd-period:hover { border-color: #c7d2fe; background: #f8faff; }
.fmd-period.active {
  border-color: #4f6bff;
  background: linear-gradient(135deg, #eef2ff, #f5f3ff);
  box-shadow: 0 3px 10px rgba(79,107,255,.15);
}
.fmd-period-l { font-size: 13px; font-weight: 600; color: #1c2333; }
.fmd-period.active .fmd-period-l { color: #4f6bff; }
.fmd-period-p { font-size: 15px; font-weight: 800; color: #e11d48; margin-top: 4px; }
.fmd-empty-specs {
  padding: 18px;
  border: 1px dashed #eef1f7;
  border-radius: 10px;
  color: #8a94a6;
  text-align: center;
  font-size: 13px;
}

/* 底部购买条 */
.fmd-buybar {
  position: sticky;
  bottom: 0;
  left: 0; right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  margin: 20px -24px -22px;
  background: #fff;
  border-top: 1px solid #eef1f7;
  gap: 16px;
}
.fmd-buybar-label { font-size: 12px; color: #8a94a6; }
.fmd-buybar-price { font-size: 26px; font-weight: 800; color: #e11d48; margin-left: 6px; }
.fmd-buybar-period { font-size: 12px; color: #6b7588; margin-left: 6px; }

.fm-btn {
  padding: 12px 26px;
  border-radius: 10px;
  border: none;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all .15s;
  white-space: nowrap;
}
.fm-btn-primary {
  background: linear-gradient(135deg, #f97316, #fb923c);
  color: #fff;
  box-shadow: 0 4px 14px rgba(249,115,22,.3);
}
.fm-btn-primary:hover { box-shadow: 0 6px 20px rgba(249,115,22,.4); }
.fm-btn-login {
  background: linear-gradient(135deg, #4f6bff, #7a5cff);
  color: #fff;
  box-shadow: 0 4px 14px rgba(79,107,255,.3);
}
.fm-btn-disabled {
  background: #f1f3f8;
  color: #8a94a6;
  cursor: not-allowed;
}

/* 响应式 */
@media (max-width: 768px) {
  .fm-hero-inner { padding: 28px 22px; flex-direction: column; align-items: flex-start; gap: 18px; }
  .fm-hero h1 { font-size: 26px; }
  .fm-hero-stats { width: 100%; justify-content: space-between; }
  .fm-stat { flex: 1; min-width: 0; padding: 12px; }
  .fm-search { max-width: 100%; }
  .fm-guarantee { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .fm-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
  .fmd-panel { border-radius: 14px; }
  .fmd-buybar { padding: 12px 16px; margin: 20px -22px -22px; }
  .fmd-body { padding: 18px 20px; }
}
