/* ==========================================================================
   Katalog proizvoda – stranice kategorija (studeni 2026.).
   Sve je ograničeno na .kk-catalog – header, footer i ostale stranice ostaju netaknuti.
   ========================================================================== */
.kk-catalog {
  --kk-yellow: #ffed00; --kk-ink: #151515; --kk-muted: #5a5a5a; --kk-line: #e9e9e9;
  position: relative; width: min(1760px, 100%); margin: 0 auto; padding: 32px clamp(22px, 2.6vw, 48px) 90px;
  color: var(--kk-ink); font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; -webkit-font-smoothing: antialiased;
  scroll-margin-top: 0;
}
.kk-catalog *, .kk-catalog *::before, .kk-catalog *::after { box-sizing: border-box; }
.kk-catalog a { color: inherit; text-decoration: none; border-bottom: 0; }
.kk-catalog button, .kk-catalog select { font: inherit; color: inherit; }
.kk-catalog button { cursor: pointer; }
.kk-catalog [hidden] { display: none !important; }
.kk-catalog h1, .kk-catalog h2, .kk-catalog p { font-family: inherit; text-transform: none; }
.kk-catalog .screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.kk-layout { display: grid; grid-template-columns: 258px minmax(0, 1fr); gap: 32px; align-items: start; }

