:root {
  color-scheme: light;
  --paper: #f6f7f8;
  --white: #fff;
  --ink: #2f3337;
  --muted: #646b73;
  --line: #e1e4e8;
  --red: #dc4642;
  --category-surface: #eff1f2;
  --category-hover: #e5e8ea;
  --category-count: #59616a;
  --display: Impact, "Arial Narrow", "Roboto Condensed", sans-serif;
  --body: Arial, Helvetica, sans-serif;
  --mono: "Courier New", Courier, monospace;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--body); }
button, input { font: inherit; }
button { cursor: pointer; }
:where(a, button, input, summary):focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }
[hidden] { display: none !important; }
.shell { width: min(100% - 3rem, max(75vw, 360px), 1160px); margin-inline: auto; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.skip-link { position: fixed; z-index: 10; top: .5rem; left: .5rem; padding: .7rem 1rem; background: white; transform: translateY(-150%); }
.skip-link:focus { transform: none; }
.site-header { background: #fff; border-bottom: 1px solid var(--line); }
.header-inner { width: min(100% - 3rem, max(75vw, 360px), 1160px); min-height: 72px; display: flex; align-items: stretch; margin-inline: auto; }
.brand { width: 117px; display: inline-flex; align-items: center; justify-content: center; flex: none; border-right: 1px solid #d0d0d0; }
.brand img { display: block; width: 104px; height: auto; }
.header-catalog, .header-phone, .header-search { display: inline-flex; align-items: center; justify-content: center; min-height: 72px; background: var(--red); color: #fff; text-decoration: none; }
.header-catalog { gap: .65rem; padding-inline: 1.25rem; font: 700 .94rem/1 var(--mono); }
.download-wrap { position: relative; display: flex; }
.header-download { display: inline-flex; align-items: center; justify-content: center; gap: .6rem; min-height: 72px; padding-inline: 1.25rem; border: 0; border-left: 1px solid #f4aaa8; background: var(--red); color: white; font: 700 .94rem/1 var(--mono); }
.header-download svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.header-download:hover:enabled { background: #c83431; }
.header-download:disabled { opacity: .55; cursor: default; }
.download-status { position: absolute; z-index: 30; inset-block-start: calc(100% + .5rem); inset-inline-start: 0; width: max-content; max-width: min(22rem, calc(100vw - 2rem)); margin: 0; padding: .65rem .8rem; border: 1px solid var(--line); background: #fff; box-shadow: 0 4px 14px rgb(0 0 0 / .08); color: var(--ink); font-size: .82rem; line-height: 1.35; }
.header-grid-icon { width: 18px; height: 18px; background: linear-gradient(#fff 0 0) 0 0 / 7px 7px, linear-gradient(#fff 0 0) 11px 0 / 7px 7px, linear-gradient(#fff 0 0) 0 11px / 7px 7px, linear-gradient(#fff 0 0) 11px 11px / 7px 7px; background-repeat: no-repeat; }
.header-spacer { flex: 1; }
.header-phone { padding-inline: 1.3rem; border-right: 1px solid #f4aaa8; font: 700 .88rem/1 var(--mono); white-space: nowrap; }
.header-search { width: 60px; border-right: 1px solid #f4aaa8; }
.header-search svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; }
.header-catalog:hover, .header-phone:hover, .header-search:hover { background: #c83431; }
.compact-header { position: fixed; z-index: 20; inset: 0 0 auto; height: 72px; background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 4px 14px rgb(0 0 0 / .09); }
.compact-inner { width: min(100% - 3rem, max(75vw, 360px), 1160px); height: 100%; display: flex; align-items: center; margin-inline: auto; }
.compact-brand { width: 92px; display: grid; place-items: center; flex: none; margin-right: 1rem; }
.compact-brand img { width: 76px; height: auto; display: block; }
.compact-search-field { min-width: 0; flex: 1; }
.compact-categories { margin-left: .5rem; }
.compact-view { margin-left: .5rem; flex: none; }
.catalog { padding-block: 2.3rem 6rem; }
.catalog-heading { display: flex; justify-content: space-between; align-items: end; gap: 1rem; margin-bottom: 1rem; }
.eyebrow { margin: 0; color: var(--red); font: 700 .7rem/1.3 var(--mono); letter-spacing: .09em; text-transform: uppercase; }
h1 { margin: 0; font: 900 clamp(3.2rem, 6vw, 5.5rem)/.97 var(--display); letter-spacing: .01em; text-transform: uppercase; }
.catalog-meta { display: flex; align-items: baseline; gap: 1rem; flex-wrap: wrap; justify-content: flex-end; }
.result-count { margin: 0 0 .25rem; color: var(--muted); font-size: .78rem; line-height: 1.3; white-space: nowrap; }
.result-count { font-weight: 600; }
.toolbar { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(170px, .43fr) auto; align-items: end; gap: 1rem; padding: 1.85rem 1.4rem; background: var(--white); }
@media (min-width: 801px) { .toolbar { padding-left: 117px; } }
.search-wrap { width: 100%; min-width: 0; }
.search-wrap label, .control-label { display: block; margin-bottom: .55rem; font: 700 .76rem/1.2 var(--body); letter-spacing: .04em; text-transform: uppercase; }
.search-field { height: 36px; display: flex; align-items: center; gap: .65rem; padding-inline: .9rem; border: 1px solid #b7b5b0; background: white; }
.search-field:focus-within { border-color: var(--red); }
.search-field svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; }
.search-field input { width: 100%; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 1rem; }
.search-field input::placeholder { color: #999a96; }
.view-wrap { flex: none; margin-left: 0; }
.view-switch { display: inline-flex; }
.view-switch button { height: 36px; display: inline-flex; align-items: center; gap: .45rem; padding: .35rem .8rem; border: 1px solid #b7b5b0; background: white; color: var(--ink); font: 600 .72rem/1 var(--body); }
.view-switch button + button { border-left: 0; }
.view-switch button[aria-pressed="true"] { background: var(--ink); color: white; }
.view-switch button:hover:not([aria-pressed="true"]) { background: #eeeae5; }
.view-icon { flex: none; }
.view-icon-list { width: 17.2px; text-align: center; font-size: 1.2rem; line-height: .6; }
.view-icon-tree { width: 11.5px; height: 16px; }
.categories { position: relative; min-width: 0; height: 36px; background: white; border: 1px solid #b7b5b0; }
.category-wrap { min-width: 0; }
.toolbar-categories { width: 100%; }
.compact-categories { width: clamp(170px, 22vw, 260px); flex: none; }
.categories-toggle { height: 100%; display: flex; align-items: center; gap: .7rem; padding: .35rem .9rem; cursor: pointer; list-style: none; }
.categories-toggle::-webkit-details-marker { display: none; }
.categories-toggle::after { content: ""; width: .45rem; height: .45rem; margin-left: auto; border-right: 2px solid var(--red); border-bottom: 2px solid var(--red); transform: rotate(45deg); }
.categories[open] > .categories-toggle::after { transform: rotate(225deg); }
.categories-title { font: 700 .7rem/1.2 var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.selected-category { overflow: hidden; color: var(--ink); font: 700 .72rem/1.2 var(--body); letter-spacing: .04em; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.filters { position: absolute; top: calc(100% + 1px); left: -1px; z-index: 25; width: min(360px, calc(100vw - 3rem)); max-height: 320px; overflow: auto; padding: .5rem .65rem .7rem; background: white; border: 1px solid var(--line); box-shadow: 0 8px 18px rgb(0 0 0 / .12); }
.filter-tree, .filter-children { margin: 0; padding: 0; list-style: none; }
.filter-tree { margin-top: .35rem; }
.filter-children { margin-left: .7rem; padding-left: .55rem; border-left: 1px solid var(--line); }
.filter-node-row { min-height: 28px; display: flex; align-items: center; }
.filter-expand, .filter-spacer { width: 22px; height: 26px; flex: none; }
.filter-expand { border: 0; background: transparent; color: var(--red); }
.filter-expand::before { content: ""; display: block; width: .35rem; height: .35rem; margin-inline: auto; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); }
.filter-expand[aria-expanded="true"]::before { transform: rotate(45deg); }
.filter-button { min-height: 28px; padding: .25rem .4rem; border: 0; background: transparent; color: var(--ink); font: .72rem/1.2 var(--body); text-align: left; }
.filter-button.filter-all { font: 700 .72rem/1.2 var(--body); letter-spacing: .04em; text-transform: uppercase; }
.filter-button:hover, .filter-button[aria-pressed="true"] { color: var(--red); text-decoration: underline; }
.results { padding-top: 1rem; }
.table-scroll { max-width: 100%; overflow-x: auto; }
.catalog-table { width: 100%; min-width: 680px; border-collapse: collapse; table-layout: fixed; background: white; }
.catalog-table .photo-column { width: 124px; }
.catalog-table .unit-column { width: 148px; }
.catalog-table .price-column { width: 168px; }
.catalog-table th, .catalog-table td { border: 1px solid var(--line); }
.catalog-table thead th { height: 44px; padding: .65rem .75rem; background: #565754; color: white; font: 700 .74rem/1.25 var(--mono); text-align: center; }
.catalog-table .table-group-row th { padding: .55rem .85rem; background: var(--category-surface); color: var(--ink); font: 600 .88rem/1.3 var(--body); letter-spacing: .02em; text-align: left; text-transform: uppercase; }
.table-product-row { height: 80px; }
.table-product-row td { padding: .55rem .75rem; background: white; }
.table-product-row .table-photo-cell { padding: .35rem; }
.table-product-row .table-name-cell { font-size: 1.05rem; font-weight: 500; line-height: 1.35; overflow-wrap: anywhere; }
.table-product-row .table-unit-cell { font-size: .95rem; font-weight: 400; text-align: center; }
.table-product-row .table-price-cell { font: 600 1.375rem/1.1 var(--body); font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.product-tree, .tree-contents { padding: 0; margin: 0; list-style: none; }
.product-row { min-width: 0; min-height: 80px; display: grid; grid-template-columns: 64px minmax(0, 1fr) 64px 120px; align-items: center; gap: 1rem; padding: .5rem 1rem .5rem .5rem; background: white; border: 1px solid var(--line); }
.product-photo { width: 64px; height: 64px; display: grid; place-items: center; flex: none; overflow: hidden; background: #eff1f2; }
.product-photo img { display: block; width: 100%; height: 100%; object-fit: contain; }
.table-photo-cell .product-photo { width: 64px; height: 64px; margin-inline: auto; }
.photo-placeholder { color: #9aa2a9; font: italic 700 .65rem/1 var(--body); letter-spacing: -.02em; }
.product-details { min-width: 0; }
.product-name { margin: 0; font: 500 1.05rem/1.35 var(--body); overflow-wrap: anywhere; }
.product-unit { font-size: 1rem; font-weight: 400; text-align: center; }
.product-price { font: 600 1.375rem/1.1 var(--body); font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.empty-state { padding: 3.5rem 2rem; margin: 0; background: white; border: 1px solid var(--line); color: var(--muted); text-align: center; font-size: .95rem; }
.product-tree { display: grid; gap: .55rem; }
.tree-node { min-width: 0; }
.tree-disclosure { background: transparent; }
.tree-summary { min-height: 44px; display: flex; align-items: center; gap: .8rem; padding: .65rem 1rem; background: var(--category-surface); color: var(--ink); border: 0; cursor: pointer; list-style: none; }
.tree-summary:hover { background: var(--category-hover); }
.tree-summary::-webkit-details-marker { display: none; }
.tree-caret { width: .5rem; height: .5rem; flex: none; border-right: 2px solid var(--red); border-bottom: 2px solid var(--red); transform: rotate(-45deg); transition: transform .15s ease; }
.tree-disclosure[open] > .tree-summary .tree-caret { transform: rotate(45deg); }
.tree-name { flex: 1; font-size: 1.125rem; font-weight: 600; line-height: 1.25; }
.tree-count { color: var(--category-count); font: 400 .85rem/1 var(--body); }
.tree-contents { display: grid; gap: .55rem; margin: .55rem 0 0 1.6rem; padding-left: 0; border-left: 0; }
.tree-contents .tree-summary { background: #fbfcfc; border-bottom: 1px solid var(--line); }
.tree-contents .tree-summary:hover { background: #f1f3f4; }
.tree-contents .tree-name { font-size: 1rem; font-weight: 500; }
.tree-contents > .product-row { min-height: 80px; grid-template-columns: 64px minmax(0, 1fr) 64px 120px; }
.tree-contents > .product-row .product-photo { width: 64px; height: 64px; }
@media (max-width: 800px) {
  .shell, .header-inner, .compact-inner { width: min(100% - 3rem, max(75vw, 360px), 1160px); }
  .toolbar { grid-template-columns: 1fr; gap: 1.2rem; padding: 1rem; }
  .search-wrap { width: 100%; }
  .category-wrap { width: 100%; }
  .toolbar-categories { width: 100%; }
  .view-wrap { width: 100%; margin-left: 0; }
}
@media (max-width: 720px) {
  .shell { width: min(100% - 1.5rem, max(75vw, 360px), 1160px); }
  .header-inner, .compact-inner { width: min(100% - 1.5rem, max(75vw, 360px), 1160px); }
  .brand { width: 100px; }
  .brand img { width: 78px; }
  .header-catalog { padding-inline: .9rem; }
  .header-download { padding-inline: .8rem; }
  .header-phone { padding-inline: .8rem; font-size: .7rem; }
  .catalog { padding-block: 1.5rem 4rem; }
  .catalog-heading { display: block; margin-bottom: 1rem; }
  .result-count { margin-top: .9rem; }
  .compact-brand { width: 67px; margin-right: .5rem; }
  .compact-brand img { width: 65px; }
  .compact-categories { width: 112px; }
  .compact-categories { margin-left: .5rem; }
  .compact-categories .selected-category { display: none; }
  .compact-categories .categories-toggle { padding-inline: .55rem; }
  .compact-categories .categories-title { font-size: .6rem; }
  .compact-view { margin-left: .5rem; }
  .compact-view button { width: 39px; padding: .4rem; }
  .compact-view .view-label { display: none; }
  .product-row { grid-template-columns: 64px minmax(0, 1fr) 55px 85px; gap: .8rem; padding: .45rem .7rem .45rem .45rem; }
  .product-photo { width: 64px; height: 64px; }
  .product-name { font-size: .94rem; }
  .product-price { font-size: 1.1rem; }
  .tree-contents { margin-left: .75rem; padding-left: 0; }
  .tree-contents > .product-row { grid-template-columns: 64px minmax(0, 1fr) 45px 74px; gap: .5rem; }
  .tree-contents > .product-row .product-photo { width: 64px; height: 64px; }
}
@media (max-width: 480px) {
  .brand { width: 76px; }
  .brand img { width: 62px; }
  .header-catalog, .header-download { gap: .4rem; padding-inline: .65rem; font-size: .72rem; }
  .header-search { width: 32px; }
  .header-phone { display: none; }
  .compact-categories { width: 38px; }
  .compact-categories .categories-toggle { justify-content: center; padding: 0; }
  .compact-categories .categories-title { display: none; }
  .compact-categories .categories-toggle::before { content: "☷"; font-size: 1.25rem; }
  .compact-categories .categories-toggle::after { display: none; }
  .compact-categories .filters { left: auto; right: -78px; width: min(300px, calc(100vw - 1.5rem)); }
  .product-row { grid-template-columns: 64px minmax(0, 1fr) 54px; align-items: center; }
  .product-photo { grid-row: span 2; }
  .product-details { align-self: end; grid-column: 2 / 4; }
  .product-unit { grid-column: 2; align-self: start; text-align: left; }
  .product-price { grid-column: 3; align-self: start; text-align: right; }
  .tree-contents > .product-row { grid-template-columns: 64px minmax(0, 1fr) 54px; }
}
@media (prefers-reduced-motion: reduce) { .tree-caret { transition: none; } }
