/*
Theme Name: Locksmith Helper
Description: Тема для отображения данных о ключах автомобилей на базе GeneratePress
Version: 2.2.0
Author: Locksmith Helper Team
Template: generatepress
*/

/* Импортируем стили GeneratePress */
@import url("../generatepress/style.css");

/* Оригинальные стили теперь подключаются через wp_enqueue_style в functions.php с версионностью */

/* Простой и чистый стиль как на оригинале */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

/* Заголовок страницы */
.page-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 0;
}

.page-header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin: 0;
    color: #333;
    letter-spacing: -0.02em;
}

/* Flat дизайн - основные контейнеры */
.key-page-wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.key-container {
    width: 100%;
    margin: 0 0 24px 0;
    padding: 24px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    /* Flat дизайн - без теней и скруглений */
    border-radius: 0;
    box-shadow: none;
}

.key-header-block {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 0;
}

/* Стили для text-muted-foreground если его нет в original-styles.css */
.text-muted-foreground {
    color: #6b7280;
}

/* Flat заголовки в header блоке - переопределяем Tailwind классы с максимальной специфичностью */
.key-header-block .flex-1 h1,
.key-header-block .flex-1 h1.mt-2,
.key-header-block .flex-1 h1.mb-1,
.key-header-block .flex-1 h1.text-base,
.key-header-block .flex-1 h1.font-bold {
    font-size: 20px !important;
    font-weight: 700 !important;
    color: #111827 !important;
    margin: 8px 0 4px 0 !important;
    line-height: 1.3 !important;
}

@media (min-width: 768px) {
    .key-header-block .flex-1 h1,
    .key-header-block .flex-1 h1.md\:mb-2,
    .key-header-block .flex-1 h1.md\:text-2xl {
        font-size: 28px !important;
        margin-bottom: 8px !important;
    }
}

.key-header-block .flex-1 h2,
.key-header-block .flex-1 h2.text-muted-foreground,
.key-header-block .flex-1 h2.text-sm {
    font-size: 14px !important;
    color: #6b7280 !important;
    font-weight: 400 !important;
    margin: 0 !important;
    line-height: 1.5 !important;
}

@media (min-width: 768px) {
    .key-header-block .flex-1 h2,
    .key-header-block .flex-1 h2.md\:text-base {
        font-size: 16px !important;
    }
}

.flex-1 {
    flex: 1;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 20px;
}

