/* Catalog: stock badge, availability, price block, tier table, option chips, swatches,
   pack tile, filter chip, spec table, category card, product card (03-components,
   S-Core, S-Commerce, A-Home). Prices and quantities use tabular figures. */

/* ---------- cmp.stockBadge: colour + marker shape + text (three channels) ---------- */
.np-stock {
  display: inline-flex; align-items: center; gap: var(--np-space-1-5); align-self: flex-start;
  font: var(--np-type-caption); font-weight: var(--np-font-weight-semibold);
}
.np-stock__shape { flex: none; width: 9px; height: 9px; box-sizing: border-box; }
.np-stock--own_stock { color: var(--np-color-stock-own-fg); }
.np-stock--own_stock .np-stock__shape { background: currentColor; border-radius: var(--np-radius-full); }
.np-stock--supplier { color: var(--np-color-stock-supplier-fg); }
.np-stock--supplier .np-stock__shape { background: currentColor; border-radius: var(--np-radius-sm); }
.np-stock--made_to_order { color: var(--np-color-stock-order-fg); }
.np-stock--made_to_order .np-stock__shape { border: var(--np-borderWidth-strong) solid currentColor; border-radius: var(--np-radius-full); }
.np-stock--unavailable { color: var(--np-color-stock-unavailable-fg); }
.np-stock--unavailable .np-stock__shape { width: 8px; height: 8px; border: var(--np-borderWidth-strong) solid currentColor; transform: rotate(45deg); }

/* ---------- cmp.availability ---------- */
.np-availability { display: flex; flex-direction: column; gap: var(--np-space-1); }
.np-availability .np-stock { font: var(--np-type-body); font-weight: var(--np-font-weight-semibold); }
.np-availability__note { font: var(--np-type-bodySm); color: var(--np-color-text-secondary); }

/* ---------- cmp.priceBlock ---------- */
.np-price { display: flex; flex-direction: column; gap: var(--np-space-0-5); font-variant-numeric: tabular-nums; transition: opacity var(--np-duration-base) linear; }
.np-price__main { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: var(--np-space-2); }
.np-price__amount { font: var(--np-type-priceLg); white-space: nowrap; }
.np-price__unit { font: var(--np-type-bodySm); color: var(--np-color-text-secondary); }
.np-price__secondary { font: var(--np-type-bodySm); color: var(--np-color-text-secondary); }
.np-price__discount { font: var(--np-type-bodySm); font-weight: var(--np-font-weight-semibold); color: var(--np-color-feedback-success-fg); }
.np-price.is-updating { opacity: .6; }

/* ---------- cmp.tierTable ---------- */
.np-tiers { display: flex; flex-direction: column; gap: var(--np-space-2); }
.np-tiers__table { width: 100%; border-collapse: collapse; font: var(--np-type-bodySm); font-variant-numeric: tabular-nums; }
.np-tiers__caption { padding-bottom: var(--np-space-2); text-align: left; font: var(--np-type-h4); }
.np-tiers__table th, .np-tiers__table td {
  padding: var(--np-space-2) var(--np-space-2); border-bottom: var(--np-borderWidth-default) solid var(--np-color-border-default); text-align: left;
}
.np-tiers__table th { background: var(--np-color-bg-muted); font: var(--np-type-label); letter-spacing: var(--np-type-label-tracking); color: var(--np-color-text-secondary); }
.np-tiers__table .np-num { text-align: right; white-space: nowrap; }
.np-tiers__table td.np-num { font-family: var(--np-font-family-mono); }
.np-tiers__table tr.is-current td { background: var(--np-color-bg-selected); font-weight: var(--np-font-weight-bold); }
.np-tiers__table tr.is-current td:first-child { box-shadow: inset 3px 0 var(--np-color-border-focus); }
.np-tiers__hint:not(:empty) {
  padding: var(--np-space-2) var(--np-space-2-5); border-radius: var(--np-radius-md);
  background: var(--np-color-accent-bgSubtle); font: var(--np-type-bodySm); font-weight: var(--np-font-weight-semibold);
}
@media (max-width: 767.98px) { .np-tiers__yours { display: block; } }

