/* 儿童家具库 · 首页样式（设计基准 1440，稿 1024×1536 等比放大） */
/* 变量统一由 tokens.css 提供（先在 <head> 中加载 tokens.css，再加载本文件） */

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
h1, h2, h3, p, dl, dd, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }

.container {
  width: min(var(--container), calc(100% - 80px));
  margin: 0 auto;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  background: var(--accent-deep);
  color: #fff;
  padding: 10px 16px;
  border-radius: 8px;
  transition: top .2s;
}
.skip-link:focus { top: 12px; }

/* ---------- header ---------- */
.site-header {
  position: relative;
  z-index: 20;
  height: 68px;
  background: rgba(248, 248, 250, .94);
  border-bottom: 1px solid rgba(228, 233, 241, .8);
  backdrop-filter: blur(8px);
}
.header-inner {
  height: 68px;
  display: flex;
  align-items: center;
  gap: 34px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--accent-deep);
  flex: none;
}
.brand-mark { width: 34px; height: 34px; }
.brand-name {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: .01em;
  color: #1b3a5c;
}
.main-nav {
  display: flex;
  align-items: center;
  gap: 27px;
  margin-left: 8px;
}
.main-nav a {
  font-size: 16px;
  font-weight: 500;
  color: #24344d;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
}
.main-nav a:hover, .main-nav a:focus-visible {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.header-cta {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 18px;
  border: 1px solid #cddced;
  border-radius: 999px;
  color: var(--accent-deep);
  background: #fff;
  font-size: 14px;
  white-space: nowrap;
}
.header-cta:hover { background: var(--accent-soft); }
.menu-toggle {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
}
.menu-toggle span {
  display: block;
  height: 2px;
  background: var(--ink);
  margin: 4px 0;
  border-radius: 2px;
}
.mobile-nav {
  position: absolute;
  top: 68px;
  left: 0;
  right: 0;
  background: #fff;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 18px 30px rgba(22, 35, 58, .08);
  padding: 18px 24px 22px;
}
.mobile-nav nav { display: grid; gap: 4px; }
.mobile-nav a {
  display: block;
  padding: 11px 8px;
  border-radius: 8px;
  font-size: 17px;
}
.mobile-nav a:hover { background: var(--accent-soft); }
.mobile-nav-cta {
  margin-top: 10px;
  background: var(--accent);
  color: #fff !important;
  text-align: center;
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  height: 359px;
  overflow: hidden;
  background: linear-gradient(106deg, #f3f7fc 0%, #eaf1fa 52%, #e2ebf7 100%);
}
.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 1px;
  background: rgba(53, 111, 158, .08);
}
.hero-inner {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
}
.hero-copy {
  position: relative;
  z-index: 2;
  width: 55%;
  padding: 6px 0 0;
}
.kicker {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: .13em;
  color: var(--accent);
  text-transform: uppercase;
}
.hero h1 {
  margin-top: 8px;
  font-size: 60px;
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: -.02em;
  color: #13223a;
}
.hero-lead {
  margin-top: 14px;
  max-width: 640px;
  font-size: 19px;
  line-height: 1.72;
  color: #35455e;
}
.hero-actions {
  display: flex;
  gap: 16px;
  margin-top: 22px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 50px;
  padding: 0 28px;
  border-radius: 999px;
  font-size: 17px;
  font-weight: 600;
  transition: transform .18s, background .18s, box-shadow .18s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 6px 16px rgba(53, 111, 158, .22);
}
.btn-primary:hover { background: var(--accent-deep); }
.btn-ghost {
  border: 1px solid #a9c4dd;
  color: var(--accent-deep);
  background: rgba(255, 255, 255, .45);
}
.btn-ghost:hover { background: #fff; }
.hero-facts {
  display: flex;
  gap: 38px;
  margin-top: 22px;
}
.hero-facts dt {
  font-size: 18px;
  font-weight: 700;
  color: var(--accent-deep);
  line-height: 1.25;
}
.hero-facts dd {
  font-size: 13px;
  color: #65748b;
  line-height: 1.4;
  margin-top: 2px;
}
.hero-media {
  position: absolute;
  right: 0;
  top: 0;
  width: 55%;
  height: 100%;
}
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 58% 55%;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 26%, #000 100%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 26%, #000 100%);
}

/* ---------- section heading ---------- */
.section { padding: 28px 0 10px; }
.section-head { max-width: 100%; }
.section-title {
  position: relative;
  padding-left: 15px;
  font-size: 32px;
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: -.01em;
}
.section-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: .16em;
  width: 5px;
  height: .78em;
  border-radius: 3px;
  background: var(--accent);
}
.section-lead {
  margin-top: 6px;
  padding-left: 15px;
  font-size: 16px;
  line-height: 1.55;
  color: #4c5b71;
}
.section-head.compact .section-title { font-size: 25px; }
.section-head.compact .section-lead { font-size: 14px; line-height: 1.45; }

