/* ================================================================
   Публичный каталог запчастей /parts/
   ================================================================ */
.mv-cat {
    --mv-orange: #E8631A;
    --mv-dark: #2C3E50;
    --mv-gray: #64748b;
    --mv-border: #E9ECEF;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #F8F9FA;
    min-height: 100vh;
    padding: 30px 0 60px;
}
.mv-cat-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}
.mv-cat-crumbs {
    font-size: 13px;
    color: var(--mv-gray);
    margin-bottom: 20px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}
.mv-cat-crumbs a { color: var(--mv-gray); text-decoration: none; }
.mv-cat-crumbs a:hover { color: var(--mv-orange); }
.mv-cat-crumbs span { color: #cbd5e1; }

/* ===== Заголовок ===== */
.mv-cat-header { margin-bottom: 24px; }
.mv-cat-header h1 {
    font-size: 32px;
    margin: 0 0 8px;
    color: var(--mv-dark);
    font-weight: 800;
}
.mv-cat-header p {
    font-size: 15px;
    color: var(--mv-gray);
    margin: 0;
}

/* ===== Фильтры ===== */
.mv-cat-filters {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid var(--mv-border);
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}
.mv-cat-filter-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 12px;
}
.mv-cat-filter-row:nth-child(2) { grid-template-columns: 1fr 1fr 2fr 1fr; }
.mv-cat-filter label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--mv-gray);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.mv-cat-filter select,
.mv-cat-filter input {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid var(--mv-border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    color: var(--mv-dark);
    background: #fff;
    transition: border-color 0.15s;
    box-sizing: border-box;
}
.mv-cat-filter select:focus,
.mv-cat-filter input:focus {
    outline: none;
    border-color: var(--mv-orange);
}
.mv-cat-filter-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--mv-border);
}
.mv-cat-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 24px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s;
    border: none;
}
.mv-cat-btn--primary {
    background: var(--mv-orange);
    color: #fff;
}
.mv-cat-btn--primary:hover { background: #C44E0F; }
.mv-cat-btn--reset {
    background: #F1F5F9;
    color: var(--mv-gray);
    border: 1px solid var(--mv-border);
}
.mv-cat-btn--reset:hover { background: #E2E8F0; color: var(--mv-dark); }

/* ===== Индикатор "Найдено" ===== */
.mv-cat-active-filters,
.mv-cat-total {
    background: #FEF9C3;
    padding: 10px 16px;
    border-left: 4px solid #F39C12;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 14px;
    color: #854D0E;
}
.mv-cat-total {
    background: #F0FDF4;
    border-left-color: #27AE60;
    color: #065F46;
}

/* ===== Сетка карточек ===== */
.mv-cat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 30px;
}
.mv-cat-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    border: 1px solid var(--mv-border);
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
    transition: all 0.2s;
}
.mv-cat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    border-color: var(--mv-orange);
}
.mv-cat-card__photo {
    position: relative;
    background: #F8F9FA;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.mv-cat-card__photo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 8px;
    box-sizing: border-box;
}
.mv-cat-card__placeholder {
    font-size: 64px;
    line-height: 1;
    background: linear-gradient(135deg, #F8F9FA, #F1F5F9);
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.mv-cat-card__badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #27AE60;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.mv-cat-card__body {
    padding: 12px 14px 14px;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.mv-cat-card__brand {
    font-size: 11px;
    color: var(--mv-gray);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.3px;
    margin-bottom: 4px;
    min-height: 14px;
}
.mv-cat-card__name {
    font-size: 14px;
    font-weight: 600;
    color: var(--mv-dark);
    margin: 0 0 8px;
    line-height: 1.35;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.mv-cat-card__oem {
    font-size: 11px;
    color: var(--mv-gray);
    margin-bottom: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mv-cat-card__oem code {
    background: #F1F5F9;
    padding: 1px 5px;
    border-radius: 3px;
    font-family: 'SF Mono', Consolas, monospace;
    font-size: 10px;
    color: var(--mv-dark);
}
.mv-cat-card__bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding-top: 8px;
    border-top: 1px solid #f1f5f9;
    margin-top: auto;
}
.mv-cat-card__price {
    font-size: 18px;
    font-weight: 800;
    color: var(--mv-orange);
}
.mv-cat-card__stock {
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}
.mv-cat-card__stock--in { color: #27AE60; }
.mv-cat-card__stock--out { color: #E74C3C; }

/* ===== Пагинация ===== */
.mv-cat-pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
    margin: 30px 0;
}
.mv-cat-page {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 8px;
    background: #fff;
    color: var(--mv-dark);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    border: 1px solid var(--mv-border);
    transition: all 0.15s;
}
.mv-cat-page:hover {
    border-color: var(--mv-orange);
    color: var(--mv-orange);
}
.mv-cat-page--active {
    background: var(--mv-orange);
    color: #fff;
    border-color: var(--mv-orange);
    cursor: default;
}

/* ===== Пустой результат ===== */
.mv-cat-empty {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border-radius: 12px;
    border: 1px dashed var(--mv-border);
    margin: 30px 0;
}
.mv-cat-empty h2 {
    margin: 12px 0;
    color: var(--mv-dark);
    font-size: 22px;
}
.mv-cat-empty p {
    color: var(--mv-gray);
    font-size: 14px;
}
.mv-cat-empty a {
    color: var(--mv-orange);
    font-weight: 600;
}

/* ===== Адаптив ===== */
@media (max-width: 1024px) {
    .mv-cat-grid { grid-template-columns: repeat(3, 1fr); }
    .mv-cat-filter-row { grid-template-columns: repeat(2, 1fr); }
    .mv-cat-filter-row:nth-child(2) { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .mv-cat-header h1 { font-size: 24px; }
    .mv-cat-header p { font-size: 14px; }
    .mv-cat-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .mv-cat-card__photo { height: 150px; }
    .mv-cat-card__name { font-size: 13px; }
    .mv-cat-card__price { font-size: 16px; }
    .mv-cat-filters { padding: 14px; }
    .mv-cat-filter-row { grid-template-columns: 1fr; }
    .mv-cat-filter-row:nth-child(2) { grid-template-columns: 1fr; }
    .mv-cat-filter-actions { flex-direction: column; }
    .mv-cat-btn { width: 100%; }
}
@media (max-width: 480px) {
    .mv-cat-grid { grid-template-columns: 1fr; }
    .mv-cat-page { min-width: 36px; height: 36px; font-size: 13px; }
}
