/*
Theme Name: dds_marystailorshop.com
Author: Мария Соколова
Description: Информационная тема об индивидуальном пошиве, переделке одежды и осознанном гардеробе.
Version: 1.1
Text Domain: mts
*/

/* ===== Переменные ===== */
:root {
    --wine: #6f2b3d;
    --wine-dark: #532031;
    --brass: #c79a4b;
    --brass-soft: #e3c98a;
    --cream: #faf5ee;
    --cream-2: #f1e7d8;
    --ink: #2c2521;
    --ink-soft: #5a4f47;
    --line: #e0d3c1;
    --paper: #ffffff;
}

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

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: "Georgia", "Times New Roman", serif;
    color: var(--ink);
    background: var(--cream);
    line-height: 1.7;
    font-size: 18px;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: "Georgia", "Times New Roman", serif;
    line-height: 1.25;
    color: var(--wine);
    margin: 0 0 0.6em;
}

h1 { font-size: 2.1rem; }
h2 { font-size: 1.7rem; }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1.1em; }

a { color: var(--wine); text-decoration: none; }
a:hover { color: var(--brass); text-decoration: underline; }

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

.shell {
    width: min(92%, 1180px);
    margin-inline: auto;
}

/* ===== Шапка ===== */
.site-header {
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 22px 0;
}
.header-inner {
    display: flex;
    align-items: center;
    gap: 22px;
    flex-wrap: wrap;
}
.brand-link { display: flex; align-items: center; gap: 16px; min-width: 0; text-decoration: none; }
.brand-logo, .brand-logo-svg { flex: 0 0 auto; width: 64px; height: 64px; display: block; }
.brand-text { min-width: 0; }
.brand-title {
    font-size: 1.05rem;
    font-weight: bold;
    color: var(--wine);
    margin: 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.brand-desc {
    font-size: 0.82rem;
    color: var(--ink-soft);
    margin: 4px 0 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ===== Навигация ===== */
.main-nav { margin-top: 16px; }
.nav-toggle {
    display: none;
    background: var(--wine);
    color: #fff;
    border: 0;
    padding: 10px 16px;
    border-radius: 6px;
    font: inherit;
    cursor: pointer;
}
.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 26px;
}
.main-nav li { margin: 0; }
.main-nav a {
    display: inline-block;
    padding: 6px 2px;
    font-size: 1rem;
    color: var(--ink);
    border-bottom: 2px solid transparent;
}
.main-nav a:hover,
.main-nav .current-menu-item > a {
    color: var(--wine);
    border-bottom-color: var(--brass);
    text-decoration: none;
}

/* ===== Хлебные крошки ===== */
.breadcrumbs {
    font-size: 0.86rem;
    color: var(--ink-soft);
    padding: 18px 0 0;
}
.breadcrumbs a { color: var(--ink-soft); }
.breadcrumbs a:hover { color: var(--wine); }
.breadcrumbs .sep { color: var(--brass); margin: 0 4px; }

/* ===== Макеты контента ===== */
.site-main { padding: 28px 0 56px; }

.layout-with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 67fr) minmax(0, 27fr);
    gap: 6%;
    align-items: start;
}
.layout-single .content-area,
.layout-wide .content-area { width: 100%; }
.layout-wide { width: 85%; margin-inline: auto; }

.content-area { min-width: 0; }

/* ===== Сайдбар ===== */
.sidebar {
    min-width: 0;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 22px;
}
.sidebar .widget { margin-bottom: 26px; }
.sidebar .widget:last-child { margin-bottom: 0; }
.sidebar .widget-title {
    font-size: 1.1rem;
    color: var(--wine);
    margin: 0 0 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--brass-soft);
}
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar li { margin: 0 0 10px; padding-bottom: 10px; border-bottom: 1px dashed var(--line); }
.sidebar li:last-child { border-bottom: 0; }
.sidebar a { color: var(--ink); }
.sidebar a:hover { color: var(--wine); }
.sidebar .post-date { display: block; font-size: 0.78rem; color: var(--ink-soft); }

