/* public/assets/css/style.css */
:root {
    --primary: #1a5276;
    --primary-dark: #154360;
    --accent: #e67e22;
    --bg: #f8f9fa;
    --card-bg: #fff;
    --text: #2c3e50;
    --text-light: #7f8c8d;
    --border: #e1e8ed;
    --shadow: 0 2px 12px rgba(0,0,0,0.08);
    --radius: 12px;
    --gap: 24px;
    --max-width: 1200px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--gap);
}

/* Header */
.header {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px var(--gap);
    gap: 20px;
}

.logo {
    font-size: 24px;
    font-weight: 800;
    color: var(--primary);
    text-decoration: none;
    display: flex;
    align-items: baseline;
    gap: 2px;
}

.logo-tag { font-size: 14px; color: var(--accent); font-weight: 600; }

.nav {
    display: flex;
    gap: 24px;
}

.nav a {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    padding: 6px 0;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.nav a:hover { color: var(--primary); border-bottom-color: var(--primary); }

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* City Selector */
.city-selector {
    position: relative;
    cursor: pointer;
    padding: 6px 12px;
    background: var(--bg);
    border-radius: 8px;
    font-size: 14px;
}

.city-name { font-weight: 600; color: var(--primary); }

.city-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 16px;
    min-width: 220px;
    z-index: 200;
}

.city-dropdown p { font-size: 12px; color: var(--text-light); margin-bottom: 8px; }

.city-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
}

.city-list a {
    color: var(--text);
    text-decoration: none;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 14px;
}

.city-list a:hover { background: var(--bg); color: var(--primary); }

.city-selector:hover .city-dropdown,
.city-selector.active .city-dropdown { display: block; }

/* Search */
.search-form { display: flex; gap: 0; }
.search-form input {
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: 8px 0 0 8px;
    border-right: none;
    outline: none;
    width: 200px;
    font-size: 14px;
}

.search-form button {
    padding: 8px 14px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
}

/* Main */
.main { padding: 32px 0; min-height: 60vh; }

.content-wrapper {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: var(--gap);
    margin-top: 24px;
}

.content { min-width: 0; }

/* Breadcrumbs */
.breadcrumbs { margin-bottom: 16px; font-size: 13px; }
.breadcrumbs ol { display: flex; list-style: none; gap: 8px; flex-wrap: wrap; }
.breadcrumbs li:not(:last-child)::after { content: '›'; margin-left: 8px; color: var(--text-light); }
.breadcrumbs a { color: var(--primary); text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }

/* Page title */
.page-title { font-size: 32px; margin-bottom: 20px; color: var(--primary-dark); }

/* Hero */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    padding: 60px var(--gap);
    border-radius: var(--radius);
    margin-bottom: 40px;
    text-align: center;
}

.hero h2 { font-size: 36px; margin-bottom: 12px; }

.hero p { font-size: 18px; opacity: 0.9; margin-bottom: 24px; }

.hero-search input {
    padding: 16px 24px;
    width: 100%;
    max-width: 600px;
    border: none;
    border-radius: 8px 0 0 8px;
    font-size: 16px;
}

.hero-search button {
    padding: 16px 32px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 0 8px 8px 0;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

.hero-search form { display: flex; justify-content: center; }

/* Grid */
.grid { display: grid; gap: var(--gap); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

@media (max-width: 900px) {
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .content-wrapper { grid-template-columns: 1fr; }
    .nav { display: none; }
}

@media (max-width: 600px) {
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
    .hero h2 { font-size: 24px; }
}

/* Cards */
.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    color: var(--text);
    display: block;
}

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

.card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 12px;
}

.card h3 { font-size: 18px; margin-bottom: 8px; color: var(--primary); }

.card h3 a { color: inherit; text-decoration: none; }

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

.card p { color: var(--text-light); font-size: 14px; line-height: 1.5; }

.card-meta {
    display: flex;
    gap: 12px;
    margin-top: 12px;
    font-size: 13px;
    color: var(--text-light);
}

.card-count {
    display: inline-block;
    margin-top: 8px;
    padding: 4px 12px;
    background: var(--bg);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
}

