/* The product catalogue: product tiles, the category pages and the breadcrumbs. */

@layer pages {
  /* ——— Product tiles (category pages) ——— */

  .kl__tile { display: block; color: var(--ink); }
  .kl__tile-img { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; display: block; border-radius: var(--radius-media); background: var(--sky); transition: opacity var(--duration-base) var(--ease-standard); }
  .kl__tile:hover .kl__tile-img { opacity: .9; }
  .kl__tile-name { display: block; margin-top: 12px; font-size: var(--text-base); transition: color var(--duration-fast) var(--ease-standard); }
  .kl__tile:hover .kl__tile-name { color: var(--tone); }
  /* A tile without a photo shows the bracelet's placeholder (ms-placeholder); hovered, its outline takes the tone. */
  .kl__tile:hover .kl__tile-placeholder::before { border-color: var(--tone); }
  /* The price line is used by the category pages only; „wycena indywidualna” may wrap in a narrow tile. */
  .kl__tile-price { display: block; margin-top: 2px; font-size: var(--text-base); color: var(--ink-soft); white-space: normal; }

  /* ——— Product catalogue: category pages (/produkty/kategoria/:id) ——— */

  .kl__catalog { padding: 44px 0 76px; }
  .kl__catalog-head { margin-bottom: clamp(28px, 4vw, 44px); padding-bottom: clamp(22px, 3vw, 30px); border-bottom: 1px solid var(--line); }
  .kl__catalog-eyebrow { margin: 0 0 10px; font-size: var(--text-xs); letter-spacing: var(--tracking-caps); text-transform: uppercase; color: var(--tone); }
  .kl__catalog-title { margin: 0 0 10px; }
  .kl__catalog-lead { margin: 0; color: var(--muted); }
  .kl__catalog-layout { display: grid; grid-template-columns: 230px 1fr; gap: clamp(28px, 4vw, 56px); align-items: start; }

  /* Sidebar: a glass card that stays under the sticky navbar while the tiles scroll. */
  .kl__catalog-nav { position: sticky; top: calc(var(--nav-stuck) + 24px); padding: 20px 22px 10px; }
  .kl__catalog-nav-title { margin: 0 0 6px; font-size: var(--text-2xs); font-family: var(--font-sans); letter-spacing: var(--tracking-caps); text-transform: uppercase; color: var(--muted); }
  .kl__catalog-categories { list-style: none; margin: 0; padding: 0; }
  .kl__catalog-categories li + li { border-top: 1px solid var(--line); }
  /* Every category has a hairline dot; the current one (aria-current="page") is the selected one — its dot fills with
     the tone, like a checked radio button. */
  .kl__catalog-category { display: flex; align-items: center; gap: 12px; padding: 11px 0; font-size: var(--text-lg); color: var(--ink-soft); transition: color var(--duration-fast) var(--ease-standard); }
  .kl__catalog-category::before { content: ""; flex: none; width: 9px; height: 9px; border: 1px solid var(--tone-pale); border-radius: 50%; transition: background-color var(--duration-fast) var(--ease-standard), border-color var(--duration-fast) var(--ease-standard); }
  .kl__catalog-category:hover { color: var(--tone); }
  .kl__catalog-category:hover::before { border-color: var(--tone); }
  .kl__catalog-category[aria-current="page"] { color: var(--ink); font-weight: var(--weight-medium); }
  .kl__catalog-category[aria-current="page"]::before { border-color: var(--tone); background: var(--tone); }

  .kl__catalog-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(26px, 3.4vw, 40px) clamp(14px, 2vw, 24px); }
  .kl__catalog-empty { padding: clamp(32px, 5vw, 56px) 24px; text-align: center; }
  .kl__catalog-empty-text { margin: 0 0 18px; color: var(--muted); }

  /* ——— Breadcrumbs (shared/_breadcrumbs) ——— */

  .kl__crumbs { margin-bottom: 22px; font-size: var(--text-sm); line-height: normal; color: var(--muted); }
  .kl__crumbs-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 8px; }
  .kl__crumbs-item { display: inline-flex; gap: 8px; min-width: 0; }
  /* The separator is drawn, not read: the empty alternative text keeps it out of the accessibility tree. */
  .kl__crumbs-item + .kl__crumbs-item::before { content: "/"; content: "/" / ""; }
  .kl__crumbs-link { color: var(--tone); transition: color var(--duration-fast) var(--ease-standard); }
  .kl__crumbs-link:hover { color: var(--tone-strong); }
}