/* ---------- categories ---------- */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 13px;
  margin-top: 20px;
}
.cat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-height: 204px;
  padding: 17px 12px 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f9fbfe 100%);
  border: 1px solid #e7edf5;
  border-radius: 13px;
  box-shadow: var(--shadow);
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
.cat-card:hover {
  transform: translateY(-3px);
  border-color: #bcd3e8;
  box-shadow: 0 10px 22px rgba(38, 77, 115, .10);
}
.cat-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 62px;
  height: 58px;
  color: var(--accent);
  margin-bottom: 5px;
}
.cat-icon svg { width: 46px; height: 46px; }
.cat-name {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
}
.cat-desc {
  margin-top: 5px;
  min-height: 42px;
  font-size: 13px;
  line-height: 1.55;
  color: #5b6a7f;
}
.cat-count {
  margin-top: 8px;
  font-size: 12px;
  color: #73829a;
  padding: 2px 9px;
  border-radius: 999px;
  background: #f0f4f9;
}

/* ---------- age band ---------- */
.band {
  background: linear-gradient(100deg, #eaf1fa 0%, #e4edf8 52%, #e9f1fa 100%);
  border-top: 1px solid rgba(53, 111, 158, .07);
  border-bottom: 1px solid rgba(53, 111, 158, .07);
}
.age-band { padding: 16px 0 14px; }
.age-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin-top: 8px;
}
.age-card {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 0 20px;
  border-left: 1px solid rgba(53, 111, 158, .18);
}
.age-card:first-child { border-left: 0; padding-left: 6px; }
.age-card:last-child { padding-right: 6px; }
.age-photo {
  flex: none;
  width: 108px;
  height: 142px;
  border-radius: 10px;
  overflow: hidden;
  background: #dfe8f2;
}
.age-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 42%; }
.age-text h3 { font-size: 22px; line-height: 1.2; font-weight: 800; }
.age-combo {
  margin-top: 4px;
  font-size: 15px;
  font-weight: 700;
  color: var(--accent-deep);
}
.age-note {
  margin-top: 4px;
  font-size: 12.5px;
  line-height: 1.55;
  color: #53657c;
}

/* ---------- bento ---------- */
.bento { padding: 18px 0 56px; }
.bento-row {
  display: grid;
  gap: 18px;
  margin-bottom: 18px;
}
.bento-row:last-child { margin-bottom: 0; }
.row-mid { grid-template-columns: 1fr 1.16fr; }
.row-low { grid-template-columns: 1.04fr 1fr; }
.row-last { grid-template-columns: .92fr 1.06fr 1fr; }
.panel {
  background: var(--card);
  border: 1px solid #e5eaf2;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px 20px 16px;
  min-width: 0;
}
.panel .section-head.compact { margin-bottom: 0; }

/* featured */
.featured-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 9px;
}
.feature-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.feature-thumb {
  display: block;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  overflow: hidden;
  background: #e7edf4;
  margin-bottom: 7px;
}
.feature-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.feature-card:hover .feature-thumb img { transform: scale(1.03); }
.feature-tag { font-size: 11.5px; font-weight: 600; color: var(--accent); }
.feature-title {
  margin-top: 1px;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
}
.feature-summary {
  margin-top: 3px;
  font-size: 12px;
  line-height: 1.45;
  color: #5a6a80;
}
.feature-link {
  position: relative;
  margin-top: 5px;
  padding-right: 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-deep);
}
.feature-link::after {
  content: "";
  position: absolute;
  right: 2px;
  top: 50%;
  width: 6px;
  height: 6px;
  border-top: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
  transform: translateY(-50%) rotate(45deg);
}

