/* ==========================================================================
   Текстовый блок сайта — одно правило для описания товара и текста внизу каталога и категорий (15.10.2026).
   Разметка: описание товара — template-parts/product/product-description.php (.nt-description-content,
   .nt-read-more-link-wrapper, .nt-collapse-top-wrapper); текст каталога — template-parts/catalog/seo-text.php
   (.seo-text, .seo-read-more-wrapper, .seo-collapse-top).

   Эталон — описание товара (владелец 15.10.2026: «вот же текстовый блок как выглядит у нас», «а фейд у текста? цвет
   и толщина линии? шрифт кнопки „читать полностью“? отступы от линии?»). До этого у блоков были две копии правил
   (инлайн в product-description.php и catalog-v2.css), и они разошлись: в каталоге растушёвка поверх последних строк,
   линия без отступа сверху, у кнопки другие поля, текст тёмно-синий. Теперь правила только здесь, в обоих местах их нет.
   Грузится на всех страницах (inc/assets/enqueue.php), как форма заявки. !important — щит от кита Elementor (красит p
   и заголовки тёмно-синим) и от старого правила style.css «[class*=product] a { display:block }».
   ========================================================================== */

.nt-description-content,
.seo-text {
    font-size: 16px;
    line-height: 1.8;
    color: #16181D;
    position: relative;
}

.nt-description-content p,
.seo-text p {
    margin: 0 0 16px;
    font-size: inherit !important;
    font-weight: 400 !important;
    line-height: inherit !important;
    color: #16181D !important; /* кит красит p в тёмно-синий напрямую — наследование не работает */
}

.nt-description-content li,
.seo-text li {
    font-size: inherit !important;
    font-weight: 400 !important;
    line-height: inherit !important;
    color: #16181D !important;
}

/* Подзаголовки: липнут к своему абзацу (низ 10px), отбиты от предыдущего (верх 48px) */
.nt-description-content h2,
.nt-description-content h3,
.seo-text h2,
.seo-text h3 {
    color: #000 !important;
    font-weight: 800 !important;
    margin-top: 48px;
    margin-bottom: 10px;
    padding: 0;
    background: none;
    border: 0;
    border-radius: 0;
    position: relative;
}

/* h2 — синий квадрат 10px слева. Текст без h2 (текст /catalog/ размечен h3) — его h3 выглядят как h2 */
.nt-description-content h2,
.seo-text h2,
.nt-description-content:not(:has(h2)) h3,
.seo-text:not(:has(h2)) h3 {
    font-size: 22px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding-left: 0;
}

.nt-description-content h2::before,
.seo-text h2::before,
.nt-description-content:not(:has(h2)) h3::before,
.seo-text:not(:has(h2)) h3::before {
    content: "";
    position: static;
    width: 10px;
    height: 10px;
    background: #2C3DF5;
    flex-shrink: 0;
}

/* h3 под h2 — чёрная точка слева */
.nt-description-content:has(h2) h3,
.seo-text:has(h2) h3 {
    font-size: 19px;
    padding-left: 32px;
}

.nt-description-content:has(h2) h3::before,
.seo-text:has(h2) h3::before {
    content: "•";
    position: absolute;
    left: 8px;
    width: auto;
    height: auto;
    background: none;
    color: #000;
    font-weight: 700;
    font-size: 18px;
}

.nt-description-content ul,
.nt-description-content ol,
.seo-text ul,
.seo-text ol {
    margin: 16px 0;
    padding-left: 30px;
}

/* Выделение — смена голоса шрифта (Unbounded), без плашек */
.nt-description-content strong,
.seo-text strong {
    font-family: 'Unbounded', 'Montserrat', sans-serif !important;
    font-weight: 500 !important;
    font-size: 0.92em;
    color: #000 !important;
    background: none !important;
    padding: 0 !important;
    border-radius: 0 !important;
}

