/* ===== 买家端前台样式（列表页 + 详情页） ===== */

/* ---- 顶部店招 ---- */
.shopbar {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, #0d1b33 0%, #16345f 52%, #1f4a85 100%);
  color: #fff;
}
/* 右上光晕装饰 */
.shopbar::before {
  content: ''; position: absolute; pointer-events: none;
  right: -70px; top: -70px; width: 240px; height: 240px; border-radius: 50%;
  background: radial-gradient(circle, rgba(120,180,255,.28), transparent 68%);
}
/* 右下柔光装饰 */
.shopbar::after {
  content: ''; position: absolute; pointer-events: none;
  right: -140px; bottom: -150px; width: 260px; height: 260px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.10), transparent 70%);
}
.shopbar-in {
  position: relative;
  padding-top: 30px; padding-bottom: 26px;
  padding-right: 22px; padding-left: 22px;
  padding-right: calc(22px + env(safe-area-inset-right));
  padding-left: calc(22px + env(safe-area-inset-left));
}
.shopbar .shop-name {
  font-size: 24px; font-weight: 800; letter-spacing: 1px;
  display: flex; align-items: center; gap: 9px;
}
.shopbar .shop-name::before { content: '🚗'; font-size: 22px; }
.shopbar .shop-slogan {
  color: rgba(255,255,255,.78); font-size: 13px; margin-top: 6px; letter-spacing: .4px;
}
.shopbar .counts {
  display: flex; gap: 10px; margin-top: 16px;
  font-size: 12px; color: #cfe0f5;
}
.shopbar .counts span {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: 999px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.18);
}
.shopbar .counts b { font-size: 18px; margin-right: 0; color: #fff; }

/* ---- 顶部工具条 ---- */
.toolbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.toolbar-in {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 0;
}
.toolbar .result { font-size: 13px; color: var(--text2); flex: 1; white-space: nowrap; overflow: hidden; }
.sort-select {
  border: 1px solid var(--line); border-radius: 999px;
  padding: 5px 10px; font-size: 13px; background: #fff; color: var(--text);
  outline: none;
}
.icon-btn {
  width: 30px; height: 30px; border-radius: 50%;
  background: #fff; border: 1px solid var(--line);
  font-size: 15px; display: flex; align-items: center; justify-content: center;
}

/* ---- 公告条 ---- */
.notice {
  background: #fff8ec; color: #9a6b13;
  font-size: 13px; padding: 8px 14px;
}
.notice strong { margin-right: 6px; }

/* ---- 车辆卡片 ---- */
.car-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
  padding: 14px 0 30px;
}
.car-card {
  background: var(--card); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
  cursor: pointer; transition: transform .15s ease, box-shadow .15s ease;
}
.car-card:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(20,30,60,.12); }
.card-photo {
  position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: #e8ebf0;
}
.card-photo img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .3s ease;
}
.car-card:hover .card-photo img { transform: scale(1.04); }
.photo-tag {
  position: absolute; right: 8px; bottom: 8px;
  background: rgba(0,0,0,.5); color: #fff;
  font-size: 12px; padding: 2px 7px; border-radius: 6px;
}
.sold-mask {
  position: absolute; inset: 0; background: rgba(30,34,42,.55);
  display: flex; align-items: center; justify-content: center;
}
.sold-mask span {
  color: #fff; font-size: 26px; font-weight: 900; letter-spacing: 4px;
  border: 3px solid #fff; padding: 8px 18px; border-radius: 10px;
  transform: rotate(-12deg);
}

