/* ==========================================================================
   布局：页头（含产品大菜单）、内页页头、区块、页脚、手机菜单与底部操作栏
   ========================================================================== */

/* ---------- 页头：悬浮胶囊 ---------- */
.site-header {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  width: max-content;
  max-width: calc(100% - 32px);
  height: 64px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.97);
  border-radius: 999px;
  box-shadow:
    0 1px 2px rgba(var(--shade), 0.06),
    0 12px 40px -12px rgba(var(--shade), 0.28);
}

.site-header > .wrap {
  max-width: none;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 0 10px 0 28px;
}

.site-logo {
  position: relative;
  display: block;
  flex-shrink: 0;
}

.site-logo,
.site-logo img {
  height: 28px;
}

.site-logo img {
  width: auto;
}

.nav {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 6px;
  height: 100%;
}

.nav-item {
  position: static;
  height: 100%;
  display: flex;
  align-items: center;
}

.nav-link {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  gap: 4px;
  height: 100%;
  padding: 0 14px;
  border: 0;
  background: none;
  color: inherit;
  font-family: var(--label);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.01em;
  white-space: nowrap;
  opacity: 0.9;
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 18px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}

.nav-link:hover,
.nav-link.on {
  opacity: 1;
}

.nav-link:hover::after,
.nav-link.on::after,
.nav-item.open .nav-link::after {
  transform: scaleX(1);
}

/* 产品中心大菜单 */
.mega {
  position: absolute;
  left: 50%;
  top: calc(100% + 10px);
  width: min(1080px, calc(100vw - 32px));
  background: #fff;
  color: var(--ink);
  border-radius: 24px;
  box-shadow: 0 30px 80px -24px rgba(var(--shade), 0.35);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, -6px);
  transition:
    opacity 0.25s,
    visibility 0.25s,
    transform 0.3s var(--ease);
}

.nav-item.open .mega {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

.mega .wrap {
  max-width: none;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 250px;
  align-items: start;
  gap: 44px;
  padding: 36px 40px 40px;
}

.mega h5 {
  margin: 0 0 16px;
  font: 500 12px var(--num);
  letter-spacing: 0.2em;
  color: var(--faint);
  text-transform: uppercase;
}

.mega-types,
.mega-areas {
  display: grid;
}

.mega-areas {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 32px;
}

.mega-types a,
.mega-areas a {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--line-2);
}

.mega-types a {
  padding: 10px 0;
  font-size: 15px;
}

.mega-areas a {
  padding: 9px 0;
  font-size: 14px;
  color: var(--ink-2);
}

.mega-types a:hover,
.mega-areas a:hover {
  color: var(--brand);
}

.mega-types a span,
.mega-areas a span {
  font: 300 13px var(--num);
  color: var(--faint);
}

.mega-card {
  display: grid;
  gap: 12px;
  padding-left: 32px;
  border-left: 1px solid var(--line);
}

.mega-card b {
  font: 300 22px/1.4 var(--head);
  color: var(--ink);
}

.mega-card .small {
  color: var(--ink-2);
}

.mega-card .btn {
  justify-self: start;
}

/* 页头右侧操作 */
.hdr-actions {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.search-pill {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: var(--bg-2);
  color: inherit;
  font-family: var(--label);
  font-size: 14px;
  letter-spacing: 0.04em;
  white-space: nowrap;
  opacity: 0.9;
}

.search-pill:hover {
  opacity: 1;
}

.search-pill svg {
  width: 19px;
  height: 19px;
}

.hdr-actions .icon-btn svg {
  width: 22px;
  height: 22px;
}

.hdr-actions .btn {
  flex-shrink: 0;
  height: 42px;
  padding: 0 20px;
  font-size: 14px;
  letter-spacing: 0.04em;
}

.menu-btn {
  display: none;
}

@media (max-width: 1100px) {
  .nav,
  .hdr-actions .btn,
  .search-pill .t {
    display: none;
  }

  .menu-btn {
    display: grid;
  }
}

@media (max-width: 760px) {
  .site-header {
    top: 10px;
    width: calc(100% - 24px);
    max-width: none;
    height: 52px;
  }

  .site-header.menu-open {
    box-shadow: none;
  }

  .site-header > .wrap {
    gap: 6px;
    padding: 0 6px 0 16px;
  }

  .site-logo,
  .site-logo img {
    height: 22px;
  }

  #cart-btn {
    display: none;
  }

  .search-pill {
    width: 40px;
    height: 40px;
    padding: 0;
    justify-content: center;
    background: transparent;
  }

  .search-pill svg {
    width: 18px;
    height: 18px;
  }

  .hdr-actions .icon-btn svg {
    width: 20px;
    height: 20px;
  }
}

