/* =========================================================
   LiderMoto - szczegółowy lewy filtr kategorii
   Plik: /web/lidermoto/assets/css/lewy-filtr-kategorii-szczegoly.css
   Dotyczy tylko /filtry/lewy-filtr-kategorii-szczegoly.php
   ========================================================= */

.lm-content-layout {
    grid-template-columns: 300px minmax(0, 1fr) !important;
    gap: 18px !important;
}

.lm-category-details-sidebar {
    background: #ffffff;
    border: 1px solid #d7e0ea;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(31, 70, 104, .06);
    overflow: hidden;
    position: sticky;
    top: 74px;
    height: calc(100vh - 92px);
    max-height: 720px;
    display: flex;
    flex-direction: column;
}

.lm-category-details-head {
    min-height: 88px;
    padding: 14px 14px 12px;
    background: linear-gradient(180deg, #f7fafc 0%, #ffffff 100%);
    border-bottom: 1px solid #e3e9f0;
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.lm-category-details-kicker {
    color: #7a8795;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.lm-category-details-head h2 {
    margin: 0;
    color: #24384d;
    font-size: 18px;
    line-height: 1.15;
    font-weight: 900;
}

.lm-category-details-head p {
    margin: 4px 0 0;
    color: #718093;
    font-size: 12px;
    line-height: 1.25;
    font-weight: 700;
}

.lm-category-details-back {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #edf3f8;
    color: #2f526f;
    font-size: 26px;
    font-weight: 900;
    line-height: 1;
    flex: 0 0 34px;
}

.lm-category-details-back:hover {
    background: #dce9f3;
}

.lm-category-details-path {
    padding: 8px 14px;
    border-bottom: 1px solid #e3e9f0;
    background: #f8fafc;
    color: #52677c;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.25;
}

.lm-category-details-tools {
    padding: 12px 12px 10px;
    border-bottom: 1px solid #e3e9f0;
    display: grid;
    gap: 8px;
}

.lm-category-details-search {
    display: grid;
    gap: 5px;
}

.lm-category-details-search span {
    color: #617083;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.lm-category-details-search input {
    width: 100%;
    height: 34px;
    border: 1px solid #cfd9e3;
    border-radius: 8px;
    background: #fff;
    color: #26394c;
    padding: 0 10px;
    font-size: 12px;
    font-weight: 700;
}

.lm-category-details-search input:focus {
    outline: none;
    border-color: #e0ad1f;
    box-shadow: 0 0 0 2px rgba(240, 188, 37, .18);
}

.lm-category-details-view-switch {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}

.lm-category-details-view-switch button {
    height: 30px;
    border: 1px solid #d5dee8;
    border-radius: 8px;
    background: #f7f9fb;
    color: #43586d;
    cursor: pointer;
    font-size: 14px;
    font-weight: 900;
}

.lm-category-details-view-switch button.is-active {
    background: #2f526f;
    border-color: #2f526f;
    color: #fff;
}

.lm-category-details-list {
    flex: 1 1 auto;
    min-height: 220px;
    overflow: auto;
    padding: 8px;
    scrollbar-width: thin;
    overscroll-behavior: contain;
}

.lm-category-details-item {
    min-height: 42px;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    align-items: center;
    gap: 9px;
    padding: 7px 8px;
    border-radius: 9px;
    color: #26394c;
    border: 1px solid transparent;
}

.lm-category-details-item:hover {
    background: #f2f7fb;
    border-color: #d8e4ef;
}

.lm-category-details-item.is-active {
    background: #eaf4fb;
    border-color: #a9c5dd;
}

.lm-category-details-logo {
    width: 34px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.lm-category-details-logo img {
    width: 32px;
    height: 24px;
    object-fit: contain;
    display: block;
}

.lm-category-details-logo span {
    font-size: 19px;
    line-height: 1;
}

.lm-category-details-main {
    min-width: 0;
    display: grid;
    gap: 1px;
}

.lm-category-details-main strong {
    min-width: 0;
    color: #24384d;
    font-size: 13px;
    line-height: 1.16;
    font-weight: 900;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lm-category-details-main small {
    min-width: 0;
    color: #8290a0;
    font-size: 10px;
    line-height: 1.12;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lm-category-details-count {
    min-width: 24px;
    color: #6d7e8f;
    font-size: 12px;
    font-weight: 900;
    text-align: right;
}

.lm-category-details-empty {
    margin: 8px;
    padding: 12px;
    border-radius: 10px;
    background: #f7f9fb;
    color: #657589;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.35;
}


/* Widok: lista tekstowa — bez ikon, bez emoji, profesjonalna lista wyboru */
.lm-category-details-sidebar[data-view="list"] .lm-category-details-item {
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: 40px;
    padding: 8px 10px;
}

.lm-category-details-sidebar[data-view="list"] .lm-category-details-logo {
    display: none;
}

/* Widok: lista z logo */
.lm-category-details-sidebar[data-view="media"] .lm-category-details-item {
    grid-template-columns: 46px minmax(0, 1fr) auto;
    min-height: 52px;
}

.lm-category-details-sidebar[data-view="media"] .lm-category-details-logo {
    width: 46px;
    height: 38px;
}

.lm-category-details-sidebar[data-view="media"] .lm-category-details-logo img {
    width: 44px;
    height: 32px;
}

/* Widok: siatka logo */
.lm-category-details-sidebar[data-view="grid"][data-level="brand"] .lm-category-details-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
    padding: 10px;
}

.lm-category-details-sidebar[data-view="grid"][data-level="brand"] .lm-category-details-item {
    min-height: 82px;
    grid-template-columns: 1fr;
    justify-items: center;
    align-content: center;
    text-align: center;
    gap: 5px;
    padding: 8px 6px;
}

.lm-category-details-sidebar[data-view="grid"][data-level="brand"] .lm-category-details-logo {
    width: 60px;
    height: 36px;
}

.lm-category-details-sidebar[data-view="grid"][data-level="brand"] .lm-category-details-logo img {
    width: 58px;
    height: 34px;
}

.lm-category-details-sidebar[data-view="grid"][data-level="brand"] .lm-category-details-main small,
.lm-category-details-sidebar[data-view="grid"][data-level="brand"] .lm-category-details-count {
    display: none;
}

.lm-category-details-sidebar[data-view="grid"][data-level="brand"] .lm-category-details-main strong {
    font-size: 11px;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

@media (max-width: 1100px) {
    .lm-content-layout {
        grid-template-columns: 270px minmax(0, 1fr) !important;
    }
}

@media (max-width: 980px) {
    .lm-content-layout {
        grid-template-columns: 1fr !important;
    }

    .lm-category-details-sidebar {
        position: static;
        height: auto;
        max-height: none;
        display: block;
    }

    .lm-category-details-list {
        max-height: none;
        min-height: 0;
    }
}

/* =========================================================
   Logo marek w filtrze szczegółowym
   - widok listowy pozostaje bez ikon,
   - widok z logo i siatka używają logo z bazy,
   - jeśli logo nie ma, pokazujemy neutralny kafelek z literą marki,
   - prawdziwe logo jest czarno-białe, a po najechaniu kolorowe.
   ========================================================= */

.lm-category-details-logo-img {
    filter: grayscale(100%) contrast(110%);
    opacity: .82;
    transition: filter .16s ease, opacity .16s ease, transform .16s ease;
}

.lm-category-details-item:hover .lm-category-details-logo-img,
.lm-category-details-item:focus-visible .lm-category-details-logo-img {
    filter: none;
    opacity: 1;
    transform: scale(1.03);
}

.lm-category-details-logo-placeholder {
    width: 30px;
    height: 30px;
    border: 1px solid #d2dce6;
    border-radius: 9px;
    background: linear-gradient(180deg, #f8fafc 0%, #eef3f7 100%);
    color: #2f526f;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px !important;
    line-height: 1 !important;
    font-weight: 900;
    letter-spacing: .02em;
}

.lm-category-details-sidebar[data-view="media"] .lm-category-details-logo-placeholder {
    width: 38px;
    height: 34px;
    border-radius: 10px;
    font-size: 14px !important;
}

.lm-category-details-sidebar[data-view="grid"][data-level="brand"] .lm-category-details-logo-placeholder {
    width: 54px;
    height: 38px;
    border-radius: 12px;
    font-size: 15px !important;
}

/* W widoku listowym logo/placeholder jest całkowicie ukryte. */
.lm-category-details-sidebar[data-view="list"] .lm-category-details-logo-img,
.lm-category-details-sidebar[data-view="list"] .lm-category-details-logo-placeholder {
    display: none !important;
}
