/* ============================================================
   匠心养车轮胎汽修救援 · 官网样式
   移动优先 / 响应式 / 红色品牌主题
   ============================================================ */

:root {
  --red: #d81e06;
  --red-dark: #a81404;
  --red-light: #fbe9e7;
  --ink: #1a1a1a;
  --gray: #5a6066;
  --gray-light: #8a9099;
  --bg: #ffffff;
  --bg-soft: #f5f6f8;
  --line: #e6e8ec;
  --gold: #ffb000;
  --green: #1f9d55;
  --radius: 12px;
  --shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
  --maxw: 1080px;
  --header-h: 60px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
  font-size: 16px;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--red); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { line-height: 1.3; color: var(--ink); }

/* ---------- 布局容器 ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 18px;
}

.section { padding: 48px 0; }
.section.soft { background: var(--bg-soft); }

.section-title {
  font-size: 1.6rem;
  margin: 0 0 8px;
  position: relative;
  padding-left: 14px;
}
.section-title::before {
  content: "";
  position: absolute;
  left: 0; top: 0.18em; bottom: 0.18em;
  width: 5px; border-radius: 3px;
  background: var(--red);
}
.section-sub { color: var(--gray); margin: 0 0 28px; }

/* ---------- 顶部公告条 ---------- */
.topbar {
  background: var(--red);
  color: #fff;
  font-size: 0.85rem;
  text-align: center;
  padding: 7px 12px;
}
.topbar a { color: #fff; font-weight: 700; }

/* ---------- 头部 / 导航 ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #fff;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--ink);
  font-size: 1.05rem;
}
.brand:hover { text-decoration: none; }
.brand .logo {
  width: 34px; height: 34px;
  flex: none;
}
.brand small {
  display: block;
  font-weight: 500;
  font-size: 0.68rem;
  color: var(--gray);
  letter-spacing: 0.5px;
}

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  color: var(--ink);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
}
.nav a:hover { background: var(--bg-soft); text-decoration: none; }
.nav a.active { color: var(--red); }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  width: 42px; height: 42px;
  cursor: pointer;
  padding: 9px;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--ink);
  margin: 5px 0;
  border-radius: 2px;
  transition: 0.25s;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: 0.2s;
  text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-dark); }
.btn-outline { background: #fff; color: var(--red); border-color: var(--red); }
.btn-outline:hover { background: var(--red-light); }
.btn-ghost { background: rgba(255,255,255,0.15); color: #fff; border-color: rgba(255,255,255,0.6); }
.btn-ghost:hover { background: rgba(255,255,255,0.28); }
.btn-white { background: #fff; color: var(--red); }
.btn-white:hover { background: #ffe9e6; }
.btn-block { width: 100%; }

/* ---------- 首屏 Hero ---------- */
.hero {
  background: linear-gradient(135deg, #d81e06 0%, #a81404 100%);
  color: #fff;
  padding: 56px 0 64px;
}
.hero h1 {
  color: #fff;
  font-size: 2.1rem;
  margin: 0 0 12px;
}
.hero .lead {
  font-size: 1.05rem;
  opacity: 0.95;
  margin: 0 0 22px;
  max-width: 640px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero .badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.16);
  border: 1px solid rgba(255,255,255,0.35);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  margin-bottom: 18px;
}

/* ---------- 紧急拨号卡片 ---------- */
.callout {
  background: var(--red-light);
  border: 1px solid #f3c6bf;
  border-left: 5px solid var(--red);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin: 0 0 8px;
}
.callout h2 { margin-top: 0; font-size: 1.3rem; }
.callout .phone {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--red);
  display: inline-block;
  margin: 6px 0;
}

