@font-face {
  font-family: "Source Han Sans CN";
  src: url("/assets/fonts/SourceHanSansCN-Normal.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Source Han Sans CN";
  src: url("/assets/fonts/SourceHanSansCN-Bold.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: var(--font-body);
  line-height: var(--line-body);
  text-rendering: optimizeLegibility;
}

body.has-mobile-menu {
  position: fixed;
  width: 100%;
  overflow: hidden;
}

[hidden] { display: none !important; }

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3,
p,
dl,
dd,
dt {
  margin: 0;
}

h1,
h2,
h3 {
  line-height: var(--line-title);
  font-weight: var(--weight-title);
}

h3 { font-weight: var(--weight-h3); }
html:lang(en) body { font-family: var(--font-latin), var(--font-sans); }

.container {
  width: min(100% - 64px, 1600px);
  margin-inline: auto;
}

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

.section--gray {
  background: var(--color-bg-gray);
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: -100px;
  left: 16px;
  padding: 10px 14px;
  background: var(--color-white);
  color: var(--color-primary);
  border: 2px solid var(--color-primary-light);
}

.skip-link:focus {
  top: 16px;
}

:focus-visible {
  outline: 2px solid var(--color-primary-light);
  outline-offset: 2px;
}

::selection { background: var(--color-primary-light); color: var(--color-white); }
input, textarea { caret-color: var(--color-primary-light); }
a { text-underline-offset: 3px; }

@media (max-width: 767px) {
  .container {
    width: min(100% - 32px, 1440px);
  }

  .section {
    padding: 64px 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .site-header, .button, .product-card { transition: none; }
  .product-card:hover { transform: none; }
}