/* Sidebar */
.kk-sidebar { position: sticky; top: 20px; align-self: start; max-height: calc(100vh - 40px); overflow-y: auto; scrollbar-width: thin; background: #fff; border-right: 1px solid var(--kk-line); padding-right: 15px; }
.kk-sidebar-title { background: var(--kk-yellow); padding: 14px 15px; margin-bottom: 8px; font-size: 15px; font-weight: 800; letter-spacing: .01em; text-transform: uppercase; }
.kk-group { border-bottom: 1px solid #e5e5e5; }
.kk-group:last-child { border-bottom: 0; }
.kk-group-header { display: grid; grid-template-columns: minmax(0, 1fr) 36px; align-items: center; gap: 2px; }
.kk-catalog .kk-group-label { display: block; width: 100%; text-align: left; background: transparent; border: 0; padding: 12px 7px 12px 11px; font-size: 15px; font-weight: 800; line-height: 1.35; border-radius: 6px; }
.kk-catalog .kk-group-label:hover { background: #f7f7f7; }
.kk-catalog .kk-toggle, .kk-catalog .kk-subtoggle { display: flex; align-items: center; justify-content: center; min-width: 34px; min-height: 34px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: #252525; }
.kk-catalog .kk-toggle:hover, .kk-catalog .kk-subtoggle:hover { background: #f0f0f0; }
.kk-toggle svg, .kk-subtoggle svg { transition: transform .18s ease; }
.kk-toggle[aria-expanded="false"] svg, .kk-subtoggle[aria-expanded="false"] svg { transform: rotate(-90deg); }
.kk-group-body { padding: 1px 0 13px 8px; }
.kk-catalog .kk-all { display: block; margin: 0 0 6px 4px; padding: 9px 9px 9px 11px; border-radius: 4px; font-size: 13.5px; font-weight: 700; }
.kk-catalog .kk-all:hover { background: #f7f7f7; }
.kk-catalog .kk-all.is-active { background: #fff6af; box-shadow: inset 4px 0 var(--kk-yellow); font-weight: 800; }
.kk-categories { list-style: none; margin: 0; padding: 0; }
.kk-category { margin: 1px 0; }
.kk-cat-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; min-height: 35px; }
.kk-catalog .kk-cat-link { display: block; min-width: 0; padding: 8px 7px 8px 12px; border-radius: 6px; font-size: 13.5px; line-height: 1.4; color: #2d2d2d; }
.kk-catalog .kk-cat-link:hover { background: #f7f7f7; }
.kk-catalog .kk-cat-link.is-path { font-weight: 700; color: #111; }
.kk-catalog .kk-cat-link.is-active { background: #fff6af; box-shadow: inset 3px 0 var(--kk-yellow); font-weight: 800; color: #111; }
.kk-subbody { margin: 0 0 6px 15px; padding-left: 10px; border-left: 1px solid #dcdcdc; }
.kk-subbody .kk-cat-link { font-size: 12.8px; color: #4b4b4b; }

/* Glavni dio */
.kk-main { min-width: 0; }
.kk-breadcrumb ol { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 9px; list-style: none; margin: 2px 0 12px; padding: 0; font-size: 13px; color: #666; }
.kk-breadcrumb li + li::before { content: "/"; margin-right: 9px; color: #bbb; }
.kk-catalog .kk-breadcrumb a:hover { color: #111; text-decoration: underline; text-underline-offset: 3px; }
.kk-catalog .kk-page-title { margin: 0 0 9px; font-size: clamp(30px, 2.6vw, 43px); line-height: 1.1; font-weight: 800; letter-spacing: -.035em; color: var(--kk-ink); }
.kk-page-title::before { content: ""; display: inline-block; width: 5px; height: .87em; margin-right: 15px; vertical-align: -.09em; background: var(--kk-yellow); }
.kk-catalog .kk-intro { margin: 0 0 21px; font-size: 15px; line-height: 1.55; color: #5b5b5b; max-width: 900px; }
.kk-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 17px 0; border-top: 1px solid var(--kk-line); }
.kk-toolbar-left { display: flex; align-items: center; gap: 13px; }
.kk-catalog .kk-count { margin: 0; font-size: 17px; font-weight: 800; }
.kk-count span { color: #777; font-weight: 600; }
.kk-sort-wrap { display: flex; align-items: center; gap: 11px; margin: 0; font-size: 13.5px; font-weight: 700; }
.kk-sort-wrap label { margin: 0; font-weight: 700; }
.kk-catalog .kk-sort { min-width: 180px; height: 40px; padding: 0 13px; border: 1px solid #d5d5d5; border-radius: 10px; background: #fff; color: #1d1d1d; font-weight: 500; }
.kk-catalog .kk-sort-go { height: 40px; padding: 0 14px; border: 1px solid #171717; border-radius: 10px; background: #fff; font-weight: 700; }
.kk-js .kk-sort-go { display: none; }

/* Kartice */
.kk-products { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.kk-product { display: flex; flex-direction: column; min-width: 0; background: #fff; border: 1px solid #e6e6e6; border-radius: 12px; transition: border-color .16s ease, box-shadow .16s ease; }
.kk-product:hover { border-color: #cfcfcf; box-shadow: 0 8px 24px rgba(0, 0, 0, .05); }
.kk-catalog .kk-prod-image { display: flex; align-items: center; justify-content: center; height: 215px; flex: 0 0 215px; padding: 12px 13px 2px; overflow: hidden; }
.kk-prod-image img { display: block; width: auto; height: auto; max-width: 100%; max-height: 195px; object-fit: contain; }
.kk-no-image { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; border-radius: 8px; background: #f5f5f5; color: #888; font-size: 13px; }
.kk-prod-details { display: flex; flex: 1; flex-direction: column; align-items: flex-start; padding: 8px 17px 17px; }
.kk-badge { display: inline-block; margin: 0 0 6px; padding: 2px 8px; border-radius: 4px; background: #b42318; color: #fff; font-size: 11px; font-weight: 800; text-transform: uppercase; }
.kk-catalog .kk-prod-name { margin: 0 0 9px; min-height: 42px; font-size: 16px; line-height: 1.3; font-weight: 800; letter-spacing: -.01em; text-transform: uppercase; color: var(--kk-ink); }
.kk-catalog .kk-prod-name a:hover { text-decoration: underline; text-underline-offset: 3px; }
.kk-prod-price { margin-bottom: 4px; font-size: 18px; line-height: 1.2; font-weight: 800; }
.kk-prod-price--upit { font-size: 16px; }
.kk-prod-vat { font-size: 11.5px; font-weight: 600; color: #6f6f6f; }
.kk-prod-unit { margin-bottom: 4px; font-size: 12px; color: #666; }
.kk-catalog .kk-prod-sub { margin: 3px 0 17px; min-height: 34px; font-size: 12.5px; line-height: 1.4; color: #666; }
.kk-catalog .kk-prod-cta { display: flex; align-items: center; justify-content: center; gap: 9px; width: 100%; min-height: 42px; margin-top: auto; border: 1px solid #171717; border-radius: 10px; background: #fff; color: #111; font-size: 13px; font-weight: 800; }
.kk-catalog .kk-prod-cta:hover { background: #fff5a8; border-color: #deb900; }
.kk-catalog .kk-product:first-child .kk-prod-cta { background: var(--kk-yellow); border-color: var(--kk-yellow); }

/* Stranice */
.kk-pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin-top: 28px; }
.kk-catalog .kk-page { display: inline-flex; align-items: center; justify-content: center; min-width: 42px; height: 42px; padding: 0 12px; border: 1px solid #d5d5d5; border-radius: 10px; font-weight: 700; font-size: 14px; }
.kk-catalog a.kk-page:hover { border-color: #171717; }
.kk-page.is-current { background: var(--kk-yellow); border-color: var(--kk-yellow); }

/* Prazna kategorija */
.kk-empty { padding: 36px 28px; border: 1px dashed #d5d5d5; border-radius: 14px; background: #fafafa; }
.kk-catalog .kk-empty h2 { margin: 0 0 8px; font-size: 20px; font-weight: 800; }
.kk-catalog .kk-empty p { margin: 0 0 18px; color: #555; }
.kk-empty-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.kk-catalog .kk-btn { display: inline-flex; align-items: center; min-height: 46px; padding: 0 20px; border-radius: 10px; font-weight: 800; font-size: 14.5px; }
.kk-catalog .kk-btn-primary { background: var(--kk-yellow); }
.kk-catalog .kk-btn-line { border: 1px solid #bdbdbd; background: #fff; }

/* Mobilna ladica */
.kk-catalog .kk-mobile-filters { display: none; align-items: center; gap: 8px; padding: 10px 14px; border: 1px solid #dadada; border-radius: 10px; background: #fff; font-weight: 700; font-size: 14px; }
.kk-scrim, .kk-catalog .kk-close-sidebar { display: none; }
.kk-catalog :is(a, button, select):focus-visible { outline: 3px solid #b68400; outline-offset: 2px; }

@media (max-width: 1380px) {
  .kk-products { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kk-catalog .kk-prod-image { height: 185px; flex-basis: 185px; }
  .kk-prod-image img { max-height: 166px; }
}
@media (max-width: 1100px) {
  .kk-layout { grid-template-columns: 240px minmax(0, 1fr); gap: 24px; }
  .kk-products { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 800px) {
  .kk-catalog { padding: 24px 16px 60px; }
  .kk-layout { grid-template-columns: minmax(0, 1fr); }
  .kk-catalog .kk-mobile-filters { display: flex; }
  .kk-sidebar { position: fixed; z-index: 1002; top: 0; bottom: 0; left: 0; width: min(350px, 88vw); max-height: 100vh; padding: 22px 16px 30px; border: 0; box-shadow: 12px 0 40px rgba(0, 0, 0, .2); transform: translateX(-110%); transition: transform .2s ease; visibility: hidden; }
  .kk-sidebar.is-open { transform: translateX(0); visibility: visible; }
  .kk-catalog .kk-close-sidebar { display: flex; align-items: center; gap: 8px; margin: 0 0 14px auto; padding: 8px 10px; border: 1px solid #ddd; border-radius: 9px; background: #fff; }
  .kk-scrim.is-visible { display: block; position: fixed; z-index: 1001; inset: 0; background: rgba(0, 0, 0, .55); }
  .kk-toolbar { flex-wrap: wrap; }
  .kk-catalog .kk-page-title { font-size: 32px; }
  .kk-catalog .kk-intro { font-size: 14px; }
}
@media (max-width: 520px) {
  .kk-products { gap: 9px; }
  .kk-catalog .kk-prod-image { height: 140px; flex-basis: 140px; padding: 6px; }
  .kk-prod-image img { max-height: 130px; }
  .kk-prod-details { padding: 8px 10px 12px; }
  .kk-catalog .kk-prod-name { font-size: 13.5px; min-height: 36px; }
  .kk-prod-price { font-size: 15.5px; }
  .kk-prod-vat { font-size: 10px; }
  .kk-catalog .kk-prod-sub { font-size: 11.5px; min-height: 32px; margin-bottom: 12px; }
  .kk-catalog .kk-prod-cta { font-size: 11.5px; min-height: 40px; padding: 6px; }
  .kk-sort-wrap { font-size: 12px; gap: 8px; }
  .kk-catalog .kk-sort { min-width: 0; height: 38px; padding: 0 6px; font-size: 13px; }
  .kk-catalog .kk-count { font-size: 15px; }
  .kk-breadcrumb ol { font-size: 12px; }
}
@media (max-width: 350px) {
  .kk-products { grid-template-columns: 1fr; }
  .kk-catalog .kk-prod-image { height: 210px; flex-basis: 210px; }
  .kk-prod-image img { max-height: 195px; }
}
@media (prefers-reduced-motion: reduce) {
  .kk-sidebar, .kk-toggle svg, .kk-subtoggle svg, .kk-product { transition: none; }
}

/* Na stranicama kategorija (računalo) header ostaje vidljiv na vrhu dok se pregledava katalog. */
@media (min-width: 1024px) {
  .tax-kategorije-proizvoda .skh-desktop { position: sticky; top: 0; }
  .tax-kategorije-proizvoda.admin-bar .skh-desktop { top: 32px; }
  .tax-kategorije-proizvoda #proizvodi { scroll-margin-top: var(--kk-hdr, 160px); }
  .tax-kategorije-proizvoda .kk-sidebar { top: calc(var(--kk-hdr, 160px) + 16px); max-height: calc(100vh - var(--kk-hdr, 160px) - 32px); }
}