/* size table */
.table-wrap { margin-top: 8px; overflow-x: auto; }
.size-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  line-height: 1.3;
}
.size-table th, .size-table td {
  padding: 8px 9px;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid var(--line-soft);
}
.size-table thead th {
  background: #eef4fb;
  color: #263a54;
  font-weight: 700;
  white-space: nowrap;
  border-bottom-color: #dde7f2;
}
.size-table thead th:first-child { border-radius: 7px 0 0 7px; }
.size-table thead th:last-child { border-radius: 0 7px 7px 0; }
.size-table tbody th { font-weight: 600; white-space: nowrap; }
.size-table tbody tr:last-child th,
.size-table tbody tr:last-child td { border-bottom: 0; }
.size-table td:nth-child(2) { white-space: nowrap; color: #31445e; }
.size-table td:last-child { white-space: nowrap; color: #4e607a; }

/* steps */
.step-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-top: 13px;
}
.step {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 0 5px;
}
.step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 16px;
  right: -7px;
  width: 8px;
  height: 8px;
  border-top: 1.5px solid #9db5cc;
  border-right: 1.5px solid #9db5cc;
  transform: rotate(45deg);
}
.step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .01em;
}
.step-name {
  margin-top: 8px;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
}
.step-note {
  margin-top: 4px;
  font-size: 12.5px;
  line-height: 1.55;
  color: #5a6a80;
}

