/* Category description card and typography. */
.tax-product_cat .term-description.partak-category-description {
    padding: clamp(18px, 3vw, 32px);
    margin-block: 24px;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 5px 24px rgb(15 23 42 / 4%);
    text-align: start;
}

.partak-category-description__content {
    color: #4b5563;
    font-size: 15px;
    line-height: 2.15;
    overflow-wrap: anywhere;
}

.partak-category-description__content > :first-child {
    margin-top: 0;
}

.partak-category-description__content > :last-child {
    margin-bottom: 0;
}

.partak-category-description__content p {
    margin-bottom: 16px;
}

.partak-category-description__content :is(h1, h2, h3, h4, h5, h6) {
    color: #1f2937;
    font-size: 1.2em;
    font-weight: 700;
    line-height: 1.8;
    margin-block: 24px 12px;
}

.partak-category-description__content strong {
    color: #283341;
}

.partak-category-description__content a {
    color: #c8102e;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.partak-category-description__content :is(ul, ol) {
    padding-inline-start: 24px;
}

.partak-category-description__content table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
}

.partak-category-description__content :is(th, td) {
    padding: 12px 16px;
}

.partak-category-description__content th {
    background: #f5f6f8;
    color: #1f2937;
}

/* JavaScript sets the preview height to four lines of body text. */
.partak-category-description.is-collapsible:not(.is-expanded) .partak-category-description__content {
    max-height: var(--partak-description-preview);
    overflow: hidden;
}

/* Accessible expand/collapse control and interaction states. */
.partak-category-description__toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    margin-block-start: 12px;
    padding: 8px 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    color: #c8102e;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.partak-category-description__toggle[hidden] {
    display: none;
}

.partak-category-description__toggle::after {
    content: '';
    width: 7px;
    height: 7px;
    border-inline-end: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-2px) rotate(45deg);
}

.is-expanded > .partak-category-description__toggle::after {
    transform: translateY(2px) rotate(225deg);
}

.partak-category-description__toggle:hover {
    background: transparent;
    color: #950d23;
}

.partak-category-description__toggle:focus-visible {
    outline: 2px solid #c8102e;
    outline-offset: 4px;
}