/* ---------- 内页页头：画面在下，渐变遮罩居中，文字在上 ---------- */
.page-hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 460px;
  overflow: hidden;
  background: var(--dark);
  color: #fff;
}

.page-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(var(--shade), 0.86) 0%, rgba(var(--shade), 0.5) 55%, rgba(var(--shade), 0.15) 100%),
    linear-gradient(0deg, rgba(var(--shade), 0.5), rgba(var(--shade), 0) 50%);
  pointer-events: none;
}

.page-hero .wrap {
  width: 100%;
  padding-top: calc(var(--hdr) + 80px);
  padding-bottom: 80px;
}

.page-hero .ph-art {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.page-hero .ph-copy {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 22px;
  max-width: 760px;
}

.page-hero h1 {
  color: #fff;
  font-size: clamp(40px, 5.4vw, 84px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.page-hero .lead {
  color: rgba(255, 255, 255, 0.72);
}

.page-hero .crumbs {
  color: rgba(255, 255, 255, 0.55);
}

/* 简洁版：白底，只有面包屑（产品详情） */
.page-hero.compact {
  min-height: 0;
  background: #fff;
  color: var(--ink);
}

.page-hero.compact::after {
  display: none;
}

.page-hero.compact .wrap {
  padding-top: calc(var(--hdr) + 32px);
  padding-bottom: 20px;
}

.page-hero.compact .crumbs {
  color: var(--muted);
}

@media (max-width: 760px) {
  .page-hero {
    min-height: 340px;
  }

  .page-hero .wrap {
    padding-top: 120px;
    padding-bottom: 40px;
  }

  .page-hero h1 {
    font-size: 38px;
  }

  .page-hero .lead {
    font-size: 15px;
  }
}

/* ---------- 区块 ---------- */
.section {
  position: relative;
  padding-block: clamp(80px, 11vw, 160px);
}

.warm {
  background: var(--warm);
}

.section.credits {
  padding-top: 40px;
}

.sec-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 32px;
  margin-bottom: clamp(40px, 5vw, 72px);
}

.sec-top > div {
  display: grid;
  gap: 20px;
  max-width: 760px;
}

@media (max-width: 760px) {
  .section {
    padding-block: 64px;
  }

  .sec-top {
    gap: 14px;
    margin-bottom: 28px;
  }
}

/* ---------- 页脚 ---------- */
.site-footer {
  padding-block: 80px 36px;
  border-top: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  font-family: var(--label);
  font-size: 13px;
}

.site-footer h4 {
  margin-bottom: 18px;
  font: 400 15px var(--head);
  color: var(--ink);
}

.site-footer ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer a:hover {
  color: var(--brand);
}

.ft-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--line);
}

.ft-head img {
  height: 30px;
  width: auto;
}

.ft-head .small {
  letter-spacing: 0.02em;
}

.ft-top {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.3fr);
  gap: 40px;
  padding-top: 44px;
}

.ft-contact {
  display: grid;
  align-content: start;
  gap: 14px;
}

.ft-contact .hot-line {
  display: grid;
  gap: 2px;
}

.ft-contact .hot-line b {
  font: 400 28px/1.2 var(--head);
  letter-spacing: -0.01em;
  color: var(--ink);
}

.ft-contact .rows {
  display: grid;
  gap: 6px;
  padding: 10px 0;
  border-block: 1px solid var(--line);
  font-size: 13px;
}

.ft-contact .rows div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.ft-contact .rows b {
  font: 400 13px var(--num);
  color: var(--ink-2);
}

.ft-contact p {
  font-size: 13px;
  line-height: 1.8;
}

.ft-qr {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 4px;
}

.ft-qr img {
  width: 72px;
  height: 72px;
  padding: 3px;
  border: 1px solid var(--line);
  background: #fff;
}

.ft-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-family: var(--label);
  font-size: 12px;
  color: var(--faint);
}

