:root {
  color-scheme: light;
  --navy: #111e2d;
  --ink: #172338;
  --muted: #687487;
  --blue: #2f6fa7;
  --blue-dark: #245985;
  --line: #dbe2ea;
  --pale: #f3f6f9;
  --white: #ffffff;
  --shadow: 0 18px 50px rgba(17, 30, 45, .10);
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: #eef2f6; min-width: 320px; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
img { display: block; max-width: 100%; }

.topbar {
  position: sticky; top: 0; z-index: 20;
  height: 72px; padding: 0 clamp(20px, 4vw, 64px);
  display: flex; align-items: center; justify-content: space-between;
  color: white; background: rgba(17, 30, 45, .96);
  border-bottom: 3px solid var(--blue); backdrop-filter: blur(14px);
}
.brand { display: inline-flex; align-items: center; gap: 14px; color: white; text-decoration: none; font-size: 20px; font-weight: 800; }
.brand-mark { display: grid; grid-template-columns: repeat(2, 10px); gap: 3px; }
.brand-mark i { width: 10px; height: 10px; border-radius: 2px; background: white; }
.catalog-count { color: #b9c9d9; font-size: 14px; }

main { min-height: calc(100vh - 72px); }
.search-view { padding-bottom: 72px; }
.search-shell {
  padding: 56px clamp(20px, 6vw, 92px) 48px;
  color: white;
  background:
    radial-gradient(circle at 86% 20%, rgba(47,111,167,.36), transparent 30%),
    linear-gradient(135deg, #111e2d 0%, #152b42 100%);
}
.search-copy { max-width: 920px; margin: 0 auto 28px; }
.eyebrow { margin: 0 0 8px; color: var(--blue); font-weight: 800; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; }
.search-copy .eyebrow { color: #91b9db; }
h1 { margin: 0 0 12px; font-size: clamp(30px, 4.8vw, 52px); line-height: 1.12; letter-spacing: -.03em; }
.search-copy > p:last-child { margin: 0; color: #c7d5e2; font-size: 17px; }

.search-form {
  position: relative; max-width: 920px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr auto; gap: 10px;
  padding: 8px; background: white; border-radius: 15px; box-shadow: 0 20px 60px rgba(0,0,0,.25);
}
.search-form input {
  width: 100%; height: 56px; padding: 0 50px 0 48px;
  color: var(--ink); background: transparent; border: 0; outline: 0; font-size: 17px;
}
.search-form input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.search-form:focus-within { box-shadow: 0 0 0 4px rgba(94, 158, 211, .34), 0 20px 60px rgba(0,0,0,.25); }
.search-icon { position: absolute; left: 26px; top: 27px; width: 16px; height: 16px; border: 2px solid var(--blue); border-radius: 50%; }
.search-icon::after { content: ""; position: absolute; width: 7px; height: 2px; right: -6px; bottom: -3px; background: var(--blue); transform: rotate(45deg); border-radius: 2px; }
.search-button { min-width: 108px; border: 0; border-radius: 10px; color: white; background: var(--blue); font-weight: 800; cursor: pointer; }
.search-button:hover { background: var(--blue-dark); }
.clear-button { display: none; position: absolute; right: 126px; top: 17px; width: 38px; height: 38px; border: 0; border-radius: 50%; color: #6e7a8c; background: transparent; font-size: 25px; cursor: pointer; }
.clear-button.visible { display: block; }
.clear-button:hover { background: var(--pale); }
.quick-search { max-width: 920px; margin: 18px auto 0; display: flex; flex-wrap: wrap; align-items: center; gap: 9px; color: #b9c9d9; font-size: 13px; }
.quick-search button { border: 1px solid rgba(255,255,255,.2); border-radius: 999px; padding: 7px 12px; color: white; background: rgba(255,255,255,.07); cursor: pointer; }
.quick-search button:hover { background: rgba(255,255,255,.15); }

.results-section { width: min(1280px, calc(100% - 40px)); margin: 0 auto; padding: 46px 0 0; }
.results-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.results-heading h2 { margin: 0; font-size: clamp(23px, 3vw, 32px); }
.result-count { color: var(--muted); font-size: 14px; }
.result-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.material-card { display: flex; flex-direction: column; overflow: hidden; min-height: 100%; color: inherit; text-decoration: none; background: white; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 8px 26px rgba(17,30,45,.06); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.material-card:hover, .material-card:focus-visible { transform: translateY(-4px); border-color: #8db4d4; box-shadow: var(--shadow); outline: none; }
.card-image-wrap { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: #dfe6ec; }
.card-image { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.material-card:hover .card-image { transform: scale(1.025); }
.sequence-badge { position: absolute; top: 14px; left: 14px; display: grid; place-items: center; min-width: 52px; height: 34px; padding: 0 10px; border-radius: 999px; color: white; background: rgba(17,30,45,.92); font-weight: 800; font-variant-numeric: tabular-nums; }
.card-body { display: flex; flex: 1; flex-direction: column; padding: 18px 18px 17px; }
.card-category { margin: 0 0 6px; color: var(--blue); font-size: 13px; font-weight: 800; }
.card-title { margin: 0 0 8px; font-size: 19px; line-height: 1.35; }
.card-spec { display: -webkit-box; margin: 0 0 18px; overflow: hidden; color: var(--muted); font-size: 14px; line-height: 1.65; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.card-price { display: flex; flex-wrap: wrap; gap: 7px 12px; margin: 0 0 17px; padding: 11px 12px; color: var(--muted); background: var(--pale); border-radius: 8px; font-size: 13px; }
.card-price span { white-space: nowrap; }
.card-price strong { color: var(--ink); font-size: 14px; }
.card-quantity { width: 100%; color: var(--blue); font-weight: 800; }
.view-detail { margin-top: auto; color: var(--blue); font-size: 14px; font-weight: 800; }
.view-detail b { display: inline-block; transition: transform .18s ease; }
.material-card:hover .view-detail b { transform: translateX(4px); }
.load-more { display: block; margin: 30px auto 0; padding: 12px 28px; border: 1px solid var(--blue); border-radius: 999px; color: var(--blue); background: white; font-weight: 800; cursor: pointer; }
.load-more:hover { color: white; background: var(--blue); }
.empty-state { padding: 60px 24px; text-align: center; color: var(--muted); background: white; border: 1px dashed #b7c3cf; border-radius: 14px; }
.empty-state strong { color: var(--ink); font-size: 20px; }

.detail-view { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 34px 0 72px; }
.detail-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.back-button, .copy-link { border: 1px solid var(--line); border-radius: 999px; padding: 10px 15px; color: var(--ink); background: white; font-weight: 700; cursor: pointer; }
.back-button:hover, .copy-link:hover { border-color: var(--blue); color: var(--blue); }
.detail-card { overflow: hidden; background: white; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.detail-head { padding: clamp(24px, 4vw, 44px); background: linear-gradient(135deg, var(--navy), #19334d); color: white; }
.detail-number { display: inline-flex; align-items: center; justify-content: center; min-width: 64px; height: 38px; padding: 0 15px; border-radius: 999px; background: var(--blue); font-weight: 800; }
.detail-head h1 { margin-top: 18px; max-width: 880px; font-size: clamp(28px, 4vw, 44px); }
.detail-name { margin: 0; color: #b9c9d9; font-size: 16px; }
.detail-content { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(300px, .75fr); gap: 30px; padding: clamp(22px, 4vw, 42px); }
.detail-hero { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 13px; }
.detail-side { display: flex; flex-direction: column; gap: 20px; }
.info-block { padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.info-block:last-child { border-bottom: 0; padding-bottom: 0; }
.info-label { margin: 0 0 7px; color: var(--blue); font-size: 13px; font-weight: 800; letter-spacing: .08em; }
.info-value { margin: 0; line-height: 1.75; overflow-wrap: anywhere; }
.price-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.price-chip { padding: 12px; border-radius: 9px; background: var(--pale); }
.price-chip span { display: block; color: var(--muted); font-size: 12px; }
.price-chip strong { display: block; margin-top: 4px; font-size: 15px; }
.detail-gallery { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; padding: 0 clamp(22px, 4vw, 42px) clamp(22px, 4vw, 42px); }
.detail-figure { margin: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: var(--pale); }
.detail-figure img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.detail-figure figcaption { padding: 14px 16px; }
.detail-figure strong { display: block; margin-bottom: 4px; }
.detail-figure span { color: var(--muted); font-size: 13px; }
.notice { margin: 20px clamp(22px, 4vw, 42px) 38px; padding: 14px 16px; color: #536173; background: #f5f7fa; border-left: 4px solid var(--blue); border-radius: 0 8px 8px 0; font-size: 13px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (max-width: 900px) {
  .result-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .detail-content { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .topbar { height: 62px; }
  .catalog-count { display: none; }
  .search-shell { padding-top: 36px; }
  .search-form { grid-template-columns: 1fr; }
  .search-form input { height: 52px; padding-right: 42px; }
  .search-button { height: 48px; }
  .clear-button { right: 13px; top: 15px; }
  .results-section, .detail-view { width: min(100% - 24px, 1280px); }
  .result-grid { grid-template-columns: 1fr; gap: 16px; }
  .results-heading { align-items: start; flex-direction: column; }
  .detail-gallery { grid-template-columns: 1fr; }
  .detail-toolbar { align-items: stretch; }
}