/* ===== Карточки записей ===== */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 26px;
}
.card {
    display: flex;
    flex-direction: column;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
    transition: box-shadow .2s ease, transform .2s ease;
}
.card:hover { box-shadow: 0 10px 28px rgba(111,43,61,.12); transform: translateY(-3px); }
.card-thumb { display: block; }
.card-thumb img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}
.card-thumb-placeholder {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    background: linear-gradient(135deg, var(--cream-2), var(--brass-soft));
}
.card-thumb-placeholder svg { width: 100%; height: 100%; display: block; }
.card-body { flex: 1; display: flex; flex-direction: column; padding: 20px; }
.card-title { font-size: 1.22rem; margin: 0 0 10px; }
.card-title a { color: var(--wine); }
.card-meta { font-size: 0.8rem; color: var(--ink-soft); margin: 0 0 12px; }
.card-excerpt { color: var(--ink-soft); margin: 0 0 16px; flex: 1; }
.card-excerpt p { margin: 0 0 0.5em; background: none; }
.card-more {
    align-self: flex-start;
    margin-top: auto;
    font-weight: bold;
    color: var(--wine);
    border-bottom: 2px solid var(--brass);
}
.card-more:hover { text-decoration: none; color: var(--brass); }

/* ===== Запись / страница ===== */
.entry {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 34px;
}
.entry-title { margin-top: 0; }
.entry-meta { font-size: 0.85rem; color: var(--ink-soft); margin-bottom: 20px; }
.entry-thumb { margin: 0 0 24px; border-radius: 10px; overflow: hidden; }
.entry-thumb img { display: block; width: 100%; height: auto; }
.entry-content img { border-radius: 8px; }
.entry-content h2, .entry-content h3 { margin-top: 1.4em; }
.entry-content ul, .entry-content ol { padding-left: 1.4em; }

/* ===== Таблицы ===== */
table { border-collapse: collapse; width: 100%; margin: 0 0 1.4em; }
table, th, td { border: 1px solid var(--line); }
th, td { padding: 10px 12px; text-align: left; }
th { background: var(--cream-2); color: var(--wine); }

/* ===== Главная: секции ===== */
.home-section { padding: 56px 0; }
.home-section:nth-child(even) { background: var(--cream-2); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 36px; }
.section-head p { color: var(--ink-soft); }

/* Текст + иллюстрация */
.feature-split {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 44px;
    align-items: center;
}
.feature-split.reverse .feature-media { order: 2; }
.feature-media img, .feature-media svg { width: 100%; height: auto; display: block; border-radius: 12px; }
.feature-text h2 { margin-top: 0; }

/* Сетка рубрик */
.topic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
}
.topic-card {
    min-width: 0;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 28px 24px;
    text-align: center;
}
.topic-card .topic-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px; height: 56px;
    margin: 0 auto 16px;
    color: var(--wine);
}
.topic-card .topic-icon svg { width: 100%; height: 100%; display: block; }
.topic-card h3 { margin: 0 0 10px; }
.topic-card p { margin: 0; color: var(--ink-soft); font-size: 0.95rem; }

/* Шаги */
.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 26px;
    counter-reset: step;
}
.step {
    min-width: 0;
    position: relative;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 30px 24px 24px;
}
.step::before {
    counter-increment: step;
    content: counter(step);
    position: absolute;
    top: -18px; left: 24px;
    width: 44px; height: 44px;
    display: flex; align-items: center; justify-content: center;
    background: var(--wine);
    color: #fff;
    font-weight: bold;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(111,43,61,.25);
}
.step h3 { margin: 8px 0 8px; }
.step p { margin: 0; color: var(--ink-soft); font-size: 0.95rem; }

/* FAQ */
.faq { max-width: 820px; margin: 0 auto; }
.faq details {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 0 20px;
    margin-bottom: 14px;
}
.faq summary {
    cursor: pointer;
    list-style: none;
    padding: 18px 0;
    font-weight: bold;
    color: var(--wine);
    display: flex;
    justify-content: space-between;
    gap: 14px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--brass); font-size: 1.4rem; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details > p { margin: 0 0 18px; color: var(--ink-soft); }

