/* =========================================================
   HiKOKI Parts Finder — local demo
   ========================================================= */
:root {
  --red: #e4001b;
  --red-bright: #ff2338;
  --red-dark: #ad0014;
  --ink: #141618;
  --ink-2: #24282b;
  --graphite: #363b3f;
  --steel: #6d7378;
  --muted: #8d918f;
  --line: #dedcd5;
  --line-dark: #c9c7c0;
  --paper: #f2f0eb;
  --paper-2: #e9e6df;
  --white: #fff;
  --lime: #d7ff45;
  --font-display: Bahnschrift, "Arial Narrow", "Segoe UI", "Microsoft YaHei", sans-serif;
  --font-body: "Segoe UI", "Microsoft YaHei", "PingFang SC", "Noto Sans SC", sans-serif;
  --shadow-sm: 0 2px 8px rgba(18, 20, 22, .06);
  --shadow-md: 0 18px 45px rgba(18, 20, 22, .10);
  --shadow-lg: 0 30px 90px rgba(18, 20, 22, .18);
  --ease: cubic-bezier(.22, 1, .36, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
body.is-locked { overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button { border: 0; background: none; cursor: pointer; }
a { color: inherit; text-decoration: none; }
img, svg { max-width: 100%; }
[hidden] { display: none !important; }
::selection { background: var(--red); color: #fff; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }

.container { width: min(1360px, calc(100% - 64px)); margin-inline: auto; }
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 1.15em; height: 1.15em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- Scrollbar ---------- */
* { scrollbar-width: thin; scrollbar-color: #b7b4ac transparent; }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: #c2bfb7; border-radius: 20px; border: 2px solid transparent; background-clip: content-box; }
*::-webkit-scrollbar-thumb:hover { background: #9c9890; border: 2px solid transparent; background-clip: content-box; }

/* =========================================================
   Header
   ========================================================= */
.top-strip {
  background: #0f1112;
  color: #aeb1b2;
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.top-strip-inner { height: 34px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.top-strip p, .top-strip-inner > div { display: flex; align-items: center; gap: 9px; margin: 0; }
.top-strip a { display: inline-flex; align-items: center; gap: 5px; color: #e6e6e2; transition: color .2s; }
.top-strip a:hover { color: var(--red-bright); }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--red-bright); box-shadow: 0 0 0 3px rgba(255, 35, 56, .16); }
.top-divider { width: 1px; height: 11px; background: #3b3e3f; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}
.header-inner { height: 78px; display: flex; align-items: center; gap: 40px; }
.brand { display: inline-flex; align-items: center; gap: 12px; flex: none; }
.brand-logo { display: block; height: 29px; width: auto; }
.brand-mark { width: 28px; height: 28px; display: flex; align-items: flex-end; gap: 3px; transform: skewX(-11deg); }
.brand-mark i { width: 6px; background: var(--ink); display: block; }
.brand-mark i:nth-child(1) { height: 17px; }
.brand-mark i:nth-child(2) { height: 27px; background: var(--red); }
.brand-mark i:nth-child(3) { height: 21px; }
.brand-type {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 27px;
  line-height: .82;
  letter-spacing: -.035em;
  font-stretch: condensed;
  display: flex;
  flex-direction: column;
}
.brand-type small { font-size: 7.5px; font-weight: 600; letter-spacing: .24em; color: var(--steel); margin-top: 5px; }
.demo-tag {
  align-self: flex-start;
  margin-top: 4px;
  font-family: var(--font-display);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--red);
  border: 1px solid rgba(228, 0, 27, .36);
  border-radius: 2px;
  padding: 1px 4px;
}
.main-nav { display: flex; align-items: center; gap: 30px; height: 100%; }
.main-nav a, .main-nav button {
  position: relative;
  height: 100%;
  display: inline-flex;
  align-items: center;
  font-size: 14px;
  font-weight: 600;
  color: #4d5154;
  transition: color .2s;
}
.main-nav a::after, .main-nav button::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 3px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .28s var(--ease);
}
.main-nav a:hover, .main-nav button:hover, .main-nav a.is-active { color: var(--ink); }
.main-nav a:hover::after, .main-nav a.is-active::after, .main-nav button:hover::after { transform: scaleX(1); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 24px; }
.phone-link { display: flex; flex-direction: column; text-align: right; line-height: 1.18; }
.phone-link span { font-size: 10px; color: var(--muted); letter-spacing: .1em; }
.phone-link strong { font-family: var(--font-display); font-size: 16px; letter-spacing: .015em; }
.cart-button {
  height: 44px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: var(--ink);
  color: #fff;
  border-radius: 2px;
  font-size: 13px;
  font-weight: 600;
  transition: background .2s, transform .2s;
}
.cart-button:hover { background: var(--red); transform: translateY(-1px); }
.cart-button .icon { width: 19px; height: 19px; }
.cart-count {
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 20px;
  background: var(--red);
  font-family: var(--font-display);
  font-size: 11px;
  line-height: 1;
  transition: background .2s;
}
.cart-button:hover .cart-count { background: #fff; color: var(--red); }
.cart-count.bump { animation: bump .35s var(--ease); }
@keyframes bump { 0%,100% { transform: scale(1); } 45% { transform: scale(1.35); } }
.menu-button { display: none; width: 42px; height: 42px; flex-direction: column; align-items: center; justify-content: center; gap: 5px; border: 1px solid var(--line); }
.menu-button span { display: block; width: 19px; height: 1.5px; background: var(--ink); transition: transform .2s, opacity .2s; }
.menu-button.is-open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.menu-button.is-open span:nth-child(2) { opacity: 0; }
.menu-button.is-open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
.mobile-nav { display: none; }

/* =========================================================
   Buttons / forms
   ========================================================= */
.btn {
  min-height: 44px;
  padding: 0 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid transparent;
  border-radius: 2px;
  font-size: 13px;
  font-weight: 650;
  line-height: 1;
  transition: background .2s, color .2s, border-color .2s, transform .2s, box-shadow .2s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--red); color: #fff; box-shadow: 0 5px 16px rgba(228, 0, 27, .16); }
.btn-primary:hover { background: var(--red-dark); box-shadow: 0 8px 22px rgba(228, 0, 27, .24); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: var(--red); }
.btn-outline { background: transparent; border-color: var(--line-dark); color: var(--ink); }
.btn-outline:hover { border-color: var(--ink); background: #fff; }
.btn-ghost { background: var(--paper); color: var(--ink); }
.btn-ghost:hover { background: var(--paper-2); }
.btn .icon { width: 17px; height: 17px; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.text-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--steel);
  transition: color .2s;
}
.text-button:hover { color: var(--red); }
.text-button .icon { width: 15px; height: 15px; }
.icon-button {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  color: var(--steel);
  transition: color .2s, border-color .2s, background .2s;
}
.icon-button:hover { color: var(--ink); border-color: var(--ink); background: #fff; }

/* =========================================================
   Hero
   ========================================================= */
.hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 87% 18%, rgba(228, 0, 27, .20), transparent 31%),
    linear-gradient(115deg, #0f1112 0%, #15181a 58%, #0e1011 100%);
}
.hero-grid-lines {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(90deg, #000, transparent 78%);
}
.hero-grid-lines::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0; left: 56%;
  width: 1px;
  background: linear-gradient(transparent, rgba(228, 0, 27, .65), transparent);
  transform: rotate(19deg) scaleY(1.8);
  transform-origin: center;
}
.hero-ghost {
  position: absolute;
  right: -20px;
  bottom: -56px;
  font-family: var(--font-display);
  font-size: clamp(160px, 23vw, 330px);
  font-weight: 900;
  line-height: .7;
  letter-spacing: -.07em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255,255,255,.065);
  pointer-events: none;
  user-select: none;
}
.hero-inner {
  position: relative;
  z-index: 2;
  min-height: 480px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(470px, 560px);
  align-items: center;
  gap: clamp(40px, 7vw, 110px);
  padding-top: 48px;
  padding-bottom: 62px;
}
.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .21em;
  color: #a9adaf;
}
.eyebrow i { width: 28px; height: 1px; background: var(--red-bright); }
.hero-copy h1 {
  margin: 23px 0 20px;
  font-family: var(--font-display);
  font-size: clamp(46px, 5.2vw, 72px);
  font-weight: 750;
  line-height: 1.03;
  letter-spacing: -.045em;
}
.hero-copy h1 em { font-style: normal; color: var(--red-bright); }
.hero-lede { margin: 0; color: #a6abae; font-size: 14px; line-height: 1.85; }
.hero-stats { display: flex; align-items: stretch; gap: 0; margin-top: 34px; }
.hero-stats > div { padding: 0 27px; border-left: 1px solid #34383a; display: flex; flex-direction: column; gap: 1px; }
.hero-stats > div:first-child { padding-left: 0; border-left: 0; }
.hero-stats strong { font-family: var(--font-display); font-size: 28px; font-weight: 650; letter-spacing: -.02em; line-height: 1; }
.hero-stats span { color: #858b8e; font-size: 10px; letter-spacing: .05em; }
.hero-side-label {
  position: absolute;
  right: 17px;
  top: 50%;
  transform: translateY(-50%) rotate(180deg);
  writing-mode: vertical-rl;
  font-family: var(--font-display);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: .28em;
  color: #5e6366;
  z-index: 1;
}

/* Search card */
.search-card {
  position: relative;
  background: #fff;
  color: var(--ink);
  padding: 28px 30px 24px;
  box-shadow: var(--shadow-lg);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 22px), calc(100% - 22px) 100%, 0 100%);
}
.search-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--red); }
.search-card::after {
  content: "";
  position: absolute;
  right: 0; bottom: 0;
  width: 22px; height: 22px;
  background: linear-gradient(135deg, transparent 48%, var(--paper-2) 50%);
}
.search-card-head { display: flex; justify-content: space-between; align-items: flex-start; padding-bottom: 17px; border-bottom: 1px solid var(--line); }
.card-kicker { font-family: var(--font-display); font-size: 8.5px; font-weight: 650; letter-spacing: .17em; color: var(--red); }
.search-card-head h2 { margin: 3px 0 0; font-family: var(--font-display); font-size: 26px; font-weight: 700; letter-spacing: -.02em; }
.search-card-code { font-family: var(--font-display); font-size: 10px; letter-spacing: .1em; color: #b6b3ab; padding-top: 4px; }
.search-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 19px; }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field > span:first-child { font-size: 10px; font-weight: 650; letter-spacing: .08em; color: #696d6c; }
.field input, .field select, .field textarea {
  width: 100%;
  height: 46px;
  padding: 0 13px;
  background: #f5f3ee;
  border: 1px solid #e6e3dc;
  border-radius: 1px;
  font-size: 13px;
  transition: background .2s, border-color .2s, box-shadow .2s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  background: #fff;
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(228, 0, 27, .08);
}
.field input::placeholder, .field textarea::placeholder { color: #aaa69e; }
.field-category { grid-column: 1 / 2; }
.select-shell { position: relative; display: block; }
.select-shell select { appearance: none; padding-right: 38px; cursor: pointer; }
.select-shell .icon { position: absolute; right: 13px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: #767a78; pointer-events: none; }
.search-submit { grid-column: 1 / -1; height: 49px; margin-top: 1px; font-size: 13.5px; }
.search-submit .icon { width: 18px; height: 18px; }
.search-card-foot {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 15px;
  font-size: 10px;
  color: #959990;
}
.search-card-foot > span { margin-right: 2px; }
.search-card-foot button {
  padding: 3px 7px;
  border: 1px solid #e6e3dc;
  font-family: var(--font-display);
  font-size: 9.5px;
  letter-spacing: .04em;
  color: #646966;
  transition: all .2s;
}
.search-card-foot button:hover { color: #fff; background: var(--red); border-color: var(--red); }

/* =========================================================
   Catalog
   ========================================================= */
.catalog-section { padding-top: 66px; scroll-margin-top: 78px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; margin-bottom: 30px; }
.section-index { font-family: var(--font-display); font-size: 9.5px; letter-spacing: .15em; color: var(--red); }
.section-heading h2 { margin: 6px 0 0; font-family: var(--font-display); font-size: 33px; font-weight: 650; letter-spacing: -.035em; line-height: 1.1; }
.catalog-layout { display: grid; grid-template-columns: 224px minmax(0, 1fr); gap: 42px; align-items: start; }
.filter-rail { position: sticky; top: 103px; display: flex; flex-direction: column; gap: 30px; }
.filter-block { border-top: 1px solid var(--line-dark); padding-top: 15px; }
.filter-block h3 { margin: 0 0 13px; font-family: var(--font-display); font-size: 12px; font-weight: 700; letter-spacing: .04em; }
.category-filters { display: flex; flex-direction: column; gap: 3px; }
.category-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 36px;
  padding: 0 10px;
  color: #6c706e;
  font-size: 12.5px;
  border-left: 2px solid transparent;
  transition: all .18s;
}
.category-chip b { font-family: var(--font-display); font-size: 10px; font-weight: 500; color: #a8a49a; }
.category-chip:hover { background: #eae7df; color: var(--ink); }
.category-chip.is-active { background: #fff; border-left-color: var(--red); color: var(--ink); font-weight: 650; box-shadow: var(--shadow-sm); }
.category-chip.is-active b { color: var(--red); }
.model-links { display: flex; flex-direction: column; }
.model-links a {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "model arrow" "name arrow";
  align-items: center;
  gap: 0 8px;
  padding: 10px 2px;
  border-bottom: 1px solid #e3e0d8;
  transition: padding .2s, color .2s;
}
.model-links a:hover { color: var(--red); padding-left: 5px; }
.model-links span { grid-area: model; font-family: var(--font-display); font-size: 13px; font-weight: 650; letter-spacing: .015em; }
.model-links small { grid-area: name; color: #92958e; font-size: 10.5px; }
.model-links .icon { grid-area: arrow; width: 14px; height: 14px; color: #b4b0a7; }
.model-links a:hover .icon { color: var(--red); }
.support-card { background: #1a1d1f; color: #fff; padding: 19px; display: flex; gap: 12px; }
.support-icon { width: 34px; height: 34px; flex: none; display: flex; align-items: center; justify-content: center; background: var(--red); }
.support-icon .icon { width: 17px; height: 17px; }
.support-card strong { font-size: 12px; display: block; line-height: 1.5; }
.support-card p { margin: 6px 0 10px; font-size: 10.5px; color: #92989a; line-height: 1.7; }
.support-card a { display: inline-flex; align-items: center; gap: 4px; color: #fff; font-family: var(--font-display); font-size: 11px; border-bottom: 1px solid #5a5f61; padding-bottom: 2px; }
.support-card a:hover { color: var(--red-bright); }
.support-card a .icon { width: 12px; height: 12px; }

.catalog-main { min-width: 0; }
.results-bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.results-bar p { margin: 0; font-size: 12px; color: #666b68; }
.results-bar p span { color: #a09c93; margin-left: 6px; }
.results-view { display: flex; align-items: center; gap: 5px; color: #96958e; font-size: 10.5px; }
.results-view .icon { width: 13px; height: 13px; }

.product-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  overflow: hidden;
  transition: border-color .28s, transform .28s var(--ease), box-shadow .28s;
}
.product-card:hover { border-color: #b8b5ac; transform: translateY(-4px); box-shadow: var(--shadow-md); }
.product-card:focus-visible { outline-offset: 2px; }
.product-card-visual {
  position: relative;
  height: 226px;
  overflow: hidden;
  background:
    linear-gradient(rgba(20,22,24,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20,22,24,.035) 1px, transparent 1px),
    radial-gradient(circle at 65% 40%, #f7f5ef, #e8e5dd);
  background-size: 26px 26px, 26px 26px, auto;
  border-bottom: 1px solid #e4e1d9;
}
.product-card-visual::before {
  content: "";
  position: absolute;
  left: 30px; right: 30px; bottom: 27px;
  height: 1px;
  background: linear-gradient(90deg, transparent, #c8c4ba, transparent);
}
.product-card-visual::after {
  content: "";
  position: absolute;
  right: 22px; bottom: 22px;
  width: 37px; height: 37px;
  border-right: 1px solid #c7c3b9;
  border-bottom: 1px solid #c7c3b9;
}
.product-index {
  position: absolute;
  right: 21px; top: 13px;
  font-family: var(--font-display);
  font-size: 10px;
  color: #aaa69d;
  letter-spacing: .1em;
}
.product-cat {
  position: absolute;
  left: 20px; top: 17px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  background: #fff;
  border: 1px solid #dedad0;
  font-size: 9.5px;
  color: #5d625f;
  letter-spacing: .03em;
}
.product-cat::before { content: ""; width: 5px; height: 5px; background: var(--red); }
.product-art { position: absolute; inset: 18px 20px 18px; display: flex; align-items: center; justify-content: center; z-index: 1; }
.product-art svg { width: 88%; height: 88%; filter: drop-shadow(0 16px 12px rgba(24,26,27,.18)); transition: transform .45s var(--ease); }
.product-card:hover .product-art svg { transform: translateY(-3px) scale(1.035) rotate(-.7deg); }
.product-watermark {
  position: absolute;
  left: 13px; bottom: 2px;
  font-family: var(--font-display);
  font-size: 82px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -.06em;
  color: rgba(28,31,32,.035);
  pointer-events: none;
}
.product-card-body { padding: 21px 23px 22px; display: flex; flex-direction: column; flex: 1; }
.product-model-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 15px; }
.product-model { margin: 0; font-family: var(--font-display); font-size: 29px; font-weight: 750; line-height: 1; letter-spacing: -.035em; }
.product-badge { font-family: var(--font-display); font-size: 9px; letter-spacing: .05em; color: #6e726e; border: 1px solid #e1ded6; padding: 4px 7px; white-space: nowrap; }
.product-name { margin: 9px 0 0; font-size: 14px; font-weight: 600; color: #34383a; }
.product-desc { margin: 7px 0 17px; color: #8b8e88; font-size: 11.5px; line-height: 1.7; min-height: 38px; }
.product-meta { display: flex; align-items: center; gap: 12px; margin-top: auto; padding-top: 16px; border-top: 1px solid #ece9e2; }
.product-meta span { font-size: 10.5px; color: #8d908a; }
.product-meta span + span::before { content: "·"; margin-right: 12px; color: #c4c0b7; }
.product-link { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 650; color: var(--ink); }
.product-link .icon { width: 15px; height: 15px; transition: transform .2s; }
.product-card:hover .product-link { color: var(--red); }
.product-card:hover .product-link .icon { transform: translateX(3px); }

.part-match-panel { background: #fff; border: 1px solid var(--line); margin-bottom: 19px; animation: reveal .35s var(--ease); }
.part-match-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid #e8e5dd; }
.part-match-head h3 { margin: 3px 0 0; font-family: var(--font-display); font-size: 17px; }
.part-match-head > span { font-size: 10px; color: #8c8f89; }
.part-match-list { display: flex; flex-direction: column; }
.part-match-row { display: grid; grid-template-columns: 54px minmax(0, 1fr) 96px 92px; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid #eeece5; }
.part-match-row:last-child { border-bottom: 0; }
.part-match-row .pm-no { font-family: var(--font-display); font-size: 11px; color: var(--red); font-weight: 650; }
.part-match-row .pm-main strong { display: block; font-size: 12.5px; font-weight: 600; }
.part-match-row .pm-main span { display: block; margin-top: 2px; color: #94978f; font-size: 10.5px; }
.part-match-row .pm-price { font-family: var(--font-display); font-size: 12px; text-align: right; }
.part-match-row .pm-link { font-size: 10.5px; color: var(--red); font-weight: 600; display: inline-flex; align-items: center; gap: 3px; justify-self: end; }
.part-match-row .pm-link .icon { width: 12px; height: 12px; }
.part-match-row .pm-link:hover { text-decoration: underline; }
.part-match-empty { display: flex; gap: 13px; align-items: flex-start; padding: 18px 20px; color: #7f837c; }
.part-match-empty > .icon { width: 21px; height: 21px; color: #b5b1a7; margin-top: 1px; }
.part-match-empty strong { display: block; font-size: 12px; color: #444946; }
.part-match-empty p { margin: 3px 0 0; font-size: 10px; line-height: 1.65; }
.empty-state { background: #fff; border: 1px solid var(--line); min-height: 380px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 50px 20px; text-align: center; grid-column: 1 / -1; }
.empty-code { font-family: var(--font-display); font-size: 68px; font-weight: 900; line-height: 1; color: #e6e2d9; letter-spacing: -.05em; }
.empty-state h3 { margin: 12px 0 7px; font-family: var(--font-display); font-size: 22px; }
.empty-state p { margin: 0 0 22px; color: #8b8e87; font-size: 12.5px; }

@keyframes reveal { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: none; } }

/* Service strip */
.service-strip { margin-top: 80px; background: #171a1c; color: #fff; }
.service-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.service-item { position: relative; padding: 27px 28px; display: flex; align-items: flex-start; gap: 14px; border-left: 1px solid #2b2f31; }
.service-item:first-child { border-left: 0; padding-left: 0; }
.service-item > span { position: absolute; right: 17px; top: 12px; font-family: var(--font-display); font-size: 8px; color: #4c5153; letter-spacing: .1em; }
.service-item > .icon { width: 25px; height: 25px; color: var(--red-bright); margin-top: 2px; stroke-width: 1.5; }
.service-item strong { display: block; font-size: 12.5px; font-weight: 600; }
.service-item p { margin: 4px 0 0; color: #7f8587; font-size: 10.5px; }

/* =========================================================
   Detail view
   ========================================================= */
.view { display: none; }
.view.is-active { display: block; }
#view-detail { padding-bottom: 60px; }
.detail-container { padding-top: 25px; }
.breadcrumb { display: flex; align-items: center; gap: 9px; font-size: 11px; color: #8d908a; margin-bottom: 26px; }
.breadcrumb a:hover { color: var(--red); }
.breadcrumb span:last-child { color: #4f5452; }
.detail-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 30px; padding-bottom: 28px; }
.detail-kicker { display: flex; align-items: center; gap: 8px; font-family: var(--font-display); font-size: 9.5px; font-weight: 600; letter-spacing: .11em; color: var(--red); text-transform: uppercase; }
.detail-kicker .dot { width: 3px; height: 3px; border-radius: 50%; background: #b9b6ae; }
.detail-kicker span:last-child { color: #8d9089; }
.detail-title-wrap h1 { display: flex; align-items: baseline; flex-wrap: wrap; gap: 14px; margin: 8px 0 7px; font-family: var(--font-display); font-size: clamp(34px, 3.6vw, 50px); font-weight: 750; letter-spacing: -.04em; line-height: 1.06; }
.detail-title-wrap h1 em { font-style: normal; font-size: .49em; font-weight: 500; letter-spacing: -.01em; color: #555a57; }
.detail-title-wrap > p { margin: 0; max-width: 720px; color: #747872; font-size: 12.5px; line-height: 1.7; }
.spec-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }
.spec-chip { padding: 4px 9px; border: 1px solid #dcd8cf; background: rgba(255,255,255,.42); font-size: 10px; color: #626762; }
.spec-chip b { font-weight: 650; color: #2d3132; }
.detail-side { display: flex; align-items: stretch; gap: 9px; flex: none; }
.detail-count { border: 1px solid #dcd8cf; background: rgba(255,255,255,.45); min-width: 84px; padding: 7px 14px; display: flex; flex-direction: column; justify-content: center; }
.detail-count span { font-size: 9px; color: #8a8e88; }
.detail-count strong { font-family: var(--font-display); font-size: 22px; line-height: 1.05; }
.detail-side .btn b { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 20px; background: var(--red); color: #fff; font-family: var(--font-display); font-size: 9px; font-weight: 500; }

.workspace { background: #fff; border: 1px solid #d8d5cd; box-shadow: 0 14px 35px rgba(20,22,24,.06); }
.workspace-head { height: 58px; display: flex; align-items: center; gap: 24px; padding: 0 17px 0 10px; border-bottom: 1px solid #e3e0d8; background: #fbfaf7; }
.view-switch { display: flex; align-items: center; height: 100%; }
.view-switch button { height: 100%; display: inline-flex; align-items: center; gap: 6px; padding: 0 14px; font-size: 11px; color: #828681; position: relative; transition: color .2s, background .2s; }
.view-switch button .icon { width: 15px; height: 15px; }
.view-switch button::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 0; height: 2px; background: var(--red); transform: scaleX(0); transition: transform .22s; }
.view-switch button:hover { color: var(--ink); background: #f4f1ea; }
.view-switch button.is-active { color: var(--ink); font-weight: 650; }
.view-switch button.is-active::after { transform: scaleX(1); }
.workspace-note { display: flex; align-items: center; gap: 5px; color: #9a9c94; font-size: 10px; margin-left: 3px; }
.workspace-note .icon { width: 13px; height: 13px; }
.workspace-actions { margin-left: auto; display: flex; align-items: center; gap: 13px; }
.new-badge { font-family: var(--font-display); font-size: 8px; letter-spacing: .1em; color: #969990; border: 1px solid #dfdcd3; padding: 3px 7px; }
.workspace-body { display: grid; grid-template-columns: var(--split) 9px minmax(0, 1fr); height: 682px; }
.workspace[data-view-mode="diagram"] .workspace-body { grid-template-columns: minmax(0, 1fr); }
.workspace[data-view-mode="diagram"] .split-handle,
.workspace[data-view-mode="diagram"] .list-panel { display: none; }
.workspace[data-view-mode="list"] .workspace-body { grid-template-columns: minmax(0, 1fr); }
.workspace[data-view-mode="list"] .diagram-panel,
.workspace[data-view-mode="list"] .split-handle { display: none; }

.diagram-panel { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: #f8f7f3; }
.panel-label { height: 50px; flex: none; display: flex; align-items: center; justify-content: space-between; padding: 0 17px 0 20px; border-bottom: 1px solid #e5e2da; background: #fbfaf7; }
.panel-label > div:first-child { display: flex; align-items: baseline; gap: 9px; }
.panel-index { font-family: var(--font-display); font-size: 8px; font-weight: 600; letter-spacing: .1em; color: var(--red); }
.panel-label strong { font-family: var(--font-display); font-size: 14px; font-weight: 650; }
.diagram-controls { display: flex; align-items: center; gap: 3px; }
.diagram-controls button { width: 29px; height: 29px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid #e1ded6; background: #fff; color: #626763; transition: all .18s; }
.diagram-controls button:hover { border-color: #a9a69d; color: var(--red); }
.diagram-controls button .icon { width: 14px; height: 14px; }
.diagram-controls #zoom-readout { min-width: 40px; text-align: center; font-family: var(--font-display); font-size: 9.5px; color: #7f837d; }
.control-divider { width: 1px; height: 15px; background: #ddd9d0; margin: 0 4px; }
.diagram-stage {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  cursor: grab;
  touch-action: none;
  user-select: none;
  background-color: #f6f4ee;
  background-image:
    linear-gradient(rgba(31,35,36,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31,35,36,.045) 1px, transparent 1px),
    radial-gradient(circle at 52% 43%, rgba(255,255,255,.92), rgba(246,244,238,.45) 62%, rgba(235,232,224,.55));
  background-size: 27px 27px, 27px 27px, auto;
}
.diagram-stage.is-dragging { cursor: grabbing; }
.diagram-stage:fullscreen { background-color: #f6f4ee; }
.stage-corner { position: absolute; z-index: 1; width: 17px; height: 17px; border-color: #c3bfb6; border-style: solid; pointer-events: none; }
.stage-corner-tl { left: 15px; top: 15px; border-width: 1px 0 0 1px; }
.stage-corner-tr { right: 15px; top: 15px; border-width: 1px 1px 0 0; }
.stage-corner-bl { left: 15px; bottom: 15px; border-width: 0 0 1px 1px; }
.stage-corner-br { right: 15px; bottom: 15px; border-width: 0 1px 1px 0; }
.diagram-watermark { position: absolute; left: 26px; bottom: 16px; font-family: var(--font-display); font-size: 66px; font-weight: 900; letter-spacing: -.06em; color: rgba(27,30,31,.045); line-height: 1; pointer-events: none; user-select: none; }
.diagram-zoomer { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 23px; transform-origin: center center; will-change: transform; transition: transform .2s var(--ease); }
.diagram-stage.is-dragging .diagram-zoomer,
.diagram-zoomer.is-instant { transition: none; }
.diagram-panel:fullscreen { background: #f8f7f3; width: 100vw; height: 100vh; }
.diagram-panel:fullscreen .diagram-stage { background-color: #f6f4ee; }
.diagram-panel:fullscreen .selection-ribbon { min-height: 82px; }
.diagram-svg .hotspot:focus { outline: none; }
.diagram-svg .hotspot:focus-visible .hs-circle { fill: var(--red); stroke: var(--red); stroke-width: 3; }
.diagram-svg .hotspot:focus-visible .hs-text { fill: #fff; }
.diagram-zoomer svg { width: 100%; height: 100%; overflow: visible; }
.stage-hint { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); display: flex; align-items: center; gap: 6px; padding: 4px 9px; background: rgba(250,249,245,.8); color: #a6a39a; font-size: 8.5px; white-space: nowrap; pointer-events: none; backdrop-filter: blur(4px); }
.mouse-icon { width: 9px; height: 13px; border: 1px solid #b1ada3; border-radius: 6px; position: relative; }
.mouse-icon::after { content: ""; position: absolute; width: 1px; height: 3px; background: #b1ada3; left: 50%; top: 2px; transform: translateX(-50%); }

/* Diagram internals */
.diagram-svg text { font-family: var(--font-display); }
.diagram-svg .part-group { cursor: pointer; transition: opacity .2s, filter .2s; }
.diagram-svg .part-group:hover { filter: brightness(1.05) drop-shadow(0 0 4px rgba(228,0,27,.38)); }
.diagram-svg .part-group.is-selected { filter: drop-shadow(0 0 6px rgba(228,0,27,.55)); }
.diagram-svg .part-group.is-selected .sel-outline { stroke: var(--red) !important; stroke-width: 2.5 !important; }
.diagram-svg .hotspot { cursor: pointer; }
.diagram-svg .hotspot .hs-circle { fill: #fff; stroke: #bdb9b0; stroke-width: 1.2; transition: fill .18s, stroke .18s; }
.diagram-svg .hotspot .hs-text { fill: #3d4241; font-size: 10px; font-weight: 700; text-anchor: middle; dominant-baseline: central; pointer-events: none; }
.diagram-svg .hotspot .hs-line { stroke: #b8b4ab; stroke-width: .8; stroke-dasharray: 2 2.5; }
.diagram-svg .hotspot:hover .hs-circle, .diagram-svg .hotspot.is-selected .hs-circle { fill: var(--red); stroke: var(--red); }
.diagram-svg .hotspot:hover .hs-text, .diagram-svg .hotspot.is-selected .hs-text { fill: #fff; }
.diagram-svg .hotspot.is-selected .hs-line { stroke: var(--red); stroke-dasharray: none; }
.diagram-svg .tech-label { fill: #aaa69d; font-size: 7.5px; letter-spacing: .08em; }
.diagram-svg .tech-label-strong { fill: #5e625f; font-size: 9px; font-weight: 650; letter-spacing: .04em; }
.diagram-svg .tech-line { stroke: #c9c5bb; stroke-width: .75; }
.diagram-svg .explode-axis { stroke: #c1bdb3; stroke-width: .9; stroke-dasharray: 5 6; }
.diagram-svg .axis-arrow { fill: #c1bdb3; }
.diagram-tooltip {
  position: absolute;
  z-index: 7;
  min-width: 175px;
  max-width: 245px;
  padding: 10px 12px;
  background: #171a1c;
  color: #fff;
  box-shadow: 0 12px 28px rgba(0,0,0,.22);
  pointer-events: none;
  transform: translate(14px, -50%);
  animation: tooltipIn .12s ease-out;
}
.diagram-tooltip::before { content: ""; position: absolute; left: -5px; top: 50%; transform: translateY(-50%); border-top: 5px solid transparent; border-bottom: 5px solid transparent; border-right: 5px solid #171a1c; }
.diagram-tooltip.is-left { transform: translate(calc(-100% - 14px), -50%); }
.diagram-tooltip.is-left::before { left: auto; right: -5px; border-right: 0; border-left: 5px solid #171a1c; }
.diagram-tooltip .tt-code { display: block; font-family: var(--font-display); font-size: 9px; letter-spacing: .08em; color: #a8adaf; }
.diagram-tooltip strong { display: block; margin-top: 2px; font-size: 12px; line-height: 1.4; }
.diagram-tooltip .tt-price { display: block; margin-top: 5px; font-family: var(--font-display); font-size: 11px; color: #ff5164; }
@keyframes tooltipIn { from { opacity: 0; transform: translate(10px, -50%); } to { opacity: 1; transform: translate(14px, -50%); } }

.selection-ribbon { flex: none; min-height: 73px; border-top: 1px solid #e2ded6; background: #fff; display: flex; align-items: center; padding: 10px 17px; }
.selection-empty { display: flex; align-items: center; gap: 9px; padding-left: 4px; color: #999b94; font-size: 10.5px; }
.selection-empty p { margin: 0; }
.pulse-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 4px rgba(228,0,27,.1); animation: pulse 2s infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 3px rgba(228,0,27,.09); } 50% { box-shadow: 0 0 0 6px rgba(228,0,27,.035); } }
.selection-content { width: 100%; display: flex; align-items: center; gap: 12px; animation: reveal .25s var(--ease); }
.sel-number { width: 36px; height: 36px; flex: none; display: flex; align-items: center; justify-content: center; background: var(--red); color: #fff; font-family: var(--font-display); font-size: 13px; font-weight: 650; }
.sel-main { min-width: 0; }
.sel-main strong { display: block; font-size: 12.5px; line-height: 1.35; }
.sel-main span { display: block; margin-top: 2px; font-family: var(--font-display); font-size: 9.5px; letter-spacing: .04em; color: #92958e; }
.sel-price { margin-left: auto; text-align: right; flex: none; }
.sel-price span { display: block; font-size: 8.5px; color: #a2a49d; }
.sel-price strong { font-family: var(--font-display); font-size: 17px; font-weight: 650; }
.sel-action { flex: none; height: 35px; min-height: 35px; padding: 0 14px; font-size: 11px; }
.sel-action .icon { width: 14px; height: 14px; }

.split-handle { position: relative; cursor: col-resize; background: #eeebe4; border-left: 1px solid #e2ded6; border-right: 1px solid #e2ded6; touch-action: none; }
.split-handle::before { content: ""; position: absolute; top: 0; bottom: 0; left: -4px; right: -4px; }
.split-handle span { position: absolute; top: 50%; left: 50%; width: 3px; height: 36px; transform: translate(-50%, -50%); border-left: 1px solid #aaa69b; border-right: 1px solid #aaa69b; }
.split-handle:hover, .split-handle.is-dragging { background: #e6e2d9; }
.split-handle:hover span, .split-handle.is-dragging span { border-color: var(--red); }

.list-panel { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: #fff; }
.list-head { flex: none; height: 62px; padding: 0 17px 0 19px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #e7e4dc; }
.list-head > div { display: flex; align-items: baseline; gap: 8px; }
.list-head h2 { margin: 0; font-family: var(--font-display); font-size: 16px; font-weight: 650; }
.list-count { font-family: var(--font-display); font-size: 9px; color: #8c8f88; border: 1px solid #e0dcd3; padding: 3px 7px; }
.list-filter { position: relative; flex: none; padding: 10px 15px; border-bottom: 1px solid #e7e4dc; background: #fbfaf7; }
.list-filter .icon { position: absolute; left: 27px; top: 50%; transform: translateY(-50%); width: 14px; height: 14px; color: #9da098; }
.list-filter input { width: 100%; height: 34px; padding: 0 34px 0 34px; border: 1px solid #dedad1; background: #fff; font-size: 11px; transition: border-color .2s; }
.list-filter input:focus { outline: none; border-color: var(--red); }
.list-filter input::placeholder { color: #aaa79f; }
#parts-filter-clear { position: absolute; right: 23px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center; color: #8d918b; }
#parts-filter-clear .icon { position: static; transform: none; width: 12px; height: 12px; }
.table-wrap { flex: 1; min-height: 0; overflow: auto; }
.parts-table { width: 100%; min-width: 565px; border-collapse: collapse; table-layout: fixed; }
.parts-table thead { position: sticky; top: 0; z-index: 2; }
.parts-table th { height: 36px; padding: 0 7px; background: #f4f2ec; border-bottom: 1px solid #dcd8cf; text-align: left; font-size: 8.5px; font-weight: 650; letter-spacing: .04em; color: #8a8e87; white-space: nowrap; }
.parts-table th:first-child { padding-left: 13px; }
.parts-table th button { display: inline-flex; align-items: center; gap: 3px; font-size: inherit; font-weight: inherit; letter-spacing: inherit; color: inherit; }
.parts-table th button:hover { color: var(--red); }
.parts-table th button::after { content: "↕"; font-size: 8px; color: #bbb7ae; }
.parts-table th.is-sorted-asc button::after { content: "↑"; color: var(--red); }
.parts-table th.is-sorted-desc button::after { content: "↓"; color: var(--red); }
.parts-table .col-no { width: 49px; }
.parts-table .col-code { width: 84px; }
.parts-table .col-qty { width: 43px; text-align: center; }
.parts-table .col-qty button { justify-content: center; width: 100%; }
.parts-table .col-price { width: 68px; text-align: right; }
.parts-table .col-price button { justify-content: flex-end; width: 100%; }
.parts-table .col-action { width: 74px; text-align: right; padding-right: 12px; }
.parts-table td { padding: 9px 7px; border-bottom: 1px solid #efede6; vertical-align: middle; }
.parts-table td:first-child { padding-left: 13px; }
.parts-table tbody tr { cursor: pointer; transition: background .15s; }
.parts-table tbody tr:hover { background: #faf8f3; }
.parts-table tbody tr.is-selected { background: #fff4f5; box-shadow: inset 3px 0 0 var(--red); }
.parts-table tbody tr.is-flash { animation: rowFlash .7s ease; }
@keyframes rowFlash { 0%, 100% { background: transparent; } 35% { background: #ffedf0; } }
.table-empty-row { cursor: default !important; }
.table-empty-row:hover { background: transparent !important; }
.table-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 150px; color: #999c95; text-align: center; }
.table-empty .icon { width: 22px; height: 22px; color: #c0bcb2; margin-bottom: 3px; }
.table-empty strong { font-size: 11.5px; color: #656a66; font-weight: 600; }
.table-empty span { font-size: 9.5px; }
.part-no { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 21px; background: #f1efe9; color: #555b57; font-family: var(--font-display); font-size: 9px; font-weight: 650; }
tr.is-selected .part-no { background: var(--red); color: #fff; }
.part-code { display: block; font-family: var(--font-display); font-size: 10.5px; letter-spacing: .02em; color: #3e4341; white-space: nowrap; }
.part-name { display: block; font-size: 11px; line-height: 1.4; color: #25292a; font-weight: 500; }
.part-note { display: block; margin-top: 1px; font-size: 8.5px; color: #a29e94; }
.part-qty { text-align: center; font-family: var(--font-display); font-size: 10px; color: #6f746f; }
.part-price { text-align: right; font-family: var(--font-display); font-size: 11px; font-weight: 600; white-space: nowrap; }
.part-price small { font-size: 8px; font-weight: 500; color: #9a9d96; margin-right: 1px; }
.add-part { height: 27px; padding: 0 9px; border: 1px solid #d8d4ca; background: #fff; display: inline-flex; align-items: center; gap: 4px; font-size: 9.5px; color: #555a56; white-space: nowrap; transition: all .18s; }
.add-part .icon { width: 12px; height: 12px; }
.add-part:hover { color: #fff; background: var(--red); border-color: var(--red); }
.add-part.is-added { background: #f0f7e4; border-color: #c8dca4; color: #45610e; }
.add-part.is-added:hover { background: var(--red); border-color: var(--red); color: #fff; }
.qty-inline { display: inline-flex; align-items: center; height: 27px; border: 1px solid #d8d4ca; background: #fff; }
.qty-inline button { width: 20px; height: 100%; display: inline-flex; align-items: center; justify-content: center; color: #6b706b; }
.qty-inline button:hover { color: var(--red); background: #f5f2ec; }
.qty-inline button .icon { width: 10px; height: 10px; }
.qty-inline b { min-width: 18px; text-align: center; font-family: var(--font-display); font-size: 9.5px; font-weight: 600; }
.list-foot { flex: none; min-height: 39px; border-top: 1px solid #e7e4dc; padding: 8px 15px; display: flex; align-items: center; justify-content: space-between; gap: 10px; background: #fbfaf7; }
.list-foot p { display: flex; align-items: center; gap: 4px; margin: 0; font-size: 8.5px; color: #9b9e96; }
.list-foot p .icon { width: 11px; height: 11px; }
.list-foot .text-button { font-size: 9.5px; }

.detail-bottom { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 20px; }
.back-link { display: inline-flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 600; color: #5d625e; transition: color .2s; }
.back-link .icon { width: 14px; height: 14px; transform: rotate(180deg); }
.back-link:hover { color: var(--red); }
.detail-bottom p { margin: 0; font-size: 9.5px; color: #999c95; letter-spacing: .02em; }
.detail-bottom p strong { font-family: var(--font-display); color: #60655f; font-weight: 600; }

/* =========================================================
   Cart
   ========================================================= */
.drawer-layer { position: fixed; inset: 0; z-index: 130; }
.drawer-scrim { position: absolute; inset: 0; width: 100%; height: 100%; background: rgba(10,12,13,.58); opacity: 0; transition: opacity .35s; backdrop-filter: blur(2px); }
.cart-drawer {
  position: absolute;
  right: 0; top: 0;
  width: min(455px, 100%);
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #f6f4ef;
  box-shadow: -30px 0 70px rgba(0,0,0,.2);
  transform: translateX(102%);
  transition: transform .38s var(--ease);
}
.drawer-layer.is-open .drawer-scrim { opacity: 1; }
.drawer-layer.is-open .cart-drawer { transform: none; }
.cart-head { flex: none; min-height: 91px; display: flex; align-items: center; justify-content: space-between; padding: 19px 24px; background: #fff; border-bottom: 1px solid #e2ded6; }
.cart-head h2 { margin: 2px 0 0; font-family: var(--font-display); font-size: 26px; font-weight: 700; letter-spacing: -.025em; }
.cart-head h2 b { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; margin-left: 2px; padding: 0 5px; vertical-align: 3px; border-radius: 20px; background: var(--red); color: #fff; font-size: 10px; font-weight: 500; }
.drawer-close { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid #e0dcd3; color: #6e736e; transition: all .2s; }
.drawer-close:hover { color: #fff; background: var(--red); border-color: var(--red); }
.drawer-close .icon { width: 16px; height: 16px; }
.cart-body { flex: 1; overflow: auto; padding: 18px 20px 26px; }
.cart-empty { height: 100%; min-height: 320px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 30px; }
.cart-empty-icon { width: 68px; height: 68px; border: 1px solid #ddd9d0; background: #fbfaf7; display: flex; align-items: center; justify-content: center; color: #aaa69d; margin-bottom: 17px; }
.cart-empty-icon .icon { width: 28px; height: 28px; stroke-width: 1.3; }
.cart-empty h3 { margin: 0 0 6px; font-family: var(--font-display); font-size: 19px; }
.cart-empty p { margin: 0 0 21px; color: #8d918b; font-size: 11.5px; line-height: 1.7; }
.cart-group { margin-bottom: 22px; }
.cart-group-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; padding: 0 2px; }
.cart-group-head span { font-family: var(--font-display); font-size: 9px; letter-spacing: .08em; color: var(--red); }
.cart-group-head strong { font-family: var(--font-display); font-size: 12px; letter-spacing: .01em; }
.cart-group-head small { margin-left: auto; font-size: 9px; color: #999c95; }
.cart-item { display: grid; grid-template-columns: 55px minmax(0, 1fr) auto; gap: 12px; padding: 13px 12px; background: #fff; border: 1px solid #e6e2da; margin-bottom: 6px; }
.cart-thumb { width: 55px; height: 62px; background: #f0eee7; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.cart-thumb svg { width: 52px; height: 52px; }
.cart-item-main { min-width: 0; }
.cart-item-main .ci-code { font-family: var(--font-display); font-size: 9px; color: #969990; letter-spacing: .04em; }
.cart-item-main strong { display: block; font-size: 12px; line-height: 1.35; margin: 2px 0 5px; }
.cart-item-main .ci-note { font-size: 8.5px; color: #afaba1; }
.cart-item-side { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; gap: 8px; }
.ci-price { font-family: var(--font-display); font-size: 12px; font-weight: 600; }
.ci-remove { width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; color: #b6b2a8; transition: color .2s; }
.ci-remove:hover { color: var(--red); }
.ci-remove .icon { width: 12px; height: 12px; }
.qty-stepper { display: inline-flex; align-items: center; height: 27px; border: 1px solid #dedad1; background: #fff; }
.qty-stepper button { width: 24px; height: 100%; display: inline-flex; align-items: center; justify-content: center; color: #6e736e; }
.qty-stepper button:hover { background: #f5f2ec; color: var(--red); }
.qty-stepper button .icon { width: 11px; height: 11px; }
.qty-stepper b { min-width: 24px; text-align: center; font-family: var(--font-display); font-size: 10px; }
.cart-foot { flex: none; background: #fff; border-top: 1px solid #dedad1; padding: 19px 24px 21px; box-shadow: 0 -12px 30px rgba(20,22,24,.04); }
.cart-summary-line { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 5px; font-size: 10.5px; color: #8b8f89; }
.cart-summary-line strong { font-family: var(--font-display); font-size: 12px; color: #4c514d; }
.cart-summary-line strong small { font-size: 8px; font-weight: 500; color: #8d918a; margin-right: 1px; }
.cart-discount-box { margin: 11px 0 9px; padding: 10px 11px; background: #f6f3ec; border: 1px solid #e4dfd5; }
.cart-discount-head { display: flex; align-items: center; gap: 8px; }
.cart-discount-head label { font-size: 10px; font-weight: 650; color: #5e645f; }
.cart-discount-input { display: flex; align-items: center; height: 31px; margin-left: auto; border: 1px solid #d7d2c8; background: #fff; }
.cart-discount-input input {
  width: 55px;
  height: 100%;
  padding: 0 2px 0 7px;
  border: 0;
  background: transparent;
  color: #252a29;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  text-align: right;
}
.cart-discount-input input:focus { outline: none; background: #fffdf8; }
.cart-discount-input input.is-invalid { color: var(--red); }
.cart-discount-input span { padding: 0 7px 0 3px; font-size: 9px; color: #8e928b; }
.cart-discount-reset { font-size: 9px; color: #747a74; text-decoration: underline; text-underline-offset: 2px; white-space: nowrap; }
.cart-discount-reset:hover { color: var(--red); }
.cart-discount-error { margin: 6px 0 0; color: #af303d; font-size: 8.5px; line-height: 1.5; }
.cart-discount-hint { margin: 4px 0 0; color: #9d9f97; font-size: 8.5px; }
#cart-discount-amount { color: var(--red); }
#cart-final-total { color: var(--ink); }
.cart-total { display: flex; justify-content: space-between; align-items: flex-end; padding: 11px 0 15px; border-top: 1px dashed #dcd8cf; margin-top: 8px; }
.cart-total span { font-size: 11px; color: #70756f; }
.cart-total strong { font-family: var(--font-display); font-size: 26px; font-weight: 650; line-height: 1; }
.cart-total strong small { font-size: 11px; font-weight: 500; color: #7d817a; margin-right: 2px; }
.cart-foot .btn { width: 100%; height: 48px; }
.cart-foot-note { margin: 9px 0 0; text-align: center; font-size: 8.5px; color: #aaa69d; }
.cart-continue { display: block; margin: 10px auto 0; font-size: 10px; color: #7d817b; text-decoration: underline; text-underline-offset: 3px; }
.cart-continue:hover { color: var(--red); }

/* =========================================================
   Modal / forms
   ========================================================= */
.modal-layer { position: fixed; inset: 0; z-index: 150; display: flex; align-items: center; justify-content: center; padding: 26px; }
.modal-scrim { position: absolute; inset: 0; width: 100%; height: 100%; background: rgba(10,12,13,.62); backdrop-filter: blur(3px); animation: fadeIn .25s; }
.modal { position: relative; width: min(720px, 100%); max-height: calc(100vh - 52px); overflow: auto; background: #f8f7f3; box-shadow: 0 40px 100px rgba(0,0,0,.28); animation: modalIn .35s var(--ease); }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes modalIn { from { opacity: 0; transform: translateY(18px) scale(.985); } to { opacity: 1; transform: none; } }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; padding: 25px 28px 20px; background: #fff; border-bottom: 1px solid #e2ded6; }
.modal-head h2 { margin: 3px 0 0; font-family: var(--font-display); font-size: 28px; font-weight: 700; letter-spacing: -.03em; }
.modal-head p { margin: 6px 0 0; font-size: 11px; color: #8f928b; }
.modal-close { width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; border: 1px solid #e2ded6; color: #777c76; }
.modal-close:hover { color: #fff; background: var(--red); border-color: var(--red); }
.modal-body { padding: 24px 28px 27px; }
.modal-foot { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 17px 28px; background: #fff; border-top: 1px solid #e2ded6; }
.modal-foot .btn { min-height: 43px; }
.modal-foot-note { font-size: 9.5px; color: #989b94; display: flex; align-items: center; gap: 5px; }
.modal-foot-note .icon { width: 13px; height: 13px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.form-grid .col-full { grid-column: 1 / -1; }
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field label { font-size: 10px; font-weight: 600; color: #626762; }
.form-field label em { font-style: normal; color: var(--red); margin-left: 2px; }
.form-field input, .form-field textarea, .form-field select { width: 100%; height: 42px; border: 1px solid #dedad1; background: #fff; padding: 0 12px; font-size: 12px; transition: border-color .2s, box-shadow .2s; }
.form-field textarea { height: 76px; padding: 10px 12px; resize: vertical; line-height: 1.55; }
.form-field input:focus, .form-field textarea:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(228,0,27,.07); }
.form-field.has-error input, .form-field.has-error textarea { border-color: var(--red); background: #fff6f7; }
.field-error { font-size: 9px; color: var(--red); display: none; }
.has-error .field-error { display: block; }
.checkout-summary { background: #efede7; border-left: 3px solid var(--red); display: flex; flex-wrap: wrap; gap: 14px 22px; padding: 12px 15px; margin-bottom: 21px; }
.checkout-summary div { display: flex; flex-direction: column; }
.checkout-summary span { font-size: 8.5px; color: #8c9089; }
.checkout-summary strong { font-family: var(--font-display); font-size: 17px; font-weight: 600; }
.checkout-summary div:last-child { margin-left: auto; text-align: right; }
.checkout-summary div:last-child strong { color: var(--red); }
.delivery-options { display: flex; gap: 9px; }
.radio-card { flex: 1; position: relative; }
.radio-card input { position: absolute; opacity: 0; }
.radio-card span { display: flex; flex-direction: column; gap: 1px; padding: 10px 12px; border: 1px solid #dedad1; background: #fff; cursor: pointer; font-size: 11px; transition: border-color .2s, background .2s; }
.radio-card span small { font-size: 8.5px; color: #9a9d96; }
.radio-card input:checked + span { border-color: var(--red); background: #fff6f7; box-shadow: inset 0 0 0 1px var(--red); }
.shipping-rule { display: flex; align-items: center; gap: 11px; padding: 10px 12px; background: #f7f4ee; border: 1px solid #e2ddd4; }
.shipping-rule-icon { width: 36px; height: 36px; flex: none; display: flex; align-items: center; justify-content: center; background: #292d2d; color: #fff; }
.shipping-rule-icon .icon { width: 18px; height: 18px; }
.shipping-rule.is-free .shipping-rule-icon { background: #4d6e31; }
.shipping-rule-copy { flex: 1; min-width: 0; }
.shipping-rule-copy strong { display: block; font-family: var(--font-display); font-size: 12px; font-weight: 650; color: #303534; }
.shipping-rule-copy span { display: block; margin-top: 3px; color: #8d918a; font-size: 8.5px; line-height: 1.55; }
.shipping-rule-badge {
  flex: none;
  padding: 5px 8px;
  border: 1px solid #e0cf9f;
  background: #fff9e8;
  color: #916817;
  font-style: normal;
  font-size: 8.5px;
  font-weight: 650;
  white-space: nowrap;
}
.shipping-rule.is-free .shipping-rule-badge { border-color: #bdd3a5; background: #f4faed; color: #4e6b2c; }
.shipping-rule-note { display: block; margin-top: 6px; color: #9d9f97; font-size: 8.5px; line-height: 1.5; }
.help-steps { display: flex; flex-direction: column; }
.help-step { display: grid; grid-template-columns: 44px 1fr; gap: 14px; padding: 16px 0; border-bottom: 1px solid #e5e1d8; }
.help-step:last-child { border-bottom: 0; }
.help-step > b { width: 36px; height: 36px; background: var(--ink); color: #fff; display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-size: 11px; }
.help-step h3 { margin: 0 0 4px; font-size: 13px; }
.help-step p { margin: 0; font-size: 11px; color: #83877f; line-height: 1.7; }
.help-note { margin-top: 18px; background: #fff; border: 1px solid #e2ded6; padding: 13px 15px; font-size: 10px; color: #8a8e87; display: flex; gap: 8px; }
.help-note .icon { width: 15px; height: 15px; flex: none; color: var(--red); }
.help-note p { margin: 0; }

/* =========================================================
   Order page
   ========================================================= */
#view-order { background: #e7e4dd; min-height: 100vh; }
.order-toolbar { position: sticky; top: 78px; z-index: 60; background: rgba(255,255,255,.96); border-bottom: 1px solid #dad6cc; backdrop-filter: blur(10px); }
.order-toolbar-inner { height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.order-toolbar-actions { display: flex; align-items: center; gap: 11px; }
.order-toolbar-actions .btn { min-height: 40px; font-size: 11.5px; }
.switch-label { display: inline-flex; align-items: center; gap: 8px; margin-right: 8px; font-size: 10.5px; color: #5f6460; cursor: pointer; user-select: none; }
.switch-label input { position: absolute; opacity: 0; pointer-events: none; }
.switch { width: 33px; height: 18px; border-radius: 20px; background: #c7c3ba; position: relative; transition: background .2s; flex: none; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 12px; height: 12px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .2s; }
.switch-label input:checked + .switch { background: var(--red); }
.switch-label input:checked + .switch::after { transform: translateX(15px); }
.order-stage { padding: 40px 20px 70px; display: flex; justify-content: center; }
.order-sheet {
  width: 820px;
  min-height: 1120px;
  background: #fff;
  padding: 48px 50px 42px;
  color: #1a1d1e;
  box-shadow: 0 25px 70px rgba(32,33,30,.16);
  position: relative;
  display: flex;
  flex-direction: column;
}
.order-sheet::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 7px; background: var(--red); }
.order-top { display: flex; justify-content: space-between; align-items: flex-start; padding-bottom: 22px; border-bottom: 2px solid #1b1e1f; }
.order-brand { display: flex; align-items: flex-start; gap: 12px; }
.order-logo { display: block; width: auto; height: 26px; }
.order-brand p { margin: 7px 0 0; font-size: 8.5px; color: #8c8f89; letter-spacing: .02em; }
.order-title-block { text-align: right; }
.order-title-block h1 { margin: 0; font-family: var(--font-display); font-size: 34px; font-weight: 750; letter-spacing: -.04em; line-height: 1; }
.order-title-block span { display: block; margin-top: 5px; font-family: var(--font-display); font-size: 8px; letter-spacing: .18em; color: #a0a39b; }
.order-meta { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-bottom: 1px solid #dcd8cf; }
.order-meta > div { padding: 15px 15px 14px 0; border-right: 1px solid #e5e1d9; }
.order-meta > div:last-child { border-right: 0; }
.order-meta span { display: block; font-size: 8px; color: #9a9d96; letter-spacing: .04em; margin-bottom: 4px; }
.order-meta strong { display: block; font-family: var(--font-display); font-size: 11.5px; font-weight: 600; letter-spacing: .01em; }
.order-meta .status { display: inline-flex; align-items: center; gap: 4px; color: #b38400; }
.status-dot-sm { width: 4px; height: 4px; border-radius: 50%; background: #d6a300; }
.order-parties { display: grid; grid-template-columns: 1.25fr .75fr; gap: 36px; padding: 22px 0 20px; border-bottom: 1px solid #dcd8cf; }
.order-block-title { display: flex; align-items: center; gap: 7px; font-family: var(--font-display); font-size: 8px; font-weight: 650; letter-spacing: .11em; color: var(--red); margin-bottom: 10px; }
.order-block-title::after { content: ""; height: 1px; flex: 1; background: #e6e2da; }
.customer-grid { display: grid; grid-template-columns: 64px 1fr; gap: 6px 8px; font-size: 10px; align-items: baseline; }
.customer-grid span { color: #9a9d96; font-size: 9px; }
.customer-grid strong { font-weight: 500; color: #303435; }
.order-info-grid { display: grid; gap: 7px; font-size: 9.5px; }
.order-info-grid div { display: flex; justify-content: space-between; gap: 10px; }
.order-info-grid span { color: #9a9d96; }
.order-info-grid strong { font-weight: 500; }
.order-items-wrap { flex: 1; padding-top: 20px; }
.order-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.order-table th { height: 30px; padding: 0 7px; background: #24282a; color: #fff; font-size: 8px; font-weight: 500; letter-spacing: .03em; text-align: left; }
.order-table th:nth-child(1) { width: 33px; text-align: center; }
.order-table th:nth-child(2) { width: 84px; }
.order-table th:nth-child(3) { width: auto; }
.order-table th:nth-child(4) { width: 44px; text-align: center; }
.order-table th:nth-child(5) { width: 66px; text-align: right; }
.order-table th:nth-child(6) { width: 80px; text-align: right; }
.order-table td { padding: 9px 7px; border-bottom: 1px solid #ece9e1; font-size: 9.5px; vertical-align: top; }
.order-table td:nth-child(1) { text-align: center; color: #9a9d96; font-family: var(--font-display); font-size: 8.5px; }
.order-table td:nth-child(2) { font-family: var(--font-display); font-size: 9px; letter-spacing: .02em; }
.order-table td:nth-child(3) small { display: block; color: #a0a39b; font-size: 8px; margin-top: 2px; }
.order-table td:nth-child(4) { text-align: center; font-family: var(--font-display); }
.order-table td:nth-child(5), .order-table td:nth-child(6) { text-align: right; font-family: var(--font-display); white-space: nowrap; }
.order-table tbody tr:nth-child(even) { background: #faf9f6; }
.order-table tfoot td { border-bottom: 0; padding: 6px 7px; }
.order-table tfoot tr:first-child td { padding-top: 13px; }
.order-table tfoot .label { text-align: right; font-size: 8.5px; color: #8e918a; }
.order-table tfoot .value { font-family: var(--font-display); font-size: 9.5px; font-weight: 500; }
.order-table tfoot .grand .label { font-size: 9.5px; color: #333738; font-weight: 600; padding-top: 9px; border-top: 1px solid #c9c5bb; }
.order-table tfoot .grand .value { font-size: 16px; font-weight: 700; color: var(--red); padding-top: 6px; border-top: 1px solid #c9c5bb; }
.order-notes { margin-top: 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.order-note-box { border: 1px solid #dedad1; padding: 11px 13px; min-height: 67px; }
.order-note-box h4 { margin: 0 0 6px; font-family: var(--font-display); font-size: 8px; letter-spacing: .08em; color: #888c85; font-weight: 600; }
.order-note-box p { margin: 0; font-size: 8.5px; line-height: 1.7; color: #717670; }
.order-terms { margin-top: 13px; font-size: 7.8px; line-height: 1.7; color: #a0a39b; }
.order-signatures { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; margin-top: 33px; padding-top: 15px; }
.order-signature { display: grid; grid-template-columns: 50px 1fr; gap: 7px; align-items: end; font-size: 9px; color: #747871; }
.order-signature .line { border-bottom: 1px solid #bdb9b0; height: 24px; }
.order-sheet-footer { margin-top: auto; padding-top: 25px; border-top: 1px solid #dedad1; display: flex; justify-content: space-between; gap: 20px; font-size: 8px; color: #a2a59e; letter-spacing: .02em; }
.order-sheet-footer strong { color: #666b65; font-weight: 500; }
.order-sheet.hide-prices .price-col { display: none; }
.order-sheet.hide-prices .order-table th:nth-child(5),
.order-sheet.hide-prices .order-table th:nth-child(6) { display: none; }
.order-sheet.hide-prices .order-table tfoot { display: none; }
.order-sheet.hide-prices .order-notes { grid-template-columns: 1fr; }
.order-sheet.hide-prices .order-note-box:last-child { display: none; }
.order-empty { margin: auto; text-align: center; padding: 80px 20px; }
.order-empty h2 { font-family: var(--font-display); }
.order-empty p { color: #8f928b; font-size: 12px; }

/* =========================================================
   Footer
   ========================================================= */
.site-footer { background: #111315; color: #c9cccb; margin-top: 0; }
.footer-main { padding: 47px 0 38px; display: flex; justify-content: space-between; gap: 60px; }
.footer-logo { display: inline-flex; align-items: center; }
.footer-logo img { display: block; height: 27px; width: auto; filter: brightness(0) invert(1); }
.footer-brand p { margin: 15px 0 0; color: #707678; font-size: 10.5px; line-height: 1.8; }
.footer-links { display: flex; gap: 80px; }
.footer-links > div { display: flex; flex-direction: column; gap: 9px; min-width: 100px; }
.footer-links h4 { margin: 0 0 5px; color: #f1f1ed; font-family: var(--font-display); font-size: 9px; letter-spacing: .1em; font-weight: 600; }
.footer-links a, .footer-links button, .footer-links span { font-size: 10.5px; color: #898f91; text-align: left; padding: 0; transition: color .2s; }
.footer-links a:hover, .footer-links button:hover { color: var(--red-bright); }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 25px; min-height: 57px; border-top: 1px solid #2a2d2f; }
.footer-bottom p { margin: 0; color: #5f6567; font-size: 8.5px; letter-spacing: .025em; }

/* =========================================================
   Toast
   ========================================================= */
.toast-stack { position: fixed; left: 22px; bottom: 22px; z-index: 200; display: flex; flex-direction: column; gap: 9px; pointer-events: none; }
.toast { min-width: 250px; max-width: 350px; display: flex; align-items: center; gap: 10px; padding: 11px 14px; background: #171a1c; color: #fff; box-shadow: 0 16px 36px rgba(0,0,0,.25); font-size: 11.5px; animation: toastIn .3s var(--ease); pointer-events: auto; }
.toast .toast-icon { width: 24px; height: 24px; flex: none; display: flex; align-items: center; justify-content: center; background: var(--red); }
.toast .toast-icon .icon { width: 13px; height: 13px; }
.toast strong { font-weight: 600; }
.toast span { color: #a3a8a9; }
.toast.is-out { animation: toastOut .25s ease forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(8px); } }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1220px) {
  .container { width: min(1360px, calc(100% - 48px)); }
  .header-inner { gap: 28px; }
  .main-nav { gap: 23px; }
  .phone-link { display: none; }
  .hero-inner { grid-template-columns: minmax(0, 1fr) minmax(430px, 510px); gap: 45px; }
  .hero-copy h1 { font-size: 57px; }
  .product-grid { gap: 18px; }
  .product-card-visual { height: 205px; }
  .diagram-controls #zoom-readout { min-width: 34px; }
  .workspace-note { display: none; }
  .parts-table { min-width: 540px; }
}
@media (max-width: 1160px) {
  .workspace-body { height: auto; display: flex; flex-direction: column; }
  .split-handle { display: none; }
  .diagram-panel { min-height: 540px; }
  .diagram-stage { min-height: 455px; }
  .list-panel { min-height: 500px; max-height: 660px; border-top: 1px solid #dfdbd2; }
  .workspace[data-view-mode="diagram"] .diagram-panel { min-height: 640px; }
  .workspace[data-view-mode="list"] .list-panel { border-top: 0; max-height: none; }
}
@media (max-width: 1020px) {
  .top-strip-inner > div > span:first-child { display: none; }
  .main-nav { display: none; }
  .menu-button { display: flex; }
  .mobile-nav { background: #fff; border-top: 1px solid var(--line); padding: 8px 24px 17px; }
  .mobile-nav.is-open { display: flex; flex-direction: column; gap: 0; }
  .mobile-nav a, .mobile-nav button { padding: 12px 0; text-align: left; font-size: 13px; font-weight: 600; border-bottom: 1px solid #eeece5; }
  .mobile-nav a:last-child { border-bottom: 0; color: var(--red); }
  .hero-inner { grid-template-columns: 1fr; gap: 34px; padding-top: 52px; padding-bottom: 55px; min-height: 0; }
  .hero-copy { max-width: 620px; }
  .hero-copy h1 { font-size: clamp(48px, 8vw, 68px); }
  .search-card { width: 100%; max-width: 660px; }
  .hero-side-label, .hero-ghost { display: none; }
  .catalog-layout { grid-template-columns: 1fr; gap: 25px; }
  .filter-rail { position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 22px 28px; }
  .filter-rail .support-card { grid-column: 1 / -1; max-width: 430px; }
  .category-filters { flex-direction: row; flex-wrap: wrap; gap: 6px; }
  .category-chip { border: 1px solid #dcd8cf; background: rgba(255,255,255,.35); padding: 0 12px; }
  .category-chip.is-active { border-color: var(--red); }
  .model-links { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
  .catalog-main { margin-top: 4px; }
  .service-grid { grid-template-columns: 1fr 1fr; }
  .service-item:nth-child(3) { border-left: 0; padding-left: 0; }
  .service-item { border-top: 1px solid #2b2f31; }
  .service-item:nth-child(-n+2) { border-top: 0; }
  .detail-head { flex-direction: column; align-items: flex-start; gap: 18px; }
  .detail-side { width: 100%; justify-content: space-between; }
  .detail-side .btn { flex: 1; }
  .workspace-body { height: auto; display: flex; flex-direction: column; }
  .split-handle { display: none; }
  .diagram-panel { min-height: 520px; }
  .diagram-stage { min-height: 445px; }
  .list-panel { min-height: 490px; max-height: 650px; border-top: 1px solid #dfdbd2; }
  .workspace[data-view-mode="diagram"] .diagram-panel { min-height: 620px; }
  .workspace[data-view-mode="list"] .list-panel { border-top: 0; }
  .order-toolbar { top: 78px; }
}
@media (max-width: 760px) {
  .container { width: calc(100% - 36px); }
  .top-strip { display: none; }
  .header-inner { height: 66px; gap: 16px; }
  .brand-logo { height: 24px; }
  .demo-tag { display: none; }
  .header-actions { gap: 8px; }
  .cart-button { height: 40px; padding: 0 11px; gap: 7px; }
  .cart-button > span:not(.cart-count) { display: none; }
  .menu-button { width: 40px; height: 40px; }
  .site-header { position: sticky; }
  .hero-inner { padding-top: 40px; padding-bottom: 45px; gap: 30px; }
  .hero-copy h1 { margin: 17px 0 16px; font-size: clamp(39px, 11vw, 52px); }
  .hero-lede { font-size: 12.5px; }
  .hero-stats { margin-top: 27px; }
  .hero-stats > div { padding: 0 18px; }
  .hero-stats strong { font-size: 23px; }
  .search-card { padding: 22px 20px 19px; clip-path: none; }
  .search-card::after { display: none; }
  .search-fields { gap: 10px; }
  .field input, .field select { height: 42px; }
  .search-submit { height: 45px; }
  .catalog-section { padding-top: 45px; scroll-margin-top: 66px; }
  .section-heading { align-items: flex-start; flex-direction: column; gap: 12px; margin-bottom: 22px; }
  .section-heading h2 { font-size: 27px; }
  .section-heading .text-button { display: none; }
  .filter-rail { grid-template-columns: 1fr; gap: 20px; }
  .filter-block { padding-top: 13px; }
  .filter-block h3 { margin-bottom: 9px; }
  .model-links { grid-template-columns: 1fr 1fr; }
  .filter-rail .support-card { grid-column: auto; }
  .product-grid { grid-template-columns: 1fr; }
  .product-card-visual { height: 218px; }
  .product-card-body { padding: 18px 19px 20px; }
  .product-model { font-size: 26px; }
  .results-view { display: none; }
  .part-match-row { grid-template-columns: 40px minmax(0, 1fr) 80px; padding: 11px 15px; }
  .part-match-row .pm-link { display: none; }
  .service-strip { margin-top: 50px; }
  .service-grid { grid-template-columns: 1fr; }
  .service-item, .service-item:nth-child(3) { border-left: 0; padding-left: 0; border-top: 1px solid #2b2f31; padding-block: 21px; }
  .service-item:first-child { border-top: 0; }
  .detail-container { padding-top: 17px; }
  .breadcrumb { margin-bottom: 18px; }
  .detail-title-wrap h1 { font-size: 33px; gap: 7px; }
  .detail-title-wrap h1 em { width: 100%; font-size: .45em; }
  .detail-description { font-size: 11.5px; }
  .detail-side { flex-wrap: wrap; }
  .detail-count { min-width: 76px; }
  .workspace-head { height: auto; min-height: 54px; flex-wrap: wrap; gap: 0; padding: 0 8px; }
  .view-switch { height: 54px; }
  .view-switch button { padding: 0 10px; }
  .view-switch button span { display: none; }
  .workspace-actions { margin-left: auto; height: 54px; }
  .new-badge { display: none; }
  .diagram-panel { min-height: 470px; }
  .diagram-stage { min-height: 390px; }
  .panel-label { padding: 0 12px 0 14px; }
  .panel-label > div:first-child { gap: 6px; }
  .diagram-controls button { width: 27px; height: 27px; }
  .diagram-controls #zoom-readout { min-width: 32px; font-size: 8.5px; }
  .stage-hint { display: none; }
  .selection-ribbon { padding: 9px 12px; }
  .selection-content { gap: 9px; }
  .sel-price { display: none; }
  .sel-action { padding: 0 10px; }
  .list-panel { min-height: 470px; }
  .list-head { height: 57px; }
  .parts-table { min-width: 545px; }
  .detail-bottom { align-items: flex-start; flex-direction: column; gap: 11px; }
  .footer-main { padding: 35px 0 28px; flex-direction: column; gap: 30px; }
  .footer-links { gap: 45px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; justify-content: center; gap: 4px; padding: 13px 0; }
  .order-toolbar { top: 66px; }
  .order-toolbar-inner { height: auto; min-height: 62px; padding: 10px 0; flex-wrap: wrap; gap: 10px; }
  .order-toolbar-actions { width: 100%; flex-wrap: wrap; }
  .switch-label { margin-right: auto; }
  .order-toolbar-actions .btn { flex: 1; }
  .order-stage { padding: 20px 10px 40px; }
  .order-sheet { min-height: 0; padding: 32px 24px 27px; }
  .order-top { flex-direction: column; gap: 17px; }
  .order-title-block { text-align: left; }
  .order-title-block h1 { font-size: 29px; }
  .order-meta { grid-template-columns: 1fr 1fr; }
  .order-meta > div { padding: 11px 10px 10px 0; }
  .order-meta > div:nth-child(2) { border-right: 0; }
  .order-parties { grid-template-columns: 1fr; gap: 20px; }
  .order-notes { grid-template-columns: 1fr; }
  .order-table th:nth-child(2) { width: 70px; }
  .order-table th:nth-child(5) { width: 58px; }
  .order-table th:nth-child(6) { width: 65px; }
  .order-table td { padding: 8px 5px; font-size: 8.6px; }
  .order-table td:nth-child(3) small { font-size: 7.2px; }
  .order-signatures { gap: 20px; }
  .toast-stack { left: 12px; right: 12px; bottom: 12px; }
  .toast { min-width: 0; width: 100%; max-width: none; }
  .diagram-stage { touch-action: pan-y; }
  .diagram-svg .hotspot .hs-circle { r: 21px; }
  .diagram-svg .hotspot .hs-text { font-size: 17px; }
  .modal-layer { padding: 10px; align-items: flex-end; }
  .modal { max-height: calc(100vh - 20px); }
  .modal-head { padding: 20px 20px 16px; }
  .modal-head h2 { font-size: 24px; }
  .modal-body { padding: 20px; }
  .modal-foot { padding: 14px 20px; flex-wrap: wrap; }
  .modal-foot .btn { flex: 1; }
  .modal-foot-note { width: 100%; order: 3; }
  .form-grid { grid-template-columns: 1fr; gap: 12px; }
  .form-grid .col-full { grid-column: auto; }
  .checkout-summary { gap: 15px; }
  .checkout-summary strong { font-size: 15px; }
  .shipping-rule { flex-wrap: wrap; }
  .shipping-rule-badge { margin-left: 47px; }
  .cart-head { padding: 16px 18px; min-height: 80px; }
  .cart-body { padding: 14px 14px 20px; }
  .cart-foot { padding: 16px 18px 18px; }
  .cart-item { grid-template-columns: 48px minmax(0, 1fr) auto; padding: 11px 10px; gap: 9px; }
  .cart-thumb { width: 48px; height: 56px; }
  .cart-thumb svg { width: 44px; height: 44px; }
}
@media (max-width: 470px) {
  .search-fields { grid-template-columns: 1fr; }
  .field-category { grid-column: auto; }
  .hero-stats > div { padding: 0 14px; }
  .hero-stats > div:nth-child(3) { display: none; }
  .model-links { grid-template-columns: 1fr; }
  .product-card-visual { height: 195px; }
  .product-meta { gap: 7px; }
  .product-meta span + span::before { margin-right: 7px; }
  .product-link { font-size: 10px; }
  .detail-count { display: none; }
  .detail-side .btn { width: 100%; }
  .view-switch button { padding: 0 9px; }
  .selection-empty p { font-size: 9.5px; }
  .order-toolbar-actions .btn { font-size: 10px; padding: 0 8px; }
  .switch-label { font-size: 9.5px; }
}

/* =========================================================
   Print
   ========================================================= */
@media print {
  @page { size: A4; margin: 0; }
  html, body { background: #fff !important; width: 210mm; }
  body { font-size: 10pt; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .top-strip, .site-header, .site-footer, .order-toolbar, .toast-stack, .drawer-layer, .modal-layer,
  #view-catalog, #view-detail { display: none !important; }
  main { display: block !important; }
  .view { display: none !important; }
  #view-order { display: none !important; }
  body.order-page #view-order { display: block !important; background: #fff !important; }
  .order-stage { display: block; padding: 0; }
  .order-sheet {
    width: 210mm;
    min-height: 297mm;
    padding: 13mm 14mm 10mm;
    box-shadow: none !important;
    margin: 0;
    page-break-inside: avoid;
  }
  .order-sheet::before { height: 4mm; }
  .order-table tr { page-break-inside: avoid; }
  .order-sheet-footer { padding-top: 8mm; }
}
