/*
 * Swehealth – "Se även"-blocket längst ner på kategorisidor (vmod swehealth_se_aven).
 * Laddas upp till includes/templates/swehealth.catalog/css/se-aven.css (länkas bara in på kategorisidor med länkar).
 * Lägg även filen i GitHub-repot swehealth-theme (css/se-aven.css).
 * 2026-11-07: långa kategorinamn (t.ex. Massageprodukter) klipps inte längre – texten får krympa och brytas.
 */

#box-category .se-aven {
  margin: 30px 0 10px;
  padding-top: 18px;
  border-top: 1px solid #eee;
  clear: both;
}

#box-category .se-aven-title {
  font-size: 1.25em;
  line-height: 1.3;
  margin: 0 0 12px;
}

#box-category .se-aven-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 12px;
}

#box-category .se-aven-item {
  min-width: 0;
}

#box-category .se-aven-item a {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 60px;
  padding: 8px 10px;
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  background: #fff;
  color: inherit;
  text-decoration: none;
  overflow: hidden;
  transition: border-color .15s ease, box-shadow .15s ease;
}

#box-category .se-aven-item a:hover,
#box-category .se-aven-item a:focus-visible {
  border-color: var(--navigation-background-color, #2c6fb6);
  box-shadow: 0 1px 4px rgba(0, 0, 0, .08);
  text-decoration: none;
}

#box-category .se-aven-item img {
  flex: 0 0 auto;
  width: 48px;
  height: auto;
  border-radius: 4px;
  background: #fff;
  object-fit: contain;
}

#box-category .se-aven-item-text a {
  padding-left: 14px;
}

#box-category .se-aven-name {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 14px;
  line-height: 1.3;
  font-weight: 600;
  overflow-wrap: anywhere;
  -webkit-hyphens: auto;
  hyphens: auto;
}

@media (max-width: 767px) {
  #box-category .se-aven {
    margin-top: 22px;
  }
  #box-category .se-aven-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  #box-category .se-aven-item a {
    min-height: 52px;
    padding: 6px 8px;
    gap: 8px;
  }
  #box-category .se-aven-item img {
    width: 40px;
  }
  #box-category .se-aven-name {
    font-size: 13px;
  }
}
