/* MES ARCHITECTURE: SYSTEM CORE 
   Версия: 1.0 (Refactored)
   Автор: Давид Саркисян
*/

:root {
    /* Цветовая палитра */
    --c-bg: #0e0e0e;
    --c-text: #cfcfcf;
    --c-white: #ffffff;
    --c-black: #111111;
    --c-accent: #DAAD38; /* Золото */
    --c-mes-orange: #ff9d00; /* Акцент системы */
    
    /* Типографика */
    --ff-heading: "DrukWideCyr", "Druk Wide Cyr", Impact, sans-serif;
    --ff-body: "Manrope", Inter, system-ui, sans-serif;
    
    /* Сетка и отступы */
    --grid-max-width: 1200px;
    --read-max-width: 760px;
}

/* ====== 1. ГЛОБАЛЬНЫЕ СБРОСЫ ====== */
body {
    background-color: var(--c-bg);
    color: var(--c-text);
    font-family: var(--ff-body);
    -webkit-font-smoothing: antialiased;
}

/* ====== 2. МОДУЛЬ: ПОТОКИ (READING MODE) ====== */
/* Этот блок принудительно перехватывает динамический рендер Тильды */

/* Фон всего контейнера и попапа */
.t-feed__post-popup,
.t-feed__post-popup__container,
.t-feed__post-popup__content,
.t-feed__post-popup__text-wrapper {
    background-color: var(--c-white) !important; /* Ставим белый для чтения */
}

/* РУБРИКА (надзаголовок) — фиксим «белое на белом» */
.t-feed__post-popup__category,
.js-feed-post-category {
    color: var(--c-mes-orange) !important;
    font-family: var(--ff-body) !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    font-size: 14px !important;
    letter-spacing: 1px !important;
    display: block !important;
    margin-bottom: 12px !important;
}

/* ГЛАВНЫЙ ЗАГОЛОВОК СТАТЬИ */
.t-feed__post-popup__title,
.js-feed-post-title {
    color: var(--c-black) !important;
    font-family: var(--ff-body) !important;
    font-weight: 800 !important;
    font-size: clamp(24px, 5vw, 36px) !important;
    line-height: 1.2 !important;
    margin-bottom: 24px !important;
}

/* ТЕКСТ СТАТЬИ */
.t-feed__post-popup__text,
.t-redactor__text,
.t-feed__post-popup__text-wrapper .t-text {
    color: var(--c-black) !important;
    font-family: var(--ff-body) !important;
    font-size: 18px !important;
    line-height: 1.7 !important;
    max-width: var(--read-max-width) !important;
    margin: 0 auto !important;
}

/* ЗАГОЛОВКИ ВНУТРИ ТЕКСТА (H1, H2, H3) */
.t-redactor__text h1, .t-redactor__text h2, .t-redactor__text h3,
.t-feed__post-popup__text-wrapper h1, 
.t-feed__post-popup__text-wrapper h2 {
    color: var(--c-black) !important;
    font-weight: 700 !important;
    margin-top: 32px !important;
    margin-bottom: 16px !important;
}

/* ЦИТАТЫ (Callouts) */
.t-redactor__callout {
    background: #f3f3f3 !important;
    border-left: 4px solid var(--c-mes-orange) !important;
    padding: 24px !important;
    color: var(--c-black) !important;
}

/* ====== 3. МОДУЛЬ: КОРЗИНА И ЧЕКАУТ ====== */
.t706__cartwin, 
.t706__cartwin label, 
.t706__cartwin .t-input-title,
.t706__cartwin .t706__product-title,
.t706__cartwin .t-radio__control {
    color: var(--c-black) !important;
}

.t706__cartwin input, .t706__cartwin textarea {
    background-color: var(--c-white) !important;
    color: var(--c-black) !important;
    border: 1px solid #ddd !important;
}

/* ====== 4. МОДУЛЬ: ФУТЕР (SYSTEMIZED) ====== */
footer.footer {
    background: var(--c-bg);
    color: var(--c-text);
    border-top: 1px solid rgba(255,255,255,.1);
}

.f-wrap {
    max-width: var(--grid-max-width);
    margin: 0 auto;
    padding: 48px 20px;
}

.f-grid {
    display: grid;
    grid-template-columns: 5fr 2.5fr 4fr 2.5fr;
    column-gap: 60px;
}

/* Теги и плашки в футере (Pills) */
.f-col.brand .tag {
    position: relative;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,.18);
    background: rgba(255,255,255,.03);
    color: var(--c-text);
    overflow: hidden;
    display: inline-flex;
    align-items: center;
}

.f-col.brand .tag::before {
    content: "";
    position: absolute;
    inset: -20%;
    background: radial-gradient(circle, var(--pill-glow, rgba(218,173,56,0.2)) 0%, transparent 70%);
    filter: blur(8px);
    z-index: -1;
}

/* ====== 5. АДАПТИВНОСТЬ (MOBILE PATCH) ====== */
@media (max-width: 960px) {
    .f-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
}

@media (max-width: 640px) {
    .f-grid { grid-template-columns: 1fr; }
    .t-feed__post-popup__text { font-size: 16px !important; }
}