/* Centred content column shared by every page. */
.shell {
  width: min(100% - (2 * var(--gutter)), var(--shell));
  margin-inline: auto;
}

.section {
  padding-block: var(--section-space);
}

.section--tight {
  padding-block: calc(var(--section-space) * 0.6);
}

.section + .section {
  padding-top: 0;
}

/* Section header: title on the left, an optional "see all" link on the right. */
.section-head {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3) var(--space-5);
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: clamp(1.5rem, 3vw, 2.25rem);
}

.section-head h2 {
  margin: 0;
  font-size: var(--text-2xl);
}

.section-head p {
  margin: var(--space-2) 0 0;
  color: var(--color-text-muted);
  font-size: var(--text-base);
}

.section-head__text {
  min-width: 0;
}

/* Quiet forward link: "更多 ›" */
.more-link {
  flex: none;
  color: var(--color-accent);
  font-size: var(--text-base);
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}

.more-link:hover {
  text-decoration: underline;
}

.more-link span {
  display: inline-block;
  margin-left: 0.15em;
  transition: transform var(--duration-fast) var(--ease-out);
}

.more-link:hover span {
  transform: translateX(0.2rem);
}

/* Legacy section heading kept for long-form pages. */
.section-heading {
  margin-bottom: clamp(1.5rem, 3.5vw, 2.5rem);
}

.section-heading h2 {
  max-width: 20ch;
  margin-bottom: var(--space-4);
  font-size: var(--text-2xl);
}

.section-heading p {
  margin-bottom: 0;
  color: var(--color-text-muted);
}

.section-heading--split {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(18rem, 0.8fr);
  gap: var(--space-7);
  align-items: end;
}

.section-heading--split p {
  max-width: 34rem;
}

/* Card grid used by the home page, product index and catalogues. */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: clamp(1rem, 1.6vw, 1.375rem);
}

.card-grid--two {
  grid-template-columns: repeat(auto-fit, minmax(22rem, 1fr));
}

@media (max-width: 48rem) {
  .section-heading--split {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }

  .card-grid,
  .card-grid--two {
    grid-template-columns: 1fr;
  }
}
