/* Hindrer subpixel-blink ved AJAX */
.products,
.ajax-brand-menu,
.ajax-attribute-menu {
  will-change: contents;
}
/*Låser grid for mindre hopping, men badge kommer innenfor*/
.products {
  contain: layout paint;
}
/* ---------------- Kategori-meny ---------------- */
.ajax-cat-menu {
  list-style: none;
  padding-left: 0;
  margin: 0 0 20px 0;
}
.ajax-cat-menu .cat-item {
  margin: 6px 0;
}
.ajax-cat-menu .cat-line {
  display: flex;
  align-items: center;
  gap: 2px;
  cursor: pointer;
  padding: 0;
  border: none;
  background: transparent;
  font-size: 14px;
  font-weight: 400;       /* normal tekst */  
  color: #231f20;
}
.ajax-cat-menu .cat-line:hover {
  color: #0073aa;
}
/* Undermeny */
.ajax-cat-menu .ajax-subcats {
  margin-left: 16px;
  padding-left: 0;
  border-left: none;
}
.ajax-cat-menu .ajax-subcats ul {
  margin-top: 0px;   /* prøv 0–4px i stedet for standard ~10px */
}
.ajax-cat-menu .ajax-subcats .cat-item {
  margin: 0px 0;   /* ned fra 6px i hovedmenyen */
}

/* ---------------- Checkbokser ---------------- */
.cat-checkbox,
.brand-checkbox {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border: 1px solid #999;
  margin: 0;                 /* teksten helt tett inntil */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  position: relative;
  background: #fff;
  cursor: pointer;  
}

.cat-checkbox:checked,
.brand-checkbox:checked {
  background: #231f20;      /* 0073aa WooCommerce blå */
  border-color: #231f20;
}

.cat-checkbox:checked::after,
.brand-checkbox:checked::after {
  content: "✓";
  font-size: 13px;
  color: #fff;
  line-height: 1;
  position: absolute;
  left: 3px;
  top: 0px;
}


/* ---------------- Brand-meny ---------------- */
.ajax-brand-menu {
  list-style: none;
  padding-left: 0;
  margin: 0 0 20px 0;
}
.ajax-brand-menu .brand-item {
  margin: 6px 0;
}
.ajax-brand-menu .brand-item label {
  display: flex;
  align-items: center;
  gap: 2px;
  cursor: pointer;
  padding: 0;
  border: none;
  background: transparent;
  font-weight: 400;     /* normal tekst */
  font-size: 14px;
  color: #231f20;
}
.ajax-brand-menu .brand-item label:hover {
  color: #0073aa;
}
.brand-count {
  margin-left: 4px;
  color: #666;
  font-size: 14px;
}
/* ================================
   ATTRIBUTES = CATEGORIES STYLE
   ================================ */

/* Tittel lik kategori / brand */
.ajax-attr-title {
  font-weight: 500;
  font-size:14px;
  margin: 12px 0 6px;
}

/* Bruk samme liste-layout */
.ajax-attribute-menu ul.ajax-cat-menu {
  margin: 0;
  padding: 0;
}

/* Lik spacing på hvert valg */
.ajax-attribute-menu .cat-item {
  list-style: none;
  margin: 2px 0;
}

/* Checkbox-linje lik kategori */
.ajax-attribute-menu .cat-line,
.ajax-attribute-menu label {
  font-weight: 400;
  font-size:14px;
  display: flex;
  align-items: center;  
  gap: 2px;
  cursor: pointer;
}

/* Counts – lik stil */
.ajax-attribute-menu .attr-count,
.ajax-attribute-menu .cat-count {
  opacity: 0.6;
  font-size: 0.9em;
}

/* Disabled (hvis du senere legger det til) */
.attr-disabled {
  opacity: 0.4;
  pointer-events: none; /* valgfritt */
}
.cat-disabled {
  opacity: 0.4;
  pointer-events: none; /* valgfritt */
}

/* ---------------- Pris-slider ---------------- */
#ajax-price-slider {
  margin-top: 20px;
  margin-right: 15%;   /* skyver den inn fra høyre */
  padding: 0;
  border: none;
  background: transparent;
  width: 85%;          /* sliderens totale bredde */
}

#price-range {
  margin: 12px 0;
}

.price-readout {
  font-weight: 500;
}
/* ---------------- Tilpasset noUiSlider til pris ---------------- */

/* Hele linja (bakgrunn) */
#price-range.noUi-target,
#price-range .noUi-base,
#price-range .noUi-connects {
  background: #fafafa;   /* lys grå */
  height: 8px;           /* samme som aktiv del */
  border-radius: 4px;
  box-shadow: none;
  border: none;
}

