/* =========================================================================
 * ANKORR — проектные стили.
 * Версия файла задаётся в wp_enqueue_style() в functions.php темы.
 * Правишь файл — поднимай версию, иначе у клиента останется старый из кеша.
 * ========================================================================= */

/* -------------------------------------------------------------------------
 * 1. Размеры заголовков в текстовых блоках.
 *
 * Тема задаёт h1 120px / h2 80px / h3 64px / h4 48px / h5 40px / h6 32px —
 * это размеры под Elementor-баннеры. В обычном тексте (описание каталога,
 * описание категории, вкладки товара, статьи) такие заголовки нечитаемы.
 * Правила работают только внутри контентных блоков; заголовок Elementor
 * (.elementor-heading-title) исключён — там размер задан в самом виджете.
 * ---------------------------------------------------------------------- */

/* Контентные блоки: описание архива, страница, запись, вкладки и краткое описание товара */
:is(.ankorr-archive-description, .pxl-entry-content, .pxl-item--content, .woocommerce-Tabs-panel, .woocommerce-product-details__short-description) :is(h1, h2, h3, h4, h5, h6):not(.elementor-heading-title) {
    line-height: 1.25;
    margin: 1.5em 0 0.6em;
}

:is(.ankorr-archive-description, .pxl-entry-content, .pxl-item--content, .woocommerce-Tabs-panel, .woocommerce-product-details__short-description) > :is(h1, h2, h3, h4, h5, h6):first-child {
    margin-top: 0;
}

:is(.ankorr-archive-description, .pxl-entry-content, .pxl-item--content, .woocommerce-Tabs-panel, .woocommerce-product-details__short-description) h1:not(.elementor-heading-title) { font-size: 38px; }
:is(.ankorr-archive-description, .pxl-entry-content, .pxl-item--content, .woocommerce-Tabs-panel, .woocommerce-product-details__short-description) h2:not(.elementor-heading-title) { font-size: 30px; }
:is(.ankorr-archive-description, .pxl-entry-content, .pxl-item--content, .woocommerce-Tabs-panel, .woocommerce-product-details__short-description) h3:not(.elementor-heading-title) { font-size: 24px; }
:is(.ankorr-archive-description, .pxl-entry-content, .pxl-item--content, .woocommerce-Tabs-panel, .woocommerce-product-details__short-description) h4:not(.elementor-heading-title) { font-size: 20px; }
:is(.ankorr-archive-description, .pxl-entry-content, .pxl-item--content, .woocommerce-Tabs-panel, .woocommerce-product-details__short-description) h5:not(.elementor-heading-title) { font-size: 18px; }
:is(.ankorr-archive-description, .pxl-entry-content, .pxl-item--content, .woocommerce-Tabs-panel, .woocommerce-product-details__short-description) h6:not(.elementor-heading-title) { font-size: 16px; }

@media (max-width: 767px) {
    :is(.ankorr-archive-description, .pxl-entry-content, .pxl-item--content, .woocommerce-Tabs-panel, .woocommerce-product-details__short-description) h1:not(.elementor-heading-title) { font-size: 29px; }
    :is(.ankorr-archive-description, .pxl-entry-content, .pxl-item--content, .woocommerce-Tabs-panel, .woocommerce-product-details__short-description) h2:not(.elementor-heading-title) { font-size: 25px; }
    :is(.ankorr-archive-description, .pxl-entry-content, .pxl-item--content, .woocommerce-Tabs-panel, .woocommerce-product-details__short-description) h3:not(.elementor-heading-title) { font-size: 21px; }
    :is(.ankorr-archive-description, .pxl-entry-content, .pxl-item--content, .woocommerce-Tabs-panel, .woocommerce-product-details__short-description) h4:not(.elementor-heading-title) { font-size: 19px; }
}

/* -------------------------------------------------------------------------
 * 2. Описание каталога и категории под сеткой товаров.
 * ---------------------------------------------------------------------- */

.ankorr-archive-description {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid #e6e6e6;
}

.ankorr-archive-description > *:last-child {
    margin-bottom: 0;
}

@media (max-width: 767px) {
    .ankorr-archive-description {
        margin-top: 40px;
        padding-top: 30px;
    }
}

/* -------------------------------------------------------------------------
 * 3. Ссылки внутри текстов должны быть заметны. Кнопки не трогаем.
 * ---------------------------------------------------------------------- */

:is(.ankorr-archive-description, .woocommerce-Tabs-panel, .woocommerce-product-details__short-description) a:not(.button):not(.btn):not([class*="elementor-button"]) {
    color: var(--primary-color);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.18em;
}

:is(.ankorr-archive-description, .woocommerce-Tabs-panel, .woocommerce-product-details__short-description) a:not(.button):not(.btn):not([class*="elementor-button"]):hover {
    color: var(--secondary-color);
}