.key-header {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.key-image-wrapper {
    flex-shrink: 0;
}

.key-image {
    width: 120px;
    height: 120px;
    object-fit: contain;
    border-radius: 8px;
    background: white;
    padding: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.key-image img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.key-title-main {
    margin-top: 8px;
    margin-bottom: 4px;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
    color: #111827;
}

@media (min-width: 768px) {
    .key-title-main {
        margin-bottom: 8px;
        font-size: 24px;
    }
}

.key-subtitle {
    font-size: 14px;
    color: #6b7280;
    font-weight: 400;
    margin: 0;
    line-height: 1.5;
}

@media (min-width: 768px) {
    .key-subtitle {
        font-size: 16px;
    }
}

.page-title-main {
    margin-top: 8px;
    margin-bottom: 4px;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
    color: #111827;
}

@media (min-width: 768px) {
    .page-title-main {
        margin-bottom: 8px;
        font-size: 24px;
    }
}

.key-info h1 {
    margin: 0 0 10px 0;
    font-size: 2.5rem;
    color: #2c3e50;
    font-weight: 800;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.key-info h2 {
    margin: 0;
    color: #667eea;
    font-weight: 600;
    font-size: 1.2rem;
}

.breadcrumb {
    margin-bottom: 20px;
}

.breadcrumb ol,
.breadcrumb-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 12px;
    color: #6b7280;
}

@media (min-width: 640px) {
    .breadcrumb ol,
    .breadcrumb-list {
        gap: 10px;
        font-size: 14px;
    }
}

.breadcrumb li,
.breadcrumb-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.breadcrumb a,
.breadcrumb-link {
    color: #6b7280;
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb a:hover,
.breadcrumb-link:hover {
    color: #2563eb;
}

.breadcrumb-separator {
    display: inline-flex;
    align-items: center;
    color: #9ca3af;
}

.breadcrumb-separator svg {
    width: 14px;
    height: 14px;
}

/* Flat навигация - полностью плоский дизайн */
.key-nav {
    position: sticky;
    top: 0;
    z-index: 50;
    background: #ffffff;
    border-bottom: 2px solid #e5e7eb;
    margin-bottom: 32px;
    /* Flat - без теней */
    box-shadow: none;
    border-radius: 0;
}

.key-nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    overflow-x: auto;
}

.key-nav li {
    flex: 1;
    min-width: 120px;
}

.key-nav a {
    display: block;
    padding: 14px 16px;
    text-decoration: none;
    color: #374151;
    font-weight: 500;
    font-size: 14px;
    text-align: center;
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease;
}

.key-nav a:hover {
    background: #f9fafb;
    color: #111827;
}

.key-nav a.active {
    color: #2563eb;
    border-bottom-color: #2563eb;
    background: #f9fafb;
}

/* Flat контент - сетка */
.key-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    margin-bottom: 48px;
}

@media (min-width: 1024px) {
    .key-content {
        grid-template-columns: 1fr 280px;
    }
}

/* Главный контент - flat дизайн */
.key-main {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    padding: 32px;
    /* Flat - без теней и скруглений */
    border-radius: 0;
    box-shadow: none;
}

.key-html-content {
    color: #1f2937;
    line-height: 1.7;
}

/* Общие стили для улучшения читабельности HTML контента (не меняем сам контент) */
.key-html-content p {
    margin-bottom: 1em;
}

.key-html-content ul,
.key-html-content ol {
    margin-bottom: 1em;
    padding-left: 1.5em;
}

.key-html-content li {
    margin-bottom: 0.5em;
}

.key-html-content h2,
.key-html-content h3 {
    margin-top: 1.5em;
    margin-bottom: 0.75em;
}

.key-html-content img {
    max-width: 100%;
    height: auto;
}

.no-content {
    padding: 40px 20px;
    text-align: center;
    color: #6b7280;
}

.no-content p {
    margin: 0;
}

/* Flat сайдбар */
.key-sidebar {
    position: sticky;
    top: 80px;
    align-self: start;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    padding: 20px;
    border-radius: 0;
    box-shadow: none;
}

.key-sidebar h3 {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 16px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid #e5e7eb;
}

.key-sidebar ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.key-sidebar li {
    margin-bottom: 4px;
}

.key-sidebar a {
    display: block;
    padding: 10px 12px;
    text-decoration: none;
    color: #4b5563;
    font-size: 14px;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
}

.key-sidebar a:hover {
    background: #f9fafb;
    color: #111827;
    border-left-color: #d1d5db;
}

.key-sidebar a.active {
    color: #2563eb;
    background: #eff6ff;
    border-left-color: #2563eb;
    font-weight: 500;
}

/* Якорные ссылки в сайдбаре */
.key-sidebar a.anchor-link {
    padding-left: 12px;
}

.key-sidebar a.anchor-link[data-level="3"] {
    padding-left: 20px;
    font-size: 13px;
    color: #6b7280;
}

.key-sidebar a.anchor-link:hover {
    color: #2563eb;
}

.key-sidebar a.anchor-link:target,
.key-sidebar a.anchor-link.active-anchor {
    color: #2563eb;
    background: #eff6ff;
    border-left-color: #2563eb;
    font-weight: 500;
}

.key-sidebar .no-headings {
    color: #9ca3af;
    font-size: 13px;
    font-style: italic;
}

/* Плавная прокрутка к якорям */
html {
    scroll-behavior: smooth;
}

/* Отступ для якорей при фиксированном header */
.key-html-content h2[id],
.key-html-content h3[id] {
    scroll-margin-top: 100px;
}

.sidebar-info {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
}

.info-item {
    padding: 12px 0;
    border-bottom: 1px solid #e5e7eb;
    font-size: 13px;
    color: #4b5563;
}

.info-item:last-child {
    border-bottom: none;
}

.info-item strong {
    display: block;
    margin-bottom: 4px;
    color: #111827;
    font-weight: 600;
}

.info-item a {
    color: #2563eb;
    text-decoration: none;
}

.info-item a:hover {
    text-decoration: underline;
}

/* Flat заголовки секций */
.section-title {
    font-size: 28px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 32px 0;
    padding-bottom: 16px;
    border-bottom: 2px solid #e5e7eb;
}

@media (min-width: 768px) {
    .section-title {
        font-size: 32px;
    }
}

.profile-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    background: white;
}