/* Aktivt område mellom håndtakene */
#price-range .noUi-connect {
  background: linear-gradient(90deg, #89bb3d, #537420);
  height: 100%;          /* fyll høyden til parent */
  border-radius: 4px;
}

/* Mindre håndtak – samme stil som original */
#price-range.noUi-horizontal .noUi-handle {
  width: 24px;               /* ned fra 34px */
  height: 20px;              /* ned fra 28px */
  right: -12px;              /* justert for ny bredde */
  top: -6px;                 /* bedre justering for 8px linje */
  border-radius: 3px;
  background: #fff;
  border: 1px solid #d3d3d3;
  box-shadow: 0 1px 5px #aaa;
  cursor: default;
}

/* De små "grepstrekene" inni håndtaket */
#price-range .noUi-handle:before,
#price-range .noUi-handle:after {
  content: "";
  display: block;
  position: absolute;
  height: 10px;              /* ned fra 14px */
  width: 1px;
  background: #e8e7e6;
  top: 5px;                  /* tilpasset ny høyde */
}

#price-range .noUi-handle:before { left: 8px; }
#price-range .noUi-handle:after  { left: 11px; }

/* ---------------- Show more ---------------- */
.ajaxcat-loadmore-wrap {
  margin: 24px 0;
  display: flex;
  justify-content: center;
  width: 100%;
}
#ajaxcat-loadmore.button {
  padding: 10px 20px;
  font-weight: 600;
  cursor: pointer;
}
/* Fjerner pil høyre-ned til høyre for kategori*/
.ajax-cat-menu .has-children > .cat-line .cat-name::after {
  content: none !important;
}
.ajaxcat-hijacked .woocommerce-pagination {
  display: none !important;
}
#ajaxcat-reset {
  background: none !important;
  border: none !important;
  padding: 16px 0 0 4px !important;
  margin: 10px 0 0 0;
  color: #0073aa; /* WooCommerce blå */
  font-size: 14px;
  font-weight: normal;
  cursor: pointer;
  text-decoration: underline;
}

#ajaxcat-reset:hover {  
background: #fff !important;  
  text-decoration: underline;
  font-size: 14px;
}
/* 🔒 Deaktiver kategorier med 0 treff FULLSTENDIG */
.ajax-cat-menu li.cat-disabled {
  opacity: 0.45;
  pointer-events: none; /* ⛔ stopper ALLE klikk */
}

/* Vis tydelig at den er låst */
.ajax-cat-menu li.cat-disabled .cat-line,
.ajax-cat-menu li.cat-disabled .cat-name {
  cursor: not-allowed;
}
.ajaxcat-attr-empty {
  visibility: hidden;
  height: 0;
  overflow: hidden;
}
.ajax-cat-menu li.cat-disabled .cat-checkbox {
  cursor: not-allowed;
}
/* SKJUL brands over limit – Flatsome override */
.ajax-brand-menu .brand-item.is-hidden {
    visibility: hidden;
    height: 0;
    overflow: hidden;
}

/* Vis dem igjen når "Se alle" er aktiv */
.ajaxcat-brands.is-expanded .brand-item.is-hidden {
    visibility: visible;
    height: auto;
}

.ajaxcat-show-all-brands {
    background: none;
    border: 0;
    padding: 0px 0px 0px 4px;
    margin-top: 1px;
    font-size: 14px;
	font-weight:400;
    cursor: pointer;
    color: #0073aa;
	text-decoration: underline;
}

.ajaxcat-show-all-brands:hover {
    text-decoration: underline;
}
/* =========================================================
   ATTRIBUTES – final styling (match cat + brand)
   ========================================================= */

.attr-blocked {
  pointer-events: none;
  opacity: 0.5;
}
/* === ATTRIBUTES: spacing & count alignment === */
.ajax-attribute-menu .attr-item > label{
  display:flex;
  align-items:left;
  font-size:14px;
  font-weight:400;
  line-height:1.3;
  cursor:pointer;
}

/* kun avstand mellom boks og tekst */
.ajax-attribute-menu .attr-checkbox{
  margin:0 6px 0 0;  /* <- margin-right beholdes */
  flex-shrink:0;
}

/* count til høyre, men ikke helt “limt” */
.ajax-attribute-menu .attr-count{  
  padding-left:4px;
  font-size:14px;
  color:#666;  
}

/* ========================
   Sorteringsknapp - Hovedstil
   ======================== */
