/* ============================================
   SEO Core Theme - Main Stylesheet
   ============================================ */

/* CSS Variables */
:root {
    --bg: #ffffff;
    --text: #111111;
    --muted: #666666;
    --border: #e9e9e9;
    --link: #0b57d0;
    --link-hover: #0842a0;
    --radius: 12px;
    
    /* Spacing */
    --space-4: 4px;
    --space-8: 8px;
    --space-12: 12px;
    --space-16: 16px;
    --space-20: 20px;
    --space-24: 24px;
    --space-32: 32px;
    --space-40: 40px;
    --space-48: 48px;
    --space-64: 64px;
}

/* Reset & Base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

body {
    font-family: "Inter", "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    letter-spacing: 0;
    color: #08111f;
    background-color: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography - Headings */
h1, h2, h3, h4, h5, h6 {
    font-family: "Manrope", "Inter", sans-serif;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: #08111f;
    margin-top: 0;
}

h1 {
    font-size: clamp(32px, 4.2vw, 56px);
    line-height: 1.02;
    font-weight: 800;
    letter-spacing: -0.05em;
    margin-top: 0;
    margin-bottom: var(--space-16);
}

h2 {
    font-size: clamp(28px, 3.2vw, 42px);
    line-height: 1.06;
    margin-top: var(--space-40);
    margin-bottom: var(--space-12);
}

h3 {
    font-size: 20px;
    line-height: 1.22;
    margin-top: var(--space-32);
    margin-bottom: var(--space-12);
}

h4 {
    font-size: 18px;
    line-height: 1.28;
    margin-top: var(--space-24);
    margin-bottom: var(--space-8);
}

/* Paragraphs */
p {
    margin-bottom: 12px;
}

/* Lists */
ul, ol {
    margin-bottom: var(--space-16);
    padding-left: 22px;
}

li {
    margin-bottom: var(--space-8);
}

/* Links */
a {
    color: var(--link);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    text-decoration: underline;
    color: var(--link-hover);
}

a:focus-visible {
    outline: 2px solid var(--link);
    outline-offset: 2px;
    border-radius: 2px;
}

/* Unified button hover behavior across all pages */
a.btn:hover,
a.btn:focus-visible,
.btn:hover,
.btn:focus-visible {
    text-decoration: none;
}

.btn:hover {
    transform: translateY(-2px);
    background: #030712;
    box-shadow: 0 16px 34px rgba(8, 17, 31, 0.18);
}

.btn--primary:hover {
    background: linear-gradient(135deg, #173fb4 0%, #1977dc 100%);
    box-shadow: 0 18px 40px rgba(29, 78, 216, 0.34);
    color: #fff;
}

.btn--ghost:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.42);
    color: #fff;
}

.btn--light:hover {
    background: #f8fbff;
    color: #08111f;
}

a.btn,
a.btn:hover,
a.btn:focus-visible {
    text-decoration: none;
}

/* Blockquote */
blockquote {
    margin: var(--space-24) 0;
    padding: var(--space-16) var(--space-20);
    border-left: 4px solid var(--border);
    background: #fafafa;
    border-radius: var(--radius);
}

/* Code */
pre {
    padding: var(--space-16);
    overflow: auto;
    background: #0f0f10;
    color: #f4f4f5;
    border-radius: var(--radius);
    margin: var(--space-20) 0;
    font-size: 0.95em;
    line-height: 1.6;
}

code {
    background: #f5f5f5;
    padding: 2px 6px;
    border-radius: 6px;
    font-size: 0.95em;
}

pre code {
    background: transparent;
    padding: 0;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--space-20) 0;
}

th, td {
    padding: var(--space-12);
    border: 1px solid var(--border);
    text-align: left;
}

thead {
    background: #fafafa;
}

/* Images */
img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius);
}

.wp-caption {
    margin: var(--space-20) 0;
}

.wp-caption-text {
    font-size: 14px;
    color: var(--muted);
    margin-top: var(--space-8);
    text-align: center;
}

/* Container */
.container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 var(--space-16);
}

/* Header */
.site-header {
    border-bottom: 1px solid var(--border);
    padding: var(--space-16) 0;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-16);
}

.site-branding {
    flex: 0 0 auto;
}

.site-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
}

.site-title a {
    color: var(--text);
}

.site-title a:hover {
    color: var(--link);
    text-decoration: none;
}

/* Navigation */
.main-navigation {
    flex: 1 1 auto;
}

.nav-menu {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: var(--space-24);
    flex-wrap: wrap;
}

.nav-menu li {
    margin: 0;
}

.nav-menu a {
    color: var(--text);
    font-weight: 500;
}

.nav-menu a:hover {
    color: var(--link);
    text-decoration: none;
}

/* Main Content */
.site-main {
    min-height: 60vh;
    padding-top: var(--space-32);
}

/* Readable Content Width */
.readable {
    width: 100%;
}

/* Breadcrumbs */
.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    margin-bottom: 18px;
    font-size: 12px;
    color: #7b879a;
    font-weight: 600;
    line-height: 1.4;
}

.breadcrumbs a {
    color: #63728a;
    text-decoration: none;
}

.breadcrumbs a:hover {
    color: var(--link);
    text-decoration: none;
}

.breadcrumbs .separator {
    margin: 0 2px;
    color: #b0bccd;
}

/* Page Header */
.page-header {
    margin-bottom: var(--space-32);
}

.page-title {
    font-size: 32px;
    margin-bottom: var(--space-16);
}

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.archive-description {
    color: var(--muted);
    margin-top: var(--space-12);
}

/* Legal/Policy page template */
.legal-page {
    padding-bottom: var(--space-40);
}

.legal-page__article {
    max-width: 980px;
    margin: 0 auto;
}

.legal-page__header {
    margin-bottom: var(--space-24);
}