/* ---------- cmp.optionChip / cmp.swatch: radiogroup ---------- */
.np-options { margin: 0; padding: 0; border: 0; min-width: 0; }
.np-options > .np-label { display: block; margin-bottom: var(--np-space-1-5); }
.np-options__list { display: flex; flex-wrap: wrap; gap: var(--np-space-2); }
.np-options [data-np-options-note]:not(:empty) { margin-top: var(--np-space-2); }
.np-chip__input, .np-swatch__input, .np-pack__input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }

.np-chip { position: relative; display: inline-flex; }
.np-chip > span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: var(--np-c-optionChip-minWidth); height: var(--np-c-optionChip-height); padding: 0 var(--np-space-2);
  border: var(--np-borderWidth-default) solid var(--np-c-optionChip-border); border-radius: var(--np-radius-md);
  background: var(--np-color-bg-page); font: var(--np-type-numInput); font-size: 13px; cursor: pointer;
  transition: border-color var(--np-motion-hover), background-color var(--np-motion-hover);
}
.np-chip:hover > span, .np-chip.is-hover > span { border-color: var(--np-color-border-inverse); }
.np-chip__input:checked + span, .np-chip.is-selected > span {
  border: var(--np-borderWidth-strong) solid var(--np-c-optionChip-selectedBorder); background: var(--np-c-optionChip-selectedBg);
  color: var(--np-c-optionChip-selectedFg); padding: 0 calc(var(--np-space-2) - 1px);
}
.np-chip__input:focus-visible + span, .np-chip.is-focus > span { outline: var(--np-focus-ring); outline-offset: var(--np-focus-ring-offset); }
.np-chip.is-unavailable > span { border-style: dashed; color: var(--np-color-text-muted); text-decoration: line-through; }
@media (max-width: 1023.98px) { .np-chip > span { height: var(--np-size-control-lg); } }

.np-swatches__name { font-weight: var(--np-font-weight-regular); color: var(--np-color-text-primary); }
.np-swatch { position: relative; display: inline-flex; cursor: pointer; }
.np-swatch__color {
  width: var(--np-c-optionChip-height); height: var(--np-c-optionChip-height); border-radius: var(--np-radius-md);
  border: var(--np-borderWidth-default) solid var(--np-c-optionChip-border);
}
.np-swatch__input:checked + .np-swatch__color, .np-swatch.is-selected .np-swatch__color {
  border: var(--np-borderWidth-strong) solid var(--np-c-optionChip-selectedBorder);
  box-shadow: inset 0 0 0 var(--np-borderWidth-strong) var(--np-color-bg-page);
}
.np-swatch__input:focus-visible + .np-swatch__color { outline: var(--np-focus-ring); outline-offset: var(--np-focus-ring-offset); }
.np-swatch.is-unavailable .np-swatch__color { border-style: dashed; opacity: .6; }
@media (max-width: 1023.98px) { .np-swatch__color { width: var(--np-size-control-lg); height: var(--np-size-control-lg); } }

/* ---------- cmp.packTile ---------- */
.np-pack {
  position: relative; display: inline-flex; flex-direction: column; gap: var(--np-space-0-5);
  padding: var(--np-space-2) var(--np-space-3); border: var(--np-borderWidth-default) solid var(--np-c-optionChip-border);
  border-radius: var(--np-radius-md); background: var(--np-color-bg-page); font: var(--np-type-bodySm); cursor: pointer;
  font-variant-numeric: tabular-nums; transition: border-color var(--np-motion-hover);
}
.np-pack:hover { border-color: var(--np-color-border-inverse); }
.np-pack:has(.np-pack__input:checked), .np-pack.is-selected {
  border: var(--np-borderWidth-strong) solid var(--np-c-optionChip-selectedBorder); background: var(--np-c-optionChip-selectedBg);
  padding: calc(var(--np-space-2) - 1px) calc(var(--np-space-3) - 1px);
}
.np-pack:has(.np-pack__input:focus-visible) { outline: var(--np-focus-ring); outline-offset: var(--np-focus-ring-offset); }
.np-pack__name { font-weight: var(--np-font-weight-bold); }
.np-pack__price { font-weight: var(--np-font-weight-semibold); }
.np-pack__per-unit { font: var(--np-type-sku); color: var(--np-color-text-secondary); }

