/* ═══ Каталог EQ — новый вид (v2, 23.10.2026) ═══ */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f8f9fa;
    color: #212529;
}

/* ─── Шапка: одна строка на любом экране ─── */
.cat-topbar { gap: .75rem; flex-wrap: nowrap !important; }
.cat-topbar .ellip {
    min-width: 0;
    flex: 0 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cat-count {
    font-size: .8rem;
    color: rgba(255,255,255,.6);
    white-space: nowrap;
}

/* ─── Навигация по разделам (прилипает под шапкой; стрелки по краям) ─── */
.catnav {
    position: sticky;
    top: 56px;
    z-index: 31;
    display: flex;
    align-items: center;
    min-height: 48px;
    background: #f1f3f5;
    border-bottom: 2px solid #dee2e6;
    padding: .35rem .5rem;
    box-shadow: 0 2px 6px rgba(16,24,40,.05);
}
.catnav-inner {
    display: flex;
    gap: .4rem;
    overflow-x: auto;
    scrollbar-width: none;
    padding: 0 26px;
    scroll-behavior: smooth;
    flex: 1;
    min-width: 0;
}
.catnav-inner::-webkit-scrollbar { display: none; }
.nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 32px;
    height: 34px;
    border: 1px solid #0d6efd;
    border-radius: 8px;
    background: #e9ecef;
    color: #0d6efd;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 4px rgba(0,0,0,.12);
}
.nav-arrow.show { display: flex; }
.nav-arrow:hover { color: #0a58ca; border-color: #0a58ca; background: #dee2e6; }
.nav-arrow.left { left: 4px; }
.nav-arrow.right { right: 4px; }
.catnav-btn {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .3rem .7rem;
    border: 1px solid #ced4da;
    border-radius: 999px;
    background: #fff;
    color: #495057;
    font-size: .8rem;
    font-weight: 600;
    white-space: nowrap;
    text-decoration: none;
}
.catnav-btn:hover { border-color: #0d6efd; color: #0d6efd; }
.catnav-btn .n {
    font-size: .72rem;
    background: #e9ecef;
    color: #495057;
    border-radius: 999px;
    padding: 0 .45rem;
}
.catnav-btn.active { background: #0d6efd; border-color: #0d6efd; color: #fff; }
.catnav-btn.active .n { background: rgba(255,255,255,.25); color: #fff; }

/* ─── Раздел ─── */
/* ─── Единая прилипающая шапка колонок (под шапкой + категориями) ─── */
.cat-cols {
    position: sticky;
    top: 104px;
    z-index: 29;
    background: #f1f3f5;
    border-bottom: 2px solid #dee2e6;
    box-shadow: 0 2px 6px rgba(16,24,40,.06);
    padding: 0 .5rem;
}
@media (min-width: 768px) { .cat-cols { padding: 0 1rem; } }
.cat-cols thead th {
    background: #f1f3f5;
    font-weight: 600;
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: #495057;
    border-bottom: 0;
    white-space: nowrap;
    padding: .5rem .5rem;
}
.cat-sec { margin-bottom: .9rem; }
.cat-h {
    display: flex;
    align-items: center;
    gap: .6rem;
    background: #e9ecef;
    border-left: 4px solid #0d6efd;
    padding: .55rem .9rem;
    font-size: 1rem;
    font-weight: 700;
    color: #343a40;
    border-radius: 0 4px 0 0;
    cursor: pointer;
    user-select: none;
    margin: 0;
}
.cat-h:hover { background: #e2e6ea; }
.cat-h .meta { font-size: .78rem; font-weight: 600; color: #6c757d; white-space: nowrap; }
.cat-h .chev { margin-left: auto; transition: transform .2s; color: #6c757d; flex: none; }
.cat-sec.collapsed .chev { transform: rotate(-90deg); }
.cat-sec.collapsed .cat-body { display: none; }
@media (max-width: 767px) {
    /* на телефоне прилеплены только шапка и категории; заголовок раздела прокручивается */
    .cat-h { border-radius: 0; }
}

/* ─── Таблица (компьютер) ─── */
.cat-table { font-size: .875rem; background: #fff; margin-bottom: 0; }
.cat-table thead th {
    background: #f1f3f5;
    font-weight: 600;
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
    white-space: nowrap;
}
.cat-table tbody tr:hover { background: #f0f7ff; }
.cat-table tbody tr.sel { background: #e7f1ff; }
.cat-table tbody tr.sel:hover { background: #dbeafe; }
.cat-table td { vertical-align: middle; }

/* галочка выбора */
.selcell { width: 44px; min-width: 44px; text-align: center; }
.selbox {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    cursor: pointer;
    border-radius: 8px;
}
.selbox:hover { background: rgba(13,110,253,.08); }
.selbox input {
    width: 20px;
    height: 20px;
    accent-color: #0d6efd;
    cursor: pointer;
    margin: 0;
}

/* фото */
.eq-thumb {
    width: 60px; height: 60px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #dee2e6;
    display: block;
    margin: auto;
    cursor: zoom-in;
}
.eq-thumb-placeholder {
    width: 60px; height: 60px;
    background: #f1f3f5;
    border-radius: 4px;
    border: 1px dashed #ced4da;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem; color: #adb5bd;
    margin: auto;
}

/* название + метки */
.item-name { font-weight: 600; color: #1a1a2e; line-height: 1.35; }
.item-desc { font-size: .8rem; color: #6c757d; margin-top: 3px; line-height: 1.4; }
.badge-ip65 {
    display: inline-block;
    font-size: .68rem;
    font-weight: 700;
    color: #0d6efd;
    background: #e7f1ff;
    border: 1px solid #b6d4fe;
    border-radius: 5px;
    padding: 0 .35rem;
    vertical-align: 2px;
    margin-left: .35rem;
    letter-spacing: .04em;
}

/* наличие + счётчик «нужно» */
.qty-plaque {
    display: inline-block;
    background: #d1e7dd;
    color: #0f5132;
    border-radius: 999px;
    padding: .12rem .6rem;
    font-weight: 700;
    font-size: .8rem;
    white-space: nowrap;
}
.qty-plaque.zero { background: #f8f9fa; color: #adb5bd; }
.qty-plaque.low { background: #fff3cd; color: #664d03; }
.need-cnt {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
    justify-content: center;
}
.need-cnt button {
    width: 24px; height: 24px;
    border: 1px solid #b6d4fe;
    background: #fff;
    border-radius: 6px;
    color: #0d6efd;
    font-weight: 700;
    line-height: 1;
    display: flex; align-items: center; justify-content: center;
}
.need-cnt button:hover { background: #e7f1ff; }
.need-cnt input {
    width: 46px; height: 24px;
    text-align: center;
    border: 1px solid #b6d4fe;
    border-radius: 6px;
    font-weight: 700;
    font-size: .82rem;
}
.need-lbl { font-size: .68rem; color: #6c757d; text-align: center; margin-top: 2px; }
.max-hint { font-size: .68rem; color: #dc2626; text-align: center; margin-top: 2px; min-height: 1em; }

/* вес/размер, в кофре, мощность */
.w-line { font-weight: 600; white-space: nowrap; }
.w-dims { font-size: .74rem; color: #868e96; margin-top: 2px; }
.mut-dash { color: #adb5bd; }

/* кнопки информации */
.info-btn {
    display: flex;
    align-items: center;
    gap: .35rem;
    font-size: .76rem;
    font-weight: 600;
    color: #0d6efd;
    text-decoration: none;
    border: 1px solid #b6d4fe;
    background: #fff;
    border-radius: 6px;
    padding: .18rem .5rem;
    margin: 1px 0;
    white-space: nowrap;
}
.info-btn:hover { background: #e7f1ff; color: #0a58ca; }

/* ─── «Ничего не найдено» ─── */
.nothing { display: none; padding: 48px 16px; text-align: center; color: #6c757d; }
.nothing.show { display: block; }

/* ─── Плашка подборки ─── */
.pickbar {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 50;
    background: #16181d;
    color: #fff;
    padding: .6rem .9rem calc(.6rem + env(safe-area-inset-bottom));
    box-shadow: 0 -6px 24px rgba(0,0,0,.25);
    animation: pickbar-up .2s ease;
}
@keyframes pickbar-up { from { transform: translateY(100%); } to { transform: none; } }
.pickbar-in { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; max-width: 1400px; margin: 0 auto; }
.pick-sum { font-size: .95rem; font-weight: 700; white-space: nowrap; }
.pick-chips { display: flex; gap: .35rem; flex-wrap: wrap; flex: 1; min-width: 200px; }
.pick-chip {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    font-size: .75rem;
    background: rgba(255,255,255,.12);
    border-radius: 999px;
    padding: .15rem .6rem;
    max-width: 240px;
}
.pick-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-chip button { color: #f87171; font-weight: 700; padding: 0; font-size: .9rem; }
.pick-acts { display: flex; gap: .5rem; margin-left: auto; }
.pick-acts .btn { white-space: nowrap; }

/* ─── Фото при наведении (компьютер) ─── */
.phototip {
    position: fixed;
    z-index: 60;
    display: none;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,.3);
    background: #fff;
    border: 1px solid #dee2e6;
    pointer-events: none;
}
.phototip img { width: 320px; height: 240px; object-fit: contain; display: block; background: #f8f9fa; }

/* ─── Лайтбокс (телефон) ─── */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(0,0,0,.92);
    display: none;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
}
.lightbox.show { display: flex; }
.lightbox img { max-width: 96vw; max-height: 92vh; object-fit: contain; }
.lightbox .x {
    position: absolute;
    top: 12px; right: 12px;
    width: 40px; height: 40px;
    border-radius: 20px;
    background: rgba(255,255,255,.15);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem;
}

/* ─── Заказ: «＋ В подборку» ⇄ счётчик на одном месте ─── */
.ord-add {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .3rem;
    width: 150px;
    font-size: .76rem;
    font-weight: 700;
    color: #0d6efd;
    border: 1px solid #9ec5fe;
    background: #fff;
    border-radius: 6px;
    padding: .18rem .3rem;
    white-space: nowrap;
}
.ord-add:hover { background: #e7f1ff; }
.ord-cnt {
    display: none;
    flex-direction: column;
    align-items: center;
    width: 150px;
    border: 2px solid #0d6efd;
    border-radius: 10px;
    background: #fff;
    padding: 3px 0;
}
.ordercell { text-align: center; }
.ord-row { display: inline-flex; align-items: center; gap: 4px; }
.ord-btn {
    width: 30px; height: 30px;
    border: 1px solid #b6d4fe;
    background: #fff;
    border-radius: 7px;
    color: #0d6efd;
    font-size: 1.05rem;
    font-weight: 700;
    display: inline-flex; align-items: center; justify-content: center;
}
.ord-btn:hover { background: #e7f1ff; }
.ord-inp {
    width: 44px; height: 30px;
    text-align: center;
    border: 1px solid #b6d4fe;
    border-radius: 7px;
    font-weight: 700;
    font-size: .95rem;
}
.ord-x {
    width: 26px; height: 26px;
    margin-left: 2px;
    border-radius: 6px;
    color: #dc2626;
    font-size: .95rem;
    display: inline-flex; align-items: center; justify-content: center;
}
.ord-x:hover { background: #fee2e2; }
.ord-max { font-size: .68rem; color: #6c757d; margin-top: 1px; white-space: nowrap; }
.ord-hint { font-size: .68rem; color: #dc2626; min-height: 0; white-space: nowrap; }
.prow.sel, .mcard.sel { background: #e7f1ff; }
.prow.sel:hover { background: #dbeafe; }

/* телефон: счётчик в нижнем ряду карточки, на месте кнопки */
.mcard-ord { display: block; flex: 1; min-width: 130px; }
.mcard-ord .ord-add { width: 100%; justify-content: center; padding: .3rem .5rem; }
.mcard-ord .ord-cnt { width: 100%; }
.mcard-ord .ord-btn { width: 34px; height: 34px; }
.mcard-ord .ord-inp { width: 50px; height: 34px; font-size: 1rem; }

/* ─── Плашка «Подборка по ссылке» ─── */
.linkbar {
    display: flex;
    align-items: center;
    gap: .75rem;
    flex-wrap: wrap;
    background: #e7f1ff;
    border-bottom: 1px solid #b6d4fe;
    color: #0a58ca;
    font-size: .9rem;
    font-weight: 600;
    padding: .5rem .9rem;
}
.linkbar.d-none { display: none; }

/* ─── Подсказка «Список скопирован…» ─── */
.copynote {
    position: fixed;
    top: 14px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 80;
    background: #16181d;
    color: #fff;
    font-size: .85rem;
    font-weight: 600;
    padding: .55rem 1rem;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,.25);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s, transform .2s;
    max-width: 90vw;
    text-align: center;
}
.copynote.show { opacity: 1; transform: translateX(-50%) translateY(4px); }

/* ─── Телефон: компактные карточки ─── */
.mcards { display: none; }
@media (max-width: 767px) {
    .cat-table-wrap { display: none !important; }
    .mcards { display: block; background: #fff; border: 1px solid #dee2e6; border-radius: 6px; overflow: hidden; }
    .mcard { padding: .6rem; border-bottom: 1px solid #e9ecef; }
    .mcard:last-child { border-bottom: 0; }
    .mcard.sel { background: #e7f1ff; }
    .mcard-top { display: flex; gap: .6rem; }
    .mcard-img { flex: none; }
    .mcard-img .eq-thumb, .mcard-img .eq-thumb-placeholder { width: 56px; height: 56px; margin: 0; }
    .mcard-name { flex: 1; min-width: 0; }
    .mcard-name .item-name { font-size: .9rem; }
    .mcard-name .item-desc { font-size: .74rem; }
    .mcard-qty { flex: none; text-align: right; }
    .mcard-qty .qty-plaque { font-size: .85rem; padding: .2rem .55rem; }
    .mcard-qty .need-cnt { margin-top: .35rem; }
    .mcard-qty .need-cnt button { width: 34px; height: 34px; font-size: 1.2rem; }
    .mcard-qty .need-cnt input { width: 52px; height: 34px; font-size: 1rem; }
    .mcard-specs {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: .2rem .8rem;
        margin: .45rem 0 .15rem;
        font-size: .78rem;
        color: #495057;
    }
    .mcard-specs div { display: flex; justify-content: space-between; gap: .4rem; border-bottom: 1px dashed #f1f3f5; padding: 2px 0; }
    .mcard-specs b { font-weight: 600; text-align: right; }
    .mcard-specs .lbl, .mcard-dims, .mcard-max { color: #868e96; font-size: .72rem; }
    .mcard-dims { margin: .25rem 0; }
    .mcard-max { min-height: 1em; margin: .15rem 0; color: #dc2626; }
    .mcard-btns { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: .4rem; }
    .mcard-btns .info-btn { flex: 1; justify-content: center; min-width: 130px; }
    .mcard-btns .pickbtn { flex: 1; justify-content: center; min-width: 130px; border-color: #ced4da; color: #495057; }
    .mcard.sel .pickbtn { background: #0d6efd; border-color: #0d6efd; color: #fff; }
}
