.mall-markdown {
    color: #4b5563;
    font-size: 14px;
    line-height: 1.75;
    word-break: break-word;
}

.mall-markdown h1,
.mall-markdown h2,
.mall-markdown h3,
.mall-markdown h4 {
    margin: 1.2em 0 0.6em;
    color: #111827;
    font-weight: 700;
    line-height: 1.35;
}

.mall-markdown h1 { font-size: 20px; }
.mall-markdown h2 { font-size: 18px; }
.mall-markdown h3 { font-size: 16px; }

.mall-markdown p {
    margin: 0.75em 0;
}

.mall-markdown ul,
.mall-markdown ol {
    margin: 0.75em 0;
    padding-left: 1.4em;
}

.mall-markdown li + li {
    margin-top: 0.35em;
}

.mall-markdown code {
    padding: 0.15em 0.4em;
    border-radius: 4px;
    background: #f3f4f6;
    font-size: 0.92em;
}

.mall-markdown pre {
    margin: 0.85em 0;
    padding: 12px 14px;
    border-radius: 8px;
    background: #f8fafc;
    overflow-x: auto;
}

.mall-markdown pre code {
    padding: 0;
    background: transparent;
}

.mall-markdown blockquote {
    margin: 0.85em 0;
    padding: 8px 12px;
    border-left: 3px solid #d1d5db;
    color: #6b7280;
    background: #f9fafb;
}

.mall-markdown a {
    color: #2563eb;
}

.mall-markdown img {
    max-width: 100%;
    border-radius: 8px;
}

.mall-markdown-empty {
    margin: 0;
    color: #9ca3af;
}

.product-markdown-preview {
    min-height: 180px;
    padding: 12px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
}

html[data-theme="dark"] .mall-markdown {
    color: var(--mall-text-secondary);
}

html[data-theme="dark"] .mall-markdown h1,
html[data-theme="dark"] .mall-markdown h2,
html[data-theme="dark"] .mall-markdown h3,
html[data-theme="dark"] .mall-markdown h4 {
    color: var(--mall-text);
}

html[data-theme="dark"] .mall-markdown code {
    background: #2a2a2a;
    color: #e5e5e5;
}

html[data-theme="dark"] .mall-markdown pre {
    background: #1a1a1a;
    border: 1px solid var(--mall-border);
}

html[data-theme="dark"] .mall-markdown pre code {
    color: #e5e5e5;
}

html[data-theme="dark"] .mall-markdown blockquote {
    border-left-color: #525252;
    color: var(--mall-text-muted);
    background: #1f1f1f;
}

html[data-theme="dark"] .mall-markdown a {
    color: #60a5fa;
}

html[data-theme="dark"] .mall-markdown-empty {
    color: var(--mall-text-muted);
}

html[data-theme="dark"] .product-markdown-preview {
    background: var(--mall-card);
    border-color: var(--mall-border);
}
