.category-description-wrapper {
  position: relative;
  max-width: 860px;
  margin: 15px auto 0 auto;
  text-align: center;
}

.category-description-wrapper.is-hidden-by-pagination {
  display: none !important;
}

.category-description-wrapper .category-description {
  position: relative;
  font-size: 13.5px;
  line-height: 1.6;
  color: #555;
  transition: max-height 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.category-description-wrapper .category-description p {
  margin-bottom: 0.5rem;
}

.category-description-wrapper .category-description p:last-child {
  margin-bottom: 0;
}

.category-description-wrapper.is-collapsible:not(.is-expanded) .category-description {
  max-height: 60px;
  overflow: hidden;
}

.category-description-wrapper.is-collapsible:not(.is-expanded) .category-description::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 38px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 70%, #ffffff 100%);
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.category-description-wrapper.is-collapsible.is-expanded .category-description {
  max-height: 2500px;
  overflow: visible;
}

.category-description-wrapper.is-collapsible.is-expanded .category-description::after {
  opacity: 0;
  visibility: hidden;
}

.category-description-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 4px;
  padding: 6px 12px;
  background: transparent;
  border: none;
  cursor: pointer;
  color: #888;
  transition: color 0.2s ease, transform 0.2s ease;
  line-height: 1;
}

.category-description-toggle:hover {
  color: #111;
}

.category-description-toggle:focus-visible {
  outline: 2px solid #111;
  outline-offset: 2px;
}

.category-description-toggle-icon {
  display: inline-block;
  width: 14px;
  height: 8px;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
}

.category-description-wrapper.is-collapsible:not(.is-expanded) .category-description-toggle:hover .category-description-toggle-icon {
  transform: translateY(2px);
}

.category-description-wrapper.is-expanded .category-description-toggle-icon {
  transform: rotate(180deg);
}

.category-description-wrapper.is-expanded .category-description-toggle:hover .category-description-toggle-icon {
  transform: rotate(180deg) translateY(2px);
}

@media (max-width: 767px) {
  .category-description-wrapper {
    margin-top: 10px;
    padding: 0 10px;
  }

  .category-description-wrapper.is-collapsible:not(.is-expanded) .category-description {
    max-height: 58px;
  }

  .category-description-toggle {
    margin-top: 6px;
    padding: 17px 12px;
    font-size: 11px;
  }
}

body.prettyblocks-active .category-description-wrapper,
body[data-prettyblocks-editor] .category-description-wrapper {
  max-height: none !important;
}

body.prettyblocks-active .category-description-toggle,
body[data-prettyblocks-editor] .category-description-toggle {
  display: none !important;
}

