/* Storefront Rich Text Stylesheet for HTML product descriptions, categories, and CMS content */
.rich-text {
    color: #475569;
    font-size: 1rem;
    line-height: 1.7;
    word-break: break-word;
}

.rich-text > *:first-child {
    margin-top: 0 !important;
}

.rich-text > *:last-child {
    margin-bottom: 0 !important;
}

/* Headings */
.rich-text h1 {
    display: block;
    font-size: 1.875rem;
    line-height: 1.25;
    font-weight: 700;
    color: #0f172a;
    margin-top: 1.75rem;
    margin-bottom: 0.75rem;
}

.rich-text h2 {
    display: block;
    font-size: 1.5rem;
    line-height: 1.35;
    font-weight: 600;
    color: #1e293b;
    margin-top: 1.5rem;
    margin-bottom: 0.625rem;
}

.rich-text h3 {
    display: block;
    font-size: 1.25rem;
    line-height: 1.4;
    font-weight: 600;
    color: #1e293b;
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
}

.rich-text h4 {
    display: block;
    font-size: 1.125rem;
    line-height: 1.5;
    font-weight: 600;
    color: #334155;
    margin-top: 1rem;
    margin-bottom: 0.375rem;
}

.rich-text h5,
.rich-text h6 {
    display: block;
    font-size: 1rem;
    line-height: 1.5;
    font-weight: 600;
    color: #334155;
    margin-top: 0.875rem;
    margin-bottom: 0.25rem;
}

/* Paragraphs & Text */
.rich-text p {
    margin-top: 0.875rem;
    margin-bottom: 0.875rem;
    line-height: 1.8;
}

.rich-text strong,
.rich-text b {
    font-weight: 600;
    color: #0f172a;
}

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

/* Tables */
.rich-text table {
    width: 100%;
    margin-top: 1.25rem;
    margin-bottom: 1.25rem;
    border-collapse: collapse;
    font-size: 0.9375rem;
    line-height: 1.5;
    text-align: left;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    background-color: #ffffff;
}

.rich-text th,
.rich-text td {
    border: 1px solid #e2e8f0;
    padding: 10px 14px;
    vertical-align: top;
}

.rich-text th {
    background-color: #f8fafc;
    font-weight: 600;
    color: #0f172a;
    text-transform: capitalize;
}

.rich-text tr:nth-child(even) td {
    background-color: #f8fafc;
}

.rich-text tr:hover td {
    background-color: #f1f5f9;
}

/* Lists */
.rich-text ul {
    list-style-type: disc !important;
    margin-top: 0.875rem;
    margin-bottom: 0.875rem;
    padding-left: 1.5rem !important;
}

.rich-text ol {
    list-style-type: decimal !important;
    margin-top: 0.875rem;
    margin-bottom: 0.875rem;
    padding-left: 1.5rem !important;
}

.rich-text li {
    margin-top: 0.35rem;
    margin-bottom: 0.55rem;
    line-height: 1.75;
}

.rich-text li:last-child {
    margin-bottom: 0;
}

.rich-text li::marker {
    color: #64748b;
}

/* Links */
.rich-text a {
    color: #2563eb;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.15s ease-in-out;
}

.rich-text a:hover {
    color: #1d4ed8;
}

/* Quotes & Media */
.rich-text blockquote {
    border-left: 4px solid #cbd5e1;
    padding-left: 1rem;
    margin: 1.25rem 0;
    font-style: italic;
    color: #64748b;
}

.rich-text img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 1rem 0;
}

.rich-text hr {
    border: 0;
    border-top: 1px solid #e2e8f0;
    margin: 1.5rem 0;
}

.rich-text code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.875em;
    background-color: #f1f5f9;
    padding: 0.15em 0.4em;
    border-radius: 4px;
    color: #0f172a;
}

