/* Local review revision: direction hierarchy, compact catalog and legal pages. */
.ui-scope { padding-top: 0; zoom: 1; }
.ui-scope > .ui-header {
  position: sticky;
  top: 0;
  inset-inline: auto;
  width: 100%;
  height: auto;
  overflow: visible;
  border-top: 0;
  border-bottom: 2px solid var(--dir-c);
  isolation: isolate;
}
.ui-header__inner > * { min-width: 0; }
.ui-header__inner .ui-search { max-width: none; }
/* The search input must fit inside the form’s 1px border on desktop and mobile. */
.ui-search > input[type="search"] { min-height: 0; }
.header-logo { gap: 8px; }
.header-contact { max-width: 220px; }
.header-contact > a, .header-spec { white-space: nowrap; }

.nav-direction > summary::before,
.nav-direction > summary::after,
.nav-direction > summary::marker { content: none; display: none; }
.nav-direction > summary::-webkit-details-marker { display: none; }
.nav-direction > summary { list-style: none; }
/* Equal insets in every state; each vivid direction uses its own readable foreground. */
.ui-scope .nav-direction { --nav-fill: var(--nav-c); }
.ui-scope .nav-direction > summary,
.ui-scope .nav-direction.nav-direct {
  min-height: 48px;
  padding: 12px 13px;
  border-left: 3px solid transparent;
  gap: 10px;
  font-size: 14px;
  line-height: 1.5;
  font-weight: 650;
}
.ui-scope .nav-direction > summary > span,
.ui-scope .nav-direction.nav-direct > span { min-width: 0; flex: 1; }
.ui-scope .nav-direction small { flex: none; min-width: 22px; text-align: right; font-weight: 500; }
.ui-scope .nav-direction.is-current > summary,
.ui-scope .nav-direction.nav-direct.is-current,
.ui-scope .nav-direction > summary:is(:hover, :focus-visible),
.ui-scope .nav-direction.nav-direct:is(:hover, :focus-visible) {
  border-left-color: var(--nav-c);
  background: var(--nav-fill);
  color: var(--nav-ink, #111827);
}
.ui-scope .nav-direction.is-current > summary small,
.ui-scope .nav-direction > summary:is(:hover, :focus-visible) small { color: var(--nav-ink, #111827); }
.ui-scope .nav-subgroups { margin-top: 4px; }
.ui-scope .nav-subgroups > a { padding: 9px 13px 9px 22px; }
.ui-scope .nav-subgroups > a > span { min-width: 0; flex: 1; overflow-wrap: anywhere; }
.ui-scope .nav-subgroups > a.is-current { border-left-color: var(--nav-c); background: var(--nav-fill); color: var(--nav-ink, #111827); font-weight: 650; }
.ui-scope .nav-subgroups > a.is-current small { color: var(--nav-ink, #111827); }
.ui-scope .nav-subgroups > a:is(:hover, :focus-visible) { background: var(--nav-fill); color: var(--nav-ink, #111827); }
.ui-scope .nav-subgroups > a:is(:hover, :focus-visible) small { color: var(--nav-ink, #111827); }
.ui-scope .sidebar-service { gap: 0; padding-block: 14px; }
.ui-scope .sidebar-service > a { display: block; padding: 9px 16px; }
.ui-scope .sidebar-service > a:hover { background: var(--ui-surface); }
.ui-scope .sidebar-note { padding-inline: 16px; }
.ui-scope .sidebar-filter { padding-inline: 16px; }
.ui-scope .nav-direction > summary,
.ui-scope .nav-direction.nav-direct,
.ui-scope .nav-subgroups > a,
.ui-scope .nav-direction small {
  transition: background-color .18s ease, color .18s ease, border-color .18s ease;
}
@media (prefers-reduced-motion: reduce) {
  .ui-scope .nav-direction > summary,
  .ui-scope .nav-direction.nav-direct,
  .ui-scope .nav-subgroups > a,
  .ui-scope .nav-direction small { transition: none; }
}
/* The main photo, thumbnails and captions share the column's left and right edges. */
.ui-product-page .product-media .gal .main { max-width: none; margin: 0; }
.ui-product-page .product-media .gal .thumbs { padding-inline: 0; }
.ui-product-page .product-main { column-gap: clamp(24px, 2.5vw, 40px); }

.category-grid {
  grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
  gap: 10px;
}
.category-card {
  width: 100%;
  min-height: 162px;
  max-width: 200px;
  padding: 11px 12px;
  justify-self: start;
}
.category-card .pic { width: 96px; height: 96px; max-width: 96px !important; margin-bottom: 8px !important; }
.category-card__title { font-size: 12px; line-height: 1.4; }
.category-card > small { margin-top: 5px; font-size: 10px; }

.product-card { padding: 16px; cursor: pointer; }
.product-card__media {
  width: 200px;
  min-height: 200px;
  max-width: 100%;
  margin-bottom: 12px;
}
.product-image-link { display: block; width: 100%; }
.product-card__code { margin-bottom: 7px; }
.product-card__code .copy-code { padding: 4px 6px; font-size: 10px; min-height: 30px; }
.product-card > h3 { font-size: 15px; margin-bottom: 12px; }
.product-card .micro-spec { margin-bottom: 12px; font-size: 12px; }
.product-card .micro-spec > div { padding-block: 7px; }
.product-card .stock-status { margin-bottom: 12px; }
.product-card__actions { grid-template-columns: 1fr 1fr; gap: 7px; }
.product-card__actions .button,
.product-card__actions .act { padding: 9px 7px; min-height: 40px; font-size: 11px; }
.product-card__actions .qc { grid-template-columns: 30px minmax(0, 1fr) 30px; }
.product-card__actions .qc button { width: 30px; min-width: 0; }
.ui-scope .product-card .qc .u,
.ui-scope .table-scroll .qc .u { display: none !important; }
.card-preview-controls { display: none !important; }
.ui-scope .table-scroll table.cat.catalog-table td.nm {
  min-width: 210px !important;
  max-width: 300px !important;
}
.table-product-name { display: block; white-space: normal; font-weight: 500; }
.table-product-name:hover { text-decoration: underline !important; }
.ui-scope .table-scroll table.cat.catalog-table { min-width: 1060px; }

@media (hover: hover) and (pointer: fine) {
  .ui-scope .product-card:focus-within .pic.swap[data-photo-ready] .d { opacity: 0; }
  .ui-scope .product-card:focus-within .pic.swap[data-photo-ready] .p { opacity: 1; }
}
@media (min-width: 900px) {
  .ui-header__inner {
    display: grid;
    grid-template-columns: 196px minmax(160px, 1fr) max-content max-content max-content;
    gap: 20px;
    padding: 16px 32px;
  }
  .ui-header__inner .catalog-toggle { display: none; }
  .ui-header__inner .header-logo { grid-column: auto; grid-row: auto; }
  .ui-header__inner .ui-search { grid-column: auto; grid-row: auto; }
  .ui-header__inner .header-contact { grid-column: auto; grid-row: auto; }
  .ui-header__inner .header-telegram { grid-column: auto; grid-row: auto; }
  .ui-header__inner .header-spec { grid-column: auto; grid-row: auto; }
}
@media (min-width: 900px) and (max-width: 1100px) {
  .ui-header__inner { grid-template-columns: 174px minmax(150px, 1fr) max-content max-content; gap: 14px; padding-inline: 24px; }
  .ui-header__inner .header-telegram { display: none; }
  .header-contact > a { font-size: 15px; }
  .header-contact span { font-size: 9px; }
}
@media (max-width: 899px) {
  .ui-scope { --ui-header-height: 158px; --pin: 158px; }
  .ui-header__inner {
    grid-template-columns: 44px minmax(0, 1fr) max-content;
    gap: 8px;
    min-height: 0;
    padding: 10px 12px;
  }
  .header-logo { width: auto; min-height: 44px; gap: 6px; }
  .header-mark { width: 28px; height: 29px; }
  .header-wordmark { width: clamp(88px, 28vw, 118px); max-width: 100%; }
  .header-spec { min-height: 44px; padding: 8px; gap: 6px; font-size: 12px; }
  .header-spec strong { font-size: 13px; min-width: 14px; }
  .ui-header__inner .catalog-toggle { width: 44px; height: 44px; }
  .ui-header__inner .catalog-toggle span:first-child { font-size: 21px; }
  .ui-header__inner .catalog-toggle span:last-child { font-size: 11px; }
  .ui-search { height: 46px; }
  .ui-search input { height: 44px; }
  .ui-search > button { font-size: 14px; min-width: 72px; }
  .header-contact > a, .header-telegram { display: flex; align-items: center; min-height: 32px; }
  .header-contact > a { font-size: 14px; }
  .header-telegram { justify-content: flex-end; font-size: 13px; }
  .category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .category-card { width: 100%; max-width: none; min-height: 240px; padding: 12px; }
  .category-card .pic { width: 100%; height: auto; max-width: 176px !important; margin-bottom: 14px !important; }
  .category-card__title { font-size: 16px; font-weight: 600; line-height: 1.4; overflow-wrap: break-word; }
  .category-card > small { margin-top: auto; padding-top: 8px; font-size: 13px; line-height: 1.4; }
  .product-card { padding: 16px; }
  .product-card .micro-spec { font-size: 13px; }
  .product-card > h3 { font-size: 16px; }
  .product-card__actions .button, .product-card__actions .act { min-height: 44px; font-size: 12px; }
}

.legal-copy { max-width: 960px; font-size: 14px; line-height: 1.7; }
.legal-copy h2 { margin: 28px 0 12px; font-size: 20px; }
.legal-copy p { margin-bottom: 14px; }
.legal-copy a { text-decoration: underline; text-underline-offset: 3px; }
.legal-copy .table-scroll { display: block; overflow-x: auto; max-height: none; margin: 20px 0; }
.legal-copy table { width: 100%; min-width: 680px; border-collapse: collapse; font-size: 13px; }
.legal-copy caption { text-align: left; font-weight: 600; margin-bottom: 10px; }
.legal-copy th, .legal-copy td { padding: 12px; vertical-align: top; text-align: left; border: 1px solid var(--ui-line); }
.legal-copy th { background: var(--ui-surface); }
@media print { .ui-scope > .ui-header { display: none; } }

/* Tablet columns stay close to the phone card width. */
@media (min-width: 600px) and (max-width: 899px) {
  .category-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
}
@media (max-width: 359px) {
  .category-grid { grid-template-columns: minmax(0, 1fr); }
  .category-card .pic { max-width: 200px !important; }
}

@media (max-width: 359px) {
  .ui-header__inner { padding-inline: 10px; column-gap: 6px; }
  .header-spec { padding-inline: 6px; font-size: 11px; }
  .header-spec strong { font-size: 12px; }
}