/* Заголовок блока «последние записи» */
.latest-head { text-align: center; margin: 0 auto 36px; }
.section-cta { text-align: center; margin-top: 34px; }
.btn {
    display: inline-block;
    background: var(--wine);
    color: #fff;
    padding: 13px 30px;
    border-radius: 8px;
    font-weight: bold;
}
.btn:hover { background: var(--wine-dark); color: #fff; text-decoration: none; }

/* ===== Пагинация ===== */
.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin: 40px 0 0;
}
.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
    color: var(--ink);
    text-decoration: none;
}
.pagination a.page-numbers:hover { border-color: var(--brass); color: var(--wine); }
.pagination .page-numbers.current {
    background: var(--wine);
    border-color: var(--wine);
    color: #fff;
}
.pagination .page-numbers.dots { border: 0; background: none; }

/* ===== Форма поиска ===== */
.search-form { display: flex; gap: 8px; }
.search-form .search-field {
    flex: 1;
    min-width: 0;
    padding: 11px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    font: inherit;
}
.search-form .search-submit {
    padding: 11px 20px;
    border: 0;
    border-radius: 8px;
    background: var(--wine);
    color: #fff;
    font: inherit;
    cursor: pointer;
}
.search-form .search-submit:hover { background: var(--wine-dark); }

/* ===== Комментарии ===== */
.comments-area { margin-top: 40px; }
.comment-list { list-style: none; margin: 0; padding: 0; }
.comment-list li { margin: 0 0 22px; }
.comment-body {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 18px 20px;
}
.comment-meta { font-size: 0.82rem; color: var(--ink-soft); margin-bottom: 8px; }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    font: inherit;
    margin-top: 4px;
}
.comment-form .form-submit input {
    background: var(--wine);
    color: #fff;
    border: 0;
    padding: 12px 26px;
    border-radius: 8px;
    cursor: pointer;
    font: inherit;
}

/* ===== 404 ===== */
.notfound { text-align: center; padding: 30px 0; }
.notfound .err-code { font-size: 5rem; color: var(--brass); margin: 0; }
.notfound .search-form { max-width: 480px; margin: 24px auto 0; }

/* ===== Подвал ===== */
.site-footer {
    background: var(--wine-dark);
    color: #ecdfd2;
    padding: 50px 0 26px;
}
.footer-cols {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 36px;
}
.footer-col { min-width: 0; }
.site-footer .widget-title {
    color: #fff;
    font-size: 1.1rem;
    margin: 0 0 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255,255,255,.18);
}
.site-footer .widget { margin-bottom: 0; }
.site-footer p { color: #ecdfd2; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 0 0 9px; }
.site-footer a { color: var(--brass-soft); }
.site-footer a:hover { color: #fff; }
.footer-bottom {
    margin-top: 36px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,.18);
    font-size: 0.82rem;
    color: #cdb9a6;
    text-align: center;
}

/* ===== Cookie-баннер ===== */
.cookie-banner[hidden] { display: none !important; }
.cookie-banner {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 999;
    background: var(--ink);
    color: #f3ece3;
    padding: 16px 0;
}
.cookie-inner {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    justify-content: space-between;
}
.cookie-inner p { margin: 0; font-size: 0.9rem; flex: 1; min-width: 220px; }
.cookie-inner a { color: var(--brass-soft); }
.cookie-accept {
    background: var(--brass);
    color: var(--ink);
    border: 0;
    padding: 11px 26px;
    border-radius: 8px;
    font: inherit;
    font-weight: bold;
    cursor: pointer;
    white-space: nowrap;
}
.cookie-accept:hover { background: var(--brass-soft); }

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

@media (max-width: 600px) {
    body { font-size: 17px; }
    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.45rem; }
    .layout-wide { width: 100%; }
    .nav-toggle { display: inline-block; }
    .main-nav ul {
        display: none;
        flex-direction: column;
        gap: 0;
        margin-top: 12px;
    }
    .main-nav.is-open ul { display: flex; }
    .main-nav li { border-bottom: 1px solid var(--line); }
    .main-nav a { display: block; padding: 12px 0; }
    .footer-cols { grid-template-columns: 1fr; }
    .home-section { padding: 40px 0; }
}