.legal-page__title {
    margin: 0;
    font-size: clamp(34px, 4.2vw, 54px);
    line-height: 1.04;
    letter-spacing: -0.04em;
}



.legal-page__content > *:first-child {
    margin-top: 0;
}

.legal-page__content > *:last-child {
    margin-bottom: 0;
}

.legal-page__content h2,
.legal-page__content h3,
.legal-page__content h4 {
    margin-top: 1.5em;
    margin-bottom: 0.6em;
}

.legal-page__content p,
.legal-page__content ul,
.legal-page__content ol {
    margin-bottom: 1em;
}

.legal-page__content ul,
.legal-page__content ol {
    padding-left: 1.25em;
}

.legal-page__content li {
    margin-bottom: 0.4em;
}

.legal-page__content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.2em 0;
}

.legal-page__content th,
.legal-page__content td {
    border: 1px solid #e3e9f2;
    padding: 10px 12px;
    text-align: left;
    vertical-align: top;
}

.legal-page__content blockquote {
    margin: 1.2em 0;
    padding: 14px 16px;
    border-left: 4px solid #1d4ed8;
    background: #f3f7ff;
    border-radius: 10px;
}

.legal-page__content a {
    color: #0b57d0;
    text-decoration: underline;
}

.legal-page__content a:hover {
    color: #0842a0;
}

/* Content Wrapper (Grid Layout) */
.contentwrp {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: var(--space-24);
    align-items: start;
    width: 100%;
    margin-bottom: var(--space-32);
}

/* Navigation Panel (Sidebar) */
.nav-panel {
    width: 320px;
    max-width: 320px;
    padding: 22px;
    background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
    border: 1px solid rgba(222, 228, 238, 0.9);
    border-radius: 28px;
    box-shadow: 0 18px 48px rgba(22, 35, 58, 0.08);
    position: sticky;
    top: 88px;
}

/* Posts List (Main Content) */
.posts-list {
    min-width: 0;
    width: 100%;
}

.posts-list.is-loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Load More Button */
.posts-loadmore {
    display: none;
    width: 100%;
    height: 48px;
    padding: 0 18px;
    margin-top: var(--space-24);
    border-radius: 14px;
    border: 1px solid #e5e5e5;
    background: #fff;
    font-size: 14px;
    font-weight: 600;
    color: #111;
    cursor: pointer;
    transition: all 0.15s ease;
}

.posts-loadmore:hover:not(:disabled) {
    background: #f6f6f6;
}

.posts-loadmore:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Navigation Panel Top (Search + Filters Button) */
.navpanel__top {
    width: 100%;
    display: flex;
    gap: 12px;
    align-items: center;
}

.navpanel__minimal {
    margin-top: 14px;
}

.navpanel__minimal .nav-panel-actions {
    margin-top: 14px;
    padding-top: 14px;
}

.navpanel__toggle--top {
    display: none;
}

.navpanel__toggle--bottom {
    width: 100%;
    border-radius: 100px!important;
    height: 42px!important;
    justify-content: center!important;
}

.posts-list__items.cars {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

/* Search Form */
.navpanel__search {
    position: relative;
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
    z-index: 5;
}

.navpanel__searchIcon {
    position: absolute;
    left: 18px;
    display: flex;
    align-items: center;
    pointer-events: none;
    z-index: 1;
}

.navpanel__searchInput {
    width: 100%;
    height: 52px;
    padding: 0 20px 0 52px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid #e3e9f2;
    border-radius: 18px;
    background: #ffffff;
    color: var(--text);
    box-shadow: 0 8px 22px rgba(22, 35, 58, 0.04);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.navpanel__searchInput:hover {
    border-color: #cbd7e8;
}

.navpanel__searchInput:focus {
    outline: none;
    box-shadow: 0 10px 26px rgba(11, 87, 208, 0.08);
    background: #ffffff;
}

/* Search Dropdown */
.nav-search-dd {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    left: auto;
    width: 520px;
    max-width: min(520px, calc(100vw - 48px));
    background: #fff;
    border: 1px solid #ededed;
    border-radius: 18px;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.10);
    overflow: hidden;
    z-index: 200;
    display: flex;
    max-height: 420px;
}

.nav-search-dd[hidden] {
    display: none !important;
}

.nav-search-dd__list {
    width: 240px;
    padding: 8px;
    overflow-y: auto;
    overflow-x: hidden;
    border-right: 1px solid #f0f0f0;
}

/* Тонкий скроллбар для списка */
.nav-search-dd__list::-webkit-scrollbar {
    width: 6px;
}

.nav-search-dd__list::-webkit-scrollbar-track {
    background: transparent;
}

.nav-search-dd__list::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 3px;
}

.nav-search-dd__list::-webkit-scrollbar-thumb:hover {
    background: #bbb;
}

.nav-search-dd__preview {
    flex: 1;
    padding: 14px;
    min-width: 0;
    overflow-y: auto;
}

/* Тонкий скроллбар для превью */
.nav-search-dd__preview::-webkit-scrollbar {
    width: 6px;
}

.nav-search-dd__preview::-webkit-scrollbar-track {
    background: transparent;
}

.nav-search-dd__preview::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 3px;
}

.nav-search-dd__preview::-webkit-scrollbar-thumb:hover {
    background: #bbb;
}

.nav-search-item {
    height: 44px;
    padding: 10px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: background 0.12s ease;
}

.nav-search-item:hover,
.nav-search-item.is-active {
    background: #f6f6f6;
}

.nav-search-item__icon {
    color: #777;
    display: inline-flex;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
}

.nav-search-item__title {
    font-size: 13px;
    font-weight: 600;
    color: #111;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
}

.nav-search-item mark {
    background: rgba(255, 214, 102, 0.35);
    padding: 0 2px;
    border-radius: 4px;
    color: inherit;
    font-weight: inherit;
}