/* safety */
.safety-list { margin-top: 10px; display: grid; gap: 7px; }
.safety-list li {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 9px;
  align-items: start;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line-soft);
}
.safety-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.safety-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #e8f0f9;
  color: var(--accent-deep);
  font-size: 12px;
  font-weight: 700;
  margin-top: 1px;
}
.safety-list h3 { font-size: 15px; line-height: 1.3; font-weight: 700; }
.safety-list p { margin-top: 2px; font-size: 12px; line-height: 1.45; color: #5a6a80; }

/* notes */
.row-last { align-items: stretch; }
.row-last .panel { height: 100%; }
.notes .section-title, .faq .section-title { font-size: 27px; }
.note-block {
  margin-top: 15px;
  padding-bottom: 13px;
  border-bottom: 1px solid var(--line-soft);
}
.note-block:last-child { border-bottom: 0; padding-bottom: 0; }
.note-block h3 { font-size: 16px; font-weight: 700; color: #34465e; }
.note-block p { margin-top: 3px; font-size: 13.5px; line-height: 1.6; color: #53647b; }

/* faq */
.faq-list { margin-top: 13px; display: grid; gap: 10px; }
.faq-item {
  border: 1px solid #e6ebf2;
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
}
.faq-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 15px;
  background: none;
  border: 0;
  text-align: left;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
}
.chev {
  flex: none;
  width: 8px;
  height: 8px;
  border-right: 1.8px solid #6d7f96;
  border-bottom: 1.8px solid #6d7f96;
  transform: rotate(45deg) translateY(-2px);
  transition: transform .2s;
}
.faq-item.is-open .chev { transform: rotate(225deg) translateY(-2px); }
.faq-answer { padding: 0 15px 14px; }
.faq-answer p { font-size: 13px; line-height: 1.65; color: #53647b; }

/* footer card */
.footer-card {
  display: flex;
  flex-direction: column;
  background: linear-gradient(155deg, #38679a 0%, #2c5687 100%);
  border-radius: var(--radius);
  color: #fff;
  padding: 38px 26px 28px;
  min-height: 100%;
}
.footer-brand { text-align: center; }
.footer-mark { width: 42px; height: 42px; margin: 0 auto 6px; color: #fff; }
.footer-name { font-size: 31px; font-weight: 800; line-height: 1.2; letter-spacing: .02em; }
.footer-motto {
  margin: 7px auto 0;
  max-width: 330px;
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255, 255, 255, .86);
}
.footer-links {
  display: grid;
  gap: 20px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, .18);
}
.footer-label {
  font-size: 12px;
  letter-spacing: .08em;
  color: rgba(255, 255, 255, .6);
  margin-bottom: 4px;
}
.footer-links nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 15px;
}
.footer-links a {
  font-size: 13px;
  color: rgba(255, 255, 255, .92);
  border-bottom: 1px solid transparent;
}
.footer-links a:hover { border-bottom-color: rgba(255, 255, 255, .6); }
.footer-disclaimer {
  margin-top: auto;
  padding-top: 32px;
  font-size: 11.5px;
  line-height: 1.6;
  text-align: center;
  color: rgba(255, 255, 255, .62);
}

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .container { width: calc(100% - 56px); }
  .main-nav { gap: 18px; }
  .main-nav a { font-size: 15px; }
  .hero h1 { font-size: 50px; }
  .hero-facts { gap: 24px; }
  .cat-grid { gap: 10px; }
  .cat-card { padding-left: 8px; padding-right: 8px; }
  .cat-name { font-size: 18px; }
}

@media (max-width: 980px) {
  .header-inner { gap: 18px; }
  .header-cta { display: none; }
  .main-nav {
    margin-left: 0;
    gap: 16px;
    flex: 1 1 auto;
    min-width: 0;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .main-nav::-webkit-scrollbar { display: none; }
  .main-nav a { white-space: nowrap; }
  .hero { height: auto; min-height: 420px; }
  .hero-inner { display: block; padding: 30px 0 26px; }
  .hero-copy { width: 100%; }
  .hero-media { position: relative; width: 100%; height: 240px; margin-top: 24px; border-radius: 12px; overflow: hidden; }
  .hero-media img { -webkit-mask-image: none; mask-image: none; }
  .cat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .age-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 18px; }
  .age-card:nth-child(3) { border-left: 0; padding-left: 6px; }
  .row-mid, .row-low, .row-last { grid-template-columns: 1fr; }
  .footer-card { min-height: auto; }
  .footer-disclaimer { margin-top: 18px; }
}

@media (max-width: 680px) {
  .container { width: calc(100% - 36px); }
  .site-header, .header-inner { height: 60px; }
  .brand-name { font-size: 21px; }
  .brand-mark { width: 29px; height: 29px; }
  .mobile-nav { top: 60px; }
  .hero { min-height: 0; }
  .hero h1 { font-size: 36px; }
  .hero-lead { font-size: 16px; }
  .hero-actions { flex-wrap: wrap; gap: 10px; }
  .btn { height: 46px; padding: 0 20px; font-size: 15px; }
  .hero-facts { flex-wrap: wrap; gap: 12px 22px; }
  .hero-facts dt { font-size: 16px; }
  .hero-media { height: 190px; }
  .section-title { font-size: 25px; }
  .section-lead { font-size: 14px; }
  .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cat-card { min-height: 190px; }
  .cat-name { font-size: 18px; }
  .age-grid { grid-template-columns: 1fr; row-gap: 14px; }
  .age-card, .age-card:nth-child(3) { border-left: 0; padding: 0 0 12px; border-bottom: 1px solid rgba(53,111,158,.15); }
  .age-card:last-child { border-bottom: 0; padding-bottom: 0; }
  .age-photo { width: 92px; height: 120px; }
  .featured-grid { grid-template-columns: 1fr; }
  .feature-card { display: grid; grid-template-columns: 120px 1fr; column-gap: 12px; align-items: start; }
  .feature-thumb { grid-row: span 5; margin-bottom: 0; }
  .step-list { grid-template-columns: 1fr; gap: 12px; }
  .step { display: grid; grid-template-columns: 40px 1fr; column-gap: 10px; align-items: center; }
  .step-num { grid-row: span 3; width: 34px; height: 34px; }
  .step-name { margin-top: 0; }
  .step-note { grid-column: 2; margin-top: -2px; }
  .step:not(:last-child)::after { display: none; }
  .size-table { min-width: 620px; }
  .footer-name { font-size: 26px; }
}
