/* ==========================================================================
   МАТРИЦА АВТОПОДБОРА, ФУРГОНЫ LCV И КАЛЬКУЛЯТОР ТОРГА (HUD.CSS)
   ========================================================================== */

/* 1. КАТЕГОРИИ АВТОМОБИЛЕЙ (ТАБЫ) */
.category-tabs-nav {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.cat-tab-btn {
    background: var(--bg-card);
    border: 1.5px solid var(--border-color);
    color: var(--text-muted);
    padding: 10px 20px;
    border-radius: var(--radius-pill);
    font-family: var(--font-head);
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.cat-tab-btn:hover {
    border-color: var(--primary);
    color: var(--text-main);
    background: var(--bg-surface);
}

.cat-tab-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

/* 2. СЕТКА КУЗОВОВ С ФУРГОНАМИ LCV */
.vehicles-matrix-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 24px;
}

.vehicle-type-item {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 18px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 14px;
    position: relative;
    user-select: none;
}

.vehicle-type-item:hover {
    border-color: rgba(37, 99, 235, 0.4);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.vehicle-type-item.selected {
    border-color: var(--primary);
    background: var(--bg-highlight);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.15);
}

.vehicle-icon-wrap {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: var(--bg-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    flex-shrink: 0;
}

.vehicle-type-item.selected .vehicle-icon-wrap {
    background: var(--primary);
    color: #ffffff;
}

.vehicle-meta h4 {
    font-size: 15px;
    margin-bottom: 2px;
    color: var(--text-main);
}

.vehicle-meta span {
    font-size: 12px;
    color: var(--text-muted);
}

.popular-tag {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--success-bg);
    color: var(--success);
    font-size: 10px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: var(--radius-pill);
}

/* 3. ИНТЕРАКТИВНЫЙ КАЛЬКУЛЯТОР БЮДЖЕТА И ТОРГА */
.market-calc-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 30px;
    box-shadow: var(--shadow-md);
    margin-bottom: 35px;
}

.calc-header-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 12px;
}

.budget-num-hero {
    font-family: var(--font-head);
    font-size: 34px;
    font-weight: 900;
    color: var(--primary);
}

.budget-slider-custom {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    border-radius: var(--radius-pill);
    background: var(--bg-surface);
    outline: none;
    cursor: pointer;
    margin-bottom: 18px;
}

.budget-slider-custom::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    border: 3px solid #ffffff;
    box-shadow: 0 2px 10px rgba(37, 99, 235, 0.4);
}

/* СЕТКА РАСЧЕТА ЭКОНОМИИ (SIMULATION METRICS) */
.simulation-metrics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.sim-box {
    background: var(--bg-surface);
    border-radius: var(--radius-md);
    padding: 14px;
}

.sim-box-lbl {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 700;
}

.sim-box-val {
    font-family: var(--font-head);
    font-size: 20px;
    font-weight: 800;
    color: var(--text-main);
    margin-top: 4px;
}

.sim-box-val.highlight-green {
    color: var(--success);
}

/* 4. ПАКЕТЫ УСЛУГ АВТОПОДБОРА */
.services-tiers-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.tier-card {
    background: var(--bg-card);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 26px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    position: relative;
    transition: all 0.2s ease;
}

.tier-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: rgba(37, 99, 235, 0.3);
}

.tier-card.featured {
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.15);
}

.tier-badge-top {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    padding: 4px 14px;
    border-radius: var(--radius-pill);
    text-transform: uppercase;
}

.tier-name {
    font-size: 20px;
    margin-bottom: 6px;
    color: var(--text-main);
}

.tier-price {
    font-family: var(--font-head);
    font-size: 26px;
    font-weight: 900;
    color: var(--primary);
    margin-bottom: 16px;
}

.tier-features-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.tier-features-list li {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tier-features-list li span.ok {
    color: var(--success);
    font-weight: 900;
}

/* 5. ИНТЕРАКТИВНЫЙ БЛАНК ДИАГНОСТИКИ (LIVE INSPECTION SHEET) */
.inspection-sheet-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 30px;
    box-shadow: var(--shadow-md);
}

.sheet-tabs-nav {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
}

.sheet-tab-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-head);
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    transition: all 0.2s ease;
}

.sheet-tab-btn.active {
    background: var(--primary-light);
    color: var(--primary);
}

.paint-matrix-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.paint-matrix-table th, .paint-matrix-table td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.paint-matrix-table th {
    color: var(--text-muted);
    font-weight: 700;
}

.badge-tag-verified {
    display: inline-block;
    background: var(--success-bg);
    color: var(--success);
    font-weight: 800;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-size: 11px;
}

/* МЕССЕНДЖЕРЫ В МОДАЛКЕ */
.messenger-select-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}

.m-btn {
    background: var(--bg-surface);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 10px;
    cursor: pointer;
    font-weight: 700;
    font-size: 13px;
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.m-btn.active {
    border-color: var(--primary);
    background: var(--primary-light);
    color: var(--primary);
}

@media (max-width: 1024px) {
    .vehicles-matrix-grid, .services-tiers-grid { grid-template-columns: repeat(2, 1fr); }
    .simulation-metrics-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .vehicles-matrix-grid, .services-tiers-grid { grid-template-columns: 1fr; }
    .category-tabs-nav { gap: 6px; }
    .cat-tab-btn { padding: 8px 14px; font-size: 12px; }
    
    .market-calc-box { padding: 18px 14px; }
    .calc-header-row { flex-direction: column; gap: 8px; }
    .budget-num-hero { font-size: 26px; }
    
    .inspection-sheet-card { padding: 18px 14px; overflow-x: auto; }
    .sheet-tabs-nav { overflow-x: auto; white-space: nowrap; padding-bottom: 8px; }
    .sheet-tab-btn { font-size: 12px; padding: 6px 10px; }
    .paint-matrix-table { min-width: 440px; font-size: 12px; }
    
    .messenger-select-row { grid-template-columns: 1fr; gap: 8px; }
    .m-btn { padding: 12px; }
}

@media (max-width: 480px) {
    .cat-tab-btn { width: 100%; justify-content: center; }
    .vehicle-type-item { padding: 14px; gap: 10px; }
    .vehicle-meta h4 { font-size: 13px; }
    .vehicle-meta span { font-size: 11px; }
    .tier-card { padding: 18px 14px; }
    .tier-name { font-size: 17px; }
    .tier-price { font-size: 22px; }
}
