/* Grupy produktów (lewa kolumna sklepu); na telefonie wysuwany panel */
.sg-col {
    --sg-text: #1e1e1e;
    --sg-muted: #6b6b6b;
    --sg-line: #ececec;
    --sg-accent: #CD0000;
    font-family: 'Gilroy', sans-serif;
}

.sg-col *,
.sg-col *::before,
.sg-col *::after {
    letter-spacing: normal;
}

.sg {
    padding-right: 16px;
}

.sg-toggle,
.sg-close,
.sg-backdrop {
    display: none;
}

/* ---------- Nagłówek ---------- */
.sg-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.sg-col .sg-title {
    margin: 0;
    color: var(--sg-muted);
    font-family: 'Gilroy', sans-serif;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: .12em !important;
    text-transform: uppercase;
}

/* ---------- Pozycje ---------- */
.sg-col .sg-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 4px 12px;
    border-left: 2px solid transparent;
    border-radius: 0 6px 6px 0;
    color: var(--sg-text);
    font-size: 14.5px;
    font-weight: 500;
    line-height: 1.3;
    text-decoration: none;
    transition: background-color .15s ease, color .15s ease;
}

.sg-col .sg-link:hover,
.sg-col .sg-link:focus {
    background: #f5f4f2;
    color: var(--sg-text);
    text-decoration: none;
}

.sg-col .sg-link.is-active {
    border-left-color: var(--sg-accent);
    background: #fdf1f1;
    color: var(--sg-accent);
    font-weight: 600;
}

.sg-col .sg-link:focus-visible,
.sg-col .sg-group-btn:focus-visible {
    outline: 2px solid var(--sg-accent);
    outline-offset: -2px;
}

.sg-col .sg-all {
    margin-bottom: 6px;
    font-weight: 600;
}

/* ---------- Grupy ---------- */
.sg-group {
    border-top: 1px solid var(--sg-line);
}

/* Bez kreski bezpośrednio pod "Wszystkie produkty" */
.sg-all + .sg-group {
    border-top: 0;
}

.sg-col .sg-group-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 12px 10px 14px;
    border: 0;
    background: transparent;
    color: var(--sg-text);
    font-family: 'Gilroy', sans-serif;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
    text-align: left;
    cursor: pointer;
}

.sg-group-name {
    flex: 1;
    min-width: 0;
}

.sg-chevron {
    color: var(--sg-muted);
    font-size: 18px;
    transition: transform .2s ease;
}

.sg-group-btn[aria-expanded="true"] .sg-chevron {
    transform: rotate(180deg);
}

.sg-list {
    margin: -2px 0 8px;
    padding: 0 0 0 14px; /* wcięcie pozycji względem nazwy grupy */
    list-style: none;
}

.sg-list[hidden] {
    display: none;
}

.sg-badge {
    flex: none;
    padding: 2px 7px;
    border-radius: 999px;
    background: var(--sg-accent);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.4;
}

/* ---------- Wyszukiwanie ---------- */
.sg-search {
    position: relative;
    margin-bottom: 10px;
}

.sg-search .fa {
    position: absolute;
    top: 50%;
    left: 12px;
    color: #9a9a9a;
    font-size: 12px;
    transform: translateY(-50%);
    pointer-events: none;
}

.sg-col .sg-search-input {
    width: 100%;
    height: 32px;
    padding: 0 10px 0 32px;
    border: 1px solid #e2e2e2;
    border-radius: 999px;
    background: #fff;
    color: var(--sg-text);
    font-family: 'Gilroy', sans-serif;
    font-size: 13px;
    font-weight: 500;
    box-shadow: none;
    transition: border-color .15s ease, background-color .15s ease;
}

.sg-col .sg-search-input:hover {
    border-color: #c8c8c8;
}

.sg-col .sg-search-input:focus {
    border-color: #1e1e1e;
    outline: none;
}

.sg-search-input::placeholder {
    color: #9a9a9a;
}

.sg-group[hidden],
.sg-list li[hidden],
.sg-col .sg-link[hidden],
.sg-empty[hidden] {
    display: none;
}

.sg-empty {
    margin: 8px 12px;
    color: var(--sg-muted);
    font-size: 14px;
}

/* ---------- Telefon i tablet: przycisk "Filtruj" + wysuwany panel ---------- */
@media (max-width: 991px) {
    .sg-col .sg-toggle {
        display: flex;
        align-items: center;
        gap: 8px;
        width: 100%;
        margin-bottom: 20px;
        padding: 12px 18px;
        border: 1.5px solid var(--sg-text);
        border-radius: 999px;
        background: #fff;
        color: var(--sg-text);
        font-family: 'Gilroy', sans-serif;
        font-size: 15px;
        font-weight: 500;
        line-height: 1.2;
        text-align: left;
    }

    .sg-toggle .sg-current {
        flex: 1;
        min-width: 0;
        overflow: hidden;
        font-weight: 700;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .sg {
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        z-index: 1001;
        width: min(86vw, 360px);
        padding: 0 0 24px;
        overflow-y: auto;
        overscroll-behavior: contain;
        background: #fff;
        box-shadow: 0 0 40px rgba(0, 0, 0, .2);
        transform: translateX(-100%);
        visibility: hidden;
        transition: transform .25s ease, visibility 0s linear .25s;
    }

    .sg:focus {
        outline: none;
    }

    .sg-col.is-open .sg {
        transform: none;
        visibility: visible;
        transition: transform .25s ease;
    }

    .sg-head {
        position: sticky;
        top: 0;
        z-index: 1;
        margin: 0 0 8px;
        padding: 10px 12px 10px 20px;
        border-bottom: 1px solid var(--sg-line);
        background: #fff;
    }

    .sg-col .sg-close {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border: 0;
        border-radius: 8px;
        background: transparent;
        color: var(--sg-text);
        font-size: 28px;
        line-height: 1;
    }

    .sg-col .sg-close:hover {
        background: #f5f4f2;
    }

    .sg-search {
        margin: 0 12px 10px;
    }

    .sg-body {
        padding: 0 12px;
    }

    .sg-col .sg-link {
        padding: 8px 12px; /* na telefonie wygodny cel dotyku */
    }

    .sg-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 1000;
        background: rgba(0, 0, 0, .45);
        opacity: 0;
        transition: opacity .25s ease;
    }

    .sg-backdrop[hidden] {
        display: none;
    }

    .sg-col.is-open .sg-backdrop {
        opacity: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sg,
    .sg-backdrop,
    .sg-chevron {
        transition: none !important;
    }
}
