/* 螺丝家标准件调货平台 · 对外门户（与小程序/后台同一套蓝色主题） */
* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --primary: #3A7BFD;
  --primary-2: #5B8CFF;
  --bg: #F5F6F8;
  --card: #fff;
  --text: #1A1A1A;
  --sub: #666;
  --muted: #999;
  --line: #F0F0F0;
  --green: #07C160;
  --orange: #FF6B00;
  --gold: #C9971C;
  --red: #E64340;
  --warn: #E6A23C;
  --shadow: 0 1px 4px rgba(0,0,0,.04);
  --shadow-lg: 0 8px 24px rgba(0,0,0,.08);
}
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, "Microsoft YaHei", "PingFang SC", sans-serif;
  background: var(--bg); color: var(--text); line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
img { display: block; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* 顶栏 */
.topbar {
  position: sticky; top: 0; z-index: 100;
  background: #fff; border-bottom: 1px solid #f0f0f0;
}
.topbar-inner { display: flex; align-items: center; height: 60px; gap: 24px; }
.brand { display: flex; align-items: center; gap: 8px; font-size: 19px; font-weight: 700; color: var(--primary); }
.brand .logo { font-size: 24px; }
.nav { display: flex; gap: 4px; flex: 1; }
.nav a { padding: 8px 14px; border-radius: 8px; font-size: 15px; color: var(--sub); }
.nav a:hover { color: var(--primary); background: #eef3ff; }
.topbar .btn { flex-shrink: 0; }

/* 按钮 */
.btn { display: inline-block; padding: 9px 22px; border: none; border-radius: 999px; font-size: 15px; cursor: pointer; font-family: inherit; }
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: #fff; }
.btn-primary:hover { filter: brightness(1.05); }
.btn-ghost { background: #fff; border: 1px solid var(--primary); color: var(--primary); }
.btn-block { display: block; width: 100%; text-align: center; }

/* 英雄区 */
.hero {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff; padding: 56px 0 64px; text-align: center;
}
.hero h1 { font-size: 34px; font-weight: 700; }
.hero .sub { margin-top: 10px; font-size: 17px; opacity: .92; }
.search-box {
  max-width: 560px; margin: 28px auto 0; display: flex;
  background: #fff; border-radius: 999px; padding: 5px; box-shadow: 0 8px 30px rgba(0,0,0,.15);
}
.search-box input {
  flex: 1; border: none; outline: none; font-size: 15px; padding: 10px 20px;
  background: transparent; border-radius: 999px; font-family: inherit;
}
.search-box button {
  border: none; background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff; font-size: 15px; padding: 10px 26px; border-radius: 999px; cursor: pointer; font-family: inherit;
}

/* 通用区块 */
.section { padding: 28px 0; }
.section-title { display: flex; align-items: center; gap: 8px; font-size: 20px; font-weight: 700; margin-bottom: 16px; }
.section-title .more { margin-left: auto; font-size: 13px; color: var(--muted); font-weight: 400; }
.section-title .more:hover { color: var(--primary); }

/* 轮播 */
.banner-swiper { position: relative; border-radius: 14px; overflow: hidden; margin-top: -24px; box-shadow: var(--shadow-lg); background: #eef0f3; }
.banner-swiper .slides { position: relative; aspect-ratio: 17 / 5; }
.banner-swiper .slide { position: absolute; inset: 0; opacity: 0; transition: opacity .5s; cursor: pointer; pointer-events: none; }
.banner-swiper .slide.active { opacity: 1; pointer-events: auto; }
.banner-swiper .slide img { width: 100%; height: 100%; object-fit: fill; }
.banner-swiper .dots { position: absolute; bottom: 12px; left: 0; right: 0; display: flex; justify-content: center; gap: 8px; }
.banner-swiper .dot { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.55); box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: all .3s; }
.banner-swiper .dot.active { background: #fff; width: 22px; border-radius: 999px; }
.banner-empty { height: 140px; display: flex; align-items: center; justify-content: center; color: #fff; background: linear-gradient(135deg, var(--primary), var(--primary-2)); border-radius: 14px; margin-top: -24px; font-size: 15px; }
.banner-mid { margin-top: 20px; margin-bottom: 0; }
.banner-mid .slides { aspect-ratio: 16 / 6; }

/* 分类入口（找螺丝 / 找物流 平铺两列） */
.cats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.cat-card {
  background: var(--card); border-radius: 14px; padding: 32px 16px; text-align: center;
  box-shadow: var(--shadow); cursor: pointer; transition: transform .15s, box-shadow .15s;
}
.cat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.cat-card .icon { font-size: 46px; }
.cat-card .name { margin-top: 12px; font-size: 18px; font-weight: 700; }

/* 求购 / 动态 列表（桌面多列网格） */
.card-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.feed-card {
  background: var(--card); border-radius: 12px; padding: 18px; box-shadow: var(--shadow); cursor: pointer;
  display: flex; flex-direction: column; height: 100%;
}
.feed-card:hover { box-shadow: var(--shadow-lg); }
.feed-card .title { font-size: 16px; font-weight: 700; }
.feed-card .desc {
  margin-top: 6px; font-size: 14px; color: #555;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
}
.feed-card .meta { margin-top: 10px; font-size: 13px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
.feed-card .feed-phone { margin-top: 8px; display: inline-flex; align-items: center; gap: 4px; font-size: 14px; color: var(--primary); font-weight: 600; }
.feed-card .imgs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.feed-card .imgs img { width: 96px; height: 96px; object-fit: cover; border-radius: 8px; background: var(--bg); }

/* 标签 */
.tag { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; line-height: 1.6; }
.tag-seek { background: #EAF1FF; color: var(--primary); }
.tag-rentout { background: #FFF3E6; color: var(--orange); }
.tag-goods { background: #F1E8FF; color: #7A4DF0; }
.tag-green { background: #E7F6EC; color: var(--green); }
.tag-gold { background: #FBF3DC; color: var(--gold); }
.tag-red { background: #FDECEC; color: var(--red); }
.tag-gray { background: #F0F0F0; color: var(--muted); }

/* 入驻 CTA */
.cta {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff; border-radius: 16px; padding: 40px 28px; text-align: center;
}
.cta h2 { font-size: 24px; font-weight: 700; }
.cta p { margin-top: 10px; font-size: 15px; opacity: .92; }
.cta .btn { margin-top: 20px; background: #fff; color: var(--primary); font-weight: 700; }

/* 页脚 */
.footer { background: #fff; border-top: 1px solid var(--line); padding: 48px 0 28px; margin-top: 24px; color: var(--muted); font-size: 13px; position: relative; }
.footer::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--primary), var(--primary-2), #7AB8FF); }
.footer .container { display: flex; flex-direction: column; gap: 8px; align-items: center; text-align: center; }

/* 空态 / 加载 */
.empty { text-align: center; color: var(--muted); padding: 60px 0; font-size: 15px; }
.loading { text-align: center; color: var(--muted); padding: 40px 0; font-size: 14px; }

/* 列表页 */
.list-head { background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: #fff; padding: 24px 0; }
.list-head h1 { font-size: 22px; font-weight: 700; }
.list-head .sub { font-size: 13px; opacity: .9; margin-top: 4px; }
.list-head .search-box { margin: 16px auto 0; }
.ad-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; align-items: start; }
.ad-card { background: var(--card); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); cursor: pointer; }
.ad-card:hover { box-shadow: var(--shadow-lg); }
.ad-card .thumb { width: 100%; height: 200px; object-fit: contain; display: block; background: #f3f6fb; }
.ad-card .thumb-text { min-height: 200px; padding: 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; background: #F3F7FF; }
.ad-card .thumb-text .title { font-size: 16px; font-weight: 700; text-align: center; word-break: break-all; }
.ad-card .thumb-text .sub { margin-top: 6px; font-size: 13px; color: var(--sub); text-align: center; word-break: break-all; }
.ad-card .body { padding: 12px 14px; }
.ad-card .name { font-size: 15px; font-weight: 700; }
.ad-card .meta { margin-top: 6px; font-size: 12px; color: var(--muted); }
.badges { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }

/* 详情页 */
.detail { background: var(--card); border-radius: 14px; box-shadow: var(--shadow); padding: 20px; }
.detail .cover { width: 100%; max-height: 420px; object-fit: contain; background: #fafbfc; border-radius: 10px; }
.detail h1 { font-size: 22px; font-weight: 700; margin-top: 16px; }
.detail .biz { font-size: 15px; color: var(--sub); margin-top: 6px; }
.detail .content { margin-top: 16px; font-size: 15px; color: #333; white-space: pre-line; word-break: break-all; }
.detail .imgs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.detail .imgs img { width: 140px; height: 140px; object-fit: cover; border-radius: 8px; cursor: pointer; }
.detail .info { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 14px; font-size: 14px; color: var(--sub); }
.detail .info .row { display: flex; gap: 10px; padding: 4px 0; }
.detail .info .row .k { color: var(--muted); min-width: 60px; }
.detail .actions { display: flex; gap: 12px; margin-top: 20px; }
.detail .actions .btn { flex: 1; text-align: center; }

@media (max-width: 640px) {
  .nav { display: none; }
  .hero h1 { font-size: 26px; }
  .cats { grid-template-columns: repeat(2, 1fr); }
  .ad-grid { grid-template-columns: 1fr; }
  .banner-swiper .slides { height: 200px; }
  .banner-swiper .slide img { object-fit: cover; }
}

/* 投诉举报 */
.form-card { background: var(--card); border-radius: 14px; box-shadow: var(--shadow); padding: 24px; }
.form-item { margin-bottom: 18px; }
.form-label { display: block; font-size: 14px; color: var(--sub); margin-bottom: 8px; }
.form-label b { color: var(--red); }
.form-input, .form-textarea, .form-select {
  width: 100%; box-sizing: border-box; border: 1px solid #e5e5e5; border-radius: 8px;
  padding: 11px 14px; font-size: 15px; font-family: inherit; background: #fff;
}
.form-textarea { min-height: 130px; resize: vertical; }
.form-input:focus, .form-textarea:focus, .form-select:focus { outline: none; border-color: var(--primary); }
.form-hint { margin-top: 12px; font-size: 13px; color: var(--muted); }
.form-links { margin-top: 14px; font-size: 13px; color: var(--muted); display: flex; justify-content: space-between; }
.form-links a { color: var(--primary); cursor: pointer; }
.tab-row { display: flex; gap: 8px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.tab { flex: 1; text-align: center; padding: 10px 0; font-size: 15px; color: var(--sub); cursor: pointer; border-bottom: 2px solid transparent; }
.tab.active { color: var(--primary); font-weight: 700; border-bottom-color: var(--primary); }
.report-phone { display: flex; align-items: center; gap: 16px; background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: #fff; border-radius: 14px; padding: 22px; }
.report-phone .ico { font-size: 34px; }
.report-phone .txt { flex: 1; }
.report-phone .txt .t { font-size: 14px; opacity: .92; }
.report-phone .txt .n { font-size: 26px; font-weight: 700; letter-spacing: 1px; margin-top: 2px; }
.report-phone a { color: #fff; }
.report-flow { background: var(--card); border-radius: 14px; box-shadow: var(--shadow); padding: 24px; }
.report-flow ul { list-style: none; }
.report-flow li { font-size: 14px; color: #444; padding: 7px 0 7px 18px; position: relative; }
.report-flow li::before { content: '·'; position: absolute; left: 4px; color: var(--primary); font-weight: 700; }

/* 内容页（关于我们 / 服务协议 / 隐私政策） */
.page { background: var(--card); border-radius: 14px; box-shadow: var(--shadow); padding: 28px; }
.page h1 { font-size: 22px; font-weight: 700; }
.page .updated { color: var(--muted); font-size: 13px; margin: 8px 0 4px; }
.page h2 { font-size: 17px; font-weight: 700; margin: 24px 0 8px; }
.page p { font-size: 15px; color: #333; line-height: 1.85; margin: 8px 0; }
.page a { color: var(--primary); }

/* 页脚链接 */
.footer-links { font-size: 13px; }
.footer-links a { color: var(--primary); }
.footer-links a:hover { text-decoration: underline; }

/* 协议勾选 */
.agree-line { display: flex; align-items: flex-start; gap: 8px; margin-top: 14px; font-size: 13px; color: var(--sub); line-height: 1.6; }
.agree-line input { margin-top: 3px; flex-shrink: 0; }
.agree-line a { color: var(--primary); }

/* ===== 分类浏览（找螺丝 / 找物流）：左侧二级分类 + 右侧内容 ===== */
.cat-layout {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 16px;
  padding: 24px 0;
  align-items: start;
}
.cat-side {
  position: sticky; top: 76px;
  background: var(--card); border-radius: 14px; box-shadow: var(--shadow);
  padding: 8px; max-height: calc(100vh - 96px); overflow-y: auto;
}
.side-item {
  padding: 12px 14px; border-radius: 10px; font-size: 15px; color: var(--sub); cursor: pointer;
}
.side-item:hover { background: #f3f6ff; color: var(--primary); }
.side-item.active { background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: #fff; font-weight: 700; }
.cat-main { min-width: 0; }
.cat-banner-row { display: flex; gap: 10px; margin-bottom: 14px; }
.cat-banner-item { flex: 1; min-width: 0; border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); cursor: pointer; }
.cat-banner-item img { width: 100%; height: auto; display: block; background: #eef0f3; }
.cat-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.chip {
  padding: 7px 16px; border-radius: 999px; font-size: 13px; background: #fff; color: var(--sub);
  border: 1px solid #e8e8e8; cursor: pointer;
}
.chip:hover { border-color: var(--primary); color: var(--primary); }
.chip.active { background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: #fff; border-color: transparent; font-weight: 700; }

/* 找物流：商家介绍卡 + 可点电话 */
.logi-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.logi-card {
  background: var(--card); border-radius: 12px; padding: 16px; box-shadow: var(--shadow); cursor: pointer;
}
.logi-card:hover { box-shadow: var(--shadow-lg); }
.logi-head { display: flex; align-items: center; justify-content: space-between; }
.logi-name { font-size: 16px; font-weight: 700; }
.logi-body { margin-top: 8px; font-size: 14px; color: #444; line-height: 1.7; white-space: pre-line; }
.logi-text { color: #444; white-space: pre-line; }
.logi-phone { color: var(--red); font-weight: 600; text-decoration: none; white-space: pre-line; }
.logi-phone:hover { text-decoration: underline; }
.logi-foot { display: flex; gap: 18px; margin-top: 12px; font-size: 12px; color: var(--muted); }

@media (max-width: 720px) {
  .cat-layout { grid-template-columns: 1fr; }
  .cat-side { position: static; display: flex; gap: 8px; overflow-x: auto; max-height: none; white-space: nowrap; padding: 8px; }
  .side-item { flex-shrink: 0; }
  .cat-banner-row { flex-direction: column; }
}

/* ===== 桌面端增强：详情两栏 + 登录两栏 ===== */
.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 20px;
  align-items: start;
}
.detail-main { min-width: 0; }
.detail-side { position: sticky; top: 80px; display: flex; flex-direction: column; gap: 14px; }
.side-card { background: var(--card); border-radius: 14px; box-shadow: var(--shadow); padding: 22px; }
.side-card .side-title { font-size: 17px; font-weight: 700; margin-bottom: 14px; }
.side-card .side-row { display: flex; gap: 10px; font-size: 14px; color: var(--sub); padding: 5px 0; word-break: break-all; }
.side-card .side-row .k { color: var(--muted); min-width: 52px; flex-shrink: 0; }
.side-card .side-phone { font-size: 22px; font-weight: 700; color: var(--primary); letter-spacing: .5px; }
.side-card .side-note { margin-top: 12px; font-size: 12px; color: var(--muted); line-height: 1.7; }

.login-wrap { display: grid; grid-template-columns: 1fr 1.15fr; max-width: 900px; margin: 0 auto; border-radius: 18px; overflow: hidden; box-shadow: var(--shadow-lg); background: #fff; }
.login-brand { background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: #fff; padding: 48px 40px; display: flex; flex-direction: column; justify-content: center; }
.login-brand .logo { font-size: 44px; }
.login-brand h2 { font-size: 26px; font-weight: 700; margin-top: 16px; }
.login-brand p { margin-top: 12px; font-size: 14px; opacity: .92; line-height: 1.9; }
.login-form { padding: 40px 44px; }
.login-wrap .form-card { box-shadow: none; border-radius: 0; padding: 0; background: transparent; }

/* 我的页面：两栏卡片 */
.me-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }

@media (max-width: 900px) {
  .card-list { grid-template-columns: repeat(2, 1fr); }
  .detail-layout { grid-template-columns: 1fr; }
  .detail-side { position: static; }
  .login-wrap { grid-template-columns: 1fr; }
  .login-brand { display: none; }
  .logi-list { grid-template-columns: 1fr; }
  .me-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .card-list { grid-template-columns: 1fr; }
}

/* ===== 首页两侧广告位 + 平台动态（临时，许可证审核用，通过后删除） ===== */
.home-layout {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr) 210px;
  gap: 18px;
  align-items: start;
  margin-top: 8px;
}
.home-main { min-width: 0; }
.home-main .section:first-child { padding-top: 4px; }
.home-ad { display: flex; flex-direction: column; gap: 14px; }
.home-ad-left, .home-ad-right { position: sticky; top: 76px; }

/* 侧边广告（商家卡片，自然风格，弱化模板感） */
.ad-slot {
  background: #fff; border: 1px solid #e8edf5; border-radius: 12px;
  padding: 16px; box-shadow: var(--shadow);
  transition: transform .18s, box-shadow .18s;
}
.ad-slot:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.ad-slot .ad-name { font-size: 16px; font-weight: 700; color: #1a1a1a; }
.ad-slot .ad-desc { margin-top: 6px; font-size: 13px; color: #666; line-height: 1.6; }
.ad-slot .ad-contact { margin-top: 8px; font-size: 13px; color: var(--primary); font-weight: 600; }
.ad-slot .ad-btn {
  display: inline-block; margin-top: 12px; padding: 5px 16px; border-radius: 6px;
  background: #eef3ff; color: var(--primary); font-size: 13px;
}
.ad-slot-empty { border-style: dashed; background: #fafbfc; }

/* 平台动态 */
.news-list { background: #fff; border-radius: 14px; box-shadow: var(--shadow); padding: 4px 22px; }
.news-item { display: flex; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); align-items: center; }
.news-item:last-child { border-bottom: none; }
.news-item .news-date { flex-shrink: 0; width: 58px; text-align: center; background: #f3f6ff; border-radius: 10px; padding: 9px 0; color: var(--primary); }
.news-item .news-date .d { font-size: 20px; font-weight: 700; line-height: 1.1; }
.news-item .news-date .m { font-size: 11px; margin-top: 2px; }
.news-item .news-body { flex: 1; min-width: 0; }
.news-item .news-title { font-size: 15px; font-weight: 700; }
.news-item .news-desc { font-size: 13px; color: #888; margin-top: 5px; line-height: 1.6; }
@media (max-width: 1080px) {
  .home-layout { grid-template-columns: 1fr; }
  .home-ad-left, .home-ad-right { position: static; }
  .home-ad { flex-direction: row; flex-wrap: wrap; }
  .home-ad .ad-slot { flex: 1 1 160px; min-width: 150px; }
  .home-ad .ad-img { height: 90px; font-size: 28px; }
}

/* ===== 评论区（求购/本地信息详情） ===== */
.comment-section { margin-top: 20px; background: var(--card); border-radius: 14px; box-shadow: var(--shadow); padding: 20px; }
.comment-title { font-size: 17px; font-weight: 700; margin-bottom: 14px; }
.comment-list { display: flex; flex-direction: column; }
.comment-item { border-bottom: 1px solid var(--line); padding: 12px 0; }
.comment-item:last-child { border-bottom: none; }
.comment-head { display: flex; align-items: center; gap: 10px; }
.comment-name { font-size: 14px; font-weight: 700; color: var(--sub); }
.comment-time { font-size: 12px; color: var(--muted); }
.comment-content { margin-top: 6px; font-size: 14px; color: #333; line-height: 1.7; word-break: break-all; white-space: pre-line; }
.comment-form { margin-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.comment-form textarea { width: 100%; min-height: 72px; padding: 10px 12px; border: 1px solid #e5e5e5; border-radius: 8px; font-size: 14px; font-family: inherit; resize: vertical; box-sizing: border-box; }
.comment-form textarea:focus { outline: none; border-color: var(--primary); }
.comment-form .btn { align-self: flex-end; }
.comment-login-tip { margin-top: 14px; font-size: 13px; color: var(--muted); }
.comment-login-tip a { color: var(--primary); }

/* ===== 精选供应商（有主图） ===== */
.featured-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.featured-card { background: #fff; border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); cursor: pointer; transition: transform .15s, box-shadow .15s; }
.featured-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.featured-card img { width: 100%; aspect-ratio: 16/10; object-fit: fill; display: block; background: #eef0f3; }
.featured-card .fc-noimg { width: 100%; aspect-ratio: 16/10; display: flex; align-items: center; justify-content: center; font-size: 34px; background: #f0f3f7; color: #c3cbd8; }
.featured-card .fc-body { padding: 12px 14px; }
.featured-card .fc-name { font-size: 15px; font-weight: 700; }
.featured-card .fc-biz { margin-top: 4px; font-size: 13px; color: #888; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 640px) { .featured-grid { grid-template-columns: repeat(2, 1fr); } }
