/* ===== КАТАЛОГ: мини-КП (подборка светильников) ===== */

.cat-quote-btn {
    position: relative;
    width: 40px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.02em;
}
.cat-quote-btn.on {
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent) inset;
}
.cat-quote-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    border-radius: 999px;
    background: var(--accent);
    color: var(--on-accent, #08121f);
    font-size: 10px;
    font-weight: 800;
    line-height: 17px;
    text-align: center;
    display: none;
    box-sizing: border-box;
}
.cat-card.cat-quote-in {
    outline: 2px solid var(--accent);
    outline-offset: -2px;
}
.cat-card.cat-quote-in .cat-order-btn.cat-quote-add {
    background: var(--accent);
    color: var(--on-accent, #08121f);
}
.cat-quote-detail-btn {
    margin: 8px 0 12px;
    padding: 10px 16px;
    border: 1px solid var(--accent);
    border-radius: 10px;
    background: var(--accent);
    color: var(--on-accent, #08121f);
    font: 700 13px system-ui;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.cat-quote-detail-btn:active { transform: scale(0.98); }

.cat-quote-sheet {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2450;
    display: none;
    flex-direction: column;
    max-height: 72vh;
    background: var(--panel-solid, #131a26);
    color: var(--text-primary);
    border: 1px solid var(--cat-card-border);
    border-bottom: 0;
    border-radius: 18px 18px 0 0;
    box-shadow: 0 -12px 36px rgba(0, 0, 0, 0.35);
    overflow: hidden;
    padding-bottom: env(safe-area-inset-bottom, 0px);
}
.cat-quote-sheet.cq-open { display: flex; }
.cat-quote-sheet .cq-handle {
    flex: 0 0 auto;
    min-height: 56px;
    display: grid;
    grid-template-columns: auto auto 1fr auto auto;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    cursor: pointer;
    user-select: none;
    touch-action: pan-y;
    background: var(--cat-chip-bg);
    border-bottom: 1px solid var(--cat-card-border);
}
.cq-grip {
    width: 22px;
    height: 4px;
    border-radius: 99px;
    background: var(--text-secondary);
    opacity: 0.5;
}
.cq-handle-title { font-size: 13px; font-weight: 800; }
.cq-handle-count { font-size: 12px; color: var(--text-secondary); }
.cq-handle-total { font-size: 13px; font-weight: 800; white-space: nowrap; }
.cq-handle-arrow { font-size: 18px; color: var(--text-secondary); width: 20px; text-align: center; }
.cat-quote-sheet .cq-body {
    display: none;
    min-height: 0;
    flex-direction: column;
    overflow: hidden;
}
.cat-quote-sheet.cq-expanded .cq-body { display: flex; }
.cq-body-head {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 14px 6px;
    font-size: 13px;
}
.cq-clear {
    border: 0;
    background: transparent;
    color: var(--text-secondary);
    font: 600 12px system-ui;
    cursor: pointer;
    padding: 4px;
}
.cq-list {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 4px 10px 8px;
}
.cq-item {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr) auto 28px;
    align-items: center;
    gap: 8px;
    padding: 8px 4px;
    border-bottom: 1px solid var(--cat-card-border);
}
.cq-item:last-child { border-bottom: 0; }
.cq-item-img {
    width: 46px;
    height: 46px;
    object-fit: contain;
    border-radius: 8px;
    background: var(--cat-card-bg);
}
.cq-item-main { min-width: 0; }
.cq-item-name {
    font-size: 12.5px;
    font-weight: 700;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cq-item-meta {
    font-size: 10px;
    color: var(--text-secondary);
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cq-item-price { font-size: 11.5px; margin-top: 3px; color: var(--text-secondary); }
.cq-item-price small { opacity: .8; }
.cq-item-qty {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 700;
}
.cq-item-qty button {
    width: 26px;
    height: 26px;
    border: 1px solid var(--cat-card-border);
    border-radius: 7px;
    background: var(--cat-card-bg);
    color: var(--text-primary);
    font: 700 16px/1 system-ui;
    cursor: pointer;
    padding: 0;
}
.cq-item-remove {
    width: 26px;
    height: 26px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
}
.cq-item-remove:hover { color: #ff7b7b; }
.cq-empty { padding: 20px 12px; text-align: center; color: var(--text-secondary); font-size: 12px; }
.cq-foot {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 14px calc(12px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--cat-card-border);
    font-size: 12px;
}
.cq-foot b { font-size: 15px; }
.cq-build {
    transition: transform .08s ease, filter .08s ease, opacity .15s ease;
    border: 0;
    border-radius: 10px;
    padding: 10px 16px;
    background: var(--accent);
    color: var(--on-accent, #08121f);
    font: 700 13px system-ui;
    cursor: pointer;
    white-space: nowrap;
}
.cq-build:disabled { opacity: .45; cursor: default; }
.cq-build:active:not(:disabled) { transform: scale(0.96); filter: brightness(0.9); }
.cat-quote-sheet button:active:not(:disabled) { transform: scale(0.94); filter: brightness(0.9); }
.cat-quote-sheet button { transition: transform .08s ease, filter .08s ease, opacity .15s ease; }
.cat-quote-sheet button:disabled { opacity: .5; cursor: wait; }

@media (min-width: 901px) {
    .cat-quote-sheet {
        left: auto;
        right: 18px;
        bottom: 18px;
        width: 390px;
        max-height: 70vh;
        border: 1px solid var(--cat-card-border);
        border-radius: 16px;
        padding-bottom: 0;
    }
    .cat-quote-sheet .cq-body { display: flex; }
    .cat-quote-sheet .cq-foot { padding-bottom: 12px; }
    .cq-handle { cursor: default; }
}
