/* project.css — стили проекта «ЗРуки».
   Подключается ПОСЛЕ ui-kit.css. Свои классы только с префиксом x-.
   Правки кита сюда не копируются: обновится кит — правка потеряется. */

:root {
    --x-brand: #F5B70B;
    --x-brand-light: #FFD84D;
    --x-brand-soft: #FEF7E0;
    --x-brand-dark: #252A33;
    --x-brand-grey: #6B7280;
    --x-brand-on: #252A33;
}

/* ---------- Брендовая кнопка ---------- */
.x-btn-brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    min-height: 44px;
    padding: 0 var(--space-5);
    border: 0;
    border-radius: var(--radius-sm);
    background: var(--x-brand);
    color: var(--x-brand-on);
    font: inherit;
    font-weight: var(--weight-bold);
    text-decoration: none;
    cursor: pointer;
    transition: background var(--dur-fast) var(--ease);
}

.x-btn-brand:hover { background: var(--x-brand-light); }
.x-btn-brand:focus-visible { outline: none; box-shadow: var(--focus-ring); }

.x-btn-brand-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    min-height: 44px;
    padding: 0 var(--space-5);
    border: 1px solid var(--ui-border);
    border-radius: var(--radius-sm);
    background: var(--ui-surface);
    color: var(--ui-text);
    font: inherit;
    font-weight: var(--weight-medium);
    text-decoration: none;
    cursor: pointer;
}

.x-btn-brand-outline:hover { background: var(--ui-surface-hover); }

/* ---------- Верхняя панель сайта ---------- */
.x-topbar {
    display: flex;
    align-items: center;
    gap: var(--space-5);
    min-height: 68px;
    padding: 0 var(--space-5);
    border-bottom: 1px solid var(--ui-border);
    background: var(--ui-surface);
}

.x-logo {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-lg);
    font-weight: var(--weight-heavy);
    color: var(--ui-text);
    text-decoration: none;
}

.x-logo-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    background: var(--x-brand);
    color: var(--x-brand-on);
    font-weight: var(--weight-heavy);
}

.x-topbar-nav {
    display: flex;
    gap: var(--space-4);
    margin-left: auto;
    align-items: center;
    flex-wrap: wrap;
}

.x-topbar-link {
    color: var(--ui-text-soft);
    font-size: var(--text-sm);
    text-decoration: none;
}

.x-topbar-link:hover { color: var(--ui-text); }
.x-topbar-link[aria-current="page"] { color: var(--ui-text); font-weight: var(--weight-bold); }

/* ---------- Герой ---------- */
.x-hero {
    padding: var(--space-8) var(--space-5);
    background: linear-gradient(180deg, var(--x-brand-soft) 0%, var(--ui-bg) 100%);
}

.x-hero-inner {
    max-width: 1120px;
    margin: 0 auto;
    display: grid;
    gap: var(--space-6);
    grid-template-columns: minmax(min(100%, 420px), 1fr) minmax(min(100%, 320px), 1fr);
    align-items: center;
}

.x-hero-title {
    margin: 0 0 var(--space-3);
    font-size: var(--text-4xl);
    line-height: var(--leading-tight);
    font-weight: var(--weight-heavy);
    color: var(--ui-text);
}

.x-hero-sub {
    margin: 0 0 var(--space-5);
    font-size: var(--text-lg);
    line-height: var(--leading-normal);
    color: var(--ui-text-soft);
}

.x-hero-actions { display: flex; gap: var(--space-3); flex-wrap: wrap; }

.x-hero-card {
    padding: var(--space-5);
    border: 1px solid var(--ui-border);
    border-radius: var(--radius-lg);
    background: var(--ui-surface);
    box-shadow: var(--shadow-2);
}

/* ---------- Секции лендинга ---------- */
.x-section {
    max-width: 1120px;
    margin: 0 auto;
    padding: var(--space-7) var(--space-5);
}

.x-section-title {
    margin: 0 0 var(--space-2);
    font-size: var(--text-2xl);
    font-weight: var(--weight-heavy);
}