.nav-search-preview__title {
    font-size: 14px;
    font-weight: 800;
    color: #111;
    line-height: 1.3;
    white-space: normal;
    overflow: visible;
}

.nav-search-preview__title mark {
    background: rgba(255, 214, 102, 0.35);
    padding: 0 2px;
    border-radius: 4px;
    color: inherit;
    font-weight: inherit;
}

.nav-search-preview__meta {
    margin-top: 8px;
    font-size: 12px;
    color: #777;
    line-height: 1.4;
}

.nav-search-preview__image {
    margin-bottom: 12px;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #f5f5f5;
}

.nav-search-preview__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.nav-search-preview__description {
    margin-top: 12px;
    font-size: 13px;
    color: #666;
    line-height: 1.5;
    max-height: 60px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
}

.nav-search-preview__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.nav-search-preview__tag {
    font-size: 11px;
    padding: 4px 10px;
    border: 1px solid #e5e5e5;
    border-radius: 999px;
    color: #555;
    text-decoration: none;
    transition: all 0.12s ease;
    display: inline-block;
}

.nav-search-preview__tag:hover {
    background: #f6f6f6;
    border-color: #ddd;
    color: #111;
}

.nav-search-preview__open {
    display: inline-flex;
    margin-top: 16px;
    font-size: 13px;
    font-weight: 700;
    color: #111;
    text-decoration: underline;
    cursor: pointer;
}

.nav-search-preview__open:hover {
    color: #333;
}

.nav-search-loading,
.nav-search-empty {
    cursor: default;
    height: auto;
    min-height: 44px;
    padding: 12px;
}

.nav-search-loading:hover,
.nav-search-empty:hover {
    background: transparent;
}

/* Мобильная версия */
@media (max-width: 640px) {
    /* Блок поиска и фильтров - в одну строку, без лишних отступов */
    .navpanel__top {
        gap: 8px;
        margin: 0;
        padding: 0;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        display: flex;
        align-items: center;
    }
    
    /* Поиск - занимает оставшееся место */
    .navpanel__search {
        flex: 1;
        min-width: 0;
        max-width: 100%;
        position: relative;
    }
    
    /* Поле ввода поиска - компактное, не выпирает */
    .navpanel__searchInput {
        height: 48px;
        padding: 0 16px 0 48px;
        font-size: 15px;
        border-radius: 12px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    /* Иконка поиска - ближе к краю */
    .navpanel__searchIcon {
        left: 14px;
    }
    
    /* Кнопка фильтров - компактная, только иконка на мобилке */
    .navpanel__top .navpanel__toggle {
        height: 48px;
        padding: 0 12px;
        border-radius: 12px;
        flex-shrink: 0;
        min-width: 48px;
        width: 48px;
        justify-content: center;
    }
    
    .navpanel__toggleText {
        display: none;
    }
    
    /* Dropdown поиска */
    .nav-search-dd {
        left: 0;
        right: 0;
        width: 100%;
        max-width: 100%;
        display: block;
    }
    
    .nav-search-dd__preview {
        display: none;
    }
    
    .nav-search-dd__list {
        width: 100%;
        border-right: 0;
        padding: 8px;
    }
    
    .nav-search-item {
        height: auto;
        min-height: 44px;
        align-items: flex-start;
        padding: 12px;
    }
    
    .nav-search-item__title {
        white-space: normal;
        overflow: hidden;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        line-clamp: 3;
        -webkit-box-orient: vertical;
        text-overflow: ellipsis;
    }
}

/* Filters Toggle Button */
.navpanel__toggle {
    height: 52px;
    padding: 0 14px;
    border-radius: 16px;
    border: 1px solid #e0e0e0;
    background: #ffffff;
    color: #111;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

.navpanel__toggle:hover {
    background: #f6f6f6;
}

.navpanel__toggle:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.05);
}

.navpanel__toggleIcon {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.navpanel__toggleText {
    font-size: 14px;
    font-weight: 600;
}

/* Navigation Panel Body (Collapsible Content) */
.navpanel__body {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #f0f0f0;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.18s ease, opacity 0.18s ease, margin-top 0.18s ease, padding-top 0.18s ease;
}

.navpanel__body:not([hidden]) {
    max-height: none;
    overflow: visible;
    opacity: 1;
}

.nav-panel.is-open .navpanel__body {
    max-height: none;
    overflow: visible;
    opacity: 1;
    margin-top: 14px;
    padding-top: 14px;
}

@media (prefers-reduced-motion: reduce) {
    .navpanel__body {
        transition: none;
    }
}

/* Desktop: Hide toggle button, show body always */
@media (min-width: 1025px) {
    .navpanel__toggle {
        display: inline-flex;
    }
}

/* Секции (категории, теги) */
.nav-panel-section {
    margin-bottom: 18px;
}

.nav-panel-section:last-of-type {
    margin-bottom: 18px;
}

.nav-panel-section-label {
    font-size: 13px;
    color: #6d7480;
    margin: var(--space-20) 0 var(--space-12) 0;
    font-weight: 600;
}

.nav-panel-section:first-of-type .nav-panel-section-label {
    margin-top: 0;
}

.nav-panel-section-label--filter {
    color: #6d7480;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0 0 10px 0;
}

.nav-panel-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: flex-start;
}

.nav-panel-chips-tags {
    overflow: visible;
    flex-wrap: wrap;
    white-space: normal;
    max-height: none;
}

/* Чипы категорий */
.nav-panel-chip-category {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 9px 15px;
    font-size: 12px;
    font-weight: 650;
    background: #ffffff;
    border: 1px solid #e4eaf3;
    border-radius: 999px;
    color: #27303f;
    text-decoration: none;
    box-shadow: 0 6px 16px rgba(22, 35, 58, 0.035);
    transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
    white-space: nowrap;
}

