/* A stable shared footer grid for the home page and all inner pages. */
@media (min-width: 801px) {
  .site-footer {
    box-sizing: border-box;
    width: min(1280px, 100%) !important;
    max-width: 1280px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    grid-template-columns: minmax(330px, 1.35fr) minmax(150px, .62fr) minmax(355px, 1.45fr) !important;
    gap: clamp(42px, 5vw, 72px) !important;
    padding: 60px clamp(48px, 6.4vw, 92px) !important;
    align-items: start;
  }

  .site-footer .footer-brand-block,
  .site-footer .footer-column,
  .site-footer .footer-products,
  .site-footer .footer-products > div {
    min-width: 0;
  }

  .site-footer .footer-column a,
  .site-footer .footer-contact-lines,
  .site-footer .footer-contact-lines b,
  .site-footer .footer-contact-lines span,
  .site-footer .footer-contact-lines a {
    overflow-wrap: normal;
    word-break: normal;
  }

  .site-footer .footer-column a,
  .site-footer .footer-products a {
    white-space: nowrap;
  }

  .site-footer .footer-products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: clamp(24px, 3vw, 46px);
  }

  /* The homepage intentionally uses its own 950px visual canvas. */
  main + .site-footer {
    width: min(var(--home-outer), 100%) !important;
    max-width: var(--home-outer) !important;
    grid-template-columns: 1.35fr .62fr 1.45fr !important;
    gap: clamp(28px, 4vw, 48px) !important;
    padding-left: var(--home-inset) !important;
    padding-right: var(--home-inset) !important;
  }

  /* Directory pages use the same 1280px rail as their product grid. */
  body.directory-page > footer.site-footer {
    width: min(var(--directory-frame), 100%) !important;
    max-width: var(--directory-frame) !important;
    margin-left: auto !important;
    margin-right: auto !important;
    grid-template-columns: 420px 160px minmax(0, 1fr) !important;
    gap: 58px !important;
    padding: 58px 64px !important;
  }

  /* Product detail pages share the same 1280px rail as the detail banner. */
  body.detail-v2 > footer.site-footer {
    width: min(1280px, 100%) !important;
    max-width: 1280px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    grid-template-columns: 420px 160px minmax(0, 1fr) !important;
    gap: 58px !important;
    padding: 58px 64px !important;
  }

  body.detail-v2 > footer.site-footer .footer-logo img {
    width: 64px;
    height: 64px;
  }

  body.detail-v2 > footer.site-footer .footer-logo b {
    font-size: 24px;
  }

  body.detail-v2 > footer.site-footer .footer-contact-lines {
    max-width: 360px;
    gap: 7px;
    font-size: 12px;
    line-height: 1.58;
  }

  body.detail-v2 > footer.site-footer .footer-contact-lines b {
    font-size: 13px;
  }

  body.detail-v2 > footer.site-footer .footer-column {
    gap: 11px;
  }

  body.detail-v2 > footer.site-footer .footer-column h3 {
    margin-bottom: 13px;
    font-family: Manrope, 'Microsoft YaHei', sans-serif;
    font-size: 21px;
    line-height: 1;
  }

  body.detail-v2 > footer.site-footer .footer-column a {
    font-size: 13px;
    line-height: 1.2;
  }

  body.detail-v2 > footer.site-footer .footer-products {
    grid-template-columns: 150px 150px;
    column-gap: 44px;
  }

  body.directory-page > footer.site-footer .footer-logo img {
    width: 64px;
    height: 64px;
  }

  body.directory-page > footer.site-footer .footer-logo b {
    font-size: 24px;
  }

  body.directory-page > footer.site-footer .footer-contact-lines {
    max-width: 360px;
    gap: 7px;
    font-size: 12px;
    line-height: 1.58;
  }

  body.directory-page > footer.site-footer .footer-contact-lines b {
    font-size: 13px;
  }

  body.directory-page > footer.site-footer .footer-contact-lines small {
    font-size: 10px;
  }

  body.directory-page > footer.site-footer .footer-column {
    gap: 11px;
  }

  body.directory-page > footer.site-footer .footer-column h3 {
    margin-bottom: 13px;
    font-family: Manrope, 'Microsoft YaHei', sans-serif;
    font-size: 21px;
    line-height: 1;
  }

  body.directory-page > footer.site-footer .footer-column a {
    font-size: 13px;
    line-height: 1.2;
  }

  body.directory-page > footer.site-footer .footer-products {
    grid-template-columns: 150px 150px;
    column-gap: 44px;
  }
}
