/* Category page subcategory cards — horizontal, 5 across */
.subcategory__list--with-images {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 1.15rem;
  align-items: stretch;
}

.subcategory__link--with-image {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 10px;
  padding: 8px 12px 8px 8px;
  border: 1px solid #ececec;
  border-radius: 8px;
  background: #fff;
  text-decoration: none !important;
  color: #18191a !important;
  min-height: 56px;
  min-width: 0;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.subcategory__link--with-image:hover {
  border-color: #d71920;
  box-shadow: 0 3px 10px rgba(0,0,0,.05);
}

.subcategory__thumbnail {
  width: 44px !important;
  height: 44px !important;
  flex: 0 0 44px !important;
  object-fit: contain !important;
  display: block;
}

.subcategory__name {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 12.5px;
  font-weight: 700;
  text-align: left !important;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: auto;
}

@media (max-width: 1199.98px) {
  .subcategory__list--with-images {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 991.98px) {
  .subcategory__list--with-images {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 575.98px) {
  .subcategory__list--with-images {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .subcategory__link--with-image {
    padding: 7px 10px 7px 7px;
    min-height: 50px;
    gap: 8px;
  }

  .subcategory__thumbnail {
    width: 38px !important;
    height: 38px !important;
    flex-basis: 38px !important;
  }

  .subcategory__name {
    font-size: 12px;
  }
}

/* Mega top icons */
@media (min-width: 992px) {
  .ps-mainmenu__tree-link {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
  }

  .hl-mega__toplink-icon {
    width: 20px !important;
    height: 20px !important;
    object-fit: contain !important;
    flex: 0 0 20px !important;
  }

  .hl-mega__toplink-icon.is-fallback,
  .hl-mega__toplink-icon--empty,
  .hl-mega__icon.is-fallback,
  .hl-mega__icon--empty,
  .hl-mega__thumb.is-fallback,
  .hl-mega__thumb--empty {
    display: inline-block;
    background: transparent !important;
    border: 0 !important;
    opacity: 0;
    border-radius: 0;
  }

  .hl-mega__icon.is-fallback,
  .hl-mega__icon--empty {
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
  }

  .hl-mega__thumb.is-fallback,
  .hl-mega__thumb--empty {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
  }
}

/* Sidebar: peakategooria larger, alamkategooriad smaller */
.hl-catside__thumb--root {
  flex: 0 0 40px !important;
  width: 40px !important;
  height: 40px !important;
}

.hl-catside__thumb--d1 {
  flex: 0 0 30px !important;
  width: 30px !important;
  height: 30px !important;
  border-radius: 6px !important;
}

.hl-catside__thumb--d2 {
  flex: 0 0 24px !important;
  width: 24px !important;
  height: 24px !important;
  border-radius: 5px !important;
}

.hl-catside__thumb--d3 {
  flex: 0 0 20px !important;
  width: 20px !important;
  height: 20px !important;
  border-radius: 4px !important;
}