.nav-panel-chip-category:hover {
    background: #f8fbff;
    border-color: #c9d8ea;
    color: #0b57d0;
    box-shadow: 0 8px 20px rgba(22, 35, 58, 0.06);
    text-decoration: none;
    transform: translateY(-1px);
}

.nav-panel-chip-category.nav-panel-chip-active {
    background: #1d4ed8;
    border-color: #1d4ed8;
    color: white;
}

.nav-panel-chip-category.nav-panel-chip-active:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
    color: white;
}

.nav-panel-chip-count {
    font-size: 12px;
    color: #999;
    margin-left: 6px;
    font-weight: 400;
}

.nav-panel-chip-category.nav-panel-chip-active .nav-panel-chip-count {
    color: white;
}

.nav-panel-chip-tag .nav-panel-chip-count {
    font-size: 12px;
    color: #999;
    margin-left: 6px;
    font-weight: 400;
}

.nav-panel-chip-tag.nav-panel-chip-active .nav-panel-chip-count {
    color: white;
}

/* Чипы тегов */
.nav-panel-chip-tag {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 8px 14px;
    font-size: 12px;
    font-weight: 600;
    background: #ffffff;
    border: 1px solid #e4eaf3;
    border-radius: 999px;
    color: #3f4856;
    text-decoration: none;
    box-shadow: 0 6px 16px rgba(22, 35, 58, 0.03);
    transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
    white-space: nowrap;
}

.nav-panel-chip-tag:hover {
    background: #f8fbff;
    border-color: #c9d8ea;
    color: #0b57d0;
    box-shadow: 0 8px 20px rgba(22, 35, 58, 0.055);
    text-decoration: none;
    transform: translateY(-1px);
}

.nav-panel-chip-tag.nav-panel-chip-active {
    background: #1d4ed8;
    border-color: #1d4ed8;
    color: white;
}

/* Действия (сортировка и сброс) */
.nav-panel-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding-top: 18px;
    border-top: 1px solid #edf1f7;
}

/* Пока сортировка скрыта атрибутом hidden: не показывать пустой блок, если нет «Сбросить» */
.nav-panel-actions:has(> form.nav-panel-sort-form[hidden]):not(:has(.nav-panel-reset-button)) {
    display: none;
}

.car-filter-groups {
    display: grid;
    gap: 18px;
}

.car-filter-group {
    display: grid;
    gap: 9px;
    margin: 0;
}

.car-filter-group__label {
    color: #6d7480;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.car-filter-group__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.car-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 34px;
    padding: 7px 12px;
    border: 1px solid #e4eaf3;
    border-radius: 999px;
    background: #fff;
    color: #3f4856;
    font-size: 12px;
    line-height: 1;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 6px 16px rgba(22, 35, 58, 0.03);
    transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.car-filter-chip span {
    color: #8b8b8b;
    font-size: 12px;
}

.car-filter-chip:hover {
    border-color: #c9d8ea;
    color: #0b57d0;
    text-decoration: none;
    background: #f8fbff;
    box-shadow: 0 8px 20px rgba(22, 35, 58, 0.055);
    transform: translateY(-1px);
}

.car-filter-chip:focus,
.car-filter-chip:focus-visible {
    outline: none;
    box-shadow: none;
}

.car-filter-chip--active {
    border-color: #1d4ed8;
    background: #1d4ed8;
    color: white;
    box-shadow: 0 8px 20px rgba(22, 35, 58, 0.055);
}

.car-filter-chip--active span {
    color: white;
}

.car-filter-chip--brand {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 8px 14px;
    font-size: 12px;
    font-weight: 600;
    background: #ffffff;
    border: 1px solid #e4eaf3;
    border-radius: 999px;
    color: #3f4856;
    text-decoration: none;
    box-shadow: 0 6px 16px rgba(22, 35, 58, 0.03);
    transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
    white-space: nowrap;
}

.car-filter-chip--brand:hover {
    background: #f8fbff;
    border-color: #c9d8ea;
    color: #0b57d0;
    box-shadow: 0 8px 20px rgba(22, 35, 58, 0.055);
    text-decoration: none;
    transform: translateY(-1px);
}

.car-filter-chip--brand.car-filter-chip--active {
    background: #1d4ed8;
    border-color: #1d4ed8;
    color: white;
    box-shadow: 0 8px 20px rgba(22, 35, 58, 0.055);
}

.car-filter-chip--brand .nav-panel-chip-count,
.car-filter-chip--brand span {
    font-size: 12px;
    color: #999;
    margin-left: 6px;
    font-weight: 400;
}

.car-filter-chip--brand.car-filter-chip--active .nav-panel-chip-count,
.car-filter-chip--brand.car-filter-chip--active span {
    color: white;
}

.car-range-inputs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.car-range-inputs label {
    display: grid;
    gap: 6px;
}

.car-range-inputs label span {
    color: #818b99;
    font-size: 11px;
    font-weight: 650;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.car-range-inputs input {
    width: 100%;
    height: 42px;
    padding: 0 12px;
    border: 1px solid #e4eaf3;
    border-radius: 14px;
    background: #fff;
    color: #27303f;
    font-size: 13px;
    font-weight: 600;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 6px 16px rgba(22, 35, 58, 0.03);
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.car-range-inputs input:focus,
.car-range-inputs input:focus-visible {
    outline: none;
    border-color: #b8d5ff;
    box-shadow: 0 8px 20px rgba(11, 87, 208, 0.07);
}

.nav-panel-sort-form {
    margin: 0;
    width: 100%;
}

.nav-panel-sort-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.nav-panel-sort-select {
    width: 100%;
    height: 44px;
    padding: 0 42px 0 16px;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid #e4eaf3;
    border-radius: 15px;
    background: #ffffff;
    color: #27303f;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(22, 35, 58, 0.03);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.nav-panel-sort-select:focus {
    outline: none;
    background: #ffffff;
    border-color: #b8d5ff;
    box-shadow: 0 8px 20px rgba(11, 87, 208, 0.07);
}

.nav-panel-sort-arrow {
    position: absolute;
    right: 16px;
    display: flex;
    align-items: center;
    pointer-events: none;
}

.nav-panel-reset-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 14px;
    background: #f6f8fb;
    border: 1px solid #edf1f7;
    font-size: 13px;
    font-weight: 650;
    color: #6d7480;
    text-decoration: none;
    transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease;
    text-align: center;
    width: 100%;
}

.nav-panel-reset-button:hover {
    color: #0b57d0;
    border-color: #d7e5f7;
    background: #f0f6ff;
    text-decoration: none;
}

/* Post Cards */
.posts-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-16);
}