.ajaxcat-sort-toggle {
  font-weight:500;  /* Hvit tekst */
  margin-bottom:20px;  
  cursor: pointer;           /* Håndledderpeker ved hover */
  display: inline-flex;      /* Bruk inline-flex for at den kan justere seg etter innholdet */
  align-items: center;       /* Vertikal justering for innholdet */
  justify-content: center;   /* Sentrer tekst og pil */
  min-width: 100px;          /* Minste bredde */
  max-width: 200px;          /* Maksimal bredde */
  white-space: nowrap;       /* Hindrer at teksten brytes over flere linjer */
  text-align: center;        /* Sentrer teksten */
  transition: background-color 0.3s ease, transform 0.3s ease; /* Smidig overgangseffekt */
}
.ajaxcat-toolbar button.ajaxcat-sort-toggle {
  border: 1px solid #e7e7e7;
  /*background-color: #fff; /* Blå bakgrunnsfarge */
  color: #333; 
  font-size: 14px;
font-weight:400;  /* Tekststørrelse */      
  padding:0px 10px !important;
}

.ajaxcat-toolbar button.ajaxcat-sort-toggle:hover {
  background-color: #f5f5f5; /* Mørkere blåfarge ved hover */
  
}
/* ========================
   Sorteringspilen
   ======================== */
.ajaxcat-sort-arrow {
  margin-left: 5px; /* Litt avstand mellom tekst og pil */
  font-size: 20px;   /* Pilens størrelse */
  transition: transform 0.3s ease; /* Smidig overgang for rotasjon */
}

.ajaxcat-sort-toggle[aria-expanded="true"] .ajaxcat-sort-arrow {
  transform: rotate(180deg); /* Rotere pilen når popup er åpen */
}
/* ========================
   Responsivitet - Mobil
   ======================== */
@media (max-width: 767px) {
  .ajaxcat-sort-toggle {
    font-size: 14px;         /* Mindre tekst på mobil */
    padding: 2px 6px;       /* Justere padding på mobil (8px topp/bunn, 12px venstre/høyre) */
    min-width: 100px;         /* Juster minimumsbredden på mobil */
    max-width: 160px;         /* Maksimal bredde på mobil */
  }

  .ajaxcat-sort-arrow {
    font-size: 20px;         /* Mindre pil på mobil */
  }
}
/* ==============================
   AJAXCAT – Sort dropdown
   ============================== */

.ajaxcat-sort-modal {
  position: fixed; /* Bruk fixed så den flyter over innholdet */      
  z-index: 10000;
  display: none; /* Start skjult */
}

.ajaxcat-sort-panel {
  background: #fff;
  border-radius: 8px;  
  width: 200px;
  padding: 12px;  
  box-shadow: 0px 2px 15px rgba(0, 0, 0, 0.1); /* Legg til en skygge for bedre synlighet */
  position: relative;
  top: 0px;
 right: 95px;
}


/* Tittel */
.ajaxcat-sort-title {
  font-size: 15px;
  font-weight: 400;
  padding: 0px 0px;
  color: #666;
}

/* Liste */
.ajaxcat-sort-options {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Element */
.ajaxcat-sort-item {
  padding: 4px 6px;
  font-size: 14px;
  cursor: pointer;
  border-radius: 6px;
}

/* Hover */
.ajaxcat-sort-item:hover {
  background: #f3f3f3;
}

/* Aktiv */
.ajaxcat-sort-item.is-active {
  font-weight: 600;
  background: #f0f0f0;
}
/* Aktiver filtere - chips */
.ajaxcat-active-filters {
  display: none;            /* skjult som default */
  flex-wrap: wrap;
  gap: 0px;
}

.ajaxcat-active-filters.is-active {
  display: flex;
  margin: 8px 0 10px;
}

button.ajaxcat-chip {
  background: #f9f9f9;
  border: 1px solid #ccc;
  border-radius: 20px !important;
  padding: 0px 10px;
  font-size: 13px;
  font-weight:400;
  cursor: pointer;
}

.ajaxcat-chip-x {
  margin-left: 6px;
  font-weight: bold;
}

button.ajaxcat-chip-reset {
  background: transparent;
  border: none;
  text-decoration: underline;  
}

/* Mobil: litt bredere, men fortsatt "lett" */
@media (max-width: 849px) {
  .ajaxcat-sort-toggle {  
margin-bottom:4px;
  }
  .ajaxcat-sort-panel {
    min-width: 150px;	
  } 
  .ajaxcat-active-filters.is-active {  
  margin: 4px 0 10px;
}
}
@media (max-width: 1400px) {
  .ajaxcat-sort-panel {    
	right: 0px;
  }  
}
@media (min-width: 849px) {
  .ajaxcat-active-filters {
    display: none !important;
  }
}
/*lagt til i v6.38*/
/* Sort dropdown skal ta imot klikk */
.ajaxcat-sort-modal {
  pointer-events: auto;
  z-index: 10000;
}

/* Men backdrop / overlay bak skal stoppe klikk til grid */
.ajaxcat-sort-modal::before {
  content: "";
  position: fixed;
  inset: 0;
  background: transparent;
  z-index: -1;
}

/* Loadmore-wrapper skal ikke dekke produkter */
#ajaxcat-loadmore-wrap { pointer-events: none; }
#ajaxcat-loadmore { pointer-events: auto; }

/* Fjern ekstra luft når brands er skjult bak "Se alle" */
.ajax-brand-menu {
  margin-bottom: 0;
}

.ajax-brand-menu .brand-item.is-hidden {
  margin: 0;
  padding: 0;
}

/* Litt luft kun før "Se alle"-knappen */
.ajaxcat-show-all-brands {
  margin-top: 4px;
  font-size:13px;
  font-weight:400;
}
/* Skjul attributter som default */
#ajax-attribute-menu { display: none; }

/* Vis kun når bundle har aktivert dem */
body.tax-product_cat #ajax-attribute-menu {
  display: block;
}
.ajaxcat-brands .brand-item.is-hidden {
  display: none;
}