/* 已售红色水印（图片中央印章式） */
.sold-watermark {
  position: absolute; inset: 0; z-index: 3;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.10); pointer-events: none;
}
.sold-watermark span {
  color: #fff; font-size: clamp(24px, 8vw, 40px); font-weight: 900; letter-spacing: 8px;
  background: var(--accent); padding: 10px 24px; border-radius: 12px;
  border: 3px solid rgba(255,255,255,.9);
  box-shadow: 0 4px 18px rgba(0,0,0,.25);
  transform: rotate(-10deg);
  text-shadow: 0 1px 3px rgba(0,0,0,.3);
}
/* 已售卡片整体淡出 */
.car-card.is-sold .card-photo img { filter: saturate(.75) brightness(.96); }
/* 已售红色角标（卡片标题旁） */
.sold-label {
  display: inline-block; vertical-align: middle; margin-left: 6px;
  background: var(--accent); color: #fff; font-size: 11px; font-weight: 700;
  padding: 2px 8px; border-radius: 999px; transform: translateY(-2px);
}
/* 详情页已售横幅 */
.sold-ribbon {
  display: inline-flex; align-items: center; gap: 6px;
  background: #fff0f0; color: var(--accent); font-weight: 800; font-size: 14px;
  padding: 6px 12px; border-radius: 8px; margin-bottom: 8px;
}
.card-body { padding: 12px 14px 14px; }
.card-title {
  font-size: 15px; font-weight: 600;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; min-height: 46px;
}
.card-tags { margin-top: 6px; font-size: 13px; color: var(--text2); }
.card-tags span { margin-right: 10px; }
.card-bottom {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line);
}
.price { color: var(--accent); font-weight: 800; font-size: 19px; }
.price small { font-size: 13px; font-weight: 600; }
.card-bottom .loc { font-size: 12px; color: var(--text2); }

/* 提示按钮组（微信复制成功气泡） */
.toast {
  position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%);
  background: rgba(0,0,0,.78); color: #fff;
  padding: 9px 18px; border-radius: 999px; font-size: 14px;
  z-index: 99; opacity: 0; transition: opacity .25s; pointer-events: none;
}
.toast.show { opacity: 1; }

