/* Новый листинг каталога zhbi77.ru. Префикс pl- / pc- / pt-. Подключается из фрагмента листинга (сниппет catalogListing), ?v= — CatalogListing::ASSET_V.
   Шрифт НЕ задаётся: font-family наследуется от .page сайта (Helvetica, как у прежнего прайса); у кнопок и полей — font: inherit.
   Цвета — только из палитры сайта: синие #2696d9 / #1a8cd4 / #1b78b0, состояния из zhbi-states.css (#eaf4fb, #e0eaf3, #0f5d8c, #14679b),
   шапка таблиц #e2eff5, серые #252e2e / #666 / #919191 / #bbbbbb / #e6e9eb. Скругление не больше 5px (как у тегов). Теней нет. */

.pl { --pl-blue: #2696d9; --pl-blue2: #1a8cd4; --pl-link: #1b78b0; --pl-hover-fg: #0f5d8c; --pl-hover-bg: #eaf4fb;
  --pl-press-bg: #e0eaf3; --pl-focus: #14679b; --pl-head: #e2eff5; --pl-text: #252e2e; --pl-muted: #666; --pl-line: #e6e9eb;
  --pl-border: #bbbbbb; --pl-field: #919191; --pl-fill: #1b78b0; --pl-r: 5px; color: var(--pl-text); text-align: left; }
.pl *, .pl *::before, .pl *::after { box-sizing: border-box; }
.pl button, .pl input, .pl select { font: inherit; color: inherit; }
.pl ul { list-style: none; margin: 0; padding: 0; }
.pl ul li { margin: 0; padding: 0; background: none; }
.pl p { margin: 0; }
.pl a { color: var(--pl-link); }
.pl a:focus-visible, .pl button:focus-visible, .pl input:focus-visible, .pl select:focus-visible, .pl [tabindex]:focus-visible {
  outline: 2px solid var(--pl-focus); outline-offset: 2px; }
.pl-vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: -1px; padding: 0; border: 0; }
.pl [hidden] { display: none !important; }

/* ---------- Теги: плитки по типу ---------- */
.pl-tags { margin: 0 0 12px; }
.pl-label { margin: 0 0 8px !important; color: var(--pl-muted); font-size: 13px; }
.pl-labelrow { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 28px; margin: 0 0 6px; }
.pl-labelrow .pl-label { margin: 0 !important; }
.pl-tiles-more { min-height: 28px; }
.pl-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; margin-bottom: 12px !important; }
.pl-tiles li.is-folded { display: none; }
.pl-tile { display: flex; align-items: center; gap: 10px; height: 100%; min-height: 56px; padding: 6px 10px 6px 6px; overflow-wrap: anywhere; border: 1px solid var(--pl-border);
  border-radius: var(--pl-r); background: #fff; color: var(--pl-text) !important; text-decoration: none; line-height: 1.3;
  transition: border-color .15s ease, color .15s ease, background-color .15s ease; }
.pl-tile img { width: 48px; height: 36px; object-fit: cover; flex: none; }
.pl-tile__txt { display: flex; flex-direction: column; min-width: 0; }
.pl-tile__name { font-weight: 700; }
.pl-tile__count { color: var(--pl-muted); font-size: 13px; }
.pl-tile__note { color: var(--pl-muted); font-size: 12px; line-height: 1.25; }
.pl-tile:hover { border-color: var(--pl-blue2); color: var(--pl-hover-fg) !important; text-decoration: none; }
.pl-tile[aria-current="page"] { border-color: var(--pl-blue2); background: var(--pl-hover-bg); color: var(--pl-hover-fg) !important; }

/* ---------- Теги: чипы по размеру (сворачиваются) ---------- */
.pl-chips-box { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px; }
.pl-chips { display: flex; flex-wrap: wrap; gap: 8px; flex: 1 1 auto; min-width: 0; }
.pl-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 6px 12px; background: #fff;
  border: 1px solid var(--pl-border); border-radius: var(--pl-r); color: var(--pl-text) !important; text-decoration: none; line-height: 1.3;
  transition: border-color .15s ease, color .15s ease; }
.pl-chip__count { color: var(--pl-muted); font-size: 12px; }
.pl-chip:hover { border-color: var(--pl-blue2); color: var(--pl-hover-fg) !important; text-decoration: none; }
.pl-chip[aria-current="page"] { border-color: var(--pl-blue2); background: var(--pl-hover-bg); color: var(--pl-hover-fg) !important; }
.pl-chips li.is-folded { display: none; }

.pl-linkbtn { display: inline-flex; align-items: center; min-height: 36px; padding: 0 8px; border: 0; background: none; cursor: pointer;
  color: var(--pl-link); text-decoration: underline; text-underline-offset: 3px; }
