:where(
    .dynamic-product-description,
    .rbt-product-single-description,
    .dynamic-content-page__body,
    .blog-detail-page__content,
    .about-rich-text,
    .theme-home-seo-description__content
) {
    max-width: 100%;
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}

:where(
    .dynamic-product-description,
    .rbt-product-single-description,
    .dynamic-content-page__body,
    .blog-detail-page__content,
    .about-rich-text,
    .theme-home-seo-description__content
) :where(p, div, span, a, strong, em, u, s, h1, h2, h3, h4, h5, h6, li, blockquote) {
    max-width: 100%;
    min-width: 0;
    overflow-wrap: anywhere;
    white-space: normal !important;
    word-break: break-word;
}

:where(
    .dynamic-product-description,
    .rbt-product-single-description,
    .dynamic-content-page__body,
    .blog-detail-page__content,
    .about-rich-text,
    .theme-home-seo-description__content
) pre,
:where(
    .dynamic-product-description,
    .rbt-product-single-description,
    .dynamic-content-page__body,
    .blog-detail-page__content,
    .about-rich-text,
    .theme-home-seo-description__content
) code {
    max-width: 100%;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
    word-break: break-word;
}

/* Every value coming from the shared rich-text editor gets this hook. */
[data-rich-content] {
    box-sizing: border-box;
    max-width: 100%;
    min-width: 0;
    overflow-wrap: anywhere;
    white-space: normal;
    word-break: break-word;
}

[data-rich-content] :where(
    p, div, span, a, strong, em, u, s,
    h1, h2, h3, h4, h5, h6,
    ul, ol, li, blockquote
) {
    box-sizing: border-box;
    max-width: 100%;
    min-width: 0;
    overflow-wrap: anywhere;
    white-space: normal !important;
    word-break: break-word;
}

[data-rich-content] :where(img, iframe, video) {
    height: auto;
    max-width: 100% !important;
}

[data-rich-content] table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
}

[data-rich-content] :where(pre, code) {
    max-width: 100%;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
    word-break: break-word;
}

:where(
    .dynamic-product-description,
    .rbt-product-single-description,
    .dynamic-content-page__body,
    .blog-detail-page__content,
    .about-rich-text,
    .theme-home-seo-description__content
) ul,
:where(
    .dynamic-product-description,
    .rbt-product-single-description,
    .dynamic-content-page__body,
    .blog-detail-page__content,
    .about-rich-text,
    .theme-home-seo-description__content
) ol {
    margin-block: 0 1.25em;
    padding-inline-start: 1.75em;
}

:where(
    .dynamic-product-description,
    .rbt-product-single-description,
    .dynamic-content-page__body,
    .blog-detail-page__content,
    .about-rich-text,
    .theme-home-seo-description__content
) ul {
    list-style: disc outside !important;
}

:where(
    .dynamic-product-description,
    .rbt-product-single-description,
    .dynamic-content-page__body,
    .blog-detail-page__content,
    .about-rich-text,
    .theme-home-seo-description__content
) ol {
    list-style: decimal outside !important;
}

:where(
    .dynamic-product-description,
    .rbt-product-single-description,
    .dynamic-content-page__body,
    .blog-detail-page__content,
    .about-rich-text,
    .theme-home-seo-description__content
) li {
    display: list-item;
    margin-block: .3em;
}

/* Previously saved Quill 2 content used one OL with data-list markers. */
:where(
    .dynamic-product-description,
    .rbt-product-single-description,
    .dynamic-content-page__body,
    .blog-detail-page__content,
    .about-rich-text,
    .theme-home-seo-description__content
) li[data-list="bullet"] {
    list-style-type: disc !important;
}

:where(
    .dynamic-product-description,
    .rbt-product-single-description,
    .dynamic-content-page__body,
    .blog-detail-page__content,
    .about-rich-text,
    .theme-home-seo-description__content
) li[data-list="ordered"] {
    list-style-type: decimal !important;
}

:where(
    .dynamic-product-description,
    .rbt-product-single-description,
    .dynamic-content-page__body,
    .blog-detail-page__content,
    .about-rich-text,
    .theme-home-seo-description__content
) .ql-ui {
    display: none !important;
}

:where(
    .dynamic-product-description,
    .rbt-product-single-description,
    .dynamic-content-page__body,
    .blog-detail-page__content,
    .about-rich-text,
    .theme-home-seo-description__content
) .ql-align-center,
[data-rich-content] .ql-align-center { text-align: center !important; }

:where(
    .dynamic-product-description,
    .rbt-product-single-description,
    .dynamic-content-page__body,
    .blog-detail-page__content,
    .about-rich-text,
    .theme-home-seo-description__content
) .ql-align-right,
[data-rich-content] .ql-align-right { text-align: right !important; }

