/* 法拉盛518 — v2 新增组件样式（广告位 / 私聊 / 购物车 / 库存 / 顺路车 / 司机卡片） */

/* ---------- 首页广告位 ---------- */
#homeAds { margin-bottom: 14px; }
.ad-strip { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
.ad-strip::-webkit-scrollbar { height: 4px; }
.ad-strip::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 4px; }
.ad-card {
  position: relative; flex: 0 0 auto; width: min(88vw, 420px); scroll-snap-align: start;
  display: flex; align-items: stretch; gap: 12px; overflow: hidden;
  background: linear-gradient(150deg, #fffdf6, #fdf2e6);
  border: 1px solid #efd9c2; border-radius: var(--radius); padding: 11px 13px;
  box-shadow: var(--shadow-1); transition: transform .16s var(--ease), box-shadow .16s var(--ease);
}
.ad-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.ad-img { width: 74px; height: 74px; border-radius: 10px; flex: 0 0 auto; background: #f3e9da center/cover no-repeat; }
.ad-info { min-width: 0; flex: 1; }
.ad-cat { font-size: 10.5px; letter-spacing: .1em; color: var(--amber); font-weight: 700; }
.ad-title { font-size: 15px; font-weight: 700; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ad-sub { font-size: 12.5px; color: var(--ink-2); margin-top: 3px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ad-contact { font-size: 12px; color: var(--ink-3); margin-top: 4px; font-variant-numeric: tabular-nums; }
.ad-badge {
  position: absolute; right: 0; top: 0; font-size: 9.5px; letter-spacing: .08em;
  background: #efd9c2; color: var(--amber); padding: 2px 7px 3px 9px; border-bottom-left-radius: 9px; font-weight: 700;
}

/* ---------- 私聊列表 ---------- */
.chat-list { list-style: none; margin: 0; padding: 0; }
.chat-list li { border-bottom: 1px solid var(--line); }
.chat-list li:last-child { border-bottom: 0; }
.chat-list a { display: flex; gap: 11px; align-items: center; padding: 12px 2px; }
.chat-list-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.chat-list-name { font-size: 15px; font-weight: 600; }
.chat-list-msg { font-size: 12.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 询价单气泡卡片 */
.cart-card { margin-top: 6px; border: 1px solid var(--line-strong); border-radius: 10px; background: #fff; padding: 9px 11px; font-size: 13px; max-width: 62ch; }
.cart-card-h { font-weight: 700; color: var(--green-800); margin-bottom: 5px; font-size: 12.5px; }
.cart-card-row { display: flex; justify-content: space-between; gap: 12px; color: var(--ink-2); padding: 1px 0; }
.cart-card-t { border-top: 1px dashed var(--line-strong); margin-top: 5px; padding-top: 5px; font-weight: 700; color: var(--amber); text-align: right; }

/* ---------- 店铺 CTA ---------- */
.shop-cta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.product-stock { font-size: 11.5px; color: var(--ink-3); margin-top: 4px; }
.shop-cta .btn-ghost { background: rgba(255,255,255,.18); }
.shop-cta .btn-ghost:hover { background: rgba(255,255,255,.3); }

/* ---------- 店铺后台 ---------- */
.admin-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.prod-admin { display: flex; flex-direction: column; }
.prod-row { display: flex; gap: 11px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line); }
.prod-row:last-child { border-bottom: 0; }
.prod-row img, .prod-ph { width: 54px; height: 54px; border-radius: 9px; object-fit: cover; background: var(--green-50); flex: 0 0 auto; }
.prod-main { flex: 1; min-width: 0; }
.prod-name { font-size: 14.5px; font-weight: 600; }
.prod-meta { font-size: 11.5px; color: var(--ink-3); margin-top: 2px; }
.prod-btns { display: flex; gap: 6px; flex: 0 0 auto; }
.img-pick { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.img-prev img { width: 92px; height: 92px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); margin-top: 6px; }

/* ---------- 扫码出入库 ---------- */
.scan-box .field input { font-size: 16px; }
#camVideo { max-height: 62dvh; object-fit: cover; }

/* ---------- 顺路车 / 司机 ---------- */
.ride-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.ride-stats .stat {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 13px 10px; text-align: center; box-shadow: var(--shadow-1);
}
.ride-stats .stat b { display: block; font-size: 22px; color: var(--green-800); font-variant-numeric: tabular-nums; line-height: 1.2; }
.ride-stats .stat span { font-size: 11.5px; color: var(--ink-3); }
.driver-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 13px; background: #fff; }
.driver-h { display: flex; gap: 10px; align-items: center; }
.driver-name { font-size: 15px; font-weight: 600; }
.driver-sub { font-size: 11.5px; color: var(--ink-3); margin-top: 1px; }
.driver-route { font-size: 14px; font-weight: 600; color: var(--green-800); margin-top: 9px; }
.driver-meta { display: flex; gap: 10px; flex-wrap: wrap; font-size: 12px; color: var(--ink-3); margin-top: 4px; }
.driver-meta .dot::before { content: "·"; margin-right: 6px; color: var(--line-strong); }
.online-toggle {
  display: flex; gap: 12px; align-items: center; justify-content: space-between;
  border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 13px 14px; margin-top: 14px;
  background: #fff;
}
.online-toggle.on { border-color: var(--green-600); background: var(--green-50); }

/* ---------- 购物车 ---------- */
.cart-row { display: flex; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.cart-nm { flex: 1; min-width: 0; }
.cart-p { font-variant-numeric: tabular-nums; color: var(--amber); font-weight: 600; }
.cart-del { border: 0; background: transparent; color: var(--ink-3); font-size: 18px; line-height: 1; padding: 4px 6px; border-radius: 6px; }
.cart-del:hover { background: var(--red-bg); color: var(--red); }
.cart-total { text-align: right; font-size: 14px; color: var(--ink-2); margin: 10px 0 12px; }
.cart-total b { color: var(--amber); font-size: 18px; }

/* ---------- 商家名片 ---------- */
.shop-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 24px 20px; text-align: center; box-shadow: var(--shadow-2); max-width: 460px; margin: 0 auto;
}
.shop-card-av {
  width: 68px; height: 68px; border-radius: 20px; margin: 0 auto 12px;
  display: grid; place-items: center; font-size: 22px; font-weight: 800;
  background: linear-gradient(150deg, var(--green-800), var(--green-600)); color: #fff;
}
.shop-card h1 { font-size: 20px; margin: 0 0 4px; }
.shop-card-cat { display: inline-block; font-size: 11.5px; background: var(--green-100); color: var(--green-800); border-radius: 999px; padding: 2px 10px; font-weight: 600; }
.shop-card p { font-size: 13.5px; color: var(--ink-2); margin: 10px 0 0; }
.shop-card-rows { margin-top: 14px; text-align: left; display: grid; gap: 7px; font-size: 13px; }
.shop-card-rows > div { display: flex; gap: 10px; }
.shop-card-rows span { color: var(--ink-3); width: 46px; flex: 0 0 auto; }
.qrcode-box { margin-top: 16px; display: grid; place-items: center; }
.qrcode-box img { border-radius: 10px; border: 1px solid var(--line); padding: 6px; background: #fff; }
.shop-card-tip { font-size: 12px !important; color: var(--ink-3) !important; }

@media (min-width: 760px) {
  .ad-card { width: 320px; }
  .ride-stats .stat b { font-size: 26px; }
  .shop-card { padding: 30px 28px; }
}