.profile-image {
    width: 100px;
    height: 75px;
    object-fit: contain;
    border-radius: 4px;
    margin-bottom: 10px;
}

.profile-name {
    font-weight: bold;
    margin-bottom: 5px;
}

.profile-info {
    color: #666;
    font-size: 0.9rem;
}

.code-series {
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 20px;
    font-family: monospace;
    font-size: 1.1rem;
}

.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.media-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: white;
    transition: all 0.3s ease;
}

.media-item:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.media-image {
    width: 72px;
    height: 72px;
    object-fit: contain;
    border-radius: 4px;
}

.media-info {
    flex: 1;
}

.media-title {
    font-weight: bold;
    margin-bottom: 5px;
}

/* Flat адаптивность */
@media (max-width: 768px) {
    .key-page-wrapper {
        padding: 0 16px;
    }
    
    .key-container {
        padding: 20px;
    }
    
    .key-header-block {
        flex-direction: column;
        gap: 16px;
    }
    
    .key-nav {
        margin-bottom: 24px;
    }
    
    .key-nav ul {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .key-nav li {
        min-width: 100px;
    }
    
    .key-nav a {
        padding: 12px 14px;
        font-size: 13px;
    }
    
    .key-content {
        gap: 24px;
    }
    
    .key-main {
        padding: 24px 20px;
    }
    
    .key-sidebar {
        position: static;
        margin-top: 24px;
    }
    
    .section-title {
        font-size: 24px;
        margin-bottom: 24px;
    }
}

/* Простые фильтры */
.key-filters {
    background: white;
    padding: 20px;
    margin-bottom: 30px;
    border: 1px solid #e9ecef;
    border-radius: 4px;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.filter-row {
    display: flex;
    flex-direction: column;
    position: relative;
    transition: all 0.3s ease;
}

.filter-row.hidden {
    display: none;
}

.filter-row label {
    font-weight: 500;
    margin-bottom: 5px;
    color: #333;
    font-size: 14px;
}

.filter-row select,
.filter-row input {
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    background: white;
    color: #333;
}

.filter-row select:focus,
.filter-row input:focus {
    outline: none;
    border-color: #007cba;
}

.filter-row select:disabled {
    background: #f8f9fa;
    color: #6c757d;
    cursor: not-allowed;
}

.filter-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: flex-end;
}

.filter-actions .button {
    padding: 8px 16px;
    border: 1px solid #007cba;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.filter-actions .button-primary {
    background: #007cba;
    color: white;
}

.filter-actions .button-primary:hover {
    background: #005a87;
}

.filter-actions .button:not(.button-primary) {
    background: white;
    color: #007cba;
}

.filter-actions .button:not(.button-primary):hover {
    background: #f8f9fa;
}

.reset-link {
    position: absolute;
    top: 25px;
    right: 0;
    font-size: 0.8rem;
    color: #007cba;
    text-decoration: none;
    opacity: 0.8;
}

.reset-link:hover {
    opacity: 1;
    text-decoration: underline;
}

/* Таблица с ключами */
.keys-table-container {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
    margin-bottom: 30px;
}

.keys-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.keys-table thead {
    background: #f8f9fa;
    border-bottom: 2px solid #e9ecef;
}

.keys-table th {
    padding: 15px 12px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 1px solid #e9ecef;
}

.keys-table td {
    padding: 12px;
    border-bottom: 1px solid #f1f3f4;
    vertical-align: middle;
}

.keys-table tbody tr:hover {
    background: #f8f9fa;
}

.keys-table tbody tr.key-row-clickable {
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.keys-table tbody tr.key-row-clickable:hover {
    background: #f0f4f8;
}

.key-image-cell {
    width: 80px;
    text-align: center;
}

.key-thumbnail {
    width: 60px;
    height: 40px;
    object-fit: contain;
    border-radius: 4px;
    background: #f8f9fa;
    padding: 4px;
}

.no-image {
    width: 60px;
    height: 40px;
    background: #f8f9fa;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: #6c757d;
}

.key-make, .key-model, .key-body {
    font-weight: 500;
    color: #333;
}

.key-title {
    font-weight: 600;
    color: #007cba;
}

.key-title a {
    color: #007cba;
    text-decoration: none;
}

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

.key-market {
    font-size: 12px;
    color: #6c757d;
}

.no-results {
    text-align: center;
    padding: 40px;
    color: #6c757d;
    font-style: italic;
}

/* Простой список ключей */
.keys-grid {
    display: block;
    margin-bottom: 30px;
}

.key-list-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    margin-bottom: 10px;
    background: white;
    transition: all 0.2s ease;
}

.key-list-item:hover {
    border-color: #007cba;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.key-list-image {
    width: 80px;
    height: 60px;
    margin-right: 15px;
    flex-shrink: 0;
    border-radius: 4px;
    overflow: hidden;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.key-list-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.key-list-image .no-image {
    color: #6c757d;
    font-size: 12px;
    font-weight: 500;
}

.key-list-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.key-list-info {
    flex: 1;
}

.key-list-title {
    margin: 0 0 5px 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.key-list-title a {
    color: #333;
    text-decoration: none;
}

.key-list-title a:hover {
    color: #007cba;
}

.key-list-meta {
    display: flex;
    gap: 8px;
    margin-bottom: 5px;
    flex-wrap: wrap;
}

.key-list-brand,
.key-list-model,
.key-list-body {
    font-size: 12px;
    color: #6c757d;
    background: #f8f9fa;
    padding: 2px 6px;
    border-radius: 3px;
    border: 1px solid #e9ecef;
}

.key-list-brand a,
.key-list-model a,
.key-list-body a {
    color: inherit;
    text-decoration: none;
}

.key-list-brand a:hover,
.key-list-model a:hover,
.key-list-body a:hover {
    color: #007cba;
}

.key-list-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.key-list-link {
    background: #007cba;
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.key-list-link:hover {
    background: #005a87;
    color: white;
}

.key-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.key-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.key-card-image {
    height: 200px;
    overflow: hidden;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.key-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.key-card-image .no-image {
    color: #6c757d;
    font-size: 18px;
    font-weight: 600;
}

.key-card-content {
    padding: 20px;
}

.key-card-content h3 {
    margin: 0 0 10px 0;
    font-size: 18px;
    line-height: 1.4;
}

.key-card-content h3 a {
    color: #212529;
    text-decoration: none;
}

.key-card-content h3 a:hover {
    color: #007cba;
}

.key-type {
    color: #6c757d;
    font-size: 14px;
    margin: 0 0 10px 0;
}

.key-excerpt {
    color: #6c757d;
    font-size: 14px;
    line-height: 1.5;
    margin: 0 0 15px 0;
}

.key-meta {
    margin-bottom: 15px;
}

.brand-model,
.body-info {
    display: inline-block;
    background: #e9ecef;
    color: #495057;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    margin-right: 5px;
    margin-bottom: 5px;
}

.brand-model a {
    color: #495057;
    text-decoration: none;
}

.brand-model a:hover {
    color: #007cba;
}

.tech-preview {
    margin-bottom: 15px;
}

.tech-tag {
    display: inline-block;
    background: #007cba;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    margin-right: 5px;
    margin-bottom: 5px;
}

.market-tag {
    display: inline-block;
    background: #28a745;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    margin-right: 5px;
    margin-bottom: 5px;
}

.key-link {
    display: inline-block;
    background: #007cba;
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.key-link:hover {
    background: #005a87;
    color: white;
}

/* Flat badges для structured data */
.key-badge {
    display: inline-block;
    padding: 4px 10px;
    border: 1px solid #d1d5db;
    font-size: 12px;
    line-height: 1.4;
    background: #ffffff;
    color: #374151;
    font-weight: 500;
}

.key-badge-open {
    background: #dcfce7;
    border-color: #86efac;
    color: #166534;
}

.key-badge-closed {
    background: #dbeafe;
    border-color: #93c5fd;
    color: #1e40af;
}

.key-badge-disabled {
    background: #f3f4f6;
    border-color: #d1d5db;
    color: #9ca3af;
}

.key-badge-warning {
    background: #fef3c7;
    border-color: #fde68a;
    color: #92400e;
}

.key-badge-caution {
    background: #fef3c7;
    border-color: #fde68a;
    color: #92400e;
}

.key-badge-tip {
    background: #dbeafe;
    border-color: #93c5fd;
    color: #1e40af;
}

.key-badge-important {
    background: #fee2e2;
    border-color: #fca5a5;
    color: #991b1b;
}

/* Flat structured blocks и notes */
.key-structured-wrapper {
    margin-top: 32px;
    padding-top: 32px;
    border-top: 1px solid #e5e7eb;
}

.key-structured-blocks,
.key-structured-notes {
    margin-bottom: 32px;
}

.key-structured-blocks h3,
.key-structured-notes h3 {
    font-size: 20px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 16px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid #e5e7eb;
}

.key-blocks-list,
.key-notes-list {
    display: grid;
    gap: 16px;
}

.key-block-card,
.key-note-card {
    border: 1px solid #e5e7eb;
    background: #ffffff;
    padding: 16px;
}

.key-block-header,
.key-note-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.key-block-header h4,
.key-note-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #111827;
}

.key-block-text,
.key-note-text {
    color: #4b5563;
    font-size: 14px;
    line-height: 1.6;
}

.key-block-details {
    margin-top: 12px;
}

.key-block-details summary {
    cursor: pointer;
    color: #2563eb;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 0;
}

.key-block-details summary:hover {
    color: #1d4ed8;
}

/* Стоимость работ - гибридный контент */
.key-main .rounded-lg.border-1.bg-zinc-50\/50 {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.key-main .rounded-lg.border-1.bg-zinc-50\/50 .text-sm {
    color: #1f2937;
}

.key-main .rounded-lg.border-1.bg-zinc-50\/50 .text-base {
    color: #0f172a;
}

.key-main .rounded-lg.border-1.bg-zinc-50\/50 .text-muted-foreground {
    color: #64748b;
}

.key-main .rounded-lg.border-1.bg-zinc-50\/50 .text-base.font-medium.text-gray-600 {
    color: #111827;
    font-weight: 600;
}

.key-main .rounded-lg.border-1.bg-zinc-50\/50 .flex.items-center.gap-2 {
    align-items: baseline;
}

.key-main .rounded-lg.border-1.bg-zinc-50\/50 .flex.items-center.gap-1\.5 span {
    font-size: 0.95rem;
}

.key-main .rounded-lg.border-1.bg-zinc-50\/50 .h-2.w-2 {
    flex-shrink: 0;
}

.key-block-html,
.key-note-html {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e5e7eb;
}

/* Пагинация в стиле оригинала */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 40px;
    padding: 16px;
    background: #f1f5f9;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.pagination a,
.pagination span {
    display: inline-block;
    padding: 10px 14px;
    border: 1px solid transparent;
    color: #1f2937;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
    background: white;
    min-width: 44px;
    text-align: center;
}

.pagination a:hover {
    background: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
}

.pagination .current {
    background: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
}

.pagination .dots {
    color: #94a3b8;
    border: none;
    background: none;
    cursor: default;
}

/* Адаптивность для фильтров */
@media (max-width: 768px) {
    .filter-grid {
        grid-template-columns: 1fr;
    }
    
    .keys-grid {
        grid-template-columns: 1fr;
    }
    
    .filter-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-actions .button {
        text-align: center;
    }
    
    /* Минималистичная мобильная версия таблицы ключей - блоки без границ */
    .keys-table-container {
        padding: 0 !important;
        border: none !important;
        margin: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
        border-radius: 0 !important;
    }
    
    .keys-table,
    .keys-table thead,
    .keys-table tbody,
    .keys-table th,
    .keys-table td,
    .keys-table tr {
        display: block !important;
    }
    
    .keys-table thead {
        display: none !important;
    }
    
    /* Преобразуем строки таблицы в карточки */
    .keys-table tbody tr {
        display: flex !important;
        flex-direction: row !important;
        align-items: flex-start !important;
        gap: 12px !important;
        background: white !important;
        border: none !important;
        border-radius: 12px !important;
        margin-bottom: 12px !important;
        padding: 12px !important;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
        transition: box-shadow 0.2s ease !important;
    }
    
    .keys-table tbody tr:last-child {
        margin-bottom: 0 !important;
    }
    
    .keys-table tbody tr:hover {
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1) !important;
        background: white !important;
    }
    
    .keys-table td {
        padding: 0 !important;
        border: none !important;
        margin: 0 !important;
        display: block !important;
        vertical-align: top !important;
    }
    
    /* Скрываем номер колонки */
    .keys-table td.key-number {
        display: none !important;
    }
    
    /* Скрываем бренд, модель, кузов на мобильной */
    .keys-table td.key-make,
    .keys-table td.key-model,
    .keys-table td.key-body {
        display: none !important;
    }
    
    /* Изображение - слева, компактное */
    .keys-table td.key-image-cell {
        flex-shrink: 0 !important;
        width: 80px !important;
        padding: 0 !important;
        margin: 0 !important;
        display: flex !important;
        align-items: flex-start !important;
        justify-content: center !important;
    }
    
    .key-image-cell img,
    .key-image-cell .no-image {
        width: 80px !important;
        height: 60px !important;
        object-fit: contain !important;
        border-radius: 8px !important;
        background: #f8f9fa !important;
        padding: 4px !important;
        margin: 0 !important;
    }
    
    /* Название ключа - справа, занимает оставшееся пространство */
    .keys-table td.key-title {
        flex: 1 !important;
        font-weight: 600 !important;
        font-size: 15px !important;
        line-height: 1.4 !important;
        margin: 0 !important;
        padding: 0 !important;
        color: #1e293b !important;
        min-width: 0 !important;
    }
    
    .keys-table td.key-title a {
        color: #2563eb !important;
        text-decoration: none !important;
        display: block !important;
        word-break: break-word !important;
        line-height: 1.4 !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .keys-table td.key-title a:hover {
        text-decoration: underline !important;
    }
}

/* Стили для страниц брендов и моделей */
.brands-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.brand-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.brand-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.brand-image {
    height: 150px;
    overflow: hidden;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.brand-image .no-image {
    color: #6c757d;
    font-size: 48px;
    font-weight: 600;
}

.brand-content {
    padding: 20px;
}

.brand-content h3 {
    margin: 0 0 10px 0;
    font-size: 20px;
    line-height: 1.4;
}

.brand-content h3 a {
    color: #212529;
    text-decoration: none;
}

.brand-content h3 a:hover {
    color: #007cba;
}

.brand-description {
    color: #6c757d;
    font-size: 14px;
    line-height: 1.5;
    margin: 0 0 15px 0;
}

.brand-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 24px;
    font-weight: 600;
    color: #007cba;
}

.stat-label {
    font-size: 12px;
    color: #6c757d;
    text-transform: uppercase;
}

.brand-link {
    display: inline-block;
    background: #007cba;
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.brand-link:hover {
    background: #005a87;
    color: white;
}

/* Стили для моделей */
.models-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.model-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.model-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.model-image {
    height: 150px;
    overflow: hidden;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.model-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.model-image .no-image {
    color: #6c757d;
    font-size: 18px;
    font-weight: 600;
}

.model-content {
    padding: 20px;
}

.model-content h3 {
    margin: 0 0 10px 0;
    font-size: 18px;
    line-height: 1.4;
}

.model-content h3 a {
    color: #212529;
    text-decoration: none;
}

.model-content h3 a:hover {
    color: #007cba;
}

.model-description {
    color: #6c757d;
    font-size: 14px;
    line-height: 1.5;
    margin: 0 0 15px 0;
}

.model-meta {
    margin-bottom: 15px;
}

.key-count {
    display: inline-block;
    background: #e9ecef;
    color: #495057;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.model-link {
    display: inline-block;
    background: #007cba;
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.model-link:hover {
    background: #005a87;
    color: white;
}

/* Дополнительные стили */
.ext-tag {
    display: inline-block;
    background: #6c757d;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    margin-right: 5px;
    margin-bottom: 5px;
}

.key-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.gallery-image {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #e9ecef;
}

/* ===== HEADER & NAVIGATION STYLES ===== */
/* Высокая специфичность чтобы перебить GeneratePress */
#masthead.site-header,
header#masthead.site-header {
    background: #ffffff !important;
    border-bottom: 1px solid #e5e7eb !important;
    padding: 1rem 0 !important;
}

.site-header .site-header-container {
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 0 20px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
}

.site-header .site-logo .logo-link {
    font-size: 1.25rem !important;
    font-weight: 700 !important;
    color: #111827 !important;
    text-decoration: none !important;
    transition: color 0.2s ease;
}

.site-header .site-logo .logo-link:hover {
    color: #2563eb !important;
}

.site-header .site-navigation,
.site-header nav.site-navigation {
    display: flex !important;
    align-items: center !important;
    gap: 1rem !important;
}

.site-header .site-navigation ul {
    display: flex !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    gap: 1rem !important;
    align-items: center !important;
}

.site-header .site-navigation ul li {
    margin: 0 !important;
}

.site-header .site-navigation a,
.site-header .site-navigation .nav-link {
    color: #374151 !important;
    text-decoration: none !important;
    font-weight: 500 !important;
    font-size: 0.875rem !important;
    padding: 0.5rem 1rem !important;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
}

.site-header .site-navigation a:hover,
.site-header .site-navigation .nav-link:hover {
    background-color: #f3f4f6 !important;
    color: #111827 !important;
}

/* Статус подписки в хедере */
.site-header .site-navigation .subscription-status {
    color: #6b7280 !important;
    font-size: 0.75rem !important;
    font-weight: 400 !important;
    margin-left: 0.25rem !important;
    padding: 0 !important;
    background: none !important;
}

.site-header .site-navigation .subscription-status:before {
    content: '';
    margin: 0;
}

/* Мобильная адаптация для header */
@media (max-width: 768px) {
    .site-header .site-header-container {
        padding: 0 15px !important;
        flex-wrap: wrap !important;
    }
    
    .site-header .site-navigation {
        width: 100% !important;
        margin-top: 0.5rem !important;
    }
    
    .site-header .site-navigation ul {
        flex-wrap: wrap !important;
    }
}

/* Lightbox стили */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    cursor: default;
}

.lightbox-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 1);
}

/* Адаптивность для новых шаблонов */
@media (max-width: 768px) {
    .brands-grid,
    .models-grid {
        grid-template-columns: 1fr;
    }
    
    .brand-stats {
        flex-direction: column;
        gap: 10px;
    }
    
    .lightbox-content {
        max-width: 95%;
        max-height: 95%;
    }
    
    .lightbox-close {
        top: -35px;
        width: 35px;
        height: 35px;
        font-size: 20px;
    }
}

/* Стили для блока статистики в хедере */
.locksmith-header-stats {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 16px 20px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin: 16px 0;
    box-shadow: none;
}

.locksmith-header-stats .stats-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #1f2937;
}

.locksmith-header-stats .stats-label {
    font-size: 14px;
    font-weight: 500;
    color: #64748b;
}

.locksmith-header-stats .stats-value {
    font-size: 20px;
    font-weight: 700;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    padding: 6px 12px;
    border-radius: 6px;
    min-width: 50px;
    text-align: center;
}

@media (max-width: 768px) {
    .locksmith-header-stats {
        flex-direction: column;
        gap: 15px;
        padding: 12px 15px;
    }
    
    .locksmith-header-stats .stats-item {
        width: 100%;
        justify-content: space-between;
    }
    
    .locksmith-header-stats .stats-value {
        font-size: 18px;
    }
}