/* Section */
.section { margin-bottom: 48px; }
.section h2 { font-size: 24px; margin-bottom: 20px; color: var(--primary-dark); }

/* Category card */
.category-card { text-align: center; padding: 32px 20px; }

/* Service card */
.service-card { position: relative; }
.service-meta { display: flex; flex-direction: column; gap: 4px; margin-top: 12px; font-size: 13px; color: var(--text-light); }

/* Service list (city page) */
.services-list { display: flex; flex-direction: column; gap: 20px; }

.service-item {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    position: relative;
}

.service-header { display: flex; gap: 16px; align-items: center; margin-bottom: 12px; }
.service-logo { width: 64px; height: 64px; object-fit: contain; border-radius: 8px; }

.badge {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-premium { background: linear-gradient(135deg, #f1c40f, #e67e22); color: #fff; }

.service-details { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 12px; font-size: 14px; }
.service-tags { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 6px; }

/* Service detail */
.service-detail-header { display: flex; gap: 24px; align-items: center; margin-bottom: 24px; }
.service-detail-logo { width: 100px; height: 100px; object-fit: contain; }
.rating-big { font-size: 20px; color: var(--accent); margin-top: 8px; }
.rating-big span { font-size: 14px; color: var(--text-light); }

.service-detail-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.info-block {
    background: var(--card-bg);
    padding: 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.info-block h3 { font-size: 16px; margin-bottom: 12px; color: var(--primary); }

/* Tags */
.tag {
    display: inline-block;
    padding: 4px 12px;
    background: var(--bg);
    border-radius: 20px;
    font-size: 13px;
    color: var(--primary);
    text-decoration: none;
}

.tag:hover { background: var(--primary); color: #fff; }

/* Article */
.article-full { background: var(--card-bg); padding: 32px; border-radius: var(--radius); box-shadow: var(--shadow); }
.article-image { width: 100%; max-height: 400px; object-fit: cover; border-radius: var(--radius); margin-bottom: 24px; }
.article-content { font-size: 16px; line-height: 1.8; }
.article-content h2 { font-size: 24px; margin: 32px 0 16px; color: var(--primary-dark); }
.article-content h3 { font-size: 20px; margin: 24px 0 12px; color: var(--primary); }
.article-content p { margin-bottom: 16px; }
.article-content ul, .article-content ol { margin-bottom: 16px; padding-left: 24px; }
.article-content li { margin-bottom: 8px; }
.article-content img { max-width: 100%; border-radius: 8px; margin: 16px 0; }
.article-content table { width: 100%; border-collapse: collapse; margin: 16px 0; }
.article-content th, .article-content td { padding: 10px; border: 1px solid var(--border); text-align: left; }
.article-content th { background: var(--bg); font-weight: 600; }

.article-tags { margin: 24px 0; display: flex; flex-wrap: wrap; gap: 8px; }
.article-meta { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--border); font-size: 13px; color: var(--text-light); display: flex; gap: 16px; }

.related-articles { margin-top: 40px; }

/* Cities */
.cities-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; margin: 24px 0; }
.city-card {
    background: var(--card-bg);
    padding: 24px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
    text-decoration: none;
    color: var(--text);
    transition: all 0.2s;
}

.city-card:hover { background: var(--primary); color: #fff; transform: translateY(-2px); }
.city-card h3 { font-size: 20px; margin-bottom: 4px; }
.city-count { font-size: 14px; opacity: 0.8; }

.user-city-hint {
    background: var(--card-bg);
    padding: 24px;
    border-radius: var(--radius);
    text-align: center;
    margin-top: 24px;
    border: 2px dashed var(--border);
}

.cities-small { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.cities-small a { padding: 6px 14px; background: var(--card-bg); border-radius: 20px; text-decoration: none; color: var(--text); font-size: 14px; box-shadow: var(--shadow); }
.cities-small a:hover { background: var(--primary); color: #fff; }

/* Sidebar */
.sidebar-block {
    background: var(--card-bg);
    padding: 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.sidebar-block h3 { font-size: 16px; margin-bottom: 16px; color: var(--primary); }

.sidebar-list { list-style: none; }
.sidebar-list li { margin-bottom: 10px; }
.sidebar-list a { color: var(--text); text-decoration: none; font-size: 14px; display: flex; justify-content: space-between; align-items: center; }
.sidebar-list a:hover { color: var(--primary); }
.sidebar-list .count, .sidebar-list .views { font-size: 12px; color: var(--text-light); }

.sticky { position: sticky; top: 100px; }

/* Pagination */
.pagination { display: flex; gap: 8px; margin-top: 32px; justify-content: center; }
.page-link, .page-current { padding: 8px 16px; border-radius: 8px; text-decoration: none; font-size: 14px; }
.page-link { background: var(--card-bg); color: var(--primary); box-shadow: var(--shadow); }
.page-link:hover { background: var(--primary); color: #fff; }
.page-current { background: var(--primary); color: #fff; font-weight: 600; }

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }

.btn-outline { background: transparent; color: var(--primary); border: 2px solid var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }

.text-center { text-align: center; margin-top: 24px; }

/* Search page */
.search-big { display: flex; margin-bottom: 32px; }
.search-big input { flex: 1; padding: 16px 24px; border: 2px solid var(--border); border-radius: 8px 0 0 8px; border-right: none; font-size: 16px; outline: none; }
.search-big button { padding: 16px 32px; background: var(--primary); color: #fff; border: none; border-radius: 0 8px 8px 0; font-size: 16px; cursor: pointer; }

.search-result { background: var(--card-bg); padding: 20px; border-radius: var(--radius); margin-bottom: 12px; box-shadow: var(--shadow); }
.search-result h3 { margin-bottom: 8px; }
.search-result h3 a { color: var(--primary); text-decoration: none; }
.search-result h3 a:hover { text-decoration: underline; }
.no-results { text-align: center; padding: 40px; color: var(--text-light); font-size: 18px; }

/* Related links (SEO перелинковка) */
.related-links {
    background: var(--bg);
    padding: 24px;
    border-radius: var(--radius);
    margin-top: 32px;
}

.related-links h3 { font-size: 18px; margin-bottom: 16px; color: var(--primary); }
.related-links ul { list-style: none; }
.related-links li { margin-bottom: 10px; }
.related-links a { color: var(--primary); text-decoration: none; font-weight: 500; }
.related-links a:hover { text-decoration: underline; }
.link-context { color: var(--text-light); font-size: 13px; }

/* Error */
.error-page { text-align: center; padding: 80px 20px; }
.error-page h1 { font-size: 120px; color: var(--primary); line-height: 1; }
.error-page p { font-size: 20px; color: var(--text-light); margin: 20px 0 32px; }

/* Footer */
.footer { background: var(--primary-dark); color: #fff; padding: 48px 0 24px; margin-top: 64px; }
.footer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; margin-bottom: 32px; }
.footer-col h4 { font-size: 16px; margin-bottom: 16px; color: #fff; }
.footer-col a { display: block; color: rgba(255,255,255,0.7); text-decoration: none; margin-bottom: 8px; font-size: 14px; }
.footer-col a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 24px; text-align: center; font-size: 13px; color: rgba(255,255,255,0.5); }

@media (max-width: 768px) {
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Evacuator */
.evacuator-card { border-left: 4px solid var(--accent); }

/* Brands */
.brands-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; }
.brand-card {
    background: var(--card-bg);
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
    text-decoration: none;
    color: var(--text);
    transition: all 0.2s;
}
.brand-card:hover { background: var(--primary); color: #fff; transform: translateY(-4px); }
.brand-card h2 { font-size: 28px; margin-bottom: 8px; }

/* Дополнения для страниц брендов */
.brand-placeholder {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #1a5276, #154360);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 700;
    margin: 0 auto 16px;
}

.brand-desc {
    font-size: 13px;
    color: #7f8c8d;
    margin-top: 8px;
    line-height: 1.5;
}

.model-card {
    text-align: center;
    padding: 24px;
}

.model-card img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 12px;
}

.model-card h3 {
    font-size: 18px;
    margin-bottom: 4px;
}

.model-engines {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
}

.model-detail .panel {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    overflow: hidden;
}

.model-detail .panel-header {
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
    font-weight: 600;
    color: #1a5276;
}

.model-detail .panel-body {
    padding: 20px;
}

.brand-placeholder {
    width: 80px; height: 80px;
    background: linear-gradient(135deg, #1a5276, #154360);
    color: #fff; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 32px; font-weight: 700;
    margin: 0 auto 16px;
}
.brand-desc { font-size: 13px; color: #7f8c8d; margin-top: 8px; line-height: 1.5; }
.model-card { text-align: center; padding: 24px; }
.model-card img { width: 100%; height: 160px; object-fit: cover; border-radius: 8px; margin-bottom: 12px; }
.model-card h3 { font-size: 18px; margin-bottom: 4px; }
.model-engines { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.model-detail .panel { background: #fff; border-radius: 12px; box-shadow: 0 1px 3px rgba(0,0,0,0.06); overflow: hidden; margin-bottom: 20px; }
.model-detail .panel-header { padding: 16px 20px; border-bottom: 1px solid #f0f0f0; font-weight: 600; color: #1a5276; }
.model-detail .panel-body { padding: 20px; }

/* ============================================================
   VAG CARDS 2.0 — единая система карточек и страниц
   сервисы / эвакуаторы / запчасти / тюнинг
   ============================================================ */

/* Акцентные цвета по типам */
:root {
    --type-service: #1a5276;
    --type-service-bg: #eaf2f8;
    --type-evacuator: #d35400;
    --type-evacuator-bg: #fdf2e4;
    --type-parts: #1e8449;
    --type-parts-bg: #e9f7ef;
    --type-tuning: #7d3c98;
    --type-tuning-bg: #f4ecf7;
}

/* --- Общие панели (раньше были только у model-detail) --- */
.panel {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    overflow: hidden;
    margin-bottom: 20px;
}
.panel-header {
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
    font-weight: 600;
    font-size: 15px;
    color: var(--primary);
}
.panel-body { padding: 20px; }

/* --- Бейджи типов --- */
.badge-type {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.badge-type--service   { background: var(--type-service-bg);   color: var(--type-service); }
.badge-type--evacuator { background: var(--type-evacuator-bg); color: var(--type-evacuator); }
.badge-type--parts     { background: var(--type-parts-bg);     color: var(--type-parts); }
.badge-type--tuning    { background: var(--type-tuning-bg);    color: var(--type-tuning); }
.badge-green { background: var(--type-parts-bg); color: var(--type-parts); } /* совместимость со старой страницей эвакуатора */

.btn-success { background: #27ae60; color: #fff; }
.btn-success:hover { background: #1e8449; }

/* ============================================================
   КАРТОЧКА КОМПАНИИ (в списках и на главной)
   ============================================================ */
.companies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.company-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
    border-top: 4px solid var(--type-service);
    transition: transform 0.2s, box-shadow 0.2s;
}
.company-card:hover { transform: translateY(-3px); box-shadow: 0 6px 24px rgba(0,0,0,0.12); }
.company-card--service   { border-top-color: var(--type-service); }
.company-card--evacuator { border-top-color: var(--type-evacuator); }
.company-card--parts     { border-top-color: var(--type-parts); }
.company-card--tuning    { border-top-color: var(--type-tuning); }

.company-card .badge-premium { top: 12px; right: 12px; }

.company-card__head { display: flex; gap: 14px; align-items: center; }

.company-card__logo {
    width: 56px;
    height: 56px;
    object-fit: contain;
    border-radius: 10px;
    background: var(--bg);
    padding: 4px;
    flex-shrink: 0;
}
.company-card__logo-placeholder {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    flex-shrink: 0;
}

.company-card__titlebox { min-width: 0; }
.company-card__name { font-size: 17px; line-height: 1.3; margin-bottom: 4px; color: var(--primary-dark); }
.company-card__name a { color: inherit; text-decoration: none; }
.company-card__name a:hover { color: var(--primary); text-decoration: underline; }

.company-card__sub { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--text-light); }
.company-card__rating { color: var(--accent); font-weight: 600; }

.company-card__rows {
    margin-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13.5px;
    color: var(--text-light);
}
.company-card__row { display: flex; gap: 8px; align-items: baseline; }
.company-card__row a { color: var(--primary); font-weight: 600; text-decoration: none; }
.company-card__row a:hover { text-decoration: underline; }

.company-card__tags { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 6px; }

.company-card__more {
    margin-top: auto;
    padding-top: 14px;
}
.company-card__more a {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
}
.company-card__more a:hover { text-decoration: underline; }

/* ============================================================
   ЧИПСЫ — услуги горизонтально
   ============================================================ */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 13px;
    line-height: 1.4;
    color: var(--text);
}
.chip::before { content: '✓'; color: #27ae60; font-weight: 700; }
.chip--plain::before { content: none; }
.chip--more {
    background: transparent;
    border-style: dashed;
    color: var(--text-light);
}
.chip--more::before { content: none; }

/* ============================================================
   ДЕТАЛЬНАЯ СТРАНИЦА КОМПАНИИ (сервис/эвакуатор/запчасти/тюнинг)
   ============================================================ */
.detail-hero {
    display: flex;
    gap: 20px;
    align-items: center;
    background: var(--card-bg);
    padding: 24px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 24px;
    border-top: 4px solid var(--type-service);
}
.detail-hero--service   { border-top-color: var(--type-service); }
.detail-hero--evacuator { border-top-color: var(--type-evacuator); }
.detail-hero--parts     { border-top-color: var(--type-parts); }
.detail-hero--tuning    { border-top-color: var(--type-tuning); }

.detail-hero__logo {
    width: 88px;
    height: 88px;
    object-fit: contain;
    border-radius: 12px;
    background: var(--bg);
    padding: 6px;
    flex-shrink: 0;
}
.detail-hero__placeholder {
    width: 88px;
    height: 88px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    font-weight: 700;
    flex-shrink: 0;
}

.detail-hero__body { min-width: 0; flex: 1; }
.detail-hero__name { font-size: 26px; line-height: 1.25; color: var(--primary-dark); margin-bottom: 6px; }
.detail-hero__badges { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.detail-hero__badges .badge-premium { position: static; }
.detail-hero__rating { font-size: 16px; color: var(--accent); font-weight: 600; }
.detail-hero__rating span { font-size: 13px; color: var(--text-light); font-weight: 400; }
.detail-hero__tags { display: flex; flex-wrap: wrap; gap: 6px; }

.detail-layout {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 24px;
    align-items: start;
}
.detail-sidebar { position: sticky; top: 100px; }

.contact-list { list-style: none; display: flex; flex-direction: column; gap: 12px; font-size: 14px; }
.contact-list a { color: var(--primary); font-weight: 600; text-decoration: none; }
.contact-list a:hover { text-decoration: underline; }
.contact-phone { font-size: 19px; font-weight: 700; }
.contact-phone a { color: var(--primary-dark); }

.hours-247 {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    background: var(--type-parts-bg);
    color: var(--type-parts);
    font-weight: 700;
    font-size: 13px;
}

/* Кнопка звонка на мобильных */
.mobile-call { display: none; }

@media (max-width: 900px) {
    .detail-layout { grid-template-columns: 1fr; }
    .detail-sidebar { position: static; }
}

@media (max-width: 768px) {
    .detail-hero { flex-direction: column; text-align: center; padding: 20px; }
    .detail-hero__badges, .detail-hero__tags { justify-content: center; }
    .detail-hero__name { font-size: 22px; }
    .mobile-call { display: block; margin-top: 4px; }
    .mobile-call .btn { width: 100%; text-align: center; padding: 16px; font-size: 17px; }
    .companies-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   MOBILE HEADER — компактная шапка и поиск
   ============================================================ */

/* Планшет: поиск уезжает на свою строку, шапка в две строки */
@media (max-width: 900px) {
    .header-inner {
        flex-wrap: wrap;
        gap: 10px;
        padding: 10px 16px;
    }

    /* header-actions «растворяем»: его дети (город, поиск, бургер)
       становятся flex-элементами самой .header-inner, иначе order
       работает внутри .header-actions и вся троица уезжает вниз вместе */
    .header-actions { display: contents; }

    /* Первая строка: логотип … город + бургер */
    .city-selector { order: 2; margin-left: auto; }
    .burger { order: 3; }

    /* Поиск — второй строкой во всю ширину, не вылезает за экран */
    .search-form {
        order: 4;
        width: 100%;
        display: flex;
    }
    .search-form input {
        flex: 1;
        width: auto;
        min-width: 0;
    }

    /* Выпадашка города не должна уходить за правый край */
    .city-dropdown {
        right: 0;
        max-width: calc(100vw - 32px);
    }
}

/* Телефон: максимальная компактность */
@media (max-width: 600px) {
    .header-inner { padding: 8px 12px; gap: 8px; }
    .logo { font-size: 20px; }
    .logo-tag { font-size: 12px; }

    .city-selector { padding: 5px 10px; font-size: 13px; }

    .search-form input {
        padding: 10px 12px;
        font-size: 16px; /* 16px — iOS не зумит при фокусе */
    }
    .search-form button { padding: 10px 14px; }

    /* Страница компактнее */
    .main { padding: 20px 0; }
    .container { padding: 0 12px; }
    .page-title { font-size: 24px; margin-bottom: 14px; }

    .hero { padding: 36px 16px; margin-bottom: 28px; }
    .hero p { font-size: 15px; }
    .hero-search input { padding: 12px 16px; }
    .hero-search button { padding: 12px 20px; }

    .section { margin-bottom: 32px; }
    .section h2 { font-size: 20px; margin-bottom: 14px; }

    .card, .service-item { padding: 16px; }
}

/* ============================================================
   NAVIGATION 2.0 — активный раздел + бургер-меню
   ============================================================ */

/* Активный пункт в десктопном меню */
.nav a.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    font-weight: 700;
}

/* Бургер — скрыт на десктопе */
.burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    padding: 9px;
    background: var(--bg);
    border: none;
    border-radius: 8px;
    cursor: pointer;
}
.burger span {
    display: block;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
    transition: transform 0.25s, opacity 0.25s;
}
.burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Мобильная панель меню */
.mobile-nav {
    display: none;
    flex-direction: column;
    background: var(--card-bg);
    border-top: 1px solid var(--border);
    box-shadow: 0 8px 16px rgba(0,0,0,0.08);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}
.mobile-nav.open { max-height: 420px; }

.mobile-nav a {
    padding: 14px 20px;
    color: var(--text);
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    border-bottom: 1px solid var(--bg);
}
.mobile-nav a:last-child { border-bottom: none; }
.mobile-nav a:hover { background: var(--bg); color: var(--primary); }
.mobile-nav a.active {
    color: var(--primary);
    font-weight: 700;
    border-left: 4px solid var(--primary);
    padding-left: 16px;
    background: var(--type-service-bg);
}

@media (max-width: 900px) {
    .burger { display: flex; }
    .mobile-nav { display: flex; }
}

/* ===== Отзывы и свой рейтинг ===== */
.stars { display: inline-flex; gap: 1px; }
.star { color: #dfe6e9; font-size: 15px; }
.star--on { color: #f39c12; }

.detail-hero__rating--own { display: flex; align-items: center; gap: 8px; font-size: 15px; margin-top: 4px; }
.detail-hero__rating--own strong { color: #f39c12; font-size: 17px; }
.detail-hero__rating--own span { color: var(--text-light); font-size: 13px; }

.review-flash { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; font-size: 14px; }
.review-flash--success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.review-flash--error { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }

.review-list { margin-bottom: 24px; }
.review-item { padding: 14px 0; border-bottom: 1px solid #f0f0f0; }
.review-item:last-child { border-bottom: none; }
.review-item__head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.review-item__author { font-weight: 600; font-size: 14px; }
.review-item__date { color: var(--text-light); font-size: 12px; margin-left: auto; }
.review-item__text { margin-top: 6px; font-size: 14px; line-height: 1.6; }

.review-form { border-top: 1px dashed #e1e8ed; padding-top: 20px; margin-top: 12px; }
.review-form__row { margin-bottom: 14px; }
.review-form__label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.review-form__label .required { color: #e74c3c; }
.review-form input[type="text"], .review-form textarea {
    width: 100%; padding: 10px 12px; border: 1px solid #e1e8ed; border-radius: 8px;
    font-size: 14px; font-family: inherit; outline: none; transition: border-color 0.15s;
}
.review-form input[type="text"]:focus, .review-form textarea:focus { border-color: var(--primary); }
.review-form textarea { resize: vertical; }

/* Поле-ловушка для ботов — человеку не видно */
.hp-field { position: absolute; left: -9999px; top: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Интерактивный выбор звёзд (hover/выбор подсвечивают слева направо) */
.star-input { display: inline-flex; flex-direction: row-reverse; gap: 2px; }
.star-input input { position: absolute; opacity: 0; width: 0; height: 0; }
.star-input label { font-size: 30px; color: #dfe6e9; cursor: pointer; line-height: 1; transition: color 0.1s, transform 0.1s; }
.star-input input:checked ~ label,
.star-input label:hover,
.star-input label:hover ~ label { color: #f39c12; }
.star-input label:hover { transform: scale(1.15); }

@media (max-width: 600px) {
    .star-input label { font-size: 34px; } /* удобнее попадать пальцем */
    .review-item__date { margin-left: 0; width: 100%; }
}

/* ===== Баннерные слоты ===== */
.banner-slot { position: relative; margin: 0 0 20px; text-align: center; }
.banner-slot img { max-width: 100%; height: auto; border-radius: 12px; display: inline-block; }
.banner-slot__label {
    position: absolute; top: 6px; left: 10px; z-index: 1;
    font-size: 10px; color: #95a5a6; text-transform: uppercase; letter-spacing: 0.5px;
    background: rgba(255, 255, 255, 0.9); padding: 1px 7px; border-radius: 4px;
}
.banner-slot--sidebar { margin: 0 0 20px; }
.banner-slot--sidebar img { width: 100%; }
.banner-slot--home_middle { margin: 24px 0; }
.banner-slot--footer { margin: 24px 0 0; }

@media (max-width: 600px) {
    .banner-slot img { border-radius: 8px; }
}

/* ============================================================
   УМНЫЙ ПОИСК — результаты, табы, карточки статей
   ============================================================ */

.search-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}
.search-tab {
    padding: 8px 18px;
    border-radius: 20px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    color: var(--text);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}
.search-tab:hover { border-color: var(--primary); color: var(--primary); }
.search-tab--active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    font-weight: 700;
}

.search-section { margin-bottom: 36px; }
.search-section__title {
    font-size: 20px;
    margin-bottom: 16px;
    color: var(--primary-dark);
}

/* Карточки статей в результатах — картинка строго внутри блока */
.search-articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}
.search-article-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden; /* картинка не вылезает за пределы карточки */
    display: flex;
    flex-direction: column;
    transition: transform 0.2s, box-shadow 0.2s;
}
.search-article-card:hover { transform: translateY(-2px); box-shadow: 0 4px 20px rgba(0,0,0,0.12); }

.search-article-card__imgwrap {
    display: block;
    width: 100%;
    height: 160px;
    overflow: hidden;
    background: var(--bg);
}
.search-article-card__imgwrap img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    object-fit: cover;
    display: block;
}

.search-article-card__body { padding: 16px; display: flex; flex-direction: column; flex: 1; }
.search-article-card__body h3 { font-size: 16px; line-height: 1.35; margin-bottom: 8px; }
.search-article-card__body h3 a { color: var(--primary); text-decoration: none; }
.search-article-card__body h3 a:hover { text-decoration: underline; }
.search-article-card__body p {
    color: var(--text-light);
    font-size: 14px;
    line-height: 1.5;
    flex: 1;
}

/* Пустой результат */
.search-empty {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 32px;
    text-align: center;
}
.search-empty h2 { font-size: 20px; margin-bottom: 12px; }
.search-empty p { color: var(--text-light); margin-bottom: 8px; }
.search-empty ul {
    list-style: none;
    padding: 0;
    margin: 0 auto 20px;
    max-width: 520px;
    text-align: left;
    color: var(--text-light);
    font-size: 14px;
    line-height: 1.8;
}
.search-empty__links { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.search-empty__links a {
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
}

/* Страница поиска без запроса */
.search-hero {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 32px;
    margin-bottom: 28px;
    text-align: center;
}
.search-hero__form { display: flex; max-width: 560px; margin: 0 auto 12px; }
.search-hero__form input {
    flex: 1;
    min-width: 0;
    padding: 14px 18px;
    border: 1px solid var(--border);
    border-right: none;
    border-radius: 10px 0 0 10px;
    font-size: 16px;
    outline: none;
}
.search-hero__form input:focus { border-color: var(--primary); }
.search-hero__form button {
    padding: 14px 28px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 0 10px 10px 0;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}
.search-hero__form button:hover { background: var(--primary-dark); }
.search-hero__hint { color: var(--text-light); font-size: 14px; }

.search-popular h2 { font-size: 18px; margin-bottom: 14px; }
.search-popular__links { display: flex; gap: 10px; flex-wrap: wrap; }
.search-popular__links a {
    padding: 10px 20px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s;
}
.search-popular__links a:hover { border-color: var(--primary); box-shadow: var(--shadow); }

@media (max-width: 600px) {
    .search-hero { padding: 20px 16px; }
    .search-hero__form { flex-direction: column; gap: 8px; }
    .search-hero__form input { border-right: 1px solid var(--border); border-radius: 10px; }
    .search-hero__form button { border-radius: 10px; }
    .search-articles-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   ГЛАВНАЯ 2.0 — плитки разделов, чипы, свежие статьи
   ============================================================ */

/* Быстрые запросы под поиском в hero */
.hero-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    align-items: center;
    margin-top: 16px;
    font-size: 13px;
}
.hero-chips span { opacity: 0.85; }
.hero-chips a {
    padding: 5px 14px;
    background: rgba(255,255,255,0.18);
    border: 1px solid rgba(255,255,255,0.35);
    border-radius: 20px;
    color: #fff;
    text-decoration: none;
    transition: background 0.2s;
}
.hero-chips a:hover { background: rgba(255,255,255,0.32); }

/* Плитки 4 разделов */
.home-tiles {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}
.home-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
    padding: 22px 14px;
    border-radius: var(--radius);
    text-decoration: none;
    box-shadow: var(--shadow);
    border-top: 4px solid var(--primary);
    background: var(--card-bg);
    transition: transform 0.2s, box-shadow 0.2s;
}
.home-tile:hover { transform: translateY(-3px); box-shadow: 0 6px 24px rgba(0,0,0,0.12); }
.home-tile--service   { border-top-color: var(--type-service); }
.home-tile--evacuator { border-top-color: var(--type-evacuator); }
.home-tile--parts     { border-top-color: var(--type-parts); }
.home-tile--tuning    { border-top-color: var(--type-tuning); }
.home-tile__icon { font-size: 30px; }
.home-tile__title { font-weight: 700; color: var(--text); font-size: 16px; }
.home-tile__text { font-size: 13px; color: var(--text-light); }

/* Заголовок секции со ссылкой «все» */
.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}
.section-head h2 { margin-bottom: 0; }
.section-head__all {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
}
.section-head__all:hover { text-decoration: underline; }

/* Заглушка карточки без картинки (вместо placeholder.php) */
.card-thumb-placeholder {
    width: 100%;
    height: 180px;
    border-radius: 8px;
    margin-bottom: 12px;
    background: linear-gradient(135deg, var(--type-service-bg), #d6e4f0);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 44px;
}

/* Свежие статьи — компактный список */
.latest-list {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}
.latest-list__item {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 16px;
    padding: 13px 20px;
    text-decoration: none;
    border-bottom: 1px solid var(--bg);
    transition: background 0.15s;
}
.latest-list__item:last-child { border-bottom: none; }
.latest-list__item:hover { background: var(--bg); }
.latest-list__title { color: var(--primary); font-weight: 500; }
.latest-list__item:hover .latest-list__title { text-decoration: underline; }
.latest-list__date { color: var(--text-light); font-size: 13px; white-space: nowrap; }

@media (max-width: 900px) {
    .home-tiles { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .home-tiles { gap: 10px; }
    .home-tile { padding: 16px 10px; }
    .home-tile__icon { font-size: 24px; }
    .latest-list__item { flex-direction: column; gap: 2px; }
}
