.category-description-toggle {
  display: none;
}

body.page-category .category__description-wrap {
  grid-area: description;
  width: 100%;
  max-width: 1120px;
  min-width: 0;
}

@media (max-width: 991px) {
  body .mobile-expandable-text:not(.is-expanded) {
    display: -webkit-box !important;
    overflow: hidden !important;
    max-height: none !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 4 !important;
  }

  body .mobile-expandable-text.is-expanded {
    display: block !important;
    overflow: visible !important;
    max-height: none !important;
    -webkit-line-clamp: unset !important;
  }

  body .category-description-toggle {
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    float: none;
    position: static;
    z-index: auto;
    margin: 2px 0 8px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #a56f0a;
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
    cursor: pointer;
  }

  body .category-description-toggle::after {
    content: "↓";
    font-size: 14px;
  }

  body .category-description-toggle[aria-expanded="true"]::after {
    content: "↑";
  }

  body .category-description-toggle[aria-expanded="true"] {
    float: none;
    margin: 4px 0 12px;
    padding-left: 0;
    background: transparent;
  }

}


/* Desktop More/Less for long category and product summary text */
@media (min-width:768px){
  body.page-category .category__description.mobile-expandable-text,
  body.page-product .product__description-short.mobile-expandable-text{
    max-height:126px!important;overflow:hidden!important;
  }
  body.page-category .category__description.mobile-expandable-text.is-expanded,
  body.page-product .product__description-short.mobile-expandable-text.is-expanded{
    max-height:none!important;overflow:visible!important;
  }
  body.page-category .category__description.mobile-expandable-text + .category-description-toggle,
  body.page-product .product__description-short.mobile-expandable-text + .category-description-toggle{
    display:inline-flex!important;align-items:center;gap:.38rem;
    margin:5px 0 14px!important;padding:0!important;float:none!important;
    color:#a8720d!important;background:transparent!important;border:0!important;
    font-size:.92rem!important;font-weight:750!important;line-height:1.35!important;
    cursor:pointer;text-decoration:none!important;
  }
  body.page-category .category__description-toggle::after,
  body.page-product .category__description-toggle::after{content:"↓";font-size:.9rem;line-height:1}
  body.page-category .category__description-toggle[aria-expanded="true"]::after,
  body.page-product .category__description-toggle[aria-expanded="true"]::after{content:"↑"}
  body.page-category .category-description-toggle:hover,
  body.page-product .category-description-toggle:hover{color:#7d5200!important}
}


/* Keep desktop product More button directly after the short description */
@media (min-width:768px){
  body.page-product .product__description-short.mobile-expandable-text + .category-description-toggle{
    order:4!important;align-self:flex-start!important;width:auto!important;max-width:100%!important;
  }
}


/* Expanded text must never keep the collapsed fade mask */
.mobile-expandable-text.is-expanded{
  -webkit-mask-image:none!important;mask-image:none!important;
}

/* Category expanded natural height fix */
body.page-category .category__description.mobile-expandable-text.is-expanded {
  height: auto !important;
}

/* Expanded category children must keep their natural multi-line height */
body.page-category .category__description.mobile-expandable-text.is-expanded > * { height: auto !important; max-height: none !important; overflow: visible !important; }

body.page-category .category__description.mobile-expandable-text.is-expanded > * { block-size: auto !important; max-block-size: none !important; }

/* Desktop categories: keep the heading and useful introductory text visible before expanding */
@media (min-width: 992px) { body.page-category .category__description.mobile-expandable-text:not(.is-expanded) { height: 220px !important; max-height: 220px !important; overflow: hidden !important; } }

/* Desktop category teaser: show complete semantic blocks, never clipped partial lines */
@media (min-width: 992px) {
 body.page-category .category__description.mobile-expandable-text:not(.is-expanded) { height: auto !important; max-height: none !important; overflow: visible !important; }
 body.page-category .category__description.mobile-expandable-text:not(.is-expanded):has(> h2) > :nth-child(n+3) { display: none !important; }
 body.page-category .category__description.mobile-expandable-text:not(.is-expanded):not(:has(> h2)) > :nth-child(n+2) { display: none !important; }
}

/* Universal desktop category teaser: complete lines, toggle always after text */
@media (min-width: 992px) {
  body.page-category .category__description.mobile-expandable-text:not(.is-expanded):not(:has(> h2)) > :first-child {
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 4 !important;
    overflow: hidden !important;
    max-height: calc(4 * 24.8px) !important;
  }
  body.page-category .category__description.mobile-expandable-text.is-expanded:not(:has(> h2)) > :first-child {
    display: block !important;
    -webkit-line-clamp: unset !important;
    max-height: none !important;
    overflow: visible !important;
  }
  body.page-category .category__description-wrap > .category-description-toggle {
    display: flex !important;
    clear: both !important;
    position: relative !important;
    margin: 14px 0 18px !important;
  }
}