.post-card {
    display: flex;
    flex-direction: row;
    gap: var(--space-16);
    align-items: flex-start;
    transition: all 0.15s ease;
    min-height: 160px;
    margin-bottom: 20px;
    border-bottom: 1px dashed #ededed;
    padding-bottom: 20px;
}

.post-card:hover {
    transform: translateY(-2px);
}

.post-card-thumbnail {
    flex-shrink: 0;
    width: 240px;
    height: 135px;
    border-radius: 10px;
    overflow: hidden;
}

.post-card-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    margin: 0;
    display: block;
}

.post-card:not(:has(.post-card-thumbnail)) .post-card-content {
    width: 100%;
}

.post-card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.post-card-title {
    font-size: 20px;
    line-height: 1.3;
    font-weight: 600;
    margin: 0 0 var(--space-8) 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-card-title a {
    color: var(--text);
    text-decoration: none;
}

.post-card-title a:hover {
    text-decoration: underline;
}

.post-card-prices {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 10px;
}

.post-card-price-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 10px;
}

.post-card-price-row .post-card-price-value {
    font-size: 20px;
    line-height: 1.2;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.02em;
}

.post-card-price-row--vat .post-card-price-value {
    font-size: 17px;
    font-weight: 700;
    color: #3f4856;
}

.post-card-price-caption {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #8b95a3;
}

.post-card-specline {
    margin: 0 0 var(--space-12);
    font-size: 12px;
    line-height: 1.55;
    color: #6d7480;
}

.post-card-date {
    color: #777;
}

.meta-separator {
    color: #777;
    margin: 0 4px;
}

.post-card-category a {
    color: #777;
    text-decoration: none;
}

.post-card-category a:hover {
    color: var(--link);
}

.post-card-reading-time {
    color: #777;
}

.post-card-excerpt {
    font-size: 15px;
    line-height: 1.6;
    color: #333;
    margin-bottom: var(--space-12);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-card-excerpt p {
    margin: 0;
}

.post-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.post-card-tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    background: transparent;
    border: 1px solid #e5e5e5;
    border-radius: 999px;
    color: #555;
    font-size: 12px;
    font-weight: 400;
    text-decoration: none;
    transition: all 0.2s ease;
    line-height: 1;
}

.post-card-tag:hover {
    border-color: var(--link);
    color: var(--link);
    text-decoration: none;
    background: #fafafa;
}

/* Single Post */
.entry-header {
    margin-bottom: var(--space-32);
}

.entry-car-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(8, 17, 31, 0.035) 1px, transparent 1px),
        linear-gradient(rgba(8, 17, 31, 0.028) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: linear-gradient(135deg, rgba(0, 0, 0, 0.42), transparent 64%);
    pointer-events: none;
}

.entry-car-hero > * {
    position: relative;
    z-index: 1;
}

.entry-car-hero__head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
}

.entry-title {
    max-width: 920px;
    font-size: clamp(34px, 4.8vw, 64px);
    line-height: 1.02;
    margin-top: 0;
    margin-bottom: 0;
    font-weight: 800;
    letter-spacing: -0.052em;
}

.entry-car-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 9px 14px;
    border: 1px solid rgba(29, 78, 216, 0.18);
    border-radius: 999px;
    background: #edf5ff;
    color: #0b57d0;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: inset 0 0 0 1px rgba(11, 87, 208, 0.06);
}

.entry-car-status:hover {
    color: #0842a0;
    text-decoration: none;
    background: #e7f1ff;
}

.entry-car-prices {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 260px)) minmax(180px, auto);
    gap: 12px;
    margin-top: 20px;
    align-items: end;
}

.entry-car-content-cta {
    margin-top: var(--space-24);
    display: flex;
}

.entry-car-prices__cta {
    justify-self: end;
}

.entry-car-prices__cta .btn {
    min-height: 54px;
    padding-inline: 20px;
}

.entry-car-price-card {
    display: grid;
    gap: 6px;
    padding: 17px 18px;
    border: 1px solid #dde7f2;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(8, 17, 31, 0.055);
}

.entry-car-price-card--vat {
    background: linear-gradient(180deg, #ffffff, #f4f9ff);
    border-color: #c9dcf6;
}

.entry-car-price-card span {
    color: #63728a;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
    line-height: 1.2;
    text-transform: uppercase;
}

.entry-car-price-card strong {
    color: #08111f;
    font-family: "Manrope", "Inter", sans-serif;
    font-size: clamp(24px, 3vw, 24px);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.04em;
    white-space: nowrap;
    padding-top: 5px;
}

.entry-meta {
    margin-top: 0;
    margin-bottom: var(--space-24);
}

.entry-meta-top {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-8);
    font-size: 14px;
    color: #666;
    margin-bottom: 0;
}

.entry-date {
    color: #666;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.entry-icon {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    color: currentColor;
    opacity: 0.7;
    vertical-align: middle;
}