.x-section-sub {
    margin: 0 0 var(--space-5);
    color: var(--ui-text-soft);
}

/* ---------- Карточка прицепа ---------- */
.x-trailer-card {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    padding: var(--space-4);
    border: 1px solid var(--ui-border);
    border-radius: var(--radius-md);
    background: var(--ui-surface);
    height: 100%;
}

.x-trailer-card:hover { box-shadow: var(--shadow-2); }

.x-trailer-name {
    margin: 0;
    font-size: var(--text-lg);
    font-weight: var(--weight-bold);
}

.x-trailer-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-2);
    font-size: var(--text-sm);
    color: var(--ui-text-soft);
}

.x-trailer-price {
    font-size: var(--text-xl);
    font-weight: var(--weight-heavy);
    color: var(--ui-text);
}

.x-trailer-card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    margin-top: auto;
    padding-top: var(--space-3);
    border-top: 1px solid var(--ui-border);
}

/* ---------- Кабинет ---------- */
.x-app-brand {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-4);
    font-weight: var(--weight-heavy);
    color: var(--ui-text);
    text-decoration: none;
}

.x-app-user {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    border-top: 1px solid var(--ui-border);
    font-size: var(--text-sm);
}

.x-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
    gap: var(--space-4);
}

.x-stat {
    padding: var(--space-4);
    border: 1px solid var(--ui-border);
    border-radius: var(--radius-md);
    background: var(--ui-surface);
}

.x-stat-label {
    font-size: var(--text-sm);
    color: var(--ui-text-soft);
    margin-bottom: var(--space-2);
}

.x-stat-value {
    font-size: var(--text-2xl);
    font-weight: var(--weight-heavy);
    font-variant-numeric: tabular-nums;
}

/* ---------- Карта-заглушка ---------- */
.x-map {
    position: relative;
    min-height: 360px;
    border: 1px solid var(--ui-border);
    border-radius: var(--radius-md);
    background:
        repeating-linear-gradient(0deg, transparent 0 39px, var(--grey-200) 39px 40px),
        repeating-linear-gradient(90deg, transparent 0 39px, var(--grey-200) 39px 40px),
        var(--ui-surface-sunk);
    overflow: hidden;
}

.x-map-pin {
    position: absolute;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 var(--space-2);
    border: 0;
    border-radius: var(--radius-pill);
    background: var(--x-brand);
    color: var(--x-brand-on);
    font-size: var(--text-xs);
    font-weight: var(--weight-bold);
    cursor: pointer;
    box-shadow: var(--shadow-2);
    transform: translate(-50%, -50%);
}

.x-map-pin:hover { background: var(--x-brand-light); }

.x-map-legend {
    position: absolute;
    left: var(--space-3);
    bottom: var(--space-3);
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-sm);
    background: var(--ui-surface);
    box-shadow: var(--shadow-1);
    font-size: var(--text-xs);
    color: var(--ui-text-soft);
}

/* ---------- Фото-заглушка ---------- */
.x-photo-stub {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: var(--space-2);
    min-height: 120px;
    border: 1px dashed var(--ui-border-strong);
    border-radius: var(--radius-sm);
    background: var(--ui-surface-sunk);
    color: var(--ui-text-faint);
    font-size: var(--text-xs);
    text-align: center;
    padding: var(--space-3);
}

.x-photo-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr));
    gap: var(--space-3);
}

/* ---------- Разное ---------- */
.x-muted { color: var(--ui-text-soft); font-size: var(--text-sm); }
.x-num { font-variant-numeric: tabular-nums; }
.x-nowrap { white-space: nowrap; }

.x-empty {
    padding: var(--space-6);
    text-align: center;
    color: var(--ui-text-soft);
}

@media (max-width: 860px) {
    .x-hero-inner { grid-template-columns: 1fr; }
    .x-hero { padding: var(--space-6) var(--space-4); }
    .x-hero-title { font-size: var(--text-3xl); }
    .x-topbar { flex-wrap: wrap; min-height: auto; padding: var(--space-3) var(--space-4); }
    .x-topbar-nav { margin-left: 0; width: 100%; }
}