/* ---------- cmp.filterChip ---------- */
.np-filter-chip {
  display: inline-flex; align-items: center; gap: var(--np-space-1-5); height: var(--np-size-control-sm);
  padding: 0 var(--np-space-1) 0 var(--np-space-2-5); border: var(--np-borderWidth-default) solid var(--np-color-border-inverse);
  border-radius: var(--np-radius-md); color: var(--np-color-text-primary); text-decoration: none;
  font: var(--np-type-bodySm); font-weight: var(--np-font-weight-semibold); transition: background-color var(--np-motion-hover);
}
.np-filter-chip:hover, .np-filter-chip.is-hover { background: var(--np-color-bg-subtle); color: var(--np-color-text-primary); }
.np-filter-chip .np-icon { width: var(--np-size-icon-sm); height: var(--np-size-icon-sm); margin-inline: var(--np-space-1); }
@media (max-width: 1023.98px) { .np-filter-chip { height: var(--np-size-control-lg); } }

/* ---------- cmp.specTable ---------- */
.np-spec { display: flex; flex-direction: column; gap: var(--np-space-3); }
.np-spec__table th { width: 40%; font: var(--np-type-bodySm); color: var(--np-color-text-secondary); }
.np-spec__docs { display: flex; flex-direction: column; gap: var(--np-space-2); }
.np-spec__docs .np-link .np-icon { margin: 0 var(--np-space-1-5) 0 0; }

/* ---------- cmp.categoryCard ---------- */
.np-category-card {
  display: flex; flex-direction: column; overflow: hidden; border: var(--np-borderWidth-default) solid var(--np-color-border-default);
  border-radius: var(--np-radius-md); background: var(--np-color-bg-page); color: var(--np-color-text-primary); text-decoration: none;
  transition: border-color var(--np-motion-hover), transform var(--np-duration-base) var(--np-easing-standard), box-shadow var(--np-duration-base) var(--np-easing-standard);
}
.np-category-card__media { display: flex; align-items: center; justify-content: center; height: 116px; overflow: hidden; background: var(--np-color-bg-subtle); }
.np-category-card__media img { width: 100%; height: 100%; object-fit: contain; }
.np-category-card__material {
  width: 76px; height: 76px; border-radius: var(--np-radius-sm); background: var(--np-color-bg-material); box-shadow: var(--np-shadow-overlaySm);
  transition: transform var(--np-motion-mediaZoom);
}
.np-category-card__name { display: flex; align-items: center; justify-content: space-between; gap: var(--np-space-2); padding: var(--np-space-2-5) var(--np-space-3) 0; font: var(--np-type-h4); font-size: 14px; }
.np-category-card__name .np-icon { width: var(--np-size-icon-sm); height: var(--np-size-icon-sm); color: var(--np-color-text-link); opacity: 0; transform: translateX(-4px); transition: opacity var(--np-motion-hover), transform var(--np-duration-base) var(--np-easing-standard); }
.np-category-card__params { padding: var(--np-space-0-5) var(--np-space-3) var(--np-space-3); font: var(--np-type-sku); color: var(--np-color-text-secondary); }
.np-category-card__name:last-child { padding-bottom: var(--np-space-3); }
@media (hover: hover) {
  .np-category-card:hover { border-color: var(--np-color-border-inverse); color: var(--np-color-text-primary); transform: translateY(var(--np-motion-hoverLift)); box-shadow: var(--np-shadow-overlaySm); }
  .np-category-card:hover .np-category-card__material { transform: scale(var(--np-motion-mediaZoomScale)); }
  .np-category-card:hover .np-category-card__name .np-icon { opacity: 1; transform: none; }
}

