@import url("/fonts/hafamex-i18n/font-faces.css");

/* English deliberately has no typography overrides, including its language
   links. Existing font families, weights, sizes and spacing stay authoritative. */
html[lang="vi"] {
  --hafamex-local-font: "Hafamex Vietnamese", "Hafamex Chinese", "Hafamex Arabic", Arial, sans-serif;
}
html[lang="zh-CN"] {
  --hafamex-local-font: "Hafamex Chinese", "Hafamex Vietnamese", "Hafamex Arabic", "Microsoft YaHei", "PingFang SC", sans-serif;
}
html[lang="ar"] {
  --hafamex-local-font: "Hafamex Arabic", "Hafamex Vietnamese", Tahoma, Arial, sans-serif;
}
html:is([lang="vi"], [lang="zh-CN"], [lang="ar"])
  :where(body, body *):not(:where(
    .fa, .fas, .far, .fab, .fal, .fad, .fat,
    [class^="fa-"], [class*=" fa-"],
    .material-icons, .material-icons-outlined, .material-icons-round,
    .material-icons-sharp, .material-icons-two-tone, .mud-icon-root,
    svg, svg *
  )) {
  font-family: var(--hafamex-local-font) !important;
}
html:is([lang="vi"], [lang="zh-CN"], [lang="ar"]) body {
  font-weight: 400;
  line-height: 1.65;
}
html:is([lang="vi"], [lang="zh-CN"], [lang="ar"])
  :is(h1, h2, h3, h4, h5, h6) {
  font-weight: 600 !important;
  line-height: 1.35 !important;
  letter-spacing: normal;
  overflow-wrap: break-word;
}
html:is([lang="vi"], [lang="zh-CN"]) .tttitle.hf-album-home,
html:is([lang="vi"], [lang="zh-CN"]) .slogan-content strong.hf-slogan {
  font-weight: 600;
  font-style: normal;
  line-height: 1.4;
}
html[lang="zh-CN"] :is(p, li, h1, h2, h3, h4, label) {
  line-break: strict;
  word-break: normal;
}
html[lang="ar"] :is(p, li, a, h1, h2, h3, h4, label) {
  letter-spacing: normal !important;
  line-height: 1.85;
}
html:is([lang="vi"], [lang="zh-CN"], [lang="ar"]) :is(input, select, textarea, button) {
  line-height: 1.5;
}

/* Readable language links on the existing red footer in every version. */
#footer .importer-footer-links a,
#footer nav[aria-label="Importer guides"] a,
#footer nav[aria-label="Thông tin dành cho nhà nhập khẩu"] a,
#footer nav[aria-label="进口商采购指南"] a {
  color: #fff !important;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}
#footer .importer-footer-links a:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 5px;
  border-radius: 2px;
}


@media (max-width: 767px) {
  /* On Products, place contact shortcuts after the content on small screens
     so they cannot cover the description or the language buttons. */
  #main-content.main-layout-first ~ #hf-menu-fixed.hf-shared-menu-fixed {
    position: relative;
    inset: auto;
    padding: 0 20px 28px;
    z-index: 1;
  }
  #main-content.main-layout-first ~ #hf-menu-fixed > ul {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    margin: 0;
  }
  #main-content.main-layout-first ~ #hf-menu-fixed .hf-phone a {
    animation: none;
  }
  #main-content.main-layout-first ~ #hf-menu-fixed :is(.sub-text, .sub-text-phone) {
    display: none !important;
  }
  #main-content.main-layout-first ~ #hf-menu-fixed .wechat-open .wechat-tooltip {
    display: flex !important;
    position: fixed;
    inset: auto 16px 16px;
    transform: none;
    white-space: normal;
  }
}
