:root {
  --ink: #171714;
  --muted: #68665f;
  --paper: #f4f1eb;
  --white: #fff;
  --line: rgba(23, 23, 20, 0.14);
  --red: #d71920;
  --red-dark: #ad0e14;
  --shadow: 0 24px 70px rgba(25, 23, 18, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Microsoft YaHei UI", "PingFang SC", "Noto Sans SC", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 78px;
  padding: 0 clamp(20px, 4vw, 68px);
  border-bottom: 1px solid var(--line);
  background: rgba(244, 241, 235, 0.9);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 47px;
  height: 29px;
  color: #fff;
  background: var(--red);
  font: 900 20px/1 Arial, sans-serif;
  letter-spacing: -2px;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 15px;
  letter-spacing: 0.08em;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.header-help {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
  border: 0;
  border-bottom: 1px solid var(--ink);
  background: transparent;
  cursor: pointer;
  font-size: 13px;
}

.header-help svg {
  width: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(420px, 1.12fr);
  min-height: calc(100vh - 78px);
  border-bottom: 1px solid var(--line);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(56px, 7vw, 120px) clamp(28px, 6vw, 100px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--red);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 34px;
  height: 1px;
  background: currentColor;
  content: "";
}

.hero h1 {
  max-width: 650px;
  margin: 28px 0 24px;
  font-family: "Songti SC", "STSong", "SimSun", serif;
  font-size: clamp(48px, 5.7vw, 88px);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.hero-copy > p {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.9;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 26px;
  margin-top: 42px;
}

.hero-actions > span {
  color: var(--muted);
  font-size: 12px;
}

.hero-actions b {
  color: var(--ink);
  font-size: 17px;
}

.primary-button,
.secondary-button {
  min-height: 48px;
  padding: 0 24px;
  border: 1px solid var(--ink);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  transition: 180ms ease;
}

.primary-button {
  color: #fff;
  background: var(--ink);
}

.primary-button:hover {
  border-color: var(--red);
  background: var(--red);
}

.secondary-button {
  background: transparent;
}

.secondary-button:hover {
  background: rgba(23, 23, 20, 0.06);
}

.hero-feature {
  position: relative;
  min-height: 600px;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: #d4d0c8;
  cursor: zoom-in;
}

.hero-feature img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1s cubic-bezier(.2,.8,.2,1);
}

.hero-feature:hover img {
  transform: scale(1.025);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(8, 8, 6, 0.72));
}

.hero-feature-copy {
  position: absolute;
  right: clamp(24px, 4vw, 58px);
  bottom: clamp(26px, 5vw, 62px);
  left: clamp(24px, 4vw, 58px);
  display: grid;
  color: #fff;
  text-align: left;
}

.hero-feature-copy small {
  margin-bottom: 8px;
  font-size: 11px;
  letter-spacing: 0.18em;
}

.hero-feature-copy strong {
  font-size: clamp(32px, 4vw, 58px);
  font-weight: 500;
  letter-spacing: -0.04em;
}

.hero-feature-copy span {
  margin-top: 13px;
  font-size: 13px;
}

.catalog-section {
  padding: clamp(70px, 9vw, 140px) clamp(20px, 5vw, 80px);
}

.catalog-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 36px;
}

.catalog-heading h2,
.service-note h2 {
  margin: 18px 0 0;
  font-family: "Songti SC", "STSong", "SimSun", serif;
  font-size: clamp(36px, 4vw, 60px);
  font-weight: 400;
  letter-spacing: -0.035em;
}

.search-box {
  display: grid;
  grid-template-columns: 21px minmax(180px, 290px) auto;
  align-items: center;
  gap: 11px;
  min-width: min(100%, 380px);
  padding: 12px 0;
  border-bottom: 1px solid var(--ink);
}

.search-box svg {
  width: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
}

.search-box input {
  min-width: 0;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  text-transform: uppercase;
}

.search-box kbd {
  padding: 3px 6px;
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--muted);
  background: rgba(255,255,255,.35);
  font: 10px/1.2 inherit;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 44px 0 25px;
}

.filter-button {
  padding: 9px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  font-size: 12px;
}

.filter-button.active {
  color: #fff;
  border-color: var(--ink);
  background: var(--ink);
}

.result-count {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 34px 18px;
}