:where(
    .dynamic-product-description,
    .rbt-product-single-description,
    .dynamic-content-page__body,
    .blog-detail-page__content,
    .about-rich-text,
    .theme-home-seo-description__content
) .ql-align-justify,
[data-rich-content] .ql-align-justify { text-align: justify !important; }

[data-rich-content] .ql-align-left { text-align: left !important; }

[data-rich-content] img.ql-align-center {
    display: block;
    margin-inline: auto;
}

[data-rich-content] img.ql-align-right {
    display: block;
    margin-inline: auto 0;
}

[data-rich-content] img.ql-align-left {
    display: block;
    margin-inline: 0 auto;
}

:where(
    .dynamic-product-description,
    .rbt-product-single-description,
    .dynamic-content-page__body,
    .blog-detail-page__content,
    .about-rich-text,
    .theme-home-seo-description__content
) [class*="ql-indent-"] {
    margin-inline-start: 2em;
}

:where(
    .dynamic-product-description,
    .rbt-product-single-description,
    .dynamic-content-page__body,
    .blog-detail-page__content,
    .about-rich-text,
    .theme-home-seo-description__content
) blockquote {
    border-inline-start: 4px solid var(--color-primary, #2463eb);
    margin-block: 1.25em;
    padding: .75em 1em;
}

:where(
    .dynamic-product-description,
    .rbt-product-single-description,
    .dynamic-content-page__body,
    .blog-detail-page__content,
    .about-rich-text,
    .theme-home-seo-description__content
) table {
    border-collapse: collapse;
    display: block;
    margin-block: 1.25em;
    max-width: 100%;
    overflow-x: auto;
    width: max-content;
}

:where(
    .dynamic-product-description,
    .rbt-product-single-description,
    .dynamic-content-page__body,
    .blog-detail-page__content,
    .about-rich-text,
    .theme-home-seo-description__content
) th,
:where(
    .dynamic-product-description,
    .rbt-product-single-description,
    .dynamic-content-page__body,
    .blog-detail-page__content,
    .about-rich-text,
    .theme-home-seo-description__content
) td {
    border: 1px solid currentColor;
    padding: .55em .75em;
}

/* ---- Tüm zengin içerik tabloları: site tablo tasarımı ----
   SEO yazıları, blog, sayfalar, hakkımızda, SSS cevapları ve ürün açıklamaları. */
[data-rich-content] table {
    display: table;
    width: 100%;
    max-width: 100%;
    margin-block: 1.25em 1.5em;
    overflow: hidden;
    border: 1px solid #e4e9f2;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 8px 24px -12px rgba(33, 90, 218, 0.14);
    font-size: 15px;
}

[data-rich-content] table :is(th, td) {
    padding: 13px 18px;
    border: 0;
    border-bottom: 1px solid #eef1f6;
    line-height: 1.5;
    text-align: left;
    vertical-align: middle;
}

[data-rich-content] table tr:last-child > :is(th, td) {
    border-bottom: 0;
}

[data-rich-content] table td {
    color: #374151;
}

[data-rich-content] table td + td {
    border-left: 1px solid #f1f4f9;
}

/* Satır başlıkları (ilk sütun th) */
[data-rich-content] table tbody th {
    width: 34%;
    border-right: 1px solid #e4ebf8;
    background: #f4f7fe;
    color: #0f2a6b;
    font-weight: 600;
}

/* Başlık satırı */
[data-rich-content] table thead th {
    border-bottom: 0;
    background: linear-gradient(160deg, #3a74f0 0%, #215ada 55%, #1a4fc4 100%);
    color: #fff;
    font-weight: 700;
    letter-spacing: 0.01em;
}

[data-rich-content] table thead th + th {
    border-left: 1px solid rgba(255, 255, 255, 0.14);
}

/* Zebra satırlar ve hover */
[data-rich-content] table tbody tr:nth-child(even) > td {
    background: #fafbfe;
}

[data-rich-content] table tbody tr > td {
    transition: background-color 0.15s ease;
}

[data-rich-content] table tbody tr:hover > td {
    background: #f2f6ff;
}

/* Hücre içi linkler */
[data-rich-content] table td a {
    color: #215ada;
    font-weight: 600;
    text-decoration: none;
}

[data-rich-content] table td a:hover {
    text-decoration: underline;
}

/* Mobil: küçük yazı, sığmayan tablolar yatay kaydırılır */
@media (max-width: 575px) {
    [data-rich-content] table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        font-size: 13px;
    }

    [data-rich-content] table :is(th, td),
    [data-rich-content] table :is(th, td) * {
        white-space: nowrap !important;
        word-break: normal !important;
        overflow-wrap: normal !important;
    }

    [data-rich-content] table :is(th, td) {
        padding: 10px 12px;
    }

    [data-rich-content] table tbody th {
        width: auto;
    }
}
