/* Explain: Styles for rendering sanitized rich-text product descriptions. */
/* Rich-text typography for sanitized product descriptions (allow-list output only). */
.rich-text {
    overflow-wrap: anywhere;
}

.rich-text > *:first-child { margin-top: 0; }
.rich-text > * + * { margin-top: 0.9rem; }

.rich-text p { line-height: 1.75; }

.rich-text h1,
.rich-text h2,
.rich-text h3,
.rich-text h4,
.rich-text h5,
.rich-text h6 {
    font-family: var(--font-heading);
    font-weight: 500;
    line-height: 1.2;
    color: var(--text-color);
}

.rich-text h1 { font-size: 1.7rem; margin-top: 1.6rem; }
.rich-text h2 { font-size: 1.45rem; margin-top: 1.5rem; }
.rich-text h3 { font-size: 1.2rem; margin-top: 1.35rem; }
.rich-text h4,
.rich-text h5,
.rich-text h6 { font-size: 1.05rem; margin-top: 1.2rem; }

.rich-text ul,
.rich-text ol { padding-left: 1.3rem; }
.rich-text ul { list-style: disc; }
.rich-text ol { list-style: decimal; }
.rich-text li { margin-top: 0.35rem; line-height: 1.7; }
.rich-text li::marker { color: var(--secondary-color); }

.rich-text strong,
.rich-text b { font-weight: 600; color: var(--text-color); }

.rich-text em,
.rich-text i { font-style: italic; }

.rich-text a {
    color: var(--secondary-hover);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.3s ease;
}
.rich-text a:hover { color: var(--secondary-color); }

.rich-text blockquote {
    margin-block: 1.2rem;
    padding-left: 1rem;
    border-left: 2px solid var(--secondary-color);
    font-style: italic;
    color: var(--text-muted);
}

.rich-text hr {
    border: 0;
    border-top: 1px solid var(--border-color);
    margin-block: 1.5rem;
}

.rich-text sup,
.rich-text sub { font-size: 0.75em; }