.material-card {
  min-width: 0;
}

.material-image {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: #ddd8ce;
  cursor: zoom-in;
}

.material-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 650ms cubic-bezier(.2,.8,.2,1);
}

.material-image:hover img {
  transform: scale(1.045);
}

.material-image::after {
  position: absolute;
  right: 14px;
  bottom: 14px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: #fff;
  background: rgba(17, 17, 15, 0.78);
  content: "+";
  font-size: 24px;
  font-weight: 200;
  transition: transform 180ms ease, background 180ms ease;
}

.material-image:hover::after {
  transform: rotate(90deg);
  background: var(--red);
}

.quick-badge {
  position: absolute;
  z-index: 2;
  top: 13px;
  left: 13px;
  padding: 6px 8px;
  color: #fff;
  background: var(--red);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.material-meta {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 1px 0;
}

.material-meta strong {
  font-size: 15px;
  letter-spacing: 0.02em;
}

.material-meta span {
  max-width: 62%;
  color: var(--muted);
  text-align: right;
  font-size: 10px;
  letter-spacing: 0.08em;
}

.empty-state {
  padding: 80px 20px;
  border: 1px dashed var(--line);
  text-align: center;
}

.empty-state span {
  font-family: "Songti SC", "STSong", serif;
  font-size: 32px;
}

.empty-state p {
  color: var(--muted);
}

.empty-state button {
  padding: 10px 18px;
  border: 0;
  border-bottom: 1px solid;
  background: transparent;
  cursor: pointer;
}

.service-note {
  position: relative;
  display: grid;
  grid-template-columns: 80px minmax(0, 700px) 1fr;
  gap: 35px;
  align-items: start;
  min-height: 380px;
  padding: clamp(60px, 8vw, 120px) clamp(24px, 7vw, 110px);
  overflow: hidden;
  color: #f3efe7;
  background: #191916;
}

.service-index {
  color: #9e9c93;
  font-size: 12px;
}

.service-note h2 {
  margin-top: 0;
}

.service-note p {
  max-width: 580px;
  margin: 24px 0 0;
  color: #aaa79e;
  line-height: 1.8;
}

.grain-lines {
  position: absolute;
  right: -120px;
  bottom: -110px;
  width: 520px;
  height: 350px;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 48% 52% 44% 56%;
  transform: rotate(-12deg);
  box-shadow:
    0 0 0 34px rgba(255,255,255,.025),
    0 0 0 72px rgba(255,255,255,.018),
    0 0 0 112px rgba(255,255,255,.012);
}

footer {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
  padding: 42px clamp(20px, 5vw, 80px);
  background: #fff;
}

footer strong {
  font-size: 14px;
}

footer p {
  max-width: 720px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
}

footer a {
  flex: none;
  color: var(--ink);
  font-size: 12px;
  text-decoration: none;
}

.preview-modal {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 22px;
  visibility: hidden;
  opacity: 0;
  transition: 220ms ease;
}

.preview-modal.open {
  visibility: visible;
  opacity: 1;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 12, 10, 0.78);
  backdrop-filter: blur(10px);
}

.modal-panel {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(1480px, 100%);
  height: min(900px, calc(100vh - 44px));
  overflow: hidden;
  background: var(--paper);
  box-shadow: var(--shadow);
  transform: translateY(18px) scale(.985);
  transition: 260ms cubic-bezier(.2,.8,.2,1);
}