.pl-linkbtn:hover { color: var(--pl-hover-fg); background: var(--pl-hover-bg); text-decoration: none; }

/* ---------- Панель инструментов ---------- */
.pl-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 0 0 10px; }
.pl-tools .pl-count { order: 0; flex: 1 1 auto; margin: 0 !important; }
.pl-tools .pl-sort { order: 1; }
.pl-tools .pl-view { order: 2; }
.pl-sort { display: flex; align-items: center; gap: 8px; }
.pl-sort label { color: var(--pl-muted); }
.pl-sort select { min-height: 36px; padding: 4px 8px; border: 1px solid var(--pl-field); border-radius: var(--pl-r); background: #fff; cursor: pointer; }
.pl-view { display: inline-flex; }
.pl-view button { min-height: 36px; padding: 4px 14px; border: 1px solid var(--pl-blue); background: #fff; color: var(--pl-link); cursor: pointer; }
.pl-view button:first-child { border-radius: var(--pl-r) 0 0 var(--pl-r); }
.pl-view button:last-child { border-radius: 0 var(--pl-r) var(--pl-r) 0; border-left: 0; }
.pl-view button[aria-pressed="true"] { background: var(--pl-fill); border-color: var(--pl-fill); color: #fff; }
.pl-view button[aria-pressed="false"]:hover { background: var(--pl-hover-bg); color: var(--pl-hover-fg); }

.pl-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; padding: 4px 16px;
  border: 1px solid var(--pl-blue); border-radius: var(--pl-r); background: #fff; color: var(--pl-link); cursor: pointer; }
.pl-btn:hover { background: var(--pl-hover-bg); color: var(--pl-hover-fg); }
.pl-btn:active { background: var(--pl-press-bg); }
.pl-btn--wide { min-width: 260px; min-height: 44px; }
.pl-btn--solid { background: var(--pl-fill); border-color: var(--pl-fill); color: #fff; }
.pl-btn--solid:hover { background: var(--pl-focus); color: #fff; }
.pl-filter-open { display: none; }
.pl-filter-open__n:not(:empty)::before { content: "· "; }

/* ---------- Фильтры: на компьютере — строка групп с выпадающими панелями ---------- */
.pl-filters { position: relative; margin: 0 0 10px; }
.pl-f__head, .pl-f__foot { display: none; }
.pl-f__groups { display: flex; flex-wrap: wrap; gap: 8px; }
.pl-f__group { position: static; }
.pl-f__more { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 4px 10px; border: 1px dashed var(--pl-field); border-radius: var(--pl-r);
  background: #fff; color: var(--pl-link); cursor: pointer; }
.pl-f__more:hover { border-color: var(--pl-blue2); background: var(--pl-hover-bg); color: var(--pl-hover-fg); }
.pl-f__more[hidden] { display: none; }
@media (min-width: 516px) { .pl-f__group.is-folded { display: none; } }
.pl-f__toggle { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 4px 10px 4px 12px; border: 1px solid var(--pl-border);
  border-radius: var(--pl-r); background: #fff; cursor: pointer; transition: border-color .15s ease, color .15s ease; }
.pl-f__toggle:hover { border-color: var(--pl-blue2); color: var(--pl-hover-fg); }
.pl-f__toggle[aria-expanded="true"] { border-color: var(--pl-blue2); background: var(--pl-hover-bg); color: var(--pl-hover-fg); }
.pl-f__toggle.has-value { border-color: var(--pl-blue2); }
.pl-f__toggle .pl-f__sel { color: var(--pl-link); font-weight: 700; }
.pl-f__chev { width: 10px; height: 10px; flex: none; transition: transform .15s ease; }
.pl-f__toggle[aria-expanded="true"] .pl-f__chev { transform: rotate(180deg); }
.pl-f__body { position: absolute; left: 0; right: 0; top: calc(100% + var(--pl-act, 0px)); z-index: 20; margin-top: 6px; padding: 12px; background: #fff;
  border: 1px solid var(--pl-blue2); border-radius: var(--pl-r); }
.pl-f__body:not(.is-open) { display: none; }
.pl-f__search { width: 100%; max-width: 320px; min-height: 36px; margin: 0 0 10px; padding: 4px 10px; border: 1px solid var(--pl-field); border-radius: var(--pl-r); }
.pl-f__opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0 16px; max-height: 260px; overflow-y: auto; }
.pl-f__opt { display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 2px 6px; cursor: pointer; border-radius: var(--pl-r); }
.pl-f__opt:hover { background: var(--pl-hover-bg); color: var(--pl-hover-fg); }
.pl-f__opt input { width: 18px; height: 18px; margin: 0; flex: none; accent-color: var(--pl-fill); }
.pl-f__opt.is-zero { color: #919191; }
.pl-f__n { margin-left: auto; color: var(--pl-muted); font-size: 12px; }
.pl-f__none { color: var(--pl-muted); padding: 6px; }
.pl-f__hint { margin: 8px 0 0 !important; color: var(--pl-muted); font-size: 13px; }
.pl-f__range { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pl-f__range label { display: flex; align-items: center; gap: 6px; }
.pl-f__range input { width: 110px; min-height: 36px; padding: 4px 8px; border: 1px solid var(--pl-field); border-radius: var(--pl-r); }
.pl-f__bodyfoot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }

/* ---------- Выбранные фильтры ---------- */
.pl-active { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 10px; }
.pl-active__chip { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 4px 8px 4px 12px; border: 1px solid var(--pl-blue2);
  border-radius: var(--pl-r); background: var(--pl-hover-bg); color: var(--pl-hover-fg); cursor: pointer; }
.pl-active__chip:hover { background: var(--pl-press-bg); }
.pl-active__x { width: 10px; height: 10px; flex: none; }
.pl-count { margin: 0 0 10px !important; color: var(--pl-muted); }

/* ---------- Карточки (вид «Карточки»: строка-карточка на компьютере, карточка на телефоне) ---------- */
.pl-list { border-top: 1px solid var(--pl-line); }
.pc { display: grid; grid-template-columns: 120px minmax(0, 1fr) 190px; gap: 16px; align-items: start; padding: 16px 4px;
  border-bottom: 1px solid var(--pl-line); background: #fff; }
.pc.is-hidden { display: none; }
.pc__img { display: block; line-height: 0; }
.pc__img img { width: 120px; height: 90px; object-fit: cover; }
.pc__badge { display: inline-block; vertical-align: 2px; font-weight: 400; margin-left: 8px; padding: 0 6px; border: 1px solid #919191; border-radius: var(--pl-r); color: var(--pl-text); font-size: 12px; }
.pc__title { margin: 2px 0 4px; font-size: 16px; line-height: 1.35; font-weight: 700; }
.pc__title a { color: var(--pl-link); text-decoration: none; }
.pc__title a:hover { color: var(--pl-hover-fg); text-decoration: underline; text-underline-offset: 3px; }
.pc__size { font-weight: 700; margin-bottom: 6px !important; }
.pc__specs { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 2px 12px; margin: 0; font-size: 13px; }
.pc__specs div { display: contents; }
.pc__specs dt { color: var(--pl-muted); }
.pc__specs dd { margin: 0; }
.pc__buy { display: flex; flex-direction: column; align-items: stretch; gap: 8px; }
.pc__price { font-size: 13px; color: var(--pl-muted); }
.pc__sum { font-size: 20px; font-weight: 700; color: var(--pl-text); }
.pc__std { display: flex; }
.pc__std button { flex: 1; min-height: 32px; padding: 2px 8px; border: 1px solid var(--pl-blue); background: #fff; color: var(--pl-link); cursor: pointer; }
.pc__std button:first-child { border-radius: var(--pl-r) 0 0 var(--pl-r); }
.pc__std button:last-child { border-radius: 0 var(--pl-r) var(--pl-r) 0; border-left: 0; }
.pc__std button.is-on { background: var(--pl-fill); border-color: var(--pl-fill); color: #fff; }
.pc__std button:not(.is-on):hover { background: var(--pl-hover-bg); color: var(--pl-hover-fg); }
.pc__row { display: flex; gap: 8px; }
.pc__qty { display: flex; flex: none; }
.pc__qty button { width: 32px; min-height: 38px; border: 1px solid var(--pl-field); background: #fff; cursor: pointer; }
.pc__qty button:first-child { border-radius: var(--pl-r) 0 0 var(--pl-r); }
.pc__qty button:last-child { border-radius: 0 var(--pl-r) var(--pl-r) 0; }
.pc__qty button:hover { background: var(--pl-hover-bg); color: var(--pl-hover-fg); }
.pc__qty input { width: 44px; min-height: 38px; border: 1px solid var(--pl-field); border-left: 0; border-right: 0; text-align: center; -moz-appearance: textfield; }
.pc__qty input::-webkit-outer-spin-button, .pc__qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pl .pc__order { flex: 1; width: auto; height: auto; min-height: 38px; padding: 0 10px; box-sizing: border-box; color: #fff; }
.pc__note { font-size: 12px; color: var(--pl-muted); }

/* ---------- Таблица (вид для оптовиков) ---------- */
.pl-table { position: relative; border: 1px solid var(--pl-line); overflow-x: auto; } /* relative: скрытые подписи не выходят за прокрутку */
.pt { width: 100%; border-collapse: collapse; font-size: 13px; }
.pt th, .pt td { padding: 8px 8px; border-bottom: 1px solid var(--pl-line); text-align: left; vertical-align: middle; }
.pt thead th { background: var(--pl-head); font-weight: 700; white-space: nowrap; }
.pt tbody tr:hover td { background: var(--pl-hover-bg); }
.pt td.pt-num, .pt th.pt-num { text-align: right; white-space: nowrap; }
.pt td.pt-name a { font-weight: 700; text-decoration: none; }
.pt td.pt-name a:hover { text-decoration: underline; }
.pt .pt-price b { font-size: 14px; }
.pt .pc__std { margin-top: 4px; }
.pt .pc__std button { min-height: 26px; font-size: 12px; padding: 0 6px; }
.pt .pc__order { min-height: 32px; width: auto; padding: 0 12px; }

.pl-empty { padding: 24px 12px; border: 1px dashed var(--pl-border); border-radius: var(--pl-r); text-align: center; }
.pl-empty p { margin-bottom: 12px !important; }
.pl-morebox { margin: 16px 0 0; text-align: center; }

/* ---------- Под листингом ---------- */
.pl-fs { margin: 24px 0 0; }
.pl-fs__list { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.pl-fs__list li.is-folded { display: none; }
.pl-fs__list a { display: inline-flex; align-items: center; min-height: 36px; text-underline-offset: 3px; }
.pl-fs__list a:hover { color: var(--pl-hover-fg); text-decoration-thickness: 2px; }
.pl-sec { margin: 8px 0 0; }
.pl-sec p, .pl-text-list { margin-bottom: 10px !important; line-height: 1.5; }
.pl-text-list li { position: relative; padding-left: 14px !important; margin-bottom: 4px !important; }
.pl-text-list li::before { content: ""; position: absolute; left: 2px; top: .65em; width: 5px; height: 5px; border-radius: 50%; background: var(--pl-blue); }
.pl-scroll { position: relative; overflow-x: auto; }
.pl-sizes { width: 100%; border-collapse: collapse; font-size: 13px; }
.pl-sizes th, .pl-sizes td { padding: 8px; border-bottom: 1px solid var(--pl-line); text-align: left; white-space: nowrap; }
.pl-sizes thead th { background: var(--pl-head); }
.pl-sizes tbody th { font-weight: 700; }
.pl-stub__note { padding: 14px; border: 1px dashed var(--pl-border); border-radius: var(--pl-r); color: var(--pl-muted); }

/* ---------- Постраничные ссылки (без JS и для робота; с JS скрываются, их заменяет «Показать ещё») ---------- */
.pl-pages { margin: 16px 0 0; }
.pl-pages ul { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.pl-pages li { display: inline-flex; }
.pl-pages a, .pl-pages span[aria-current] { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; min-height: 40px; padding: 0 10px;
  border: 1px solid var(--pl-border); border-radius: var(--pl-r); background: #fff; color: var(--pl-link); text-decoration: none; }
.pl-pages a:hover { border-color: var(--pl-blue2); background: var(--pl-hover-bg); color: var(--pl-hover-fg); }
.pl-pages span[aria-current] { background: var(--pl-fill); border-color: var(--pl-fill); color: #fff; }
.pl-pages .pl-pages__gap { align-items: center; padding: 0 4px; color: var(--pl-muted); }
.pl-pages[hidden] { display: none; }
@media (max-width: 515px) { .pl-pages a, .pl-pages span[aria-current] { min-width: 44px; min-height: 44px; } }

/* ---------- Без JS: интерактивные элементы скрыты, товары, цены и ссылки на месте ---------- */
.pl--nojs .pc__std, .pl--nojs .pc__row, .pl--nojs .pl-sizetags { display: none; }

/* ---------- Телефон (как у сайта: до 515 px) ---------- */
@media (max-width: 515px) {
  .pl-tiles { grid-template-columns: 1fr 1fr; margin-bottom: 6px !important; }
  .pl-tags { margin-bottom: 8px; }
  .pl-tools { margin-bottom: 6px; }
  .pl-labelrow { min-height: 44px; }
  .pl-tiles-more { min-height: 44px; }
  .pl-f__more { display: none !important; }
  .pl-tile { min-height: 56px; }
  .pl-chip, .pl-linkbtn, .pl-f__toggle, .pl-btn, .pl-sort select, .pl-view button, .pl-active__chip, .pl-fs__list a { min-height: 44px; }
  .pl-tools { gap: 8px; }
  .pl-filter-open { display: inline-flex; flex: 0 0 auto; order: 0; }
  .pl-tools .pl-sort { flex: 1 1 180px; order: 1; min-width: 0; }
  .pl-tools .pl-count { flex: 1 1 auto; order: 2; }
  .pl-tools .pl-view { order: 3; }
  .pl-sort label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .pl-sort select { width: 100%; }
  .pl-view { margin-left: 0; }
  .pl-view button { padding: 4px 10px; }

  /* Фильтр — выезжающая панель */
  .pl-filters { position: fixed; inset: 0; z-index: 10050; margin: 0; background: rgba(37, 46, 46, .45); }
  .pl-filters:not(.is-open) { display: none; }
  .pl-f__panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(100%, 380px); display: flex; flex-direction: column; background: #fff; }
  .pl-f__head { display: flex; align-items: center; justify-content: space-between; padding: 4px 4px 4px 16px; border-bottom: 1px solid var(--pl-line); }
  .pl-f__head h2 { margin: 0; font-size: 18px; }
  .pl-f__close { width: 44px; height: 44px; border: 0; background: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; color: var(--pl-text); }
  .pl-f__close:hover { background: var(--pl-hover-bg); }
  .pl-f__groups { display: block; flex: 1 1 auto; overflow-y: auto; padding: 0 16px; }
  .pl-f__group { border-bottom: 1px solid var(--pl-line); }
  .pl-f__toggle { width: 100%; justify-content: space-between; border: 0; border-radius: 0; padding: 4px 0; background: none; }
  .pl-f__toggle[aria-expanded="true"] { background: none; }
  .pl-f__toggle .pl-f__sel { margin-left: auto; }
  .pl-f__body { position: static; margin: 0 0 12px; padding: 0; border: 0; }
  .pl-f__opts { grid-template-columns: 1fr; max-height: none; overflow: visible; }
  .pl-f__opt { min-height: 44px; }
  .pl-f__search { max-width: none; min-height: 44px; }
  .pl-f__range input { width: 120px; min-height: 44px; }
  .pl-f__bodyfoot { display: none; }
  .pl-f__foot { display: flex; gap: 8px; padding: 10px 16px; border-top: 1px solid var(--pl-line); }
  .pl-f__foot .pl-btn { flex: 1; min-height: 44px; }

  /* Карточка: фото слева, рядом название, цена с ГОСТ/ТУ и размер (цена — на первом экране); характеристики и заказ — ниже */
  .pc { grid-template-columns: 96px minmax(0, 1fr) auto; grid-template-areas: "img title title" "img price std" "img size size" "specs specs specs" "row row row";
    gap: 6px 12px; padding: 12px 0; }
  .pc__main, .pc__buy { display: contents; }
  .pc__img { grid-area: img; align-self: start; }
  .pc__img img { width: 96px; height: 72px; }
  .pc__title { grid-area: title; margin: 0; }
  .pc__size { grid-area: size; margin: 0 !important; }
  .pc__specs { grid-area: specs; }
  .pc__price { grid-area: price; align-self: center; }
  .pc__std { grid-area: std; align-self: center; }
  .pc__std button { min-height: 44px; min-width: 52px; }
  .pc__row { grid-area: row; }
  .pc__note { grid-column: 1 / -1; }
  .pc__qty button { width: 44px; min-height: 44px; }
  .pc__qty input { min-height: 44px; width: 48px; }
  .pl .pc__order { min-height: 44px; }
  .pt .pc__std button, .pt .pc__order { min-height: 44px; }
  .pt .pt-opt { display: none; } /* на телефоне ГОСТ и нагрузка — в карточке товара; в таблице: имя, размер, масса, цена, заказ */
  .pt td.pt-name, .pt thead th:first-child { position: sticky; left: 0; z-index: 1; background: #fff; min-width: 130px; }
  .pt thead th:first-child { background: var(--pl-head); }
  .pl-btn--wide { width: 100%; min-width: 0; }
  .pc__title a, .pt td.pt-name a { display: inline-flex; align-items: center; min-height: 44px; }
  .pl-sec p a { display: inline-flex; align-items: center; min-height: 44px; }
  .pl-fs__list { gap: 0 16px; }
}
/* ленивая загрузка среза (большие категории): индикатор — текст в счётчике и приглушённый список */
.pl.is-loading .pl-list, .pl.is-loading .pl-table { opacity: .5; cursor: progress; }

@media (prefers-reduced-motion: reduce) { .pl * { transition: none !important; } }
body.pl-lock { overflow: hidden; }
