/*
Theme Name: dds_taliabeautysupply.com
Author: Талия Ковалева
Description: Информационно-аналитический блог и нишевое медиа о технологиях в бьюти- и фэшн-индустрии. Спокойная, технологичная эстетика с акцентом на читаемость и структуру.
Version: 1.1
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: tbs
*/

/* ===================================================================
   Токены
=================================================================== */
:root {
    --bg: #F7F7F9;
    --surface: #FFFFFF;
    --plum: #3C2A3E;
    --plum-deep: #2A1D2C;
    --steel: #3F7E8C;
    --steel-dark: #336774;
    --text: #2A2430;
    --muted: #6B6473;
    --border: #E6E3EA;
    --line-soft: #EFEDF2;
    --shadow: 0 1px 2px rgba(60, 42, 62, .05), 0 8px 24px rgba(60, 42, 62, .06);
    --shadow-soft: 0 1px 2px rgba(60, 42, 62, .05);
    --radius: 12px;
    --radius-lg: 18px;
}

/* ===================================================================
   База
=================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: 17px;
    line-height: 1.65;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
    font-family: "Playfair Display", Georgia, "Times New Roman", serif;
    color: var(--plum);
    line-height: 1.2;
    margin: 0 0 .6em;
    font-weight: 700;
}

h1 { font-size: clamp(1.9rem, 1.3rem + 2.4vw, 3rem); }
h2 { font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.1rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1.1em; }

a { color: var(--steel-dark); text-decoration: none; }
a:hover { color: var(--plum); text-decoration: underline; }

img { max-width: 100%; height: auto; }

ul, ol { padding-left: 1.3em; }

blockquote {
    margin: 1.4em 0;
    padding: .6em 1.2em;
    border-left: 4px solid var(--steel);
    background: var(--surface);
    border-radius: 0 var(--radius) var(--radius) 0;
    color: var(--muted);
    font-style: italic;
}

code, pre {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    background: #F0EEF3;
    border-radius: 6px;
}
code { padding: .12em .4em; font-size: .92em; }
pre { padding: 1em 1.2em; overflow-x: auto; min-width: 0; }

/* Таблицы — видимые границы */
table { border-collapse: collapse; width: 100%; margin: 1.4em 0; }
table, th, td { border: 1px solid var(--border); }
th, td { padding: .6em .8em; text-align: left; }
th { background: #F1EEF4; color: var(--plum); }

/* ===================================================================
   Контейнеры ширины (заданы в одном месте, без width:100%+max-width+auto)
=================================================================== */
.shell { width: min(92%, 1180px); margin-inline: auto; }
.shell--narrow { width: min(85%, 1040px); margin-inline: auto; }

/* ===================================================================
   Шапка
=================================================================== */
.site-header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-soft);
}
.header-inner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.1rem 0;
    flex-wrap: wrap;
}
.brand {
    display: flex;
    align-items: center;
    gap: .85rem;
    min-width: 0;
    text-decoration: none;
}
.brand:hover { text-decoration: none; }
.brand-logo { display: block; height: 52px; width: auto; }
.brand-text { min-width: 0; }
.brand-name {
    font-family: "Playfair Display", Georgia, serif;
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--plum);
    line-height: 1.25;
    display: block;
}
.brand-desc {
    font-size: .82rem;
    color: var(--muted);
    line-height: 1.4;
    display: block;
    margin-top: .15rem;
}

.nav-toggle {
    display: none;
    margin-left: auto;
    background: none;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: .5rem .7rem;
    cursor: pointer;
    color: var(--plum);
    font-size: 1.1rem;
    line-height: 1;
}

.main-nav { margin-left: auto; min-width: 0; }
.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 1.4rem;
    flex-wrap: wrap;
}
.main-nav a {
    color: var(--plum);
    font-weight: 500;
    font-size: .98rem;
    padding: .25rem 0;
    border-bottom: 2px solid transparent;
    text-decoration: none;
}
.main-nav a:hover,
.main-nav .current-menu-item > a {
    color: var(--steel-dark);
    border-bottom-color: var(--steel);
}