.preview-modal.open .modal-panel {
  transform: translateY(0) scale(1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 74px;
  padding: 11px 16px 11px 26px;
  border-bottom: 1px solid var(--line);
}

.modal-header span {
  color: var(--muted);
  font-size: 9px;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.modal-header h2 {
  margin: 3px 0 0;
  font-size: 21px;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.icon-button svg,
.nav-button svg {
  width: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
}

.modal-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  min-height: 0;
}

.preview-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 0;
  overflow: hidden;
  background: #d3d0c8;
}

.preview-stage > img {
  width: min(100%, 826px, calc(100vh - 118px));
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  opacity: 0;
  transition: opacity 240ms ease;
}

.preview-stage > img.loaded {
  opacity: 1;
}

.image-loader {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: grid;
  place-items: center;
  background: #d3d0c8;
  transition: opacity 180ms ease;
}

.image-loader.hidden {
  pointer-events: none;
  opacity: 0;
}

.image-loader span {
  width: 28px;
  height: 28px;
  border: 2px solid rgba(23,23,20,.2);
  border-top-color: var(--ink);
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.image-kind {
  position: absolute;
  left: 18px;
  bottom: 18px;
  padding: 7px 10px;
  color: #fff;
  background: rgba(17,17,15,.7);
  font-size: 10px;
  letter-spacing: .12em;
}

.nav-button {
  position: absolute;
  z-index: 3;
  top: 50%;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.88);
  box-shadow: 0 7px 24px rgba(0,0,0,.12);
  cursor: pointer;
  transform: translateY(-50%);
}

.nav-button.previous {
  left: 16px;
}

.nav-button.next {
  right: 16px;
}

.preview-sidebar {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 24px;
  overflow: auto;
  border-left: 1px solid var(--line);
}

.preview-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.preview-tab {
  padding: 12px 4px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  cursor: pointer;
  color: var(--muted);
  font-size: 12px;
}

.preview-tab.active {
  color: var(--ink);
  border-bottom-color: var(--red);
  font-weight: 700;
}

.swatch-card {
  display: grid;
  grid-template-columns: 90px 1fr;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  text-align: left;
}

.swatch-card img {
  width: 90px;
  height: 90px;
  object-fit: cover;
}

.swatch-card small,
.swatch-card strong {
  display: block;
}

.swatch-card small {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 10px;
}

.swatch-card strong {
  font-size: 18px;
}

.preview-message {
  margin-top: 28px;
}

.preview-message strong {
  font-family: "Songti SC", "STSong", serif;
  font-size: 27px;
  font-weight: 400;
}

.preview-message p,
.color-notice {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
}

.modal-actions {
  display: grid;
  gap: 9px;
  margin-top: auto;
  padding-top: 28px;
}

.color-notice {
  margin: 14px 0 0;
  font-size: 10px;
}

.toast {
  position: fixed;
  z-index: 200;
  right: 24px;
  bottom: 24px;
  padding: 13px 18px;
  visibility: hidden;
  color: #fff;
  background: var(--ink);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(10px);
  transition: 180ms ease;
  font-size: 12px;
}

.toast.show {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
}

body.modal-open {
  overflow: hidden;
}

@media (max-width: 1050px) {
  .hero {
    grid-template-columns: 1fr 1fr;
  }

  .catalog-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .modal-content {
    grid-template-columns: minmax(0, 1fr) 300px;
  }
}

@media (max-width: 760px) {
  .site-header {
    height: 66px;
  }

  .header-help {
    font-size: 0;
  }

  .header-help svg {
    width: 22px;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero-copy {
    min-height: 540px;
  }

  .hero-feature {
    min-height: 72vh;
  }

  .hero-actions {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
  }

  .catalog-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .search-box {
    min-width: 0;
    width: 100%;
  }

  .catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 26px 10px;
  }

  .material-meta {
    flex-direction: column;
    gap: 4px;
  }

  .service-note {
    grid-template-columns: 35px 1fr;
    gap: 14px;
  }

  footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .preview-modal {
    padding: 0;
  }

  .modal-panel {
    width: 100%;
    height: 100%;
  }

  .modal-content {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(48vh, 1fr) auto;
    overflow: auto;
  }

  .preview-stage {
    min-height: 48vh;
  }

  .preview-sidebar {
    overflow: visible;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .nav-button {
    width: 42px;
    height: 42px;
  }
}

@media (max-width: 430px) {
  .brand small {
    display: none;
  }

  .hero-copy {
    min-height: 500px;
    padding-right: 24px;
    padding-left: 24px;
  }

  .hero h1 {
    font-size: 46px;
  }

  .catalog-section {
    padding-right: 12px;
    padding-left: 12px;
  }

  .catalog-heading,
  .filter-row {
    padding-right: 8px;
    padding-left: 8px;
  }

  .filter-button {
    padding-right: 12px;
    padding-left: 12px;
  }

  .result-count {
    font-size: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

@media (max-width: 760px) {
  .filter-row .result-count { width: 100%; margin: 6px 0 0; }
  .material-meta span { max-width: 100%; text-align: left; }
}