/* ---------- cmp.productCard: the name and the photo are links, the action is separate ---------- */
.np-product-card {
  display: flex; flex-direction: column; width: 100%; min-width: 0; height: 100%; overflow: hidden;
  border: var(--np-borderWidth-default) solid var(--np-c-productCard-border); border-radius: var(--np-c-productCard-radius);
  background: var(--np-color-bg-page);
  transition: border-color var(--np-motion-hover), transform var(--np-duration-base) var(--np-easing-standard), box-shadow var(--np-duration-base) var(--np-easing-standard);
}
.np-product-card__media {
  display: flex; align-items: center; justify-content: center; height: var(--np-c-productCard-mediaHeight); overflow: hidden;
  background: var(--np-c-productCard-mediaBg); border-bottom: var(--np-borderWidth-default) solid var(--np-c-productCard-border);
  text-decoration: none;
}
.np-product-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--np-motion-mediaZoom); }
.np-product-card__no-photo { display: flex; flex-direction: column; align-items: center; gap: var(--np-space-1); font: var(--np-type-caption); color: var(--np-color-text-muted); }
.np-product-card__no-photo .np-icon { width: 28px; height: 28px; stroke-width: 1.6; color: var(--np-color-border-strong); }
.np-product-card__body { display: flex; flex: 1; flex-direction: column; gap: var(--np-c-productCard-gap); padding: var(--np-c-productCard-padding); }
.np-product-card__sku { color: var(--np-color-text-muted); }
.np-product-card__name { font: var(--np-type-h4); font-size: 14px; line-height: 1.3; }
.np-product-card__name a {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  color: var(--np-color-text-primary); text-decoration: none;
}
.np-product-card__name a:hover { text-decoration: underline; }
.np-product-card__params { font: var(--np-type-caption); color: var(--np-color-text-secondary); }
.np-product-card__price { font-variant-numeric: tabular-nums; }
.np-product-card__price b { font: var(--np-type-price); }
.np-product-card__unit, .np-product-card__tier { font: var(--np-type-caption); color: var(--np-color-text-secondary); }
.np-product-card__no-price { font: var(--np-type-bodySm); font-weight: var(--np-font-weight-semibold); color: var(--np-color-text-secondary); }
.np-product-card__action { margin-top: auto; padding-top: var(--np-space-1-5); }
.np-product-card__add { display: flex; flex-wrap: wrap; gap: var(--np-space-1-5); align-items: flex-start; }
.np-product-card__add .np-btn { flex: 1 1 auto; }
.np-product-card__add .np-stepper__btn { width: var(--np-size-control-sm); }
.np-product-card__add .np-stepper__field { min-width: 44px; padding: 0 var(--np-space-1); }
@media (hover: hover) {
  .np-product-card:hover { border-color: var(--np-c-productCard-hoverBorder); transform: translateY(var(--np-motion-hoverLift)); box-shadow: var(--np-c-productCard-hoverShadow); }
  .np-product-card:hover .np-product-card__media img { transform: scale(var(--np-motion-mediaZoomScale)); }
}
.np-product-card:focus-within { border-color: var(--np-c-productCard-hoverBorder); }
.np-product-cards { display: grid; gap: var(--np-space-3); grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); }

/* ---------- cmp.gallery: main photo 4:3 + thumbnails; phones: swipe + «2/4» ---------- */
.np-gallery { display: flex; flex-direction: column; gap: var(--np-space-2); min-width: 0; }
.np-gallery__stage { position: relative; }
.np-gallery__track {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none;
  border: var(--np-borderWidth-default) solid var(--np-color-border-default); border-radius: var(--np-radius-md); background: var(--np-color-bg-subtle);
}
.np-gallery__track::-webkit-scrollbar { display: none; }
.np-gallery__slide { flex: 0 0 100%; aspect-ratio: 4 / 3; scroll-snap-align: start; }
.np-gallery__open { display: block; width: 100%; height: 100%; cursor: zoom-in; }
.np-gallery__open:focus-visible { outline: var(--np-focus-ring); outline-offset: calc(-1 * var(--np-borderWidth-strong) * 2); }
.np-gallery__open img { width: 100%; height: 100%; object-fit: contain; }
.np-gallery__counter {
  position: absolute; right: var(--np-space-2); bottom: var(--np-space-2); padding: var(--np-space-0-5) var(--np-space-2);
  border-radius: var(--np-radius-sm); background: var(--np-color-bg-inverse); color: var(--np-color-text-inverse); font: var(--np-type-sku);
}
.np-gallery__thumbs { display: none; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--np-space-2); }
.np-gallery__thumb {
  display: block; width: 100%; aspect-ratio: 4 / 3; padding: 0; overflow: hidden; background: var(--np-color-bg-subtle);
  border: var(--np-borderWidth-default) solid var(--np-color-border-default); border-radius: var(--np-radius-md);
}
.np-gallery__thumb img { width: 100%; height: 100%; object-fit: cover; }
.np-gallery__thumb:hover { border-color: var(--np-color-border-strong); }
.np-gallery__thumb[aria-pressed="true"] { border: var(--np-borderWidth-strong) solid var(--np-color-border-inverse); }
.np-gallery__thumb:focus-visible { outline: var(--np-focus-ring); outline-offset: var(--np-focus-ring-offset); }
@media (min-width: 768px) {
  .np-gallery__thumbs { display: grid; }
  .np-gallery__counter { display: none; }
}
.np-gallery__empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--np-space-2); aspect-ratio: 4 / 3;
  border: var(--np-borderWidth-default) solid var(--np-color-border-default); border-radius: var(--np-radius-md);
  background: var(--np-color-bg-subtle); color: var(--np-color-text-muted); font: var(--np-type-bodySm);
}
.np-gallery__empty .np-icon { width: var(--np-size-icon-lg); height: var(--np-size-icon-lg); }