/* ---------- 服务卡片网格 ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  transition: 0.2s;
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card .ico {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: var(--red-light);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 12px;
}
.card h3 { margin: 0 0 6px; font-size: 1.1rem; }
.card p { margin: 0; color: var(--gray); font-size: 0.92rem; }

/* ---------- 特性列表 ---------- */
.feature {
  display: flex;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.feature:last-child { border-bottom: 0; }
.feature .num {
  flex: none;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.feature h3 { margin: 0 0 4px; font-size: 1.1rem; }
.feature p { margin: 0; color: var(--gray); }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  min-width: 540px;
}
th, td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
thead th {
  background: var(--bg-soft);
  font-weight: 700;
  white-space: nowrap;
}
tbody tr:hover { background: #fafbfc; }
.tag {
  display: inline-block;
  font-size: 0.78rem;
  background: var(--red-light);
  color: var(--red-dark);
  border-radius: 6px;
  padding: 2px 8px;
  margin: 2px 4px 2px 0;
  font-weight: 600;
}

/* ---------- 品牌墙 ---------- */
.brands { display: flex; flex-wrap: wrap; gap: 10px; }
.brand-chip {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 14px;
  font-weight: 600;
  font-size: 0.9rem;
}

/* ---------- 联系信息 ---------- */
.info-list { list-style: none; padding: 0; margin: 0; }
.info-list li {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.info-list .k { flex: none; width: 110px; font-weight: 700; color: var(--gray); }
.info-list .v { color: var(--ink); }

/* ---------- FAQ (details) ---------- */
details.faq {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 18px;
  margin-bottom: 12px;
  background: #fff;
}
details.faq summary {
  cursor: pointer;
  font-weight: 700;
  padding: 16px 0;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after {
  content: "+";
  font-size: 1.4rem;
  color: var(--red);
  flex: none;
}
details.faq[open] summary::after { content: "\2013"; }
details.faq p { margin: 0 0 16px; color: var(--gray); }

/* ---------- 页脚 ---------- */
.footer {
  background: #14161a;
  color: #c9ccd1;
  padding: 40px 0 24px;
  font-size: 0.92rem;
}
.footer h3 { color: #fff; font-size: 1.05rem; margin: 0 0 12px; }
.footer a { color: #ffd2cb; }
.footer .cols {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 28px;
}
.footer .phone-big { color: #fff; font-size: 1.4rem; font-weight: 800; }
.footer .copy {
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid #2a2d33;
  color: #8a9099;
  font-size: 0.82rem;
}
/* 工信部 ICP 备案号悬挂（须链接至备案管理系统首页） */
.footer .copy.beian {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #2a2d33;
  color: #c9ccd1;
  font-size: 0.82rem;
}
.footer .copy.beian a {
  color: #ffd2cb;
  text-decoration: underline;
}
.footer .copy.beian a:hover { color: #fff; }
/* 技术支持署名（紧随 ICP 备案号） */
.footer .copy.tech {
  margin-top: 10px;
  padding-top: 10px;
  border-top: none;
  color: #8a9099;
  font-size: 0.78rem;
}

/* ---------- 移动端浮动拨号 ---------- */
.float-call {
  position: fixed;
  right: 16px; bottom: 16px;
  z-index: 60;
  display: none;
  align-items: center;
  gap: 8px;
  background: var(--red);
  color: #fff;
  font-weight: 800;
  padding: 14px 20px;
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(216, 30, 6, 0.4);
}
.float-call:hover { text-decoration: none; color: #fff; background: var(--red-dark); }

/* ---------- 右侧悬浮咨询组件 ---------- */
.consult-fab {
  position: fixed;
  right: 0; top: 50%;
  transform: translateY(-50%);
  z-index: 70;
  writing-mode: vertical-rl;
  letter-spacing: 4px;
  background: var(--red);
  color: #fff;
  border: 0;
  border-radius: 12px 0 0 12px;
  padding: 18px 9px;
  font-size: 0.95rem;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  box-shadow: -2px 4px 16px rgba(216, 30, 6, 0.35);
  transition: background 0.2s;
}
.consult-fab:hover, .consult-fab.active { background: var(--red-dark); }
.consult-fab .consult-fab-ico {
  writing-mode: horizontal-tb;
  display: block;
  text-align: center;
  font-size: 1.05rem;
  margin-bottom: 6px;
}

.consult-toggle-cb { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.consult-panel {
  position: fixed;
  right: 52px; top: 50%;
  transform: translateY(-50%) translateX(14px);
  width: 312px;
  max-width: calc(100vw - 24px);
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  z-index: 71;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s, transform 0.22s, visibility 0.22s;
}
#consultToggle:checked ~ #consultPanel {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) translateX(0);
}

.consult-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  font-size: 1.02rem;
}
.consult-close {
  background: none;
  border: 0;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--gray-light);
  cursor: pointer;
  padding: 2px 6px;
}
.consult-close:hover { color: var(--ink); }

.consult-call {
  display: block;
  background: var(--red);
  color: #fff;
  border-radius: 10px;
  padding: 14px 16px;
  text-align: center;
  margin-bottom: 12px;
}
.consult-call:hover { background: var(--red-dark); text-decoration: none; color: #fff; }
.consult-call-label { display: block; font-size: 0.85rem; opacity: 0.92; }
.consult-call-num { display: block; font-size: 1.45rem; font-weight: 800; letter-spacing: 1px; margin: 3px 0 2px; }
.consult-call-sub { display: block; font-size: 0.78rem; opacity: 0.85; }

.consult-wechat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 12px;
  font-size: 0.88rem;
}
.consult-wechat .k { color: var(--gray); margin-right: 6px; }
.consult-wechat .v { font-weight: 800; }
.consult-wechat-sub { display: block; color: var(--gray-light); font-size: 0.76rem; margin-top: 2px; }
.consult-copy {
  flex: none;
  background: #fff;
  border: 1px solid var(--red);
  color: var(--red);
  border-radius: 8px;
  padding: 5px 12px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}
.consult-copy:hover { background: var(--red-light); }
.consult-copy.ok { background: var(--green); border-color: var(--green); color: #fff; }

.consult-info { list-style: none; margin: 0 0 12px; padding: 0; font-size: 0.85rem; }
.consult-info li { display: flex; gap: 8px; padding: 6px 0; }
.consult-info .k { flex: none; color: var(--gray); }
.consult-info .v { color: var(--ink); }

.consult-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}
.consult-links a {
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 4px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
}
.consult-links a:hover { border-color: var(--red); color: var(--red); background: var(--red-light); text-decoration: none; }

.consult-tip { margin: 0; font-size: 0.78rem; color: var(--gray-light); text-align: center; }

/* ---------- 响应式 ---------- */
@media (max-width: 860px) {
  .nav {
    position: absolute;
    top: var(--header-h);
    left: 0; right: 0;
    background: #fff;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }
  .nav.open { max-height: 360px; }
  .nav a { padding: 14px 18px; border-radius: 0; border-bottom: 1px solid var(--bg-soft); }
  .nav-toggle { display: block; }

  .footer .cols { grid-template-columns: 1fr; gap: 22px; }
  .float-call { display: inline-flex; }

  /* 悬浮咨询：右下圆钮（在浮动拨号上方），面板改为底部弹出 */
  .consult-fab {
    top: auto;
    bottom: 88px;
    right: 16px;
    transform: none;
    writing-mode: horizontal-tb;
    letter-spacing: 1px;
    padding: 12px 18px;
    border-radius: 999px;
    font-size: 0.92rem;
    box-shadow: 0 8px 24px rgba(216, 30, 6, 0.4);
  }
  .consult-fab .consult-fab-ico { display: inline; margin: 0 4px 0 0; }
  .consult-panel {
    top: auto;
    bottom: 150px;
    right: 12px;
    transform: translateY(10px);
  }
  #consultToggle:checked ~ #consultPanel { transform: translateY(0); }
}

@media (max-width: 560px) {
  body { font-size: 15px; }
  .hero { padding: 40px 0 48px; }
  .hero h1 { font-size: 1.7rem; }
  .section { padding: 36px 0; }
  .section-title { font-size: 1.35rem; }
  .hero-actions .btn { flex: 1 1 100%; }
  .info-list .k { width: 92px; }
}

/* 减少动画偏好 */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- 首页 Banner 轮播 ---------- */
/* 所有 slide 绝对定位铺满容器，靠 opacity 切换，杜绝“堆叠” */
.banner {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 62vh;            /* 大屏不至于变成一整屏高 */
  background: #0E1116;
  overflow: hidden;
  line-height: 0;
}
.banner-track { position: absolute; inset: 0; width: 100%; height: 100%; }
.banner-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .7s ease;
  z-index: 0;
}
.banner-slide.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  z-index: 1;
}
.banner-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;          /* 始终填满容器，自适应裁切 */
  display: block;
}
.banner-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px; height: 48px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s;
  z-index: 3;
}
.banner-arrow:hover { background: rgba(216, 30, 6, 0.88); }
.banner-arrow:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.banner-prev { left: 16px; }
.banner-next { right: 16px; }
.banner-dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 3;
}
.banner-dot {
  width: 11px; height: 11px;
  border-radius: 50%;
  border: 0;
  padding: 0;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  transition: background .2s, width .2s;
}
.banner-dot.is-active { background: #fff; width: 28px; border-radius: 6px; }

@media (max-width: 560px) {
  .banner-arrow { width: 38px; height: 38px; font-size: 1.4rem; }
  .banner-prev { left: 8px; }
  .banner-next { right: 8px; }
  .banner-dots { bottom: 10px; gap: 8px; }
}