/* ===================================================================
   Каркас страницы
=================================================================== */
.site-main { padding: 2.4rem 0 3rem; }

.layout-with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 67fr) minmax(0, 27fr);
    gap: 2.2rem;
    align-items: start;
}
.layout-single { display: block; }
.content-area { min-width: 0; }

/* Реколонка single → 85% уже задаётся .shell--narrow на главном контейнере */

/* ===================================================================
   Хлебные крошки
=================================================================== */
.breadcrumbs {
    font-size: .86rem;
    color: var(--muted);
    margin: 0 0 1.6rem;
    word-break: break-word;
}
.breadcrumbs a { color: var(--steel-dark); }
.breadcrumbs .sep { color: var(--border); margin: 0 .15rem; }

/* ===================================================================
   Кнопки
=================================================================== */
.btn {
    display: inline-block;
    border: none;
    border-radius: var(--radius);
    padding: .6rem 1.2rem;
    font: inherit;
    font-weight: 600;
    font-size: .95rem;
    cursor: pointer;
    text-decoration: none;
    transition: transform .15s ease, filter .15s ease, background .15s ease;
}
.btn-primary {
    color: #fff;
    background: linear-gradient(135deg, var(--plum) 0%, #594a5d 100%);
}
.btn-primary:hover {
    color: #fff;
    transform: translateY(1px);
    filter: brightness(.94);
    text-decoration: none;
}
.btn-secondary {
    color: var(--steel-dark);
    background: transparent;
    border: 1px solid var(--steel);
}
.btn-secondary:hover {
    background: rgba(63, 126, 140, .1);
    color: var(--plum);
    text-decoration: none;
}

/* ===================================================================
   Карточки записей (A8, A10 — вертикальный паттерн)
=================================================================== */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr));
    gap: 1.6rem;
}

.card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    min-width: 0;
}
.card-thumb { display: block; }
.card-thumb img,
.card-thumb svg {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
}
.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1.1rem 1.25rem 1.3rem;
    min-width: 0;
}
.card-cat {
    font-size: .74rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--steel-dark);
    font-weight: 600;
    margin-bottom: .4rem;
}
.card-title { font-size: 1.18rem; margin: 0 0 .5rem; }
.card-title a { color: var(--plum); text-decoration: none; }
.card-title a:hover { color: var(--steel-dark); }
.card-excerpt { color: var(--muted); font-size: .95rem; }
.card-excerpt p { margin: 0 0 .5em; background: none; }
.card-meta {
    font-size: .82rem;
    color: var(--muted);
    margin: .2rem 0 .9rem;
}
.card-foot { margin-top: auto; }

/* ===================================================================
   Записи и страницы
=================================================================== */
.entry {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 1.8rem;
    margin-bottom: 2rem;
    min-width: 0;
}
.entry-title { margin-top: 0; }
.entry-meta {
    font-size: .85rem;
    color: var(--muted);
    margin-bottom: 1.2rem;
}
.entry-thumb {
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 1.4rem;
}
.entry-thumb img { width: 100%; display: block; }
.entry-content > * { min-width: 0; }
.entry-content img { border-radius: var(--radius); }

.entry-tags {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--line-soft);
    font-size: .88rem;
}
.entry-tags a {
    display: inline-block;
    background: #F1EEF4;
    border-radius: 8px;
    padding: .2rem .6rem;
    margin: 0 .3rem .3rem 0;
    color: var(--steel-dark);
    text-decoration: none;
}

.list-title { margin-bottom: 1.4rem; }

