/*
Theme Name: Купите Сталинку
Description: Фирменная тема портала «Всё о сталинках» по брендбуку: ар-деко, песочный и тёмно-синий, мотив пятигранника со звездой.
Author: Купите Сталинку
Version: 1.0.0
Requires PHP: 7.4
Text Domain: kupitestalinku
*/

:root {
  --c-sand: #CA9E67;
  --c-umbra: #67461D;
  --c-antique: #EDE6E0;
  --c-dark: #151C22;
  --c-paper: #F7F2EC;
  --c-line: #E3D9CD;
  --c-text: #2A3138;
  --font-body: 'Geologica', system-ui, sans-serif;
  /* Заменить на 'Pobeda', когда появится файл шрифта */
  --font-display: 'Oswald', 'Geologica', sans-serif;
  --w-content: 1200px;
}

/* ---------- База ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  overflow-x: clip;
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 17px;
  line-height: 1.7;
  color: var(--c-text);
  background: #fff;
}
img { max-width: 100%; height: auto; }
a { color: var(--c-umbra); text-decoration-color: var(--c-sand); text-underline-offset: 3px; transition: color .15s; }
a:hover { color: var(--c-sand); }

h2[id], h3[id], h2, h3 { scroll-margin-top: 132px; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.25;
  color: var(--c-dark);
  margin: 1.6em 0 .6em;
}
h1, h2 { text-transform: uppercase; letter-spacing: .04em; }
h1 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); margin-top: 0; }
h2 { font-size: clamp(1.35rem, 2.6vw, 1.7rem); }
h3 { font-size: 1.2rem; }

.container { max-width: var(--w-content); margin: 0 auto; padding: 0 20px; }

.skip-link {
  position: absolute; left: -9999px;
}
.skip-link:focus {
  left: 10px; top: 10px; z-index: 999; background: var(--c-dark); color: #fff; padding: 8px 16px;
}

/* ---------- Шапка ---------- */
.site-header {
  background: #fff;
  position: sticky; top: 0; z-index: 90;
}

/* Верхняя полоса: слоган + поиск (тёмная, в тон футеру) */
.header-top {
  background: var(--c-dark);
  border-bottom: 1px solid rgba(202, 158, 103, .22);
}
.header-top .container {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  min-height: 40px;
}
.header-tagline {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-weight: 400; text-transform: uppercase;
  font-size: .68rem; letter-spacing: .16em; color: var(--c-sand);
}
.header-tagline::before { content: ""; width: 22px; height: 1px; background: var(--c-sand); }