/* Ссылки в тексте — строчные (старое «[class*=product] a { display:block }» ставило их отдельной строкой: «среди /
   диодных лазеров для эпиляции / : работает…»), тёмно-синие, при наведении синие с подчёркиванием */
.nt-description-content a,
.seo-text a {
    display: inline !important;
    position: static !important;
    color: var(--nt-navy) !important;
    font-weight: inherit !important;
    text-decoration: none !important;
    border: 0 !important;
}

.nt-description-content a:hover,
.seo-text a:hover {
    color: var(--nt-blue) !important;
    text-decoration: underline !important;
    text-underline-offset: 2px;
}

/* Цитата/врезка — тихая рамка, щит от глобальной голубой коробки с кавычкой */
.nt-description-content blockquote,
.seo-text blockquote {
    background: #fff !important;
    border: 2px solid #000 !important;
    padding: 18px 22px !important;
    margin: 24px 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    font-style: normal;
}

.nt-description-content blockquote::before,
.nt-description-content blockquote::after,
.seo-text blockquote::before,
.seo-text blockquote::after {
    content: none !important;
    display: none !important;
}

/* Делитель — тонкая линия системы */
.nt-description-content hr,
.seo-text hr {
    border: none;
    height: 1px;
    background: #000;
    margin: 40px 0;
}

/* Свёрнутый текст — без растушёвки: обрезка по целому абзацу, ниже линия и «Читать полностью» */
.seo-text.collapsed #seoVisible::after { content: none !important; display: none !important; }

/* «Читать полностью» — линия 1px во всю ширину, отступ 32px от текста, под ней Unbounded по центру.
   Селекторы с обёрткой секции (.nt-product-description …): у карточки товара product-page.css грузится позже и
   ставит `.nt-product-card * { margin:0; padding:0; font-family: Montserrat !important }` — одноклассовое правило
   его не перебивает (пока правила жили инлайном в шаблоне, их выручал порядок в странице). */
.nt-product-description .nt-read-more-link-wrapper,
.seo-section .seo-read-more-wrapper {
    margin-top: 32px;
    padding-top: 6px;
    border-top: 1px solid #000;
    text-align: center;
}

.nt-product-description .nt-read-more-link,
.seo-section .seo-read-more-link,
.nt-product-description .nt-collapse-top-link,
.seo-section .seo-collapse-top a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: 'Unbounded', 'Montserrat', sans-serif !important;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.6;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #000 !important;
    text-decoration: none !important;
    border-bottom: none !important;
    transition: color 0.2s;
    padding: 8px 0;
}

.nt-product-description .nt-read-more-link:hover,
.seo-section .seo-read-more-link:hover,
.nt-product-description .nt-collapse-top-link:hover,
.seo-section .seo-collapse-top a:hover {
    color: #2C3DF5 !important;
}

.nt-link-icon,
.seo-link-icon,
.nt-collapse-icon,
.seo-collapse-top a span {
    display: none;
}

.seo-link-text-more,
.seo-link-text-less {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* «Свернуть описание» вверху — та же линия снизу */
.nt-product-description .nt-collapse-top-wrapper,
.seo-section .seo-collapse-top {
    margin-bottom: 28px;
    padding-bottom: 22px;
    border-bottom: 1px solid #000;
    background: none;
    border-radius: 0;
    text-align: center;
    animation: ntTextBlockDown 0.3s ease-out;
}

@keyframes ntTextBlockDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
    .nt-description-content,
    .seo-text {
        font-size: 15px;
    }

    .nt-description-content h2,
    .seo-text h2,
    .nt-description-content:not(:has(h2)) h3,
    .seo-text:not(:has(h2)) h3 {
        font-size: 19px;
    }

    .nt-description-content:has(h2) h3,
    .seo-text:has(h2) h3 {
        font-size: 17px;
    }

    .nt-product-description .nt-collapse-top-wrapper,
    .seo-section .seo-collapse-top {
        margin-bottom: 20px;
        padding-bottom: 18px;
    }
}