.entry-icon-calendar,
.entry-icon-clock {
    margin-top: -1px;
}

.meta-separator {
    color: #666;
    margin: 0 4px;
}

.entry-category {
    position: relative;
}

.entry-category a {
    color: #666;
    font-weight: 400;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.entry-category a:hover {
    color: var(--link);
}

.entry-icon-folder {
    margin-top: -1px;
}

.entry-reading-time {
    color: #666;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.entry-intro {
    max-width: 760px;
    font-size: 17px;
    line-height: 1.6;
    color: #26334a;
    margin-top: var(--space-20);
    margin-bottom: 0;
}

.entry-intro p {
    margin-bottom: 0;
}

.entry-car-specs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-top: var(--space-24);
}

.entry-car-spec {
    position: relative;
    padding: 15px 16px;
    border: 1px solid #e4e8ef;
    border-radius: 18px;
    background: linear-gradient(180deg, #fff, #f8fbff);
    color: inherit;
    text-decoration: none;
    box-shadow: 0 10px 24px rgba(8, 17, 31, 0.04);
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.entry-car-spec:hover {
    transform: translateY(-2px);
    border-color: rgba(29, 78, 216, 0.32);
    text-decoration: none;
    box-shadow: 0 16px 34px rgba(8, 17, 31, 0.08);
}

.entry-car-spec span {
    display: block;
    margin-bottom: 8px;
    color: #6b7280;
    font-size: 12px;
    line-height: 1.2;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.entry-car-spec strong {
    display: block;
    color: var(--text);
    font-size: 16px;
    line-height: 1.3;
}

.entry-car-filter-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-top: var(--space-20);
}

.entry-car-filter-links > span {
    width: 100%;
    color: #6b7280;
    font-size: 13px;
    font-weight: 700;
}

.entry-car-filter-links a {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border: 1px solid #e4e8ef;
    border-radius: 999px;
    background: #fff;
    color: var(--text);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.entry-car-filter-links a:hover {
    border-color: rgba(29, 78, 216, 0.35);
    color: var(--link);
    text-decoration: none;
}

.entry-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    margin-top: var(--space-32);
    margin-bottom: 0;
}

/* Если нет интро, уменьшаем отступ перед тегами */
.entry-header .entry-meta + .entry-tags {
    margin-top: var(--space-24);
}

.entry-tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    background: transparent;
    border: 1px solid #e5e5e5;
    border-radius: 999px;
    color: var(--text);
    font-size: 12px;
    font-weight: 400;
    text-decoration: none;
    transition: all 0.2s ease;
    line-height: 1;
}

.entry-tag:hover {
    border-color: var(--link);
    color: var(--link);
    text-decoration: none;
    background: #fafafa;
}

.entry-thumbnail {
    margin: var(--space-32) 0;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 24px;
    background: #eef3f9;
    box-shadow: 0 20px 48px rgba(8, 17, 31, 0.12);
}

.entry-car-hero__media {
    margin: var(--space-24) 0 0;
    border: 1px solid rgba(196, 211, 228, 0.72);
}

.entry-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    margin: 0;
    display: block;
}

.entry-car-gallery {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: var(--space-24) 0 var(--space-32);
}

.entry-car-gallery a {
    display: block;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    border-radius: 14px;
    background: #f5f5f5;
}

.entry-car-gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    margin: 0;
    display: block;
    transition: transform 0.2s ease;
}

.entry-car-gallery a:hover img {
    transform: scale(1.04);
}

.page-links {
    margin-top: var(--space-24);
    padding-top: var(--space-24);
    border-top: 1px solid var(--border);
}

/* Related Posts */
.related-posts {
    margin-top: var(--space-48);
    padding-top: var(--space-48);
    border-top: 1px solid var(--border);
}

.related-posts h2 {
    margin-top: 0;
    margin-bottom: var(--space-24);
}

.related-posts-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: var(--space-20);
}

.related-post-item {
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 1px solid rgba(196, 211, 228, 0.8);
    border-radius: 20px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 14px 34px rgba(11, 24, 43, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.related-post-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 36px rgba(11, 24, 43, 0.14);
}

.related-post-thumbnail {
    border-radius: 0;
    overflow: hidden;
    margin: 0;
    aspect-ratio: 16 / 10;
    background: #edf3fb;
}

.related-post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    margin: 0;
    border-radius: 0;
}

.related-post-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px 16px 16px;
}

.related-post-title {
    font-size: 17px;
    line-height: 1.35;
    margin: 0;
}

.related-post-title a {
    color: var(--text);
}

.related-post-title a:hover {
    color: var(--link);
    text-decoration: none;
}

.related-post-price {
    font-size: 14px;
    font-weight: 600;
    color: var(--link);
}

/* Post Navigation */
.post-navigation {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-16);
    margin-top: var(--space-48);
    padding-top: var(--space-32);
    border-top: 1px solid var(--border);
    margin-bottom: 30px;
}

.nav-previous,
.nav-next {
    flex: 1;
}

