#snackys-tpl .to-seo-text {
    margin: var(--spacing-16) 0 0;
    color: var(--color-primary-100) !important;
    font-family: var(--font-family-base) !important;
    line-height: var(--lh-paragraph);
}

#snackys-tpl .to-seo-text--grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    row-gap: var(--spacing-8);
    align-items: start;
}

#snackys-tpl .to-seo-text__col {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: var(--spacing-8);
}

#snackys-tpl .to-seo-text__section {
    min-width: 0;
    margin: 0;
}

#snackys-tpl .to-seo-text,
#snackys-tpl .to-seo-text * {
    color: var(--color-primary-100) !important;
    font-family: var(--font-family-base) !important;
}

#snackys-tpl .to-seo-text h2,
#snackys-tpl .to-seo-text h3 {
    margin: 0 0 var(--spacing-3) !important;
    font-size: var(--font-size-h4) !important;
    font-weight: var(--font-weight-bold) !important;
    line-height: var(--lh-heading) !important;
}

#snackys-tpl .to-seo-text h3 {
    margin-top: var(--spacing-8) !important;
}

#snackys-tpl .to-seo-text > h2:not(:first-child),
#snackys-tpl .to-seo-text > h3:not(:first-child) {
    margin-top: var(--spacing-8) !important;
}

#snackys-tpl .to-seo-text h2 strong,
#snackys-tpl .to-seo-text h3 strong {
    font-weight: inherit !important;
}

#snackys-tpl .to-seo-text p,
#snackys-tpl .to-seo-text ul,
#snackys-tpl .to-seo-text ol,
#snackys-tpl .to-seo-text li {
    margin: 0 !important;
    font-size: var(--font-size-normal) !important;
    font-weight: var(--font-weight-regular) !important;
    line-height: var(--lh-paragraph) !important;
}

#snackys-tpl .to-seo-text p:empty {
    display: none;
}

#snackys-tpl .to-seo-text p + p {
    margin-top: var(--spacing-4) !important;
}

#snackys-tpl .to-seo-text ul,
#snackys-tpl .to-seo-text ol {
    padding-left: var(--spacing-6);
}

#snackys-tpl .to-seo-text li + li {
    margin-top: var(--spacing-2) !important;
}

#snackys-tpl .to-seo-text a,
#snackys-tpl .to-seo-text a:visited,
#snackys-tpl .to-seo-text a:hover,
#snackys-tpl .to-seo-text a:focus,
#snackys-tpl .to-seo-text a:active {
    color: inherit !important;
    text-decoration: underline !important;
    text-underline-offset: 2px;
}

/* Kategorie-SEO: eine Spalte untereinander, Abstand nur über Überschriften */
#snackys-tpl .to-seo-text--category {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 0;
    align-items: stretch;
}

#snackys-tpl .to-seo-text--category > .to-seo-text__row {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 0;
    align-items: stretch;
    width: 100%;
}

#snackys-tpl .to-seo-text--category > .to-seo-text__col,
#snackys-tpl .to-seo-text--category > .to-seo-text__row > .to-seo-text__col,
#snackys-tpl .to-seo-text--category > div:not(.to-seo-text__row) {
    display: block !important;
    flex: 0 0 auto;
    width: 100%;
    min-width: 0;
}

#snackys-tpl .to-seo-text--category h2,
#snackys-tpl .to-seo-text--category h3 {
    margin-top: var(--spacing-8) !important;
}

#snackys-tpl .to-seo-text--category > :is(h2, h3):first-child,
#snackys-tpl .to-seo-text--category > .to-seo-text__col:first-child > :is(h2, h3):first-child,
#snackys-tpl .to-seo-text--category > .to-seo-text__row > .to-seo-text__col:first-child > :is(h2, h3):first-child,
#snackys-tpl .to-seo-text--category > div:not(.to-seo-text__row):first-child > :is(h2, h3):first-child {
    margin-top: 0 !important;
}

#snackys-tpl .to-seo-text--category [style*="min-height"] {
    min-height: 0 !important;
}

/* Fallback: alte Snackys-Klasse, falls vorhanden */
#snackys-tpl .item_desc.custom_content,
#snackys-tpl .item_desc.custom_content * {
    color: var(--color-primary-100) !important;
    font-family: var(--font-family-base) !important;
}

#snackys-tpl .item_desc.custom_content {
    margin: var(--spacing-16) 0 0;
    line-height: var(--lh-paragraph) !important;
}

#snackys-tpl .item_desc.custom_content h2,
#snackys-tpl .item_desc.custom_content h3 {
    margin: 0 0 var(--spacing-3) !important;
    font-size: var(--font-size-h4) !important;
    font-weight: var(--font-weight-bold) !important;
    line-height: var(--lh-heading) !important;
}

#snackys-tpl .item_desc.custom_content h3 {
    margin-top: var(--spacing-8) !important;
}

#snackys-tpl .item_desc.custom_content p,
#snackys-tpl .item_desc.custom_content li {
    margin: 0 !important;
    font-size: var(--font-size-normal) !important;
    font-weight: var(--font-weight-regular) !important;
    line-height: var(--lh-paragraph) !important;
}

#snackys-tpl .item_desc.custom_content p + p {
    margin-top: var(--spacing-4) !important;
}

#snackys-tpl .item_desc.custom_content a,
#snackys-tpl .item_desc.custom_content a:visited,
#snackys-tpl .item_desc.custom_content a:hover,
#snackys-tpl .item_desc.custom_content a:focus,
#snackys-tpl .item_desc.custom_content a:active {
    color: inherit !important;
    text-decoration: underline !important;
    text-underline-offset: 2px;
}

@media (max-width: 767px) {
    #snackys-tpl .to-seo-text,
    #snackys-tpl .item_desc.custom_content {
        margin: var(--spacing-16) 0 0;
    }

    #snackys-tpl .to-seo-text h2,
    #snackys-tpl .to-seo-text h3,
    #snackys-tpl .item_desc.custom_content h2,
    #snackys-tpl .item_desc.custom_content h3 {
        font-size: var(--font-size-h5) !important;
    }
}
