/* Glidende internnavigasjon */
html {
  scroll-behavior: smooth;
}

/* =========================================================
   JERNVARER / KJETTINGREDSKAP – OVERSIKTSSIDE
   Crane Partner AS
   ========================================================= */

.jernvarer-shell {
  width: 100%;
  padding: 28px 18px 42px;
  background: #eef1f2;
  box-sizing: border-box;
  overflow-x: clip;
}

.jernvarer-shell *,
.jernvarer-shell *::before,
.jernvarer-shell *::after {
  box-sizing: border-box;
}

.jernvarer-page {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 28px 30px 36px;
  border: 1px solid #d9dddf;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,.05);
  color: #292929;
}

.jernvarer-page a {
  color: #252525;
}

.jernvarer-page a:hover {
  color: #0e1a41;
}

/* Brødsmuler */
.jernvarer-page .breadcrumb {
  margin: 0 0 22px;
  font-size: .9rem;
}

.jernvarer-page .breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.jernvarer-page .breadcrumb li {
  display: inline-flex;
  align-items: center;
  min-width: 0;
}

.jernvarer-page .breadcrumb li:not(:last-child)::after {
  content: "›";
  margin-left: 9px;
  color: #8a8a8a;
}

.jernvarer-page .breadcrumb a {
  text-decoration: none;
}

.jernvarer-page .breadcrumb [aria-current="page"] {
  color: #666;
}

/* Topp */
.jernvarer-header {
  max-width: 900px;
  margin: 0 0 28px;
}

.jernvarer-header h1 {
  margin: 0 0 10px;
  font-size: clamp(1.8rem, 3.8vw, 2.6rem);
  line-height: 1.12;
  font-weight: 700;
}

.jernvarer-header p {
  margin: 0;
  font-size: 1.04rem;
  line-height: 1.62;
  color: #4d4d4d;
}

/* Hurtigvalg */
.kategori-hopp {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 30px;
}

.kategori-hopp a {
  display: flex;
  min-width: 0;
  min-height: 58px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid #d8dcde;
  border-radius: 7px;
  background: #f8f9f9;
  text-decoration: none;
  font-weight: 650;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.kategori-hopp a:hover {
  background: #f0f2f3;
  border-color: #c6cbce;
}

/* Kategorier */
.jernvarer-kategorier {
  width: 100%;
  min-width: 0;
}

.kategori-seksjon {
  width: 100%;
  min-width: 0;
  margin: 0 0 34px;
  scroll-margin-top: 18px;
}

.kategori-seksjon:last-child {
  margin-bottom: 0;
}

.kategori-overskrift {
  margin: 0 0 15px;
  padding: 15px 18px;
  border-left: 4px solid #676d71;
  border-radius: 5px;
  background: #f2f4f5;
}

.kategori-overskrift h2 {
  margin: 0 0 5px;
  font-size: clamp(1.3rem, 2.6vw, 1.65rem);
  line-height: 1.2;
}

.kategori-overskrift p {
  margin: 0;
  color: #555;
  line-height: 1.48;
}

/* Produktkort */
.produktkort-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 15px;
  width: 100%;
  min-width: 0;
}

.produktkort-grid > * {
  min-width: 0;
}

.produktkort {
  display: flex;
  min-width: 0;
  min-height: 100%;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #dde0e2;
  border-radius: 8px;
  background: #fff;
}

.produktkort-bilde {
  display: flex;
  min-width: 0;
  min-height: 170px;
  align-items: center;
  justify-content: center;
  padding: 14px;
  background: #fff;
}

.produktkort-bilde img {
  display: block;
  width: auto;
  height: auto;
  max-width: min(155px, 100%);
  max-height: 150px;
  object-fit: contain;
}

.produktkort-tekst {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  flex-direction: column;
  padding: 14px 15px 16px;
  border-top: 1px solid #eceeef;
}

.produktkort h3 {
  margin: 0 0 7px;
  font-size: 1.02rem;
  line-height: 1.28;
}

.produktkort h3 a {
  text-decoration: none;
  overflow-wrap: anywhere;
}

.produktkort p {
  margin: 0;
  color: #555;
  font-size: .93rem;
  line-height: 1.48;
  overflow-wrap: anywhere;
}

/* AddToAny skal ikke ligge over innholdet på mindre skjermer */
@media screen and (max-width: 980px) {
  .a2a_floating_style.a2a_floating_style {
    display: none !important;
  }

  .produktkort-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media screen and (max-width: 820px) {
  .jernvarer-shell {
    padding: 18px 12px 30px;
  }

  .jernvarer-page {
    padding: 22px 20px 30px;
  }

  .kategori-hopp {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .produktkort-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media screen and (max-width: 560px) {
  .jernvarer-shell {
    padding: 10px 8px 24px;
  }

  .jernvarer-page {
    padding: 18px 14px 24px;
    border-radius: 7px;
  }

  .jernvarer-page .breadcrumb {
    font-size: .82rem;
    margin-bottom: 18px;
  }

  .jernvarer-header {
    margin-bottom: 22px;
  }

  .jernvarer-header p {
    font-size: .98rem;
  }

  .kategori-hopp {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 24px;
  }

  .kategori-hopp a {
    min-height: 52px;
    padding: 11px 12px;
    font-size: .9rem;
  }

  .kategori-overskrift {
    padding: 13px 14px;
    margin-bottom: 11px;
  }

  .produktkort-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .produktkort {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    min-height: 112px;
  }

  .produktkort-bilde {
    min-height: 112px;
    padding: 10px;
  }

  .produktkort-bilde img {
    max-width: 76px;
    max-height: 90px;
  }

  .produktkort-tekst {
    justify-content: center;
    padding: 11px 12px;
    border-top: 0;
    border-left: 1px solid #eceeef;
  }

  .produktkort h3 {
    margin-bottom: 5px;
    font-size: .98rem;
  }

  .produktkort p {
    font-size: .88rem;
    line-height: 1.38;
  }
}

@media screen and (max-width: 390px) {
  .kategori-hopp {
    grid-template-columns: 1fr;
  }

  .produktkort {
    grid-template-columns: 82px minmax(0, 1fr);
  }

  .produktkort-bilde img {
    max-width: 66px;
    max-height: 80px;
  }
}
