/*
 * ISBAT nettbutikk – kategorisider (/product-category/…) UX 30.10.2026, v1.
 * Lastes SIST (etter isbat-butikk-2026.css og isbat-store-polish-2026.css)
 * kun på product_cat-arkiver via mu-plugins/isbat-kategori-ux-20261030.php.
 * Mål: kortere vei til første produkt, jevne kort med nøkkelspesifikasjoner
 * og tydelig primærknapp, bedre kategoritre, samme struktur ved 390 px.
 * Kontrast: normal tekst ≥ 4,5:1, stor tekst ≥ 3:1 (målt i KS-rapporten).
 */

/* ---------- 1. Kompakt topp: brødsmuler + H1 + ingress + én lenke ---------- */
.bt26 .bt26-kathero {
  padding: 16px 0 14px;
}
.bt26 .bt26-kathero .smuler {
  margin-bottom: 10px;
}
.bt26 .bt26-kathero-grid {
  grid-template-columns: minmax(0, 1fr) 200px;
  gap: 24px;
  align-items: center;
}
.bt26 .bt26-kathero .bt26-eyebrow {
  margin-bottom: 8px;
}
.bt26 .bt26-kathero h1 {
  margin: 0;
  font-size: clamp(1.7rem, 2.6vw, 2.2rem);
  line-height: 1.08;
}
.bt26 .bt26-kathero .fs-lede {
  margin: 8px 0 0;
  max-width: 66ch;
  font-size: .98rem;
  line-height: 1.5;
}
.bt26 .bt26-kathero .fs-btn-rad {
  margin-top: 12px;
}
.bt26 .bt26-kathero .fs-btn-rad .fs-btn {
  min-height: 40px;
  padding-top: 0;
  padding-bottom: 0;
}
.bt26 .bt26-kathero-figur {
  margin: 0;
}
.bt26 .bt26-kathero-bilde {
  aspect-ratio: 4 / 3;
  max-width: 200px;
  margin-left: auto;
  border: 1px solid var(--fs-line, #d7e3f0);
  border-radius: 10px;
  box-shadow: none;
  background: #fff;
}
.bt26 .bt26-kathero-bilde img {
  padding: 8px;
  object-fit: contain;
}
.bt26 .bt26-katlayout-grid {
  padding-top: 16px;
  gap: 28px;
}

/* Prosjektkriterium: ingen tekst under 12 px (rot 17,5 px → .72rem = 12,6 px). */
.bt26 .bt26-kathero .bt26-eyebrow,
.bt26 .bt26-sort label,
.bt26 .bt26-katsidebar-head span {
  font-size: .72rem;
}
.bt26 .bt26-kathero .smuler {
  font-size: .74rem;
}

/* ---------- 2. Verktøylinje: søk + sortering, chips med rent antall ---------- */
.bt26 .bt26-verktoy {
  padding: 10px 0;
}
.bt26 .bt26-verktoy-rad {
  gap: 10px;
}
.bt26 .bt26-sok input[type="search"],
.bt26 .bt26-sort select {
  min-height: 42px;
}
/* Kategoritreet dekker navigasjonen; den JS-genererte «Gå til»-velgeren skjules (eldre JS-cache). */
.bt26 .bt26-verktoy .bt26-bytt {
  display: none !important;
}
.bt26 .bt26-chips {
  margin-top: 8px;
  gap: 6px;
}
.bt26 .bt26-chip {
  min-height: 34px;
  padding: 2px 10px 2px 12px;
  gap: 6px;
  font-size: .82rem;
}
.bt26 .bt26-chip-n {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--fs-ice-2, #e3edf8);
  color: #3f5169; /* 7,4:1 på #e3edf8 */
  font-family: var(--fs-font);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: 0;
}
.bt26 .bt26-chip.er-aktiv .bt26-chip-n {
  background: rgba(255, 255, 255, .2);
  color: #fff;
}

/* ---------- 3. Gridhode: antall + prisregel én gang ---------- */
.bt26 .bt26-grid-hode {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 16px;
  margin-top: 14px;
}
.bt26 .bt26-grid-hode .bt26-teller {
  margin: 0;
  font-family: var(--fs-font);
  font-size: .86rem;
  font-weight: 700;
  letter-spacing: 0;
  color: var(--fs-ink, #16273d);
}
.bt26 .bt26-prisnote {
  margin: 0;
  font-size: .84rem;
  color: var(--fs-mute, #55677d); /* 5,9:1 på hvitt */
}
.bt26 .bt26-grid {
  margin-top: 12px;
  gap: 18px;
}

/* ---------- 4. Produktkort: fast bildeflate, spesifikasjoner, primærknapp ---------- */
.bt26 .bt26-kort {
  border-radius: 10px;
  border-color: var(--fs-line, #d7e3f0);
  box-shadow: none;
}
.bt26 .bt26-kort:hover {
  box-shadow: 0 14px 30px -18px rgba(7, 42, 112, .35);
}
.bt26 .bt26-kort-bildelenke {
  display: block;
  color: inherit;
  text-decoration: none;
}
.bt26 .bt26-kort-bilde {
  aspect-ratio: 4 / 3;
  background: #fff;
  border-bottom: 1px solid var(--fs-line, #d7e3f0);
}
.bt26 .bt26-kort-bilde img {
  padding: 12px;
}
.bt26 .bt26-kort-tekst {
  gap: 6px;
  padding: 14px 16px 16px;
}
.bt26 .bt26-kort-badge {
  padding: 0;
  border: 0;
  background: none;
  font-family: var(--fs-font);
  font-size: .75rem;      /* 12 px */
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--fs-blue, #003399);
}
.bt26 .bt26-kort h3 {
  font-size: 1.02rem;
  line-height: 1.28;
}
.bt26 .bt26-kort-nokkel {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 2px 0 0;
  padding: 0;
  list-style: none;
}
.bt26 .bt26-kort-nokkel li {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  min-width: 0;
  max-width: 100%;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--fs-ice, #f1f6fb);
  font-family: var(--fs-font); /* klassenavn uten «-spec»: temaets [class*="-spec"] gir monospace */
  font-size: .78rem;      /* 12,5 px */
  line-height: 1.35;
}
.bt26 .bt26-nokkel-k {
  flex: none;
  font-weight: 600;
  color: #4a5c73;         /* 6,2:1 på #f1f6fb */
}
.bt26 .bt26-nokkel-v {
  min-width: 0;
  overflow-wrap: anywhere;
  font-weight: 700;
  color: var(--fs-blue-deep, #072a70);
}
.bt26 .bt26-kort-utdrag {
  display: -webkit-box;
  min-height: 0;
  margin: 0;
  overflow: hidden;
  font-size: .86rem;
  line-height: 1.5;
  color: var(--fs-mute, #55677d);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;   /* første hele setning (≤ 115 tegn) får plass ved 263 px kortbredde */
  line-clamp: 4;
}
/* Eldre JS-cache kan fortsatt rendre prisinfo per kort – prisregelen står nå én gang over gridet. */
.bt26 .bt26-kort-prisinfo {
  display: none;
}
.bt26 .bt26-kort-foot {
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--fs-line, #d7e3f0);
}
/* Primærknapp – vinner over WooCommerce sin a.button (0,2,1) med (0,3,1). */
.woocommerce .bt26 a.bt26-btn-kurv,
.bt26 a.bt26-btn-kurv.button {
  display: inline-flex;
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  border: 0;
  border-radius: 8px;
  background: var(--fs-blue, #003399);
  color: #fff;
  font-family: var(--fs-font);
  font-size: .9rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  box-shadow: none;
}
.woocommerce .bt26 a.bt26-btn-kurv:hover,
.bt26 a.bt26-btn-kurv.button:hover,
.woocommerce .bt26 a.bt26-btn-kurv:focus-visible {
  background: var(--fs-blue-deep, #072a70);
  color: #fff;
  transform: none;
  box-shadow: none;
}
.woocommerce .bt26 a.bt26-btn-kurv.loading {
  opacity: .7;
}
.woocommerce .bt26 .bt26-kort--tjeneste a.bt26-btn-kurv {
  background: #fff;
  color: var(--fs-blue, #003399);
  border: 1px solid var(--fs-blue, #003399);
}
.woocommerce .bt26 .bt26-kort--tjeneste a.bt26-btn-kurv:hover {
  background: var(--fs-ice, #f1f6fb);
}
.bt26 .bt26-kort-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 12px;
}
.bt26 .bt26-kort-meta .bt26-kort-lenke {
  min-height: 32px;
  font-size: .84rem;
}
.bt26 .bt26-kort-meta .bt26-kort-lenke::after {
  content: "\2192";
  font-weight: 400;
}
.bt26 .bt26-kort-sku {
  margin: 0;
  font-family: var(--fs-font);
  font-size: .76rem;      /* 12,2 px */
  letter-spacing: 0;
  color: var(--fs-mute, #55677d);
}
/* site-readability.css har global a:hover { color: #b3f0ff } (1,25:1 på hvitt). Kortlenkene får egen hover-farge. */
.bt26 a.bt26-kort-tittellenke:hover,
.bt26 a.bt26-kort-tittellenke:focus-visible,
.bt26 a.bt26-kort-lenke:hover,
.bt26 a.bt26-kort-lenke:focus-visible,
.bt26 a.bt26-kort-badge:hover,
.bt26 a.bt26-kort-badge:focus-visible,
.bt26 .bt26-hjelp-tekst a:hover,
.bt26 .smuler a:hover {
  color: var(--fs-blue-deep, #072a70);
}
.bt26 .bt26-kort--lenket:hover h3,
.bt26 .bt26-kort--lenket:hover .bt26-kort-tittellenke {
  color: var(--fs-blue, #003399);
}
.bt26 .bt26-katsidebar-tre li > a:hover,
.bt26 .bt26-katsidebar-all:hover,
.bt26 .bt26-katsidebar-hjelp a:hover,
.bt26 .bt26-chip:hover {
  color: var(--fs-blue, #003399);
}
.bt26 .bt26-chip.er-aktiv:hover {
  color: #fff;
}
/* Woo legger «Vis forespørselsliste» etter knappen etter AJAX-tillegg. */
.bt26 .bt26-kort-foot .added_to_cart {
  align-self: flex-start;
  font-size: .84rem;
}
/* Kategorikort (display_type=subcategories) – samme kolonnefooter uten knapp. */
.bt26 .bt26-kort--kategori .bt26-kort-foot .bt26-kort-lenke {
  min-height: 36px;
}

/* ---------- 5. Kategoritre: hele etiketter, større trykkflater, ingen indre scroll ---------- */
.bt26 .bt26-katsidebar {
  top: 16px;
  max-height: none;
  overflow: visible;
  box-shadow: none;
}
.bt26 .bt26-katsidebar-head {
  padding: 14px 16px 10px;
}
.bt26 .bt26-katsidebar-all {
  margin: 10px 10px 6px;
  min-height: 42px;
  display: flex;
  align-items: center;
}
.bt26 .bt26-katsidebar-tre {
  padding: 0 6px 4px;
}
.bt26 .bt26-katsidebar-gruppe {
  padding: 4px 4px 8px;
}
.bt26 .bt26-katsidebar-glabel {
  margin: 10px 10px 4px;
}
.bt26 .bt26-katsidebar-tre li > a {
  min-height: 40px;
  padding: 7px 12px;
  gap: 10px;
  font-size: .92rem;
  color: #2f405a;         /* 10:1 på hvitt */
  overflow-wrap: normal;
  -webkit-hyphens: manual;
  hyphens: manual;
}
.bt26 .bt26-katsidebar-tre li > a span {
  min-width: 0;
  flex: 1 1 auto;
}
.bt26 .bt26-katsidebar-tre li > a small {
  flex: none;
  min-width: 22px;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--fs-ice, #f1f6fb);
  color: #4a5c73 !important;   /* 6,2:1 på #f1f6fb; !important mot body.isbat-ux-repaired .bt26-katsidebar small */
  -webkit-text-fill-color: #4a5c73 !important;
  font-size: .8rem !important; /* 12,8 px; site-readability setter small til .875rem !important */
  font-weight: 700;
  line-height: 1.5;
  text-align: center;
}
.bt26 .bt26-katsidebar-tre li > a.er-aktiv {
  background: var(--fs-ice, #f1f6fb);
  color: var(--fs-blue, #003399);
  box-shadow: inset 3px 0 0 var(--fs-blue, #003399);
}
.bt26 .bt26-katsidebar-tre li > a.er-aktiv small {
  background: var(--fs-blue, #003399);
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}
.bt26 .bt26-katsidebar-sub {
  margin: 2px 0 4px 12px;
  padding-left: 8px;
}
.bt26 .bt26-katsidebar-sub li > a {
  min-height: 38px;
  padding: 6px 10px;
  font-size: .88rem;
}
.bt26 .bt26-katsidebar-hjelp {
  padding: 14px 12px;
}

/* ---------- 6. Brytepunkter ---------- */
@media (max-width: 1220px) {
  .bt26 .bt26-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 940px) {
  .bt26 .bt26-kathero {
    padding: 14px 0 12px;
  }
  .bt26 .bt26-kathero-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
  /* Kategoribildet er dekor – mobil går rett på innholdet. */
  .bt26 .bt26-kathero-figur {
    display: none;
  }
  .bt26 .bt26-katlayout-grid {
    padding-top: 12px;
  }
  .bt26 .bt26-katsidebar-mobil {
    min-height: 48px;
    margin-bottom: 10px;
  }
  .bt26 .bt26-katsidebar-toggle:checked ~ .bt26-katsidebar {
    margin-bottom: 14px;
  }
  .bt26 .bt26-katsidebar-tre li > a {
    min-height: 44px;
  }
}
@media (max-width: 620px) {
  .bt26 .bt26-kathero h1 {
    font-size: 1.6rem;
  }
  .bt26 .bt26-kathero .fs-lede {
    font-size: .94rem;
  }
  .bt26 .bt26-verktoy-rad {
    gap: 8px;
  }
  /* Chips på én rad med sidelengs rulling (bevisst rullbar rad; alle chips er fortsatt nåbare). */
  .bt26 .bt26-chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
  }
  .bt26 .bt26-chip {
    flex: none;
    white-space: nowrap;
  }
  .bt26 .bt26-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .bt26 .bt26-kort-bilde {
    aspect-ratio: 16 / 11;
  }
  .bt26 .bt26-kort-tekst {
    padding: 12px 14px 14px;
  }
  .bt26 .bt26-kort-utdrag {
    -webkit-line-clamp: 3;
    line-clamp: 3;
  }
  .bt26 .bt26-kort-foot {
    flex-direction: column;
  }
}
@media (prefers-reduced-motion: reduce) {
  .bt26 .bt26-kort,
  .bt26 .bt26-kort:hover,
  .woocommerce .bt26 a.bt26-btn-kurv {
    transition: none;
    transform: none;
  }
}