/* ---- 底部联系条 ---- */
.contact-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  background: rgba(255,255,255,.96); border-top: 1px solid var(--line);
  backdrop-filter: blur(8px);
}
.contact-in {
  display: flex; gap: 10px;
  max-width: 640px; margin: 0 auto;
  padding: 10px 16px 10px;
  padding-bottom: calc(10px + env(safe-area-inset-bottom));
}
.btn {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  border-radius: 10px; font-size: 15px; font-weight: 600;
  padding: 11px 0; flex: 1;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-green   { background: #1aad19; color: #fff; }
.btn-outline { background: #fff; border: 1px solid var(--line); color: var(--text); }
.btn[disabled] { opacity: .5; pointer-events: none; }
.contact-extra { max-width: 640px; margin: 0 auto; }

/* 页面内容下方预留被联系条遮挡的空间 */
.page-bottom-space { height: 84px; }

/* ---- 页脚 / 备案信息 ---- */
.site-footer {
  max-width: 640px; margin: 22px auto 0;
  padding: 16px 16px 0;
  text-align: center; font-size: 12px; line-height: 2;
  color: #98a2b3;
}
.site-footer .beian {
  color: #98a2b3; text-decoration: none;
  border-bottom: 1px dotted rgba(152,162,179,.55);
}
.site-footer .beian:active { color: var(--primary, #1f4e8c); }

/* ===== 详情页 ===== */
.detail-head {
  background: var(--primary);
  color: #fff;
}
.detail-head-in { display: flex; align-items: center; gap: 10px; padding: 12px 0; }
.back-btn {
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(255,255,255,.15); color: #fff; font-size: 18px;
  display: flex; align-items: center; justify-content: center; flex: none;
}
.detail-head-in .t { font-weight: 600; font-size: 16px; }

.gallery { position: relative; background: #10131a; }
.gallery-slide { display: none; width: 100%; }
.gallery-slide.active { display: block; }
.gallery-slide img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  margin: 0 auto;
}
.gallery .g-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255,255,255,.22); color: #fff; font-size: 17px;
  display: flex; align-items: center; justify-content: center;
  z-index: 5;
}
.g-arrow.prev { left: 8px; }
.g-arrow.next { right: 8px; }
.gallery .g-count {
  position: absolute; right: 12px; bottom: 10px; z-index: 5;
  background: rgba(0,0,0,.55); color: #fff; font-size: 12px;
  padding: 3px 9px; border-radius: 999px;
}
.g-dots { display: flex; justify-content: center; gap: 6px; padding: 8px 0; background: #10131a; }
.g-dots i { width: 6px; height: 6px; border-radius: 50%; background: #555; }
.g-dots i.on { background: #fff; width: 16px; border-radius: 3px; }

.panel {
  background: var(--card); margin: 10px 0;
  padding: 14px; border-radius: var(--radius);
}
.d-price { color: var(--accent); font-size: 26px; font-weight: 800; }
.d-title { font-size: 17px; font-weight: 700; margin-top: 6px; line-height: 1.45; }
.param-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px 8px;
  margin-top: 6px;
}
.param-grid .k { font-size: 12px; color: var(--text2); }
.param-grid .v { font-weight: 600; font-size: 14px; margin-top: 2px; word-break: break-all; }
.param-grid div.narrow { grid-column: span 2; }

.d-section-t { font-size: 15px; font-weight: 700; margin-bottom: 8px; display: flex; align-items: center; gap: 7px; }
.d-section-t::before { content: ''; width: 4px; height: 15px; background: var(--accent); border-radius: 2px; }
.d-desc { font-size: 14px; color: #3d4453; white-space: pre-wrap; }
.d-shop-info { display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.d-shop-info .row { display: flex; align-items: center; gap: 9px; }
.d-shop-info .ico {
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: #f0f2f6; font-size: 16px;
}
.copy-wechat { color: #1aad19; font-weight: 600; margin-left: 4px; font-size: 13px; border-bottom: 1px dashed #1aad19; }

/* 无车辆时头图占位 */
.notice-call {
  background: #fff8ec; color: #9a6b13; font-size: 13px; padding: 8px 14px;
}

@media (min-width: 641px) {
  .contact-bar { left: auto; right: auto; width: 100%; }
}

/* ===== 看车地点地图卡 ===== */
.map-card {
  cursor: pointer; border-radius: 12px; overflow: hidden;
  border: 1px solid var(--line, #e7ebf1);
  background: #fff; box-shadow: 0 2px 8px rgba(20, 30, 60, .05);
}
.map-card-frame {
  position: relative; width: 100%; height: 180px; background: #edf1f6;
}
.map-card-frame iframe,
.map-card-frame .map-card-map {
  width: 100%; height: 100%; border: 0; display: block; background: #edf1f6;
}
.map-card-frame iframe { pointer-events: none; }
.map-card-bar {
  display: flex; align-items: center; gap: 8px; padding: 11px 12px;
}
.map-card-pin { font-size: 17px; flex: none; }
.map-card-addr {
  flex: 1; min-width: 0; font-size: 13px; font-weight: 600; color: #31425e;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.map-card-go {
  flex: none; font-size: 12px; font-weight: 700; color: #fff;
  background: var(--accent, #d9261c); padding: 6px 13px; border-radius: 999px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .12);
}
.map-hint { font-size: 12px; color: var(--text2); margin-top: 8px; text-align: center; }

/* ===== 地图选择浮层 ===== */
.sheet-mask {
  position: fixed; inset: 0; background: rgba(10, 16, 30, .5); z-index: 90;
}
.nav-sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 91;
  background: #fff; border-radius: 16px 16px 0 0;
  max-width: 640px; margin: 0 auto;
  padding: 16px 14px calc(12px + env(safe-area-inset-bottom));
  animation: sheet-up .2s ease;
}
@keyframes sheet-up {
  from { transform: translateY(25%); opacity: .5; }
  to { transform: none; opacity: 1; }
}
.nav-sheet-title {
  font-size: 14px; font-weight: 700; color: #31425e; text-align: center;
  margin: 2px 8px 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.nav-item {
  width: 100%; display: flex; align-items: center; gap: 12px;
  padding: 12px 8px; border-top: 1px solid #f1f3f6; text-align: left;
}
.nav-item .ico { font-size: 21px; width: 32px; text-align: center; flex: none; }
.nav-item b { font-size: 15px; color: #20293a; }
.nav-item small {
  margin-left: auto; font-size: 12px; color: #9aa2b1; flex: none;
}
.nav-item:active { background: #f4f6f9; }
.nav-item.nav-cancel {
  justify-content: center; margin-top: 8px; padding: 12px;
  color: #8a93a5; font-weight: 600; border: none; border-radius: 10px; background: #f2f4f8;
}
.nav-item.nav-cancel:active { background: #e6eaf1; }
