:root {
  color-scheme: light;
  --ink: #1b211f;
  --muted: #59645f;
  --line: #dce1dd;
  --soft: #f4f6f3;
  --amber: #ffc65a;
  --amber-light: #fff1ce;
  --radius: 12px;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: var(--soft);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
html { scroll-padding-top: 18px; }
body { margin: 0; font-size: 1rem; line-height: 1.45; }
button, input, select { font: inherit; color: inherit; }
button, select { cursor: pointer; }
button { -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: default; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid #ac6a09; outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
button { border: 0; }
[hidden], .icon-library { display: none !important; }
.icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.wrap { width: min(1280px, calc(100% - 96px)); margin-inline: auto; }
.sr-only, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { position: absolute; z-index: 20; padding: 12px; background: white; }
.topbar { background: #fff; }
.header-inner { min-height: 71px; display: flex; align-items: center; gap: clamp(35px, 7vw, 108px); }
.brand { display: flex; align-items: center; }
.brand img { width: 109px; height: auto; display: block; }
.header-inner nav { display: flex; align-items: center; gap: 31px; font-size: .93rem; }
.active-link { font-weight: 680; }
.text-button, .text-link { background: none; padding: 0; font-size: inherit; }
.text-button { color: var(--muted); }
.text-button:hover, .text-link:hover, .footer-inner a:hover { color: #89570c; text-decoration: underline; text-underline-offset: 3px; }
.header-order { margin-left: auto; display: inline-flex; align-items: center; gap: 9px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 7px; font-size: .9rem; font-weight: 650; white-space: nowrap; }
.header-order:hover { background: var(--soft); }
.header-order .icon { width: 17px; height: 17px; }
.header-order span { min-width: 21px; padding: 1px 5px; border-radius: 4px; background: #f0f2ef; text-align: center; font-size: .77rem; }

.hero { background: #191b1b; color: white; position: relative; isolation: isolate; overflow: hidden; }
.hero-photo { position: absolute; inset: 0 0 0 43%; z-index: -2; background: url("./assets/gaskets-hero.webp") 53% 51% / cover no-repeat; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, #191b1b 0%, #191b1b 34%, rgba(25,27,27,.98) 42%, rgba(25,27,27,.62) 51%, transparent 68%); }
.hero-inner { min-height: 264px; display: flex; align-items: center; padding-block: 29px 32px; }
.hero-copy { max-width: 56%; }
.eyebrow { display: flex; align-items: center; gap: 10px; text-transform: uppercase; font-size: .74rem; letter-spacing: .13em; font-weight: 650; color: #f6d59a; }
.eyebrow span { width: 25px; height: 2px; background: var(--amber); }
h1 { font-size: clamp(3rem, 4.4vw, 4.15rem); font-weight: 730; letter-spacing: -.058em; line-height: .99; margin: 13px 0 14px; }
h1 em { font-style: normal; color: var(--amber); }
.hero-description { max-width: 420px; color: #d6d9d7; line-height: 1.5; font-size: 1rem; }
.workspace { padding-block: 31px 52px; }
.workspace-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-bottom: 19px; }
.workspace-heading h2 { font-size: clamp(1.75rem, 2.45vw, 2.25rem); line-height: 1.17; letter-spacing: -.045em; font-weight: 710; }
.client-type { display: flex; align-items: center; gap: 12px; }
.type-label { color: var(--muted); font-size: .875rem; }
.client-options { display: inline-flex; padding: 3px; border-radius: 8px; background: #e6eae5; border: 1px solid #dadfda; }
.client-options button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 7px 12px; border-radius: 5px; background: transparent; font-size: .89rem; font-weight: 590; color: #4f5853; }
.client-options button[aria-pressed="true"] { background: #242b27; color: white; }
.client-options button:not([aria-pressed="true"]):hover { background: #d6dcd6; }
.client-options .icon { width: 15px; height: 15px; }
.workspace-grid { display: grid; grid-template-columns: minmax(0, 1fr) clamp(294px, 26.5%, 344px); align-items: start; gap: 23px; }
.panel { border: 1px solid var(--line); background: white; border-radius: var(--radius); }
.catalog { overflow: clip; min-width: 0; }
.mode-tabs { display: flex; padding-inline: 21px; align-items: stretch; gap: 24px; border-bottom: 1px solid var(--line); }
.mode-tabs button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; position: relative; background: white; color: var(--muted); padding: 17px 1px 15px; font-size: .97rem; font-weight: 620; }
.mode-tabs button[aria-selected="true"] { color: var(--ink); }
.mode-tabs button[aria-selected="true"]::after { content: ""; position: absolute; inset: auto 0 -1px; height: 3px; background: #e7a022; border-radius: 2px 2px 0 0; }
.mode-tabs .icon { width: 18px; height: 18px; }
#quick-tools { padding: 19px 21px; }
.price-instruction { padding: 17px 20px 0; color: var(--muted); font-size: .87rem; line-height: 1.4; }
.filters { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); align-items: center; gap: 9px; padding: 10px 20px 0; }
.part-search { display: grid; grid-template-columns: minmax(0,1fr) auto; grid-template-areas: "field add" "matches matches"; align-items: start; column-gap: 10px; }
.search-field { grid-area: field; }
#find-part { flex: none; align-self: stretch; display: grid; place-items: center; width: 42px; padding: 0; background: transparent; border-radius: 6px; color: var(--muted); }
#find-part:hover { background: var(--soft); color: var(--ink); }
#find-part .icon, #add-part .icon { width: 18px; height: 18px; }
#add-part { grid-area: add; }
.search-popup { grid-area: matches; margin-top: 4px; border: 1px solid #bbc5bc; border-radius: 7px; background: #fff; box-shadow: 0 3px 9px #17231c12; overflow: hidden; }
#suggestion-heading { padding: 8px 12px; background: #f1f4ee; color: #465248; font-size: .83rem; font-weight: 650; }
#part-options { list-style: none; margin: 0; padding: 0; max-height: min(19rem, 40dvh); overflow-y: auto; overscroll-behavior: contain; }
.search-option { display: grid; grid-template-columns: minmax(0,1fr) auto 34px; align-items: center; gap: 12px; min-height: 56px; width: 100%; text-align: left; padding: 9px 12px; border-top: 1px solid #e4e9e3; background: white; cursor: pointer; }
.search-option:hover, .search-option[aria-selected="true"] { background: #fff4d8; }
.search-option[aria-selected="true"] { box-shadow: inset 3px 0 #c98414; }
.search-option mark { background: #ffe4a2; color: inherit; border-radius: 2px; }
.search-option .price { font-size: .92rem; }
.pick-info .codes { margin-top: 2px; }
.pick-plus { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 6px; background: var(--amber-light); color: #704b09; }
.pick-plus .icon { width: 18px; height: 18px; }
.search-option:hover .pick-plus, .search-option[aria-selected="true"] .pick-plus { background: var(--amber); }
.search-field, .select-field { height: 42px; min-width: 0; position: relative; display: flex; align-items: center; border: 1px solid #ced5cf; border-radius: 7px; background: white; }
.search-field:focus-within, .select-field:focus-within { outline: 2px solid #b77c22; outline-offset: 1px; }
.search-field input { min-width: 0; width: 100%; height: 100%; border: 0; border-radius: inherit; padding: 0 9px 0 2px; font-size: .89rem; background: transparent; }
.search-field input:focus, .select-field select:focus { outline: none; }
.search-field input::placeholder { color: #657068; }
.select-field select { appearance: none; width: 100%; height: 100%; background: transparent; border: 0; padding: 0 27px 0 11px; border-radius: inherit; font-size: .86rem; text-overflow: ellipsis; }
.select-field .icon { position: absolute; right: 9px; width: 13px; height: 13px; }
.select-field:has(select:disabled) { background: var(--soft); }
.select-field select:disabled { cursor: default; }
.list-heading { min-height: 38px; display: flex; align-items: center; justify-content: space-between; padding: 6px 21px; gap: 7px; }
.list-heading p, .list-heading button { font-size: .81rem; color: var(--muted); }
.text-link { color: #725019; font-weight: 600; }
.parts-table { width: 100%; border-collapse: collapse; table-layout: fixed; text-align: left; }
.parts-table col:nth-child(2) { width: 110px; }
.parts-table col:nth-child(3) { width: 135px; }
.parts-table thead th { padding: 8px 12px; background: #f8f9f7; color: var(--muted); font-size: .77rem; font-weight: 600; border-block: 1px solid var(--line); }
.parts-table thead th:first-child { padding-left: 21px; }
.parts-table thead th:last-child { text-align: right; padding-right: 21px; }
.category-row th { background: #edf0eb; padding: 7px 20px; border-block: 1px solid #dce1da; }
.category-line { display: flex; align-items: center; gap: 9px; font-size: .83rem; font-weight: 700; }
.category-line::before { content: ""; width: 3px; align-self: stretch; min-height: 13px; background: #cb8b22; border-radius: 1px; }
.category-line small { flex: none; color: #58645b; font-size: .75rem; margin-left: auto; font-weight: 500; }
.parts-table td { border-bottom: 1px solid #e7ebe7; padding: 11px 12px; vertical-align: middle; }
.parts-table td:first-child { padding-left: 21px; }
.parts-table td:last-child { text-align: right; padding-right: 20px; }
.parts-table tbody:last-child tr:last-child td { border-bottom: 0; }
.part-row.chosen { background: #fffbef; }
.part-title { font-weight: 610; font-size: .955rem; text-align: left; line-height: 1.3; padding: 0; background: none; color: var(--ink); }
.part-title:hover { text-decoration: underline; text-underline-offset: 3px; }
.part-context { display: block; margin-top: 3px; font-size: .81rem; line-height: 1.4; color: var(--muted); overflow-wrap: anywhere; }
.codes { display: block; color: var(--muted); font: .76rem/1.5 "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace; margin-top: 3px; overflow-wrap: anywhere; }
.codes span + span::before { content: " · "; color: #929b93; white-space: pre; }
.price { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 660; font-size: .97rem; }
.stepper { display: inline-flex; align-items: center; justify-content: center; height: 34px; border: 1px solid #d1d7d1; border-radius: 6px; background: #fff; vertical-align: middle; }
.stepper:focus-within { border-color: #ad7926; }
.stepper button { width: 29px; height: 100%; background: transparent; display: grid; place-items: center; border-radius: 5px; color: #324137; padding: 0; }
.stepper button:enabled:hover { background: var(--amber-light); }
.stepper button:disabled { color: #939d96; }
.stepper .icon { width: 13px; height: 13px; }
.stepper input { appearance: textfield; width: 36px; min-width: 0; height: 100%; padding: 0 1px; border: 0; border-radius: 0; text-align: center; background: transparent; font-size: .89rem; font-variant-numeric: tabular-nums; }
.stepper input::-webkit-inner-spin-button, .stepper input::-webkit-outer-spin-button { appearance: none; }
.chosen .stepper { border-color: #c8a25e; }
.order { position: sticky; top: 18px; scroll-margin: 12px; }
.order-heading { display: flex; align-items: center; gap: 10px; padding: 21px 20px 17px; border-bottom: 1px solid var(--line); }
.heading-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 8px; background: var(--amber-light); }
.heading-icon .icon { width: 19px; height: 19px; }
.order-heading h2 { font-size: 1.34rem; letter-spacing: -.035em; }
.order-counts { margin: 0; padding: 15px 20px; display: grid; gap: 6px; }
.order-counts div { display: flex; justify-content: space-between; gap: 8px; font-size: .91rem; }
.order-counts dt { color: var(--muted); }
.order-counts dd { margin: 0; font-weight: 620; }
.order-bottom { margin-inline: 20px; padding: 16px 0 19px; border-top: 1px dashed #cbd2ca; }
.total { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-weight: 670; }
.total strong { font-size: 1.7rem; line-height: 1.2; letter-spacing: -.045em; white-space: nowrap; font-variant-numeric: tabular-nums; }
#order-rate { font-size: .8rem; color: var(--muted); margin: 3px 0 13px; }
.primary, .secondary { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 7px; min-height: 42px; padding: 9px 16px; font-weight: 670; font-size: .95rem; }
.primary { background: var(--amber); color: #262015; }
.primary:enabled:hover { background: #f4b53e; }
.primary:disabled { background: #f3e2bd; color: #6e644e; }
.secondary { border: 1px solid #ccd3cc; background: #fff; }
.secondary:hover { background: var(--soft); }
.checkout, .last-order { width: 100%; }
.last-order { font-size: .8rem; margin-top: 12px; }
.cart-lines { max-height: min(43vh, 380px); overflow-y: auto; overscroll-behavior: contain; padding-inline: 20px; }
.cart-line { position: relative; padding: 13px 22px 12px 0; }
.cart-line + .cart-line { border-top: 1px solid #e8ebe6; }
.cart-line h3 { font-weight: 620; font-size: .89rem; line-height: 1.35; }
.cart-money { display: flex; justify-content: space-between; gap: 5px; margin-top: 5px; color: var(--muted); font-size: .8rem; }
.cart-money strong { color: var(--ink); white-space: nowrap; }
.icon-button { display: grid; place-items: center; width: 30px; height: 30px; background: transparent; border-radius: 5px; color: var(--muted); padding: 0; }
.icon-button:hover { background: var(--soft); color: var(--ink); }
.remove-line { position: absolute; right: -5px; top: 8px; width: 25px; height: 25px; }
.remove-line .icon { width: 14px; height: 14px; }
.pick-title { display: block; font-size: .95rem; font-weight: 590; line-height: 1.35; }
.edit-order { border-top: 1px solid var(--line); padding: 15px 21px 19px; }
#edit-heading { font-size: 1rem; letter-spacing: -.015em; }
.edit-lines { list-style: none; padding: 0; margin: 5px 0 0; }
.edit-row { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(72px,auto) 32px; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); padding-block: 13px; }
.edit-meta { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 10px; margin-top: 3px; font-size: .81rem; color: var(--muted); }
.line-subtotal { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.edit-remove { width: 32px; height: 36px; }
.edit-remove .icon { width: 15px; height: 15px; }
.edit-row .stepper { border-color: #c8a25e; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-block: 20px; font-size: .86rem; color: #58635b; }
footer { border-top: 1px solid var(--line); }
.footer-inner span { color: var(--ink); font-weight: 700; }
.mobile-dock { display: none; }

dialog { width: min(480px, calc(100% - 26px)); padding: 28px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: white; max-height: min(88vh, 780px); overflow-y: auto; box-shadow: 0 20px 90px #161d1938; }
dialog::backdrop { background: rgb(18 24 21 / 53%); }
body:has(dialog[open]) { overflow: hidden; }
.close-dialog { position: absolute; top: 14px; right: 14px; background: #f2f4f0; }
dialog h2 { font-size: 1.55rem; line-height: 1.22; letter-spacing: -.035em; margin: 4px 25px 12px 0; }
dialog .sub { font-size: .91rem; color: var(--muted); margin: 0 0 15px; }
.form-fields { display: grid; gap: 13px; }
.form-fields label { display: grid; gap: 5px; font-size: .9rem; font-weight: 600; }
.form-fields input, .form-fields select { width: 100%; border: 1px solid #cbd3cb; padding: 10px; border-radius: 6px; font-size: 1rem; background: #fff; }
.form-fields .select-field { width: 100%; }
.form-fields .select-field select { border: 0; padding-right: 28px; }
.demo-note { display: flex; gap: 8px; padding: 11px; background: #f3f5f1; border-radius: 6px; color: #455248; font-size: .84rem; margin: 15px 0; }
.demo-note .icon { width: 16px; height: 16px; margin-top: 2px; }
.form-submit, .dialog-action { width: 100%; margin-top: 3px; }
.dialog-data { margin: 16px 0; }
.dialog-data div, .receipt-line { display: flex; justify-content: space-between; gap: 14px; padding: 8px 0; border-bottom: 1px solid #e4e8e2; font-size: .89rem; }
.dialog-data dt, .receipt-line small { color: var(--muted); }
.dialog-data dd { text-align: right; margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.receipt-line span { min-width: 0; }
.receipt-line small { display: block; margin-top: 3px; }
.receipt-line strong { flex: none; white-space: nowrap; }
.receipt-total { margin-block: 15px; }
.help-steps { margin: 12px 0; padding-left: 22px; }
.help-steps li { padding: 4px 0 6px 4px; font-size: .95rem; }
.help-steps li::marker { color: #89570c; font-weight: 700; }

@media (max-width: 1120px) {
  .wrap { width: calc(100% - 60px); }
  .workspace-grid { gap: 16px; grid-template-columns: minmax(0, 1fr) 280px; }
  .parts-table col:nth-child(2) { width: 85px; }
  .parts-table col:nth-child(3) { width: 120px; }
}
@media (max-width: 810px) {
  .wrap { width: calc(100% - 36px); }
  .workspace-grid { grid-template-columns: 1fr; }
  .order { position: static; }
  .workspace-heading { gap: 12px; }
  .hero-copy { max-width: 66%; }
  .hero-description { max-width: 370px; }
  .mobile-dock { position: fixed; z-index: 3; inset: auto 0 0; display: flex; justify-content: space-between; align-items: center; gap: 10px; background: #202622; color: white; padding: 9px max(17px, env(safe-area-inset-right)) max(9px,env(safe-area-inset-bottom)); box-shadow: 0 -2px 12px #0002; }
  .mobile-dock span { font-weight: 600; font-size: .92rem; }
  .mobile-dock button { min-height: 40px; border-radius: 5px; background: var(--amber); color: var(--ink); padding: 8px 15px; font-weight: 650; font-size: .9rem; }
  body:has(.mobile-dock:not([hidden])) footer { padding-bottom: 60px; }
}
@media (max-width: 575px) {
  .wrap { width: calc(100% - 28px); }
  .header-inner { min-height: 58px; gap: 14px; }
  .brand img { width: 84px; }
  .header-inner nav { gap: 0; font-size: .81rem; margin-left: auto; }
  .header-inner nav a { display: none; }
  .header-order { margin-left: 0; gap: 5px; font-size: .82rem; padding: 6px 8px; }
  .header-order .icon { width: 15px; height: 15px; }
  .hero-inner { min-height: 212px; padding-block: 23px; }
  .hero-photo { inset-inline-start: 26%; background-position: 60% center; }
  .hero::before { background: linear-gradient(90deg,#191b1b 0%,#191b1bf5 27%,#191b1bce 57%,#191b1b1c 100%); }
  .hero-copy { max-width: 91%; }
  h1 { font-size: clamp(2.45rem, 9vw, 3.1rem); margin: 11px 0; }
  .eyebrow { font-size: .7rem; }
  .hero-description { font-size: .88rem; max-width: 275px; }
  .workspace { padding-block: 22px 28px; }
  .workspace-heading { display: grid; margin-bottom: 13px; }
  .workspace-heading h2 { font-size: 1.7rem; }
  .client-type { gap: 9px; flex-wrap: wrap; }
  .type-label { font-size: .8rem; }
  .client-options button { padding: 6px 9px; font-size: .83rem; }
  .mode-tabs { padding-inline: 13px; gap: 19px; }
  .mode-tabs button { font-size: .87rem; gap: 5px; padding-block: 14px 12px; }
  #quick-tools { padding: 15px 12px; }
  .part-search { grid-template-columns: 1fr; grid-template-areas: "field" "matches" "add"; }
  #add-part { margin-top: 8px; }
  .price-instruction { padding: 13px 12px 0; }
  .filters { padding: 9px 12px 0; gap: 7px; }
  .search-field input, .select-field select { font-size: 1rem; }
  .select-field select { font-size: .87rem; }
  .list-heading { padding-inline: 13px; min-height: 33px; }
  .parts-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .parts-table, .parts-table tbody { display: block; }
  .parts-table colgroup { display: none; }
  .category-row { display: block; }
  .category-row th { display: block; padding: 7px 12px; }
  .part-row { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 7px 8px; padding: 10px 12px; border-bottom: 1px solid #e5e9e4; }
  .parts-table td, .parts-table td:first-child, .parts-table td:last-child { padding: 0; border: 0; }
  .part-info { grid-column: 1 / -1; }
  .part-title { font-size: .94rem; }
  .codes { font-size: .73rem; }
  .part-cost { align-self: center; }
  .part-cost .price::after { content: " / шт."; color: var(--muted); font-size: .75rem; font-weight: 450; }
  .stepper { height: 40px; }
  .stepper button { width: 39px; }
  .stepper input { font-size: 1rem; }
  .search-option { gap: 3px 8px; grid-template-columns: minmax(0,1fr) 40px; padding: 10px; }
  .pick-plus { grid-column: 2; grid-row: 1 / 3; justify-self: end; width: 40px; height: 40px; }
  .search-option .price { grid-column: 1; font-size: .86rem; }
  .edit-order { padding: 13px 12px 15px; }
  .edit-row { grid-template-columns: minmax(0,1fr) auto 40px; gap: 8px; padding-block: 11px; }
  .edit-info { grid-column: 1 / 3; }
  .edit-remove { grid-column: 3; grid-row: 1; width: 40px; height: 40px; }
  .edit-row .stepper { justify-self: start; }
  .line-subtotal { grid-column: 2 / 4; }
  .edit-row .stepper input { scroll-margin-block: 50px; }
  dialog { padding: 22px 17px; }
}
@media (max-width: 360px) {
  .header-inner { gap: 8px; }
  .header-order .icon { display: none; }
}
.category-line a:hover,.edit-info a:hover { text-decoration:underline; text-underline-offset:3px; }
.footer-inner { flex-wrap:wrap; }
@media (max-width:575px) {
  .header-inner nav a[href="/catalog/"] { display:inline; }
  .header-inner nav { flex-wrap:wrap; gap:2px 8px; }
}
@media (max-width:390px) {
  .header-inner nav { display:grid; justify-items:start; }
}