/* Full-screen viewer: body of ui/modal.html size «full». */
.np-modal--full .np-dialog__body { display: flex; padding: var(--np-space-3); }
.np-viewer { display: flex; align-items: center; gap: var(--np-space-2); flex: 1; min-width: 0; min-height: 0; }
.np-viewer__figure { display: flex; flex-direction: column; align-items: center; gap: var(--np-space-2); flex: 1; min-width: 0; height: 100%; margin: 0; }
.np-viewer__image { flex: 1; min-height: 0; width: 100%; object-fit: contain; }
.np-viewer__position { font: var(--np-type-sku); color: var(--np-color-text-secondary); }
.np-viewer__nav { flex: none; border: var(--np-borderWidth-default) solid var(--np-color-border-default); }
/* Phones: the photo takes the full width, the arrows go under it. */
@media (max-width: 767.98px) {
  .np-viewer { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: minmax(0, 1fr) auto; }
  .np-viewer__figure { grid-column: 1 / -1; grid-row: 1; }
  .np-viewer__nav { grid-row: 2; justify-self: start; }
  .np-viewer__nav:last-child { justify-self: end; }
}

/* ---------- product page (SDD-006): gallery 4:3 → buy box; 768–1023 two columns 1:1;
   from 1024 «460 + flex» (09-responsive-a11y, A-Product) ---------- */
.np-product-page, .np-product-main { display: flex; flex-direction: column; gap: var(--np-space-6); }
.np-product-main { gap: var(--np-space-10); }
.np-product { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--np-space-6); align-items: start; }
@media (min-width: 768px) { .np-product { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .np-product { grid-template-columns: 460px minmax(0, 1fr); gap: var(--np-space-8); } }
.np-product__gallery, .np-product__buy { min-width: 0; }

.np-buy-box { display: flex; flex-direction: column; gap: var(--np-space-4); }
.np-buy-box__sku { color: var(--np-color-text-muted); }
.np-buy-box__title { overflow-wrap: anywhere; } /* a long name is shown in full */
.np-buy-box__title:focus { outline: none; }
.np-buy-box__variant { font: var(--np-type-bodyLg); font-weight: var(--np-font-weight-semibold); }
.np-buy-box__lead { color: var(--np-color-text-secondary); }
.np-buy-box__form { display: flex; flex-direction: column; gap: var(--np-space-4); }
.np-buy-box__price { display: flex; flex-direction: column; gap: var(--np-space-3); }
.np-buy-box__price .np-price__amount.np-skeleton { color: transparent; }
.np-buy-box__no-price { font: var(--np-type-bodyLg); font-weight: var(--np-font-weight-semibold); color: var(--np-color-text-secondary); }
.np-buy-box__hint { display: flex; gap: var(--np-space-2); align-items: flex-start; font: var(--np-type-bodySm); color: var(--np-color-text-secondary); }
.np-buy-box__hint .np-icon { width: var(--np-size-icon-sm); height: var(--np-size-icon-sm); margin-top: 2px; }
.np-buy-box__quantity { display: flex; flex-direction: column; gap: var(--np-space-1-5); max-width: 280px; }
.np-buy-box__total { font-variant-numeric: tabular-nums; }
.np-buy-box__total b { font: var(--np-type-price); }
.np-variant-select { max-width: 360px; }

.np-product__details { display: flex; flex-direction: column; gap: var(--np-space-8); max-width: 800px; }
.np-product__section { display: flex; flex-direction: column; gap: var(--np-space-3); }
.np-product__text { display: flex; flex-direction: column; gap: var(--np-space-3); overflow-wrap: anywhere; }
.np-product__refresh-error { display: flex; flex-wrap: wrap; gap: var(--np-space-2); align-items: center; }

/* ---------- catalog pages (SDD-006 stage 2): «Wszystkie kategorie» and a category.
   Grid columns (09-responsive-a11y): 320–359 — 1; 360–767 — 2; 768–1279 — 3; from 1280 — 4 ---------- */
.np-catalog-page { display: flex; flex-direction: column; gap: var(--np-space-6); }
.np-catalog-page__head { display: flex; flex-direction: column; gap: var(--np-space-2); }
.np-catalog-page__head h1 { overflow-wrap: anywhere; }
.np-catalog-page__lead { display: flex; flex-direction: column; gap: var(--np-space-2); max-width: 800px; color: var(--np-color-text-secondary); overflow-wrap: anywhere; }
.np-subcategories__list { display: flex; flex-wrap: wrap; gap: var(--np-space-2); }

.np-catalog { display: flex; flex-direction: column; gap: var(--np-space-4); }
/* While a new sort loads the old cards stay readable, dimmed (05-search-catalog). */
.np-catalog .np-catalog-grid { transition: opacity var(--np-motion-hover); }
.np-catalog[aria-busy="true"] .np-catalog-grid { opacity: .6; }

.np-catalog-toolbar { display: flex; flex-direction: column; gap: var(--np-space-3); min-width: 0; }
.np-catalog-toolbar__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--np-space-3); }
.np-catalog-toolbar__count { font: var(--np-type-sku); color: var(--np-color-text-secondary); }
.np-catalog-toolbar__sort { display: flex; align-items: center; gap: var(--np-space-2); }
.np-catalog-toolbar__sort .np-input { width: auto; max-width: 100%; }