.ajaxcat-brands.is-expanded .brand-item {
  display: block !important;
}

/* =========================
   ATTR CHECKBOX = CAT/BRAND
   ========================= */

/* 1) Bruk samme custom checkbox på attributter */
.cat-checkbox,
.brand-checkbox,
.ajax-attribute-menu .attr-checkbox {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border: 1px solid #999;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  position: relative;
  background: #fff;
  cursor: pointer;
  flex: 0 0 16px;
}

/* checked */
.cat-checkbox:checked,
.brand-checkbox:checked,
.ajax-attribute-menu .attr-checkbox:checked {
  background: #231f20;
  border-color: #231f20;
}

/* checkmark */
.cat-checkbox:checked::after,
.brand-checkbox:checked::after,
.ajax-attribute-menu .attr-checkbox:checked::after {
  content: "✓";
  font-size: 13px;
  color: #fff;
  line-height: 1;
  position: absolute;
  left: 3px;
  top: 0px;
}

/* 2) Tving label-linja til å matche cat/brand */
.ajax-attribute-menu .attr-item > label,
.ajax-attribute-menu label {
  display: flex;
  align-items: center; /* <-- riktig (ikke left) */
  gap: 2px;
  cursor: pointer;
  padding: 0;
  margin: 0;
}

/* 3) Fjern eventuell innrykk/luft i attribute-lista */
.ajax-attribute-menu ul,
.ajax-attribute-menu li {
  padding-left: 0;
  margin-left: 0;
  list-style: none;
}

/* 4) Ikke la gammel margin dytte boksen ned/ut */
.ajax-attribute-menu .attr-checkbox {
  margin: 0 !important;
}
/* ==============================
   ATTRIBUTES – hard align left
   ============================== */

/* 1) Fjern ALLE venstre-offset på attribute-container */
.ajax-attribute-menu,
.ajax-attribute-menu ul,
.ajax-attribute-menu li,
.ajax-attribute-menu .attr-item {
  margin-left: 0 !important;
  padding-left: 0 !important;
}

/* 2) Tving samme venstre start som kategori */
.ajax-attribute-menu label {
  display: flex;
  align-items: center;
  padding-left: 0 !important;
  margin-left: 0 !important;
}

/* 3) Samme checkbox-posisjon som cat/brand */
.ajax-attribute-menu .attr-checkbox {
  margin-left: 0 !important;
  margin-right: 6px;
  flex: 0 0 16px;
}

/* 4) Sikre at teksten ikke har egen indent */
.ajax-attribute-menu .attr-name,
.ajax-attribute-menu span {
  padding-left: 0 !important;
}
/* ATTR: litt luft mellom boks og tekst */
.ajax-attribute-menu .attr-item > label {
  gap: 10px !important; /* samme feeling som de andre */
}

/* Ikke null alle span – kun selve navnet hvis du har den */
.ajax-attribute-menu .attr-name {
  padding-left: 0 !important;
}

/* Viktig: fjern denne hvis den finnes hos deg:
   .ajax-attribute-menu span { padding-left:0 !important; }
*/
