/* =========================================================
   在租车型（栏目 59）移动端页面公共样式
   配套模板：pc/lists_product_zuche.htm / pc/view_product_zuche.htm
   存放位置：pc/skin/css/zuche.css
   说明：完全自包含，不引用全站 style.css，避免被 PC 端样式覆盖。
   ========================================================= */
:root {
  --z-green: #05c46b;
  --z-green-deep: #0aa85f;
  --z-green-pale: #eafaf1;
  --z-green-line: #d7f2e3;
  --z-ink: #123528;
  --z-text: #3c4240;
  --z-gray: #8b9290;
  --z-line: #ecefef;
  --z-bg: #f7f9f8;
  --z-orange: #ffb43a;
  --z-page-w: 440px;
  --z-tabbar-h: 60px;
  --z-bottom-h: 68px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: #e9edeb;
  color: var(--z-text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.6;
}
img { display: block; max-width: 100%; border: 0; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; border: 0; background: none; padding: 0; cursor: pointer; }
h1, h2, h3, p { margin: 0; }

/* 手机宽度容器，PC 上居中显示 */
.z-page {
  position: relative;
  max-width: var(--z-page-w);
  min-height: 100vh;
  margin: 0 auto;
  background: var(--z-bg);
  box-shadow: 0 0 24px rgba(0, 0, 0, .06);
  /* 容器不能把 overflow 设成 hidden 或 auto —— 祖先一旦这样，下面 .z-topbar 的 sticky 就失效，标题栏固定不住 */
  overflow: visible;
}
.z-page.has-tabbar { padding-bottom: calc(var(--z-tabbar-h) + env(safe-area-inset-bottom, 0px)); }
.z-page.has-bottombar { padding-bottom: calc(var(--z-bottom-h) + env(safe-area-inset-bottom, 0px)); }

/* ---------- 顶部标题栏 ---------- */
.z-topbar {
  position: -webkit-sticky; position: sticky; top: 0; z-index: 30;
  height: 48px;
  display: flex; align-items: center; justify-content: center;
  background: #fff;
  border-bottom: 1px solid #f0f2f1;
}
.z-topbar h1 { font-size: 17px; font-weight: 600; color: #171a19; letter-spacing: .5px; }
.z-top-left, .z-top-right {
  position: absolute; top: 0; height: 48px;
  display: flex; align-items: center; gap: 12px;
  padding: 0 14px;
}
.z-top-left { left: 0; }
.z-top-right { right: 0; }
.z-ico {
  width: 22px; height: 22px; display: inline-flex;
  align-items: center; justify-content: center;
  color: #222; flex: none;
}
.z-ico svg { width: 100%; height: 100%; display: block; }
.z-top-sep { width: 1px; height: 18px; background: #dedede; }

/* ---------- 栏目页：导语 ---------- */
.z-intro { padding: 18px 18px 14px; }
.z-intro h2 { font-size: 23px; line-height: 1.35; font-weight: 800; color: var(--z-ink); letter-spacing: .5px; }
.z-intro p { margin-top: 4px; font-size: 13px; color: var(--z-gray); }

/* ---------- 栏目页：banner 轮播 ---------- */
.z-banner { margin: 0 16px; border-radius: 12px; overflow: hidden; position: relative; }
.z-banner-track { display: flex; transition: transform .45s ease; }
.z-banner-slide { min-width: 100%; height: 128px; position: relative; overflow: hidden; }
.z-banner-slide img { width: 100%; height: 100%; object-fit: cover; }
.z-banner-dots {
  position: absolute; left: 0; right: 0; bottom: 8px;
  display: flex; justify-content: center; gap: 5px; z-index: 2;
}
.z-banner-dots i { width: 5px; height: 5px; border-radius: 5px; background: rgba(255,255,255,.6); transition: all .25s; }
.z-banner-dots i.on { width: 14px; background: #fff; }

/* 无图时的兜底 banner（纯 CSS，不编造电话/二维码） */
.z-slide-fallback {
  width: 100%; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; position: relative; overflow: hidden;
}
.z-slide-fallback::after {
  content: ""; position: absolute; left: -10%; right: -10%; bottom: -46px; height: 92px;
  border: 2px solid rgba(5, 196, 107, .16); border-radius: 50% 50% 0 0;
}
.z-slide-fallback.green { background: linear-gradient(135deg, #effef5 0%, #d6f8e5 100%); }
.z-slide-fallback.orange { background: linear-gradient(120deg, #ff9d2e 0%, #f96a1f 60%, #1b3a6b 100%); }
.z-slide-fallback strong { font-size: 25px; font-weight: 900; letter-spacing: 2px; line-height: 1.3; }
.z-slide-fallback.green strong:first-child { color: #079b4e; }
.z-slide-fallback.green strong:nth-child(2) { color: #2b3a63; }
.z-slide-fallback.orange strong { color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,.18); font-size: 22px; }
.z-slide-fallback small { margin-top: 7px; font-size: 11px; letter-spacing: 1px; color: #2b3a63; }
.z-slide-fallback.orange small { color: #fff; }
.z-slide-tags { margin-top: 8px; display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.z-slide-tags span {
  font-size: 10px; color: #fff; border: 1px solid rgba(255,255,255,.85);
  border-radius: 20px; padding: 1px 9px; background: rgba(255,255,255,.08);
}

/* ---------- 栏目页：分类卡 ---------- */
.z-cats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 14px 16px 4px; }
.z-cat {
  position: relative; display: block; height: 104px;
  border: 1px solid #e9eceb; border-radius: 12px; background: #fff;
  overflow: hidden; text-align: center;
}
.z-cat.on { border-color: var(--z-green); background: var(--z-green-pale); }
.z-cat img { width: 100%; height: 66px; object-fit: contain; margin-top: 3px; }
.z-cat span { display: block; font-size: 15px; color: #4b5551; font-weight: 600; line-height: 1.4; }
.z-cat.on span { color: #1c7a4c; }
/* 选择器要压过上面的 .z-cat span（后者优先级更高，曾导致三个分类卡都显示绿勾） */
.z-cat .z-cat-check {
  position: absolute; top: 6px; right: 6px; width: 18px; height: 18px;
  border-radius: 50%; background: var(--z-green); display: none;
  align-items: center; justify-content: center;
}
.z-cat.on .z-cat-check { display: flex; }
.z-cat-check svg { width: 11px; height: 11px; }
/* 分类图缺省时用文字占位 */
.z-cat-ph {
  height: 66px; margin-top: 3px; display: flex; align-items: center; justify-content: center;
  font-size: 30px; color: #c3d8cd; font-weight: 800; letter-spacing: -2px;
}

/* ---------- 栏目页：区块标题 ---------- */
.z-sec-head { display: flex; align-items: baseline; justify-content: space-between; padding: 18px 18px 12px; }
.z-sec-head h2 { font-size: 19px; font-weight: 800; color: var(--z-ink); }
.z-sec-head span { font-size: 12px; color: var(--z-gray); }

/* ---------- 栏目页：车型卡片 ---------- */
.z-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; padding: 0 16px; }
.z-card {
  position: relative; background: #fff; border: 1px solid #eef0ef; border-radius: 12px;
  padding: 10px 10px 12px; overflow: hidden;
}
.z-card.hide { display: none; }
.z-card-pic { position: relative; display: block; border-radius: 8px; overflow: hidden; background: #f2f6f4; }
.z-card-pic img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.z-hot {
  position: absolute; top: 0; left: 0; z-index: 2;
  background: var(--z-orange); color: #fff; font-size: 11px; font-weight: 600;
  padding: 3px 10px 4px; border-radius: 8px 0 10px 0; letter-spacing: .5px;
}
/* 默认只给前两张加热销角标；想手动控制可删掉下面两条规则并给卡片加 class="z-hot-on" */
.z-card .z-hot { display: none; }
.z-card:nth-child(-n+2) .z-hot, .z-card.z-hot-on .z-hot { display: block; }
.z-card h3 { margin-top: 10px; font-size: 16px; font-weight: 700; color: #1b3a2c; line-height: 1.35; }
.z-card .z-spec { margin-top: 3px; font-size: 11.5px; color: #929a97; line-height: 1.5; min-height: 18px; }
.z-card .z-rule { height: 1px; background: var(--z-line); margin: 9px 0 8px; }
.z-card .z-note { font-size: 12.5px; color: #6a716e; margin-bottom: 9px; }
.z-btn {
  display: flex; align-items: center; justify-content: center; gap: 4px;
  width: 100%; height: 40px; border-radius: 8px;
  background: var(--z-green); color: #fff; font-size: 15px; font-weight: 700;
  letter-spacing: 1px;
}
.z-btn:active { background: var(--z-green-deep); }
.z-btn svg { width: 14px; height: 14px; }
.z-empty { grid-column: 1 / -1; text-align: center; color: var(--z-gray); padding: 40px 0; font-size: 13px; }
.z-end { text-align: center; color: #a6adaa; font-size: 12px; padding: 22px 0 26px; }

/* ---------- 栏目页：底部 tab ---------- */
.z-tabbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: var(--z-page-w); z-index: 40;
  height: calc(var(--z-tabbar-h) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: #fff; border-top: 1px solid #eef0ef;
  display: grid; grid-template-columns: repeat(5, 1fr);
}
.z-tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: #a8aeac; }
.z-tab svg { width: 23px; height: 23px; display: block; }
.z-tab span { font-size: 11px; }
.z-tab.on { color: var(--z-green); font-weight: 600; }

/* ---------- 内容页：车辆画廊（大图 + 图片集缩略图） ---------- */
.z-gallery { margin: 12px 14px 0; padding: 10px; background: #fff; border-radius: 8px; }
.z-gallery-main { border: 1px solid #e6eae8; border-radius: 4px; overflow: hidden; background: #fff; }
.z-gallery-main img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; display: block; }
.z-thumbs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.z-thumb { display: block; padding: 0; background: #fff; border: 2px solid #e6eae8; border-radius: 4px; overflow: hidden; }
.z-thumb.on { border-color: var(--z-green); }
.z-thumb img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }

/* ---------- 内容页：标题卡 ---------- */
.z-titlecard {
  margin: 12px 14px 0; padding: 14px 16px; background: #fff; border-radius: 8px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  box-shadow: 0 2px 8px rgba(20, 50, 35, .05);
}
.z-titlecard h2 { font-size: 20px; font-weight: 700; color: #191c1b; line-height: 1.35; }
.z-titlecard p { margin-top: 3px; font-size: 13px; color: #9aa09d; }
.z-titlecard .z-empty-sub { display: none; }
.z-consult { flex: none; display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--z-green); font-size: 12.5px; }
.z-consult svg { width: 23px; height: 23px; }

/* ---------- 内容页：基础参数 ---------- */
.z-param { margin: 14px 14px 0; border: 1px solid var(--z-green-line); border-radius: 10px; overflow: hidden; background: #fff; }
.z-param-hd { background: var(--z-green-pale); padding: 10px 14px; font-size: 15px; font-weight: 800; color: #1a2b22; }
.z-param-bd { display: grid; grid-template-columns: repeat(4, 1fr); padding: 16px 4px 18px; }
.z-param-cell { text-align: center; position: relative; padding: 0 2px; }
.z-param-cell + .z-param-cell::before {
  content: ""; position: absolute; left: 0; top: 6px; bottom: 6px; width: 1px; background: #e8ecea;
}
.z-param-cell b { display: block; font-size: 19px; font-weight: 800; color: #191c1b; line-height: 1.3; word-break: break-all; }
.z-param-cell span { display: block; margin-top: 4px; font-size: 11.5px; color: var(--z-gray); }

/* ---------- 内容页：商品详情 / 服务内容 ---------- */
.z-section { margin: 22px 14px 0; }
.z-section > h2 { font-size: 18px; font-weight: 800; color: #191c1b; margin-bottom: 12px; }
.z-detail-body { font-size: 14px; color: var(--z-text); line-height: 1.8; overflow: hidden; }
.z-detail-body img { max-width: 100% !important; height: auto !important; display: block; margin: 0 auto 10px; }
.z-detail-body table { max-width: 100%; width: 100% !important; border-collapse: collapse; }
.z-detail-body p { margin-bottom: 10px; }
.z-detail-body:empty::after { content: "暂无商品详情"; display: block; color: #a6adaa; font-size: 13px; padding: 8px 0 20px; }

.z-service { padding-bottom: 14px; }
.z-svc-item { display: flex; gap: 10px; margin-bottom: 18px; }
.z-svc-ico { flex: none; width: 26px; height: 26px; margin-top: 2px; color: var(--z-green); }
.z-svc-ico svg { width: 100%; height: 100%; display: block; }
.z-svc-txt { flex: 1; min-width: 0; }
.z-svc-txt h3 { font-size: 16px; font-weight: 700; color: #1c211f; line-height: 1.5; }
.z-svc-txt p { margin-top: 5px; font-size: 14px; color: #4a514e; line-height: 1.75; }

/* ---------- 内容页：底部操作栏 ---------- */
.z-bottombar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: var(--z-page-w); z-index: 40;
  min-height: calc(var(--z-bottom-h) + env(safe-area-inset-bottom, 0px));
  padding: 8px 16px calc(8px + env(safe-area-inset-bottom, 0px));
  background: #fff; border-top: 1px solid #eef0ef;
  display: flex; align-items: center; gap: 18px;
}
.z-share { flex: none; width: 46px; display: flex; flex-direction: column; align-items: center; color: #4a514e; font-size: 11.5px; gap: 2px; }
.z-share svg { width: 22px; height: 22px; }
.z-bottombar .z-btn { flex: 1; height: 46px; font-size: 17px; border-radius: 10px; }

/* ---------- 轻提示 ---------- */
.z-toast {
  position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%) translateY(10px);
  background: rgba(35, 42, 38, .88); color: #fff; font-size: 13px;
  padding: 9px 18px; border-radius: 20px; z-index: 99; opacity: 0;
  transition: opacity .2s, transform .2s; pointer-events: none; white-space: nowrap;
}
.z-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (min-width: 560px) {
  .z-page { margin: 12px auto; min-height: calc(100vh - 24px); }
}