.np-catalog-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--np-space-3); }
@media (min-width: 360px) { .np-catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 768px) { .np-catalog-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .np-catalog-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.np-catalog-grid__item { display: flex; min-width: 0; }
.np-catalog-grid__item > * { flex: 1; min-width: 0; }
/* Two narrow columns on phones: the card's name may wrap anywhere, «Pokaż kolejne» is full width. */
.np-catalog-grid .np-product-card__name { overflow-wrap: anywhere; }

.np-category-grid { display: grid; gap: var(--np-space-4) var(--np-space-3); grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
.np-category-grid__item { display: flex; flex-direction: column; gap: var(--np-space-2); min-width: 0; }
.np-category-grid__item > .np-category-card { flex: 1 0 auto; } /* cards of one row are equally tall */
.np-category-grid__children { display: flex; flex-wrap: wrap; gap: var(--np-space-1) var(--np-space-3); padding-inline: var(--np-space-1); font: var(--np-type-bodySm); }

/* ---------- catalog filters (SDD-006 stage 3, B.8). From 1024 px: sidebar 248 px + results.
   Below: a sticky bar «Filtry (N)» · «Sortuj» under the header, opening bottom sheets; active
   filters in one row scrolled sideways (05-search-catalog). Without JS the bar's links point at
   the sidebar form and the sort form, shown by :target. ---------- */
.np-catalog__layout, .np-catalog__main { display: flex; flex-direction: column; gap: var(--np-space-4); min-width: 0; }
.np-catalog__sidebar { display: none; }
.np-catalog__sidebar:target { display: block; }
.np-catalog__sidebar-title { margin-bottom: var(--np-space-4); font: var(--np-type-h4); }
@media (min-width: 1024px) {
  .np-catalog__layout--filters { display: grid; grid-template-columns: 248px minmax(0, 1fr); gap: var(--np-space-6); align-items: start; }
  .np-catalog__sidebar { display: block; }
}

/* filters.js keeps --np-header-height equal to the sticky header (its height differs by width). */
.np-catalog-bar {
  position: sticky; top: var(--np-header-height, var(--np-size-header-mobile)); z-index: var(--np-z-sticky);
  display: flex; align-items: center; gap: var(--np-space-2); min-height: 52px;
  margin-inline: calc(-1 * var(--np-catalog-gutter, var(--np-space-4))); padding: var(--np-space-1) var(--np-catalog-gutter, var(--np-space-4));
  background: var(--np-color-bg-page); border-bottom: var(--np-borderWidth-default) solid var(--np-color-border-default);
}
/* The bar spans the full width: it takes back the side margin of .np-container. */
.np-catalog-page { --np-catalog-gutter: var(--np-space-3); }
@media (min-width: 360px) { .np-catalog-page { --np-catalog-gutter: var(--np-grid-sm-margin); } }
@media (min-width: 768px) { .np-catalog-page { --np-catalog-gutter: var(--np-grid-md-margin); } }
.np-catalog-bar__button { flex: 1 1 0; min-width: 0; }
@media (min-width: 1024px) { .np-catalog-bar { display: none; } }

.np-catalog-toolbar__active { display: flex; align-items: center; gap: var(--np-space-3); min-width: 0; }
.np-catalog-toolbar__chips { display: flex; flex-wrap: wrap; gap: var(--np-space-2); min-width: 0; }
.np-catalog-toolbar__clear { flex: none; font: var(--np-type-bodySm); font-weight: var(--np-font-weight-semibold); white-space: nowrap; }
@media (max-width: 1023.98px) {
  /* One row scrolled sideways; the padding keeps the focus ring of a chip visible. */
  .np-catalog-toolbar__chips { flex: 1; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding: 3px; margin: -3px; }
  .np-catalog-toolbar__chips::-webkit-scrollbar { display: none; }
  .np-catalog-toolbar__chips > li { flex: none; }
  .np-catalog-toolbar__sort--wide { display: none; }
  .np-catalog-toolbar__sort--wide:target { display: flex; }
}

.np-filters { display: flex; flex-direction: column; gap: var(--np-space-5); }
.np-filters__group { display: flex; flex-direction: column; min-width: 0; margin: 0; padding: 0; border: 0; }
.np-filters__legend { margin-bottom: var(--np-space-1); padding: 0; font: var(--np-type-label); letter-spacing: var(--np-type-label-tracking); color: var(--np-color-text-secondary); }
.np-filters__values { display: flex; flex-direction: column; }
.np-filters__value { overflow-wrap: anywhere; }
.np-filters__value.is-disabled { color: var(--np-color-text-muted); cursor: not-allowed; }
.np-filters__count { color: var(--np-color-text-muted); font-variant-numeric: tabular-nums; }
.np-filters__more-toggle {
  display: flex; align-items: center; min-height: var(--np-size-control-lg); cursor: pointer;
  color: var(--np-color-text-link); font: var(--np-type-bodySm); font-weight: var(--np-font-weight-semibold);
}
.np-filters__more-toggle:focus-visible { outline: var(--np-focus-ring); outline-offset: var(--np-focus-ring-offset); }
/* With JS the sidebar applies a change at once: no «Pokaż wyniki» (filters.js marks the catalog). */
.np-catalog.is-live [data-np-filters="live"] .np-filters__submit { display: none; }
.np-sort-options .np-filters__group { gap: 0; }
/* «Pokaż N produktów» while the number is being counted again. */
.np-btn[data-state="counting"] [data-np-filters-count] { opacity: .6; }

/* ---------- cmp.relatedMaterials (SDD-006 stage 3, B.9): 4 compact cards in a row from 1024 px;
   below — a row scrolled sideways with the edge of the next card visible ---------- */
.np-related { display: flex; flex-direction: column; gap: var(--np-space-4); min-width: 0; }
.np-related__list {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(180px, 70%); gap: var(--np-space-3);
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; padding: var(--np-space-1) 3px var(--np-space-2);
}
.np-related__item { display: flex; min-width: 0; scroll-snap-align: start; }
.np-related__item > * { flex: 1; min-width: 0; }
@media (min-width: 768px) { .np-related__list { grid-auto-columns: minmax(180px, 40%); } }
@media (min-width: 1024px) { .np-related__list { grid-auto-flow: row; grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: visible; } }
.np-product-card--compact { --np-c-productCard-mediaHeight: 120px; }
.np-product-card--compact .np-product-card__name { overflow-wrap: anywhere; }
/* Phones and tablets: a focused element is not hidden under the sticky header and the filter bar. */
@media (max-width: 1023.98px) {
  html:has(.np-catalog-bar) { scroll-padding-top: calc(var(--np-header-height, var(--np-size-header-mobile)) + 52px + var(--np-space-4)); }
}