.header-search { flex: 0 0 auto; }
.header-search form {
  display: flex; align-items: center; gap: 9px;
  border: 1px solid rgba(202, 158, 103, .45); border-radius: 40px;
  background: rgba(255, 255, 255, .05); padding: 6px 15px;
  transition: border-color .18s, background .18s;
}
.header-search form:hover { border-color: rgba(202, 158, 103, .75); }
.header-search form:focus-within { border-color: var(--c-sand); background: rgba(255, 255, 255, .09); }
.header-search button {
  display: flex; align-items: center; padding: 0;
  background: none; border: 0; cursor: pointer; color: var(--c-sand);
  transition: color .15s;
}
.header-search button:hover { color: #fff; }
.header-search button svg { width: 16px; height: 16px; display: block; }
.header-search input[type="search"] {
  width: 155px; border: 0; background: transparent; outline: none;
  font-family: var(--font-body); font-size: .84rem; color: var(--c-antique);
}
.header-search input[type="search"]::placeholder { color: rgba(237, 230, 224, .88); opacity: 1; }

/* Основной ряд: лого + меню */
.header-main { position: relative; background: #fff; }
.header-main .container {
  display: flex; align-items: center; gap: 28px;
  min-height: 78px;
}
.header-main::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 5px;
  background: linear-gradient(var(--c-sand) 0 2px, #fff 2px 4px, var(--c-sand) 4px 5px);
}
.site-logo { flex: 0 0 auto; display: flex; align-items: center; }
.site-logo img { max-height: 56px; width: auto; display: block; }
.site-logo .logo-text {
  font-family: var(--font-display); text-transform: uppercase;
  font-size: 1.3rem; letter-spacing: .06em; color: var(--c-dark); text-decoration: none;
}

.main-nav { margin-left: auto; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 2px; justify-content: flex-end; }
.main-nav a {
  position: relative; display: block; padding: 10px 11px;
  font-family: var(--font-display); font-weight: 400;
  font-size: .77rem; text-transform: uppercase; letter-spacing: .04em;
  color: var(--c-dark); text-decoration: none;
  border-radius: 6px 6px 0 0; white-space: nowrap;
  transition: color .15s, background .15s;
}
.main-nav a::after {
  content: ""; position: absolute; left: 50%; right: 50%; bottom: 3px; height: 2px;
  background: var(--c-sand); transition: left .22s, right .22s;
}
.main-nav a:hover { color: var(--c-umbra); background: var(--c-paper); }
.main-nav a:hover::after,
.main-nav .current-menu-item > a::after,
.main-nav .current-menu-parent > a::after,
.main-nav .current_page_item > a::after { left: 11px; right: 11px; }
.main-nav .current-menu-item > a,
.main-nav .current_page_item > a { color: var(--c-umbra); }
.main-nav a:focus-visible { outline: 2px solid var(--c-sand); outline-offset: 2px; }

.nav-toggle {
  display: none; margin-left: auto;
  background: none; border: 1px solid var(--c-sand); border-radius: 4px;
  padding: 9px 12px; cursor: pointer; color: var(--c-dark);
  font-family: var(--font-display); text-transform: uppercase; font-size: .8rem; letter-spacing: .06em;
}

@media (max-width: 980px) {
  .nav-toggle { display: block; }
  .main-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    background: var(--c-antique); border-bottom: 1px solid var(--c-line);
    padding: 10px 20px 20px;
  }
  .main-nav.is-open { display: block; }
  .main-nav ul { flex-direction: column; gap: 0; }
  .main-nav a { border-bottom: 1px solid var(--c-line); padding: 12px 4px; }
  .header-search { display: none; }
}

/* ---------- Хлебные крошки ---------- */
.breadcrumbs {
  font-size: .8rem; color: #76706a; margin: 18px 0 0;
}
.breadcrumbs a { color: #76706a; text-decoration: none; }
.breadcrumbs a:hover { color: var(--c-umbra); }

/* ---------- Раскладка ---------- */
.site-main { padding: 28px 0 64px; }
.layout-sidebar {
  display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 48px; align-items: start;
}
@media (max-width: 980px) {
  .layout-sidebar { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .site-sidebar { order: 2; }
  .layout-content { order: 1; }
}
.layout-content, .site-sidebar { min-width: 0; }

/* ---------- Сайдбар ---------- */
.site-sidebar { position: sticky; top: 128px; }
@media (max-width: 980px) { .site-sidebar { position: static; } }
.site-sidebar .widget {
  background: var(--c-paper); border: 1px solid var(--c-line); border-radius: 6px;
  padding: 20px 22px; margin-bottom: 24px;
}
.site-sidebar h3, .site-sidebar .widget-title {
  margin: 0 0 12px; font-size: .95rem; text-transform: uppercase; letter-spacing: .07em;
}
.site-sidebar ul { list-style: none; margin: 0; padding: 0; }
.site-sidebar li { padding: 7px 0; border-bottom: 1px solid var(--c-line); font-size: .92rem; }
.site-sidebar li:last-child { border-bottom: none; }
.site-sidebar a { text-decoration: none; }

/* ---------- Карточки ---------- */
.cards-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 26px;
  margin-top: 26px;
}
.post-card {
  border: 1px solid var(--c-line); border-radius: 6px; overflow: hidden;
  background: #fff; display: flex; flex-direction: column;
  transition: box-shadow .2s, transform .2s;
}
.post-card:hover { box-shadow: 0 10px 28px rgba(21,28,34,.12); transform: translateY(-2px); }
.post-card__thumb { display: block; aspect-ratio: 16/9; overflow: hidden; background: var(--c-antique); position: relative; }
.post-card__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-card__thumb .thumb-fallback {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
}
.post-card__thumb .thumb-fallback svg { width: 64px; height: 64px; opacity: .55; }
.post-card__body { padding: 16px 18px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.post-card__cat {
  font-family: var(--font-display); font-size: .72rem; text-transform: uppercase;
  letter-spacing: .1em; color: var(--c-umbra); text-decoration: none;
}
.post-card__cat:hover { color: var(--c-sand); }
.post-card__title { margin: 0; font-size: 1.02rem; line-height: 1.4; text-transform: none; letter-spacing: 0; }
.post-card__title a { color: var(--c-dark); text-decoration: none; }
.post-card__title a:hover { color: var(--c-umbra); }
.post-card__excerpt { font-size: .88rem; color: #5a6067; margin: 0; }
.post-card__meta { margin-top: auto; font-size: .78rem; color: #76706a; }

/* ---------- Статья ---------- */
.entry-header { margin-bottom: 22px; }
.entry-cat {
  display: inline-block; font-family: var(--font-display); font-size: .78rem;
  text-transform: uppercase; letter-spacing: .1em; color: var(--c-umbra);
  text-decoration: none; margin-bottom: 10px;
}
.entry-cat:hover { color: var(--c-sand); }
.entry-meta { font-size: .82rem; color: #76706a; margin-top: 10px; }
.entry-meta span + span::before { content: '·'; margin: 0 8px; color: var(--c-sand); }

.entry-content { max-width: 760px; overflow-wrap: break-word; }
.entry-content p, .entry-content li {
  -webkit-hyphens: auto;
  hyphens: auto;
}

/* Видео и встраивания: адаптивные, не вылезают за экран */
.entry-content iframe,
.entry-content video,
.entry-content embed,
.entry-content object {
  max-width: 100%;
  border: 0;
}
.entry-content iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  border-radius: 6px;
}
.wp-block-embed, .wp-block-video { margin: 1.6em 0; }
.wp-block-embed__wrapper { position: relative; }
.wp-block-embed iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; }
.entry-content > h2 {
  padding-top: .5em;
}
.entry-content h2::after {
  content: ''; display: block; width: 56px; height: 3px; background: var(--c-sand); margin-top: 10px;
}
.entry-content img { border-radius: 6px; }
.entry-content a { color: var(--c-umbra); }
.entry-content a:hover { color: var(--c-sand); }
.entry-content blockquote {
  margin: 1.6em 0; padding: 18px 24px; background: var(--c-paper);
  border-inline-start: 3px solid var(--c-sand); border-radius: 0 6px 6px 0;
}
.entry-content table {
  width: 100%; border-collapse: collapse; margin: 1.6em 0; font-size: .92rem;
  display: block; overflow-x: auto;
}
.entry-content th, .entry-content td {
  border: 1px solid var(--c-line); padding: 10px 14px; text-align: left; vertical-align: top;
}
.entry-content th {
  background: var(--c-antique); color: var(--c-dark);
  font-family: var(--font-display); font-weight: 400; letter-spacing: .04em; white-space: nowrap;
}
.entry-content tr:nth-child(even) td { background: var(--c-paper); }
.entry-content ul li, .entry-content ol li { margin-bottom: .4em; }
.entry-content li::marker { color: var(--c-sand); }

/* ---------- Похожие статьи ---------- */
.related-posts { margin-top: 56px; border-top: 1px solid var(--c-line); padding-top: 34px; }
.related-posts h2 { margin-top: 0; font-size: 1.3rem; }

/* ---------- Трёхколоночный шаблон статьи ---------- */
.container-wide { max-width: 1400px; }
.right-rail { min-width: 0; }
.rail-box {
  background: var(--c-paper); border: 1px solid var(--c-line); border-radius: 6px;
  padding: 20px 20px 10px;
}
.rail-box h3 {
  margin: 0 0 10px; font-size: .95rem; text-transform: uppercase; letter-spacing: .07em;
}
.mini-card {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px 0; border-bottom: 1px solid var(--c-line);
  text-decoration: none;
}
.rail-box .mini-card:last-child { border-bottom: none; }
.mini-card__thumb {
  flex: 0 0 76px; width: 76px; height: 56px; border-radius: 6px; overflow: hidden;
  background: var(--c-antique); display: flex; align-items: center; justify-content: center;
}
.mini-card__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mini-card__thumb svg { width: 30px; height: 30px; opacity: .55; }
.mini-card__title {
  font-size: .86rem; line-height: 1.4; color: var(--c-dark); font-weight: 400;
}
.mini-card:hover .mini-card__title { color: var(--c-umbra); }

/* ≥1280px: три колонки — разделы | статья | похожие */
@media (min-width: 1280px) {
  .layout-3col { grid-template-columns: 250px minmax(0, 1fr) 290px; gap: 40px; }
  .right-rail { position: sticky; top: 128px; }
  .layout-3col .entry-content { max-width: none; }
  .layout-3col .comments-area { max-width: none; }
}
/* 981–1279px: две колонки, «похожие» под статьёй во второй колонке */
@media (min-width: 981px) and (max-width: 1279px) {
  .right-rail { grid-column: 2; }
}
/* ≤980px: одна колонка — статья, похожие, разделы */
@media (max-width: 980px) {
  .layout-3col .right-rail { order: 2; }
  .layout-3col .site-sidebar { order: 3; }
}

/* ---------- Пагинация ---------- */
.pagination, .nav-links { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 40px; }
.nav-links .page-numbers {
  display: inline-block; min-width: 42px; text-align: center; padding: 9px 12px;
  border: 1px solid var(--c-line); border-radius: 4px; text-decoration: none;
  font-family: var(--font-display); color: var(--c-dark);
}
.nav-links .page-numbers.current { background: var(--c-sand); border-color: var(--c-sand); color: #fff; }
.nav-links a.page-numbers:hover { border-color: var(--c-sand); color: var(--c-umbra); }

/* ---------- Комментарии ---------- */
.comments-area { max-width: 760px; margin-top: 56px; border-top: 1px solid var(--c-line); padding-top: 30px; }
.comment-list { list-style: none; padding: 0; }
.comment-list .comment { border-bottom: 1px solid var(--c-line); padding: 18px 0; }
.comment-author { font-weight: 500; }
.comment-metadata { font-size: .78rem; color: #9a938a; }
.comment-metadata a { color: inherit; text-decoration: none; }
.comment-reply-link { font-size: .82rem; }

/* ---------- Формы ---------- */
input[type="text"], input[type="email"], input[type="url"], input[type="search"], input[type="tel"], textarea, select {
  width: 100%; padding: 11px 14px; border: 1px solid var(--c-line); border-radius: 5px;
  font-family: var(--font-body); font-size: .95rem; background: #fff; color: var(--c-text);
}
input:focus, textarea:focus { outline: none; border-color: var(--c-sand); box-shadow: 0 0 0 3px rgba(202,158,103,.18); }
button, .wp-block-button__link, input[type="submit"], .wpcf7-submit {
  display: inline-block; background: var(--c-sand); color: #fff; border: none; cursor: pointer;
  padding: 12px 28px; border-radius: 5px;
  font-family: var(--font-display); text-transform: uppercase; letter-spacing: .08em; font-size: .85rem;
  transition: background .15s;
}
button:hover, .wp-block-button__link:hover, input[type="submit"]:hover, .wpcf7-submit:hover { background: var(--c-umbra); color: #fff; }
.wpcf7 p { margin: 0 0 16px; }
.wpcf7 label { font-size: .88rem; font-weight: 400; color: var(--c-dark); }
.wpcf7 form { max-width: 560px; }

/* ---------- Подвал ---------- */
.site-footer {
  margin-top: 40px; background: var(--c-dark); color: var(--c-antique);
  position: relative; overflow: hidden;
}
.site-footer .container { position: relative; z-index: 2; padding-top: 48px; padding-bottom: 34px; }
.footer-motif {
  position: absolute; right: -120px; top: -60px; width: 480px; height: 480px;
  opacity: .28; z-index: 1; pointer-events: none;
}
.footer-cols { display: flex; flex-wrap: wrap; gap: 40px; align-items: flex-start; }
.footer-brand { max-width: 300px; }
.footer-brand .footer-logo { display: inline-block; margin-bottom: 14px; }
.footer-brand p { font-size: .85rem; color: #a9b0b8; margin: 0; }
.footer-nav ul { list-style: none; margin: 0; padding: 0; columns: 2; gap: 40px; }
.footer-nav a {
  display: inline-block; padding: 5px 0; color: var(--c-sand); text-decoration: none;
  font-family: var(--font-display); font-size: .82rem; text-transform: uppercase; letter-spacing: .07em;
}
.footer-nav a:hover { color: var(--c-antique); }
.footer-bottom {
  border-top: 1px solid rgba(202,158,103,.25); margin-top: 34px; padding-top: 18px;
  font-size: .78rem; color: #7d858e; display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between;
}
.footer-bottom a { color: #a9b0b8; }
@media (max-width: 700px) { .footer-nav ul { columns: 1; } }

/* ---------- Блоки Gutenberg на страницах ---------- */
.wp-block-columns { gap: 26px; }
.wp-block-latest-posts { padding-left: 1.2em; }
.wp-block-latest-posts li { margin-bottom: .5em; }
.page .entry-content { max-width: none; }
.page .entry-content > p:first-child { font-size: 1.12rem; color: var(--c-dark); max-width: 900px; }

/* Витрина рубрик на главной: карточки из колонок */
.home .wp-block-columns .wp-block-column {
  background: var(--c-paper); border: 1px solid var(--c-line); border-radius: 6px;
  padding: 22px 24px;
}
.home .wp-block-column h3 { margin-top: 0; }
.home .wp-block-column h3 a { color: var(--c-dark); text-decoration: none; }
.home .wp-block-column h3 a:hover { color: var(--c-umbra); }
.home .wp-block-column ul { padding-left: 1.1em; margin-bottom: 0; }

/* ---------- Hero главной и кнопка «наверх» ---------- */
.front-hero h1 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin-bottom: 4px; }
.front-hero { margin: 6px 0 10px; }

.to-top {
  position: fixed; right: 22px; bottom: 26px; z-index: 80;
  width: 46px; height: 46px; padding: 0; border-radius: 50%;
  font-size: 1.15rem; line-height: 1;
  background: var(--c-dark); color: var(--c-sand);
  box-shadow: 0 6px 18px rgba(21, 28, 34, .3);
}
.to-top:hover { background: var(--c-umbra); color: #fff; }
@media (max-width: 980px) { .to-top { display: none; } }

/* ---------- 404 и поиск ---------- */
.page-lead { font-size: 1.05rem; color: #5a6067; max-width: 720px; }
.error404 .site-main .container { text-align: center; padding: 60px 20px; }
.error404 svg { width: 90px; opacity: .6; margin-bottom: 18px; }

/* ==================================================
   Мобильная версия в стиле приложения (< 980px)
   ================================================== */

/* Чипы рубрик */
.cat-chips { display: none; }

/* Нижняя панель */
.app-bar { display: none; }

body.app-locked { overflow: hidden; }

@media (max-width: 980px) {
  body {
    padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
    font-size: 16.5px;
  }

  /* Компактная прячущаяся шапка */
  .header-top { display: none; }
  .site-header { transition: transform .25s ease; }
  .site-header.is-hidden { transform: translateY(-100%); }
  .header-main .container { min-height: 60px; justify-content: center; gap: 12px; }
  .site-logo img { max-height: 42px; }
  .nav-toggle { display: none; }
  .main-nav { display: none !important; }

  /* Чипы рубрик — горизонтальная лента */
  .cat-chips {
    display: flex; gap: 8px; overflow-x: auto; -webkit-overflow-scrolling: touch;
    scrollbar-width: none; padding: 12px 20px;
    background: #fff; border-bottom: 1px solid var(--c-line);
  }
  .cat-chips::-webkit-scrollbar { display: none; }
  .cat-chips a {
    flex: 0 0 auto; padding: 8px 15px; border-radius: 999px;
    border: 1px solid var(--c-line); background: var(--c-paper);
    font-family: var(--font-display); font-size: .78rem; text-transform: uppercase;
    letter-spacing: .05em; color: var(--c-dark); text-decoration: none; white-space: nowrap;
  }
  .cat-chips a.is-current, .cat-chips a:active { background: var(--c-sand); border-color: var(--c-sand); color: #fff; }

  /* Нижняя панель навигации */
  .app-bar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 95;
    background: var(--c-dark);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    box-shadow: 0 -8px 24px rgba(21, 28, 34, .28);
  }
  .app-bar a, .app-bar button {
    position: relative;
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px;
    padding: 11px 4px 9px; background: none; border: none; border-radius: 0;
    color: #aab2ba; text-decoration: none; cursor: pointer;
    font-family: var(--font-display); font-size: .7rem; text-transform: uppercase; letter-spacing: .04em;
  }
  .app-bar svg { width: 25px; height: 25px; }
  .app-bar .is-active, .app-bar a:active, .app-bar button[aria-expanded="true"] { color: var(--c-sand); background: none; }
  .app-bar .is-active::before, .app-bar button[aria-expanded="true"]::before {
    content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
    width: 34px; height: 3px; border-radius: 0 0 3px 3px; background: var(--c-sand);
  }

  /* Карточки на всю ширину, крупнее */
  .cards-grid { grid-template-columns: 1fr; gap: 18px; }
  .post-card { border-radius: 12px; }
  .post-card__body { padding: 16px 18px 18px; }
  .post-card__title { font-size: 1.08rem; }

  /* Контент */
  h1 { font-size: 1.55rem; }
  .site-main { padding-top: 18px; }
  .entry-content table { font-size: .85rem; }
  .home .wp-block-columns .wp-block-column { padding: 18px 18px; border-radius: 12px; }
  .footer-motif { display: none; }
}

/* Слои: bottom-sheet и поиск */
.app-sheet, .app-search {
  position: fixed; inset: 0; z-index: 120;
  opacity: 0; transition: opacity .2s ease;
}
.app-sheet.is-open, .app-search.is-open { opacity: 1; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(21, 28, 34, .55); }

.sheet-panel {
  position: absolute; left: 0; right: 0; bottom: 0; max-height: 82vh; overflow: auto;
  background: var(--c-dark); border-radius: 20px 20px 0 0;
  padding: 20px 24px calc(24px + env(safe-area-inset-bottom, 0px));
  transform: translateY(24px); transition: transform .22s ease;
}
.app-sheet.is-open .sheet-panel { transform: translateY(0); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.sheet-sign svg { width: 44px; height: 44px; }
.sheet-close {
  background: none; border: 1px solid rgba(202, 158, 103, .4); border-radius: 50%;
  width: 38px; height: 38px; padding: 0; color: var(--c-sand); font-size: 1rem; line-height: 1;
}
.sheet-close:hover { background: rgba(202, 158, 103, .15); color: var(--c-sand); }
.sheet-menu { list-style: none; margin: 6px 0 0; padding: 0; }
.sheet-menu a {
  display: block; padding: 15px 2px; color: var(--c-antique); text-decoration: none;
  font-family: var(--font-display); font-size: 1rem; text-transform: uppercase; letter-spacing: .07em;
  border-bottom: 1px solid rgba(202, 158, 103, .18);
}
.sheet-menu li:last-child a { border-bottom: none; }
.sheet-menu a:active, .sheet-menu a:hover { color: var(--c-sand); }
.sheet-menu .current-menu-item > a { color: var(--c-sand); }

.search-panel {
  position: absolute; left: 0; right: 0; top: 0;
  background: var(--c-antique); border-radius: 0 0 20px 20px;
  padding: calc(20px + env(safe-area-inset-top, 0px)) 20px 22px;
  display: flex; gap: 10px; align-items: center;
  transform: translateY(-24px); transition: transform .22s ease;
}
.app-search.is-open .search-panel { transform: translateY(0); }
.search-panel form { display: flex; gap: 10px; flex: 1; }
.search-panel input[type="search"] { font-size: 1.05rem; padding: 13px 16px; border-radius: 10px; }
.search-panel button[type="submit"] { border-radius: 10px; }
.search-panel .sheet-close { border-color: rgba(103, 70, 29, .35); color: var(--c-umbra); flex: 0 0 auto; }

@media (min-width: 981px) {
  .app-sheet, .app-search { display: none !important; }
}

/* Cookie-виджет (CookieYes): не даём перекрывать мобильную навигацию и шторки.
   Слои: app-bar 95, баннер согласия 110, шторки 120, окно настроек куки 130. */
@media (max-width: 980px) {
  .cky-btn-revisit-wrapper {
    bottom: calc(84px + env(safe-area-inset-bottom, 0px)) !important;
    left: 12px !important;
    z-index: 90 !important;
    transform: scale(.85);
    transform-origin: bottom left;
  }
  .cky-consent-container, .cky-consent-bar {
    bottom: calc(64px + env(safe-area-inset-bottom, 0px)) !important;
    z-index: 110 !important;
  }
  .cky-modal, .cky-preference-center { z-index: 130 !important; }
  .cky-overlay { z-index: 125 !important; }
}
