/* ============================================================
   Мегаменю «Каталог» — новый дизайн (2 вкладки: тип / бренд)
   ============================================================ */
.cm-menu {
    width: 1080px;
    max-width: calc(100vw - 40px);
    padding: 0;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 24px 48px rgba(6,7,19,0.14);
    border: 1px solid #EAEAEE;
    border-top: none;
    overflow: hidden;
}
.cm-inner { padding: 0 20px; }

.cm-tabs { display: flex; gap: 8px; padding: 18px 0 0; }
.cm-tab {
    height: 52px; padding: 0 26px; border: 0; border-radius: 8px 8px 0 0;
    font-size: 17px; font-weight: 700; cursor: pointer; white-space: nowrap;
    background: #F4F4F6; color: #47484F;
    transition: background .15s, color .15s;
}
.cm-tab:hover { color: #060713; }
.cm-tab.active { background: #D31E23; color: #ffffff; }
.cm-tab.active:hover { color: #ffffff; }

.cm-panel { display: none; }
.cm-panel.active { display: block; }

/* --- Вкладка «По типу запчасти» --- */
.cm-types-grid {
    display: grid; grid-template-columns: 380px 1fr; gap: 40px;
    padding: 24px 0 36px; min-height: 420px;
}
.cm-types-left {
    display: flex; flex-direction: column; gap: 2px;
    border-right: 1px solid #EFEFF2; padding-right: 24px;
}
.cm-type-item {
    display: flex; align-items: center; gap: 12px;
    padding: 11px 14px; border-radius: 8px;
    font-size: 16px; line-height: 1.3; color: #34353D;
    transition: background .15s, color .15s;
}
.cm-type-item:hover, .cm-type-item.active { background: #F4F4F6; color: #D31E23; font-weight: 600; }
.cm-type-name { flex: 1 1 auto; }
.cm-type-count { font-size: 13px; color: #9A9BA3; }
.cm-arrow { flex: 0 0 auto; }
.cm-type-item .cm-arrow path { stroke: #C9CAD0; }
.cm-type-item.active .cm-arrow path { stroke: #D31E23; }

.cm-types-right { padding: 6px 0 0; }
.cm-subs { display: none; }
.cm-subs.active { display: block; }
.cm-subs-title {
    font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase;
    color: #9A9BA3; margin-bottom: 16px;
}
.cm-subs-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px 32px; }
.cm-subs-grid a { font-size: 15px; color: #34353D; line-height: 1.35; }
.cm-subs-grid a:hover { color: #D31E23; }

.cm-all {
    display: inline-flex; align-items: center; gap: 10px; margin-top: 28px;
    font-size: 15px; font-weight: 600; color: #D31E23;
}
.cm-all:hover { color: #C42B30; }

/* --- Вкладка «По бренду запчасти» --- */
.cm-brands-panel { padding: 24px 0 36px; min-height: 420px; }
.cm-brands-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px 32px; }
.cm-brands-grid a { font-size: 15px; color: #34353D; line-height: 1.35; }
.cm-brands-grid a:hover { color: #D31E23; }

@media (max-width: 900px) {
    .cm-menu { width: calc(100vw - 20px); }
    .cm-types-grid { grid-template-columns: 1fr; gap: 20px; }
    .cm-types-left { border-right: none; padding-right: 0; }
    .cm-subs-grid { grid-template-columns: repeat(2, 1fr); }
    .cm-brands-grid { grid-template-columns: repeat(2, 1fr); }
}