/* ===================================================================
   Сайдбар (светлый фон → тёмный текст)
=================================================================== */
.sidebar { min-width: 0; }
.sidebar .widget {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    padding: 1.3rem 1.4rem;
    margin-bottom: 1.6rem;
    color: var(--text);
}
.sidebar .widget-title {
    color: var(--plum);
    font-size: 1.1rem;
    margin: 0 0 .9rem;
    padding-bottom: .5rem;
    border-bottom: 2px solid var(--steel);
}
.sidebar .widget ul { list-style: none; margin: 0; padding: 0; }
.sidebar .widget li {
    padding: .45rem 0;
    border-bottom: 1px solid var(--line-soft);
    color: var(--text);
}
.sidebar .widget li:last-child { border-bottom: none; }
.sidebar .widget a { color: var(--steel-dark); text-decoration: none; }
.sidebar .widget a:hover { color: var(--plum); text-decoration: underline; }
.sidebar .post-date { display: block; color: var(--muted); font-size: .8rem; }

/* ===================================================================
   Подвал (тёмный фон → светлый текст)
=================================================================== */
.site-footer {
    background: var(--plum-deep);
    color: #D8D1E0;
    padding: 2.8rem 0 1.4rem;
    margin-top: 2rem;
}
.footer-cols {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem;
}
.site-footer .widget { color: #CFC8D8; margin-bottom: 1rem; }
.site-footer .widget-title {
    color: #FFFFFF;
    font-size: 1.05rem;
    margin: 0 0 .9rem;
    padding-bottom: .5rem;
    border-bottom: 2px solid var(--steel);
}
.site-footer .widget ul { list-style: none; margin: 0; padding: 0; }
.site-footer .widget li { padding: .35rem 0; }
.site-footer a { color: #9FD0DA; text-decoration: none; }
.site-footer a:hover { color: #FFFFFF; text-decoration: underline; }

.footer-bottom {
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, .12);
    margin-top: 2rem;
    padding-top: 1.2rem;
    font-size: .85rem;
    color: #A89FB4;
}

/* ===================================================================
   Главная (лонгрид-журнал)
=================================================================== */
.front-section { margin-bottom: 3.2rem; }

.hero {
    background: linear-gradient(135deg, var(--plum) 0%, var(--plum-deep) 60%, #34526b 130%);
    color: #F4F0F7;
    border-radius: var(--radius-lg);
    padding: clamp(2rem, 1rem + 5vw, 4rem);
    box-shadow: var(--shadow);
}
.hero h1 { color: #FFFFFF; margin-top: 0; }
.hero p { color: #E4DEEC; font-size: 1.05rem; max-width: 56ch; }
.hero .btn-secondary { color: #CFEAF0; border-color: #6FAEBB; }
.hero .btn-secondary:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.hero-actions { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 1.4rem; }

.section-head { margin-bottom: 1.5rem; }
.section-head .eyebrow {
    color: var(--steel-dark);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .07em;
    font-size: .78rem;
    display: block;
    margin-bottom: .4rem;
}

/* Направления */
.topic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
    gap: 1.4rem;
}
.topic-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    padding: 1.4rem 1.5rem;
    min-width: 0;
}
.topic-card h3 { margin-top: 0; font-family: "Inter", sans-serif; font-size: 1.08rem; color: var(--plum); }
.topic-card p { margin: 0; color: var(--muted); font-size: .94rem; }

/* База знаний (FAQ-подобные карточки, без чисел/рейтингов) */
.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
    gap: 1.4rem;
}
.faq-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 4px solid var(--steel);
    border-radius: var(--radius);
    padding: 1.3rem 1.5rem;
    box-shadow: var(--shadow-soft);
    min-width: 0;
}
.faq-card h3 { font-family: "Inter", sans-serif; font-size: 1.05rem; margin: 0 0 .5rem; color: var(--plum); }
.faq-card p { margin: 0; color: var(--muted); font-size: .94rem; }

/* Аналитика и методологии / контакты */
.note-block {
    background: var(--surface);
    border: 1px dashed var(--border);
    border-radius: var(--radius-lg);
    padding: 1.8rem 2rem;
    min-width: 0;
}
.note-block h2 { margin-top: 0; }
.contact-line { font-size: 1.05rem; }
.social-links { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: .8rem; }
.social-links a { font-weight: 600; }

/* ===================================================================
   Комментарии
=================================================================== */
.comments-area {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    padding: 1.6rem 1.8rem;
    margin-top: 1.5rem;
}
.comment-list { list-style: none; margin: 0; padding: 0; }
.comment-list .children { list-style: none; margin: 0 0 0 1.4rem; padding: 0; }
.comment-item { margin: 0 0 1.2rem; }
.comment-inner {
    background: var(--bg);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    padding: 1rem 1.2rem;
}
.comment-head { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: .4rem; flex-wrap: wrap; }
.comment-author { font-weight: 600; color: var(--plum); }
.comment-date { font-size: .8rem; color: var(--muted); }
.comment-moderation { font-size: .82rem; color: var(--steel-dark); }
.comment-respond {
    margin-top: 1.5rem;
    border-top: 1px solid var(--line-soft);
    padding-top: 1.2rem;
}
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: .6rem .8rem;
    font: inherit;
    background: var(--bg);
    margin-bottom: .8rem;
}
.comment-form textarea { min-height: 120px; resize: vertical; }

/* ===================================================================
   Поиск
=================================================================== */
.search-form { display: flex; gap: .5rem; max-width: 480px; }
.search-form .search-field {
    flex: 1;
    min-width: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: .55rem .8rem;
    font: inherit;
    background: var(--surface);
}
.search-submit {
    border: none;
    border-radius: var(--radius);
    padding: .55rem 1.1rem;
    background: linear-gradient(135deg, var(--plum) 0%, #594a5d 100%);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
}

/* ===================================================================
   Пагинация
=================================================================== */
.pagination { margin: 2rem 0 0; }
.pagination .page-numbers {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: .4rem;
    flex-wrap: wrap;
    justify-content: center;
}
.pagination .page-numbers li a,
.pagination .page-numbers li span {
    display: inline-block;
    padding: .45rem .8rem;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--steel-dark);
    text-decoration: none;
    font-weight: 600;
    min-width: 2.4rem;
    text-align: center;
}
.pagination .page-numbers li .current {
    background: var(--plum);
    border-color: var(--plum);
    color: #fff;
}
.pagination .page-numbers li a:hover {
    background: rgba(63, 126, 140, .12);
    color: var(--plum);
}

/* ===================================================================
   404
=================================================================== */
.error-404 { text-align: center; padding: 2rem 0; }
.error-404 .big { font-size: clamp(3rem, 2rem + 6vw, 6rem); color: var(--steel); margin: 0; }
.error-404 .search-form { margin: 1.5rem auto; }

/* ===================================================================
   Cookie-баннер (A11 — правило [hidden] ДО основного блока)
=================================================================== */
.cookie-banner[hidden] { display: none !important; }
.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999;
    background: var(--plum-deep);
    color: #E9E4EE;
    padding: 1rem 1.2rem;
    box-shadow: 0 -4px 18px rgba(0, 0, 0, .25);
    display: flex;
    align-items: center;
    gap: 1.2rem;
    flex-wrap: wrap;
    justify-content: center;
}
.cookie-banner p { margin: 0; font-size: .9rem; max-width: 60ch; }
.cookie-banner a { color: #9FD0DA; }
.cookie-banner .btn-primary {
    background: linear-gradient(135deg, var(--steel) 0%, var(--steel-dark) 100%);
}

/* ===================================================================
   Адаптив
=================================================================== */
@media (max-width: 960px) {
    .layout-with-sidebar { grid-template-columns: minmax(0, 1fr); }
    .footer-cols { grid-template-columns: minmax(0, 1fr); gap: 1.4rem; }
}

@media (max-width: 600px) {
    body { font-size: 16px; }

    .nav-toggle { display: inline-block; }
    .main-nav {
        flex-basis: 100%;
        margin-left: 0;
        display: none;
    }
    .main-nav.is-open { display: block; }
    .main-nav ul { flex-direction: column; gap: .2rem; }
    .main-nav li { border-bottom: 1px solid var(--line-soft); }

    .entry { padding: 1.3rem; }
    .hero { padding: 1.6rem; }
}