.post-navigation a {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 92px;
    width: 100%;
    padding: 12px;
    border: 1px solid rgba(196, 211, 228, 0.82);
    border-radius: 18px;
    background: #fff;
    color: var(--text);
    font-weight: 500;
    text-decoration: none;
    box-shadow: 0 10px 24px rgba(11, 24, 43, 0.06);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.post-navigation a:hover {
    color: var(--text);
    border-color: rgba(29, 78, 216, 0.34);
    box-shadow: 0 14px 30px rgba(11, 24, 43, 0.1);
    transform: translateY(-1px);
    text-decoration: none;
}

.nav-next a {
    justify-content: flex-end;
}

.post-navigation-thumb {
    width: 72px;
    height: 72px;
    min-width: 72px;
    border-radius: 12px;
    object-fit: cover;
    margin: 0;
    background: #edf3fb;
}

.post-navigation-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.post-navigation-label {
    font-size: 12px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
}

.post-navigation-title {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.35;
    color: var(--text);
    overflow-wrap: anywhere;
}

/* Pagination */
.pagination {
    padding-top: var(--space-24);
}

.pagination ul {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: var(--space-8);
    justify-content: center;
    flex-wrap: wrap;
    align-items: center;
}

.pagination li {
    margin: 0;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    min-width: 40px;
    padding: var(--space-8) var(--space-12);
    font-size: 14px;
    color: var(--text);
    text-decoration: none;
    transition: all 0.2s ease;
}

.pagination a:hover {
    color: var(--link);
    text-decoration: none;
}

.pagination .current {
    font-weight: 800;
    background: var(--accent);
    color: white;
    text-decoration: none;
    border-radius: 15px;
}


/* Footer */
.site-footer {
    border-top: 1px solid var(--border);
    padding: var(--space-24) 0;
    margin-top: var(--space-64);
}

.footer-content {
    text-align: center;
    color: var(--muted);
    font-size: 14px;
}

.footer-content a {
    color: var(--muted);
}

.footer-content a:hover {
    color: var(--link);
}

/* Error Pages */
.error-404 {
    text-align: center;
    padding: var(--space-64) 0;
}

.error-content {
    max-width: 600px;
    margin: 0 auto;
}

.error-actions {
    margin: var(--space-32) 0;
}

.button {
    display: inline-block;
    padding: var(--space-12) var(--space-24);
    background: var(--link);
    color: var(--bg);
    border-radius: var(--radius);
    font-weight: 500;
    text-decoration: none;
}

.button:hover {
    background: var(--link-hover);
    text-decoration: none;
    color: var(--bg);
}

.error-search {
    margin-top: var(--space-32);
    text-align: left;
}

.error-search h2 {
    margin-bottom: var(--space-16);
}

.error-search .search-form {
    justify-content: flex-start;
}

/* No Posts */
.no-posts {
    text-align: center;
    padding: var(--space-48) 0;
    color: var(--muted);
}

/* Media Queries */

/* Very Small (max-width: 360px) */
@media (max-width: 360px) {
    body {
        font-size: 15px;
    }
    
    h1 {
        font-size: 26px;
    }
    
    .container {
        padding: 0 14px;
    }
    
    .site-main {
        padding-top: var(--space-24);
    }
    
    .posts-list,
    .related-posts-list {
        gap: calc(var(--space-16) * 0.8);
    }
    
    .entry-meta,
    .related-posts,
    .post-navigation {
        margin-top: calc(var(--space-48) * 0.8);
    }
    
    .post-card {
        flex-direction: column;
        padding: 14px;
    }
    
    .post-card-thumbnail {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
    }
}

/* Mobile (max-width: 480px) */
/* Very Small Screens (<=420px) */
@media (max-width: 420px) {
    .navpanel__toggleText {
        display: none;
    }
}

/* Mobile (<480px) */
@media (max-width: 480px) {
    body {
        font-size: 15px;
    }
    
    h1 {
        font-size: 28px;
    }
    
    h2 {
        font-size: 22px;
    }
    
    h3 {
        font-size: 18px;
    }
    
    .header-inner {
        flex-direction: column;
        align-items: stretch;
    }
    
    .main-navigation {
        order: 3;
    }
    
    .nav-menu {
        flex-direction: column;
        gap: var(--space-12);
    }
    
    .posts-list,
    .related-posts-list {
        gap: calc(var(--space-16) * 0.8);
    }

    .entry-meta{
        margin-top: 0;
        margin-bottom: 0;
    }
    .related-posts,
    .post-navigation {
        margin-top: calc(var(--space-48) * 0.8);
    }
    
    .related-posts-list {
        grid-template-columns: 1fr;
    }
    
    .post-navigation {
        grid-template-columns: 1fr;
    }
    
    .nav-next a {
        justify-content: flex-start;
    }
    
    .post-card {
        flex-direction: column;
        padding: 14px;
        min-height: auto;
    }
    
    .post-card-thumbnail {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
    }
    
    .post-card-title {
        font-size: 18px;
    }
    
    .nav-panel {
        padding: var(--space-12);
        border-radius: 16px;
        box-sizing: border-box;
        max-width: 100%;
        overflow: visible;
    }
    
    /* Блок поиска и фильтров - уже настроен выше в @media (max-width: 640px) */
    
    .nav-panel-chips-categories {
        overflow-x: auto;
        gap: var(--space-8);
        padding-bottom: var(--space-4);
        -webkit-overflow-scrolling: touch;
    }

    .nav-panel-chips-tags {
        overflow: visible;
        flex-wrap: wrap;
        white-space: normal;
    }
    
    .nav-panel-chip-category {
        flex-shrink: 0;
    }
    
    .nav-panel-actions {
        flex-direction: column;
        align-items: stretch;
        gap: var(--space-12);
    }
    
    .nav-panel-sort-wrapper {
        width: 100%;
    }
    
    .nav-panel-sort-select {
        width: 100%;
        min-width: 0;
    }
}

/* Breakpoint: Vertical Layout (<= 1024px) */
@media (max-width: 1024px) {
    .contentwrp {
        grid-template-columns: 1fr;
        gap: var(--space-16);
    }
    
    .nav-panel {
        position: relative;
        top: auto;
        width: 100%;
        max-width: none;
        order: -1;
    }
    
    .posts-list {
        order: 0;
    }
    
    /* Mobile: Show toggle, hide body by default */
    .navpanel__toggle--top { display: inline-flex; }
    .navpanel__toggle--bottom { display: none; }
    
    .navpanel__body {
        max-height: 0;
        opacity: 0;
        margin-top: 0;
        padding-top: 0;
    }

    .navpanel__minimal {
        display: none;
    }

    .nav-panel.is-open .navpanel__minimal {
        display: block;
    }
    
    .nav-panel.is-open .navpanel__body {
        max-height: none;
        overflow: visible;
        opacity: 1;
        margin-top: 14px;
        padding-top: 14px;
    }
    
    .navpanel__body[hidden] {
        display: block;
        max-height: 0;
        opacity: 0;
    }
    
    /* Стили для поиска заданы в @media (max-width: 640px) выше */
}

@media (min-width: 1025px) {
    .navpanel__toggle--top {
        display: none !important;
    }

    .navpanel__toggle--bottom {
        display: inline-flex !important;
    }
}

/* Tablet (481px - 768px) */
@media (min-width: 481px) and (max-width: 768px) {
    .post-card-thumbnail {
        width: 200px;
        height: 112px;
    }
    body {
        font-size: 16px;
    }
    
    h1 {
        font-size: 32px;
    }
    
    h2 {
        font-size: 26px;
    }
    
    h3 {
        font-size: 20px;
    }
    
    .container {
        padding: 0 var(--space-20);
    }
    
    .related-posts-list {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .nav-panel-chips-categories {
        overflow-x: auto;
        white-space: nowrap;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    .nav-panel-chips-tags {
        overflow: visible;
        flex-wrap: wrap;
        white-space: normal;
    }
}

@media (max-width: 1100px) {
    .posts-list__items.cars {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 680px) {
    .posts-list__items.cars {
        grid-template-columns: 1fr;
    }
}

/* Small Desktop (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    body {
        font-size: 16px;
    }
    
    h1 {
        font-size: 34px;
    }
    
    h2 {
        font-size: 28px;
    }
    
    .container {
        padding: 0 var(--space-24);
    }
}

/* Desktop (1025px - 1280px) */
@media (min-width: 1025px) and (max-width: 1280px) {
    body {
        font-size: 16px;
    }
    
    h1 {
        font-size: 36px;
    }
    
    .container {
        max-width: 1120px;
    }
}

/* Large Desktop (1281px+) */
@media (min-width: 1281px) {
    body {
        font-size: 17px;
    }
    
    h1 {
        font-size: 40px;
    }
    
    .container {
        max-width: 1200px;
    }
}

@media (max-width: 860px) {
    .entry-car-hero__head {
        grid-template-columns: 1fr;
    }

    .entry-car-status {
        width: fit-content;
    }

    .entry-car-specs {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .entry-car-gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .entry-car-hero {
        padding: 18px;
        border-radius: 24px;
    }

    .entry-title {
        font-size: clamp(31px, 10vw, 42px);
    }

    .entry-car-prices {
        grid-template-columns: 1fr;
    }

    .entry-car-prices__cta .btn,
    .entry-car-content-cta .btn {
        width: 100%;
    }

    .entry-car-hero__media {
        border-radius: 20px;
    }

    .entry-car-specs,
    .entry-car-gallery {
        grid-template-columns: 1fr;
    }
}

.lead-modal {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: none;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
}

.lead-modal.is-open {
    display: flex;
}

.lead-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgb(8 17 31 / 82%);
    backdrop-filter: blur(5px);
}

.lead-modal__dialog {
    position: relative;
    z-index: 1;
    width: min(420px, calc(100% - 32px));
    margin: 6vh auto 0;
    padding: 24px;
    border-radius: 24px;
    border: 1px solid #d9e5f3;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    box-shadow: 0 28px 76px rgba(8, 17, 31, 0.24);
}

.lead-modal__close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border: 1px solid #d9e5f3;
    border-radius: 999px;
    background: #fff;
    color: #3f4856;
    cursor: pointer;
}

.lead-modal__eyebrow {
    margin: 0 0 8px;
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-weight: 700;
    color: #6b7280;
}

.lead-modal__dialog h3 {
    margin: 0 0 10px;
    font-size: clamp(24px, 4vw, 34px);
    line-height: 1.1;
}

.lead-modal__sub {
    margin: 0 0 16px;
    color: #6b7280;
}

.lead-modal__form {
    display: grid;
    gap: 12px;
}

.lead-modal__form label {
    display: grid;
    gap: 6px;
}

.lead-modal__form label span {
    font-size: 12px;
    font-weight: 700;
    color: #516079;
}

.lead-modal__form input {
    height: 46px;
    border-radius: 14px;
    border: 1px solid #dbe5f2;
    padding: 0 14px;
    font-size: 14px;
    background: #fff;
}

.lead-modal__form .btn {
    margin-top: 4px;
}

.lead-modal__contacts {
    margin-top: 2px;
}

.lead-modal__contacts-title {
    margin: 4px 0 2px;
    font-size: 13px;
    font-weight: 600;
    color: #5d6d85;
}

.lead-modal__contacts a {
    min-height: 40px;
    border-radius: 12px;
}

.lead-modal__status {
    margin: 0;
    font-size: 13px;
    display: none;
}

.lead-modal__status:not(:empty) {
    display: block;
}

.lead-modal__status.is-error {
    color: #c53131;
}

.lead-modal__status.is-success {
    color: #1e7a36;
}

body.lead-modal-open {
    overflow: hidden;
}

/* Каталог и внутренние страницы GTS: ширина контента как на главной (мобилка) */
@media (max-width: 620px) {
    .gts-site-main .container {
        width: min(100% - 32px, var(--container, 1240px));
        max-width: none;
        margin-left: auto;
        margin-right: auto;
        padding-left: 0;
        padding-right: 0;
    }
}

/* Подсказки поиска поверх сетки карточек; панель не обрезает выпадашку */
@media (max-width: 1024px) {
    .nav-panel {
        overflow: visible;
        position: relative;
        z-index: 5;
    }
}