.proto {
  font-size: 11px;
  color: var(--faint);
}

/* 页脚“图片来源”：按素材授权须保留署名入口，做得尽量低调 */
.proto a {
  opacity: 0.75;
}

@media (max-width: 1024px) {
  .ft-top {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .ft-contact {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .site-footer {
    padding-block: 48px 28px;
  }

  .ft-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  /* 手机：联系方式在上，链接分组折叠 */
  .ft-top {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding-top: 8px;
  }

  .ft-contact {
    order: -1;
    gap: 12px;
    padding: 20px 0 24px;
    border-bottom: 1px solid var(--line);
  }

  .ft-contact h4 {
    display: none;
  }

  .ft-contact .hot-line {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
  }

  .ft-contact .hot-line b {
    font-size: 26px;
  }

  .ft-contact .rows {
    gap: 8px;
    padding: 0;
    border: 0;
  }

  .ft-contact .rows div {
    font-size: 13px;
  }

  .ft-contact p {
    font-size: 12px;
    color: var(--muted);
  }

  .ft-qr {
    gap: 12px;
  }

  .ft-qr img {
    width: 64px;
    height: 64px;
  }

  .ft-acc {
    border-bottom: 1px solid var(--line);
  }

  .ft-acc h4 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0;
    padding: 16px 0;
    font-size: 15px;
    cursor: pointer;
  }

  .ft-acc h4::after {
    content: '+';
    font: 300 20px/1 var(--label);
    color: var(--muted);
    transition: transform 0.3s var(--ease);
  }

  .ft-acc.open h4::after {
    transform: rotate(45deg);
  }

  .ft-acc ul {
    display: none;
    grid-template-columns: 1fr 1fr;
    gap: 10px 16px;
    padding-bottom: 16px;
  }

  .ft-acc.open ul {
    display: grid;
  }

  .ft-bottom {
    flex-direction: column;
    gap: 6px;
    margin-top: 24px;
  }
}

/* ---------- 手机全屏菜单与底部操作栏（仅 ≤ 760px 显示） ---------- */
.m-menu,
.m-bar {
  display: none;
}

@media (max-width: 760px) {
  body {
    padding-bottom: calc(var(--mbar) + env(safe-area-inset-bottom, 0px));
  }

  .m-menu {
    position: fixed;
    inset: 0;
    z-index: 58;
    display: flex;
    flex-direction: column;
    padding: calc(env(safe-area-inset-top, 0px) + 84px) 24px calc(var(--mbar) + env(safe-area-inset-bottom, 0px) + 24px);
    overflow: auto;
    background: #fff;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-12px);
    transition:
      opacity 0.35s var(--ease),
      transform 0.45s var(--ease),
      visibility 0.35s;
  }

  .m-menu.open {
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .m-links {
    display: grid;
    border-top: 1px solid var(--ink);
  }

  .m-links a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid var(--line);
    font: 400 26px/1.2 var(--head);
    letter-spacing: -0.02em;
    color: var(--ink);
  }

  .m-links a svg {
    width: 20px;
    height: 20px;
    color: var(--muted);
  }

  .m-links a.on {
    color: var(--brand);
  }

  .m-menu h5 {
    margin: 28px 0 12px;
    font: 500 12px var(--label);
    color: var(--muted);
  }

  .m-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .m-chips a {
    padding: 8px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    font: 500 13px var(--label);
    color: var(--ink);
  }

  .m-contact {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: auto;
    padding-top: 28px;
  }

  .m-contact .btn {
    height: 48px;
  }

  .m-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 70;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    height: calc(var(--mbar) + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.98);
  }

  .m-bar a,
  .m-bar button {
    position: relative;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 3px;
    border: 0;
    background: none;
    color: var(--muted);
    font: 500 11px var(--label);
  }

  .m-bar svg {
    width: 22px;
    height: 22px;
  }

  .m-bar .on {
    color: var(--brand);
  }

  /* “电话”按钮：品牌色圆角底 */
  .m-bar .call {
    color: #fff;
  }

  .m-bar .call .dot {
    position: absolute;
    inset: 7px 10px;
    z-index: -1;
    border-radius: 14px;
    background: var(--brand);
  }

  .m-bar .badge {
    top: 5px;
    right: calc(50% - 18px);
  }
}
