/* ==========================================================================
   MEGA MENU v2 — działy sklepu z filtrem „Styl” (inc/mega-menu-v2.php)
   Projekt: Kategorie/IGA_MENU_CALY_SKLEP_STYL.html (22.10.2026).
   Zmiana względem projektu: pasek „Styl” pod kolumnami, tuż nad „Według
   pomieszczenia”, oba paski tej samej wysokości (62 px, chipy 32 px).
   Kolory i czcionka marki IGA (granat #2a3392 = --tb-theme-color), nie czerwień projektu.
   ========================================================================== */

.igb-mm2,
.igb-mm2-item {
    --mm2-accent: var(--tb-theme-color, #2a3392);
    --mm2-accent-dark: var(--tb-theme-color-hover, #232b7c);
    --mm2-tint: #eef0fa;
    --mm2-tint-line: #d5d8ef;
    --mm2-ink: #222;
    --mm2-muted: #666a75;
    --mm2-line: #e6e7ec;
    --mm2-soft: #f6f7fa;
    --mm2-font: "Helvetica", Arial, sans-serif;
}

.igb-mm2-panel[hidden],
.igb-mm2-backdrop[hidden],
.igb-mm2-sub[hidden] {
    display: none !important;
}

/* --- Pozycja działu w pasku menu (strzałka w istniejącym paddingu = bez przesunięcia) --- */
.main-menu > li.igb-mm2-item > a::after {
    content: "";
    display: block;
    position: absolute;
    top: 50%;
    right: -3px;
    width: 6px;
    height: 6px;
    border-right: 1.6px solid currentColor;
    border-bottom: 1.6px solid currentColor;
    transform: translateY(-75%) rotate(45deg);
    opacity: .55;
    transition: transform .2s;
}

.main-menu > li.igb-mm2-item > a::before {
    content: "";
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 2px;
    height: 2px;
    background: var(--mm2-accent);
    transform: scaleX(0);
    transition: transform .18s;
}

.main-menu > li.igb-mm2-item.is-open > a {
    color: var(--mm2-accent);
    background: none;
}

.main-menu > li.igb-mm2-item.is-open > a::before {
    transform: scaleX(1);
}

.main-menu > li.igb-mm2-item.is-open > a::after {
    transform: translateY(-25%) rotate(225deg);
    opacity: 1;
}

/* --- Panel: wspólne --- */
.igb-mm2-panel {
    font-family: var(--mm2-font);
    font-size: 15px;
    line-height: 1.5;
    color: var(--mm2-ink);
    background: #fff;
    text-align: left;
    box-sizing: border-box;
}

.igb-mm2-panel *,
.igb-mm2-panel *::before,
.igb-mm2-panel *::after {
    box-sizing: border-box;
}

.igb-mm2-panel a {
    color: var(--mm2-ink);
    text-decoration: none;
}

.igb-mm2-panel button {
    font: inherit;
    color: inherit;
    cursor: pointer;
}

.igb-mm2-panel a:focus-visible,
.igb-mm2-panel button:focus-visible,
.igb-mm2-panel summary:focus-visible,
.igb-mm2-item > a:focus-visible {
    outline: 3px solid var(--mm2-accent);
    outline-offset: 2px;
    border-radius: 4px;
}

.igb-mm2-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    vertical-align: middle;
}

.igb-mm2-ui {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* Nagłówek panelu */
.igb-mm2-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 19px 27px 17px;
    flex-shrink: 0;
}

.igb-mm2-back {
    display: none;
    background: none;
    border: 0;
    padding: 0;
}

.igb-mm2-heading {
    display: flex;
    align-items: baseline;
    gap: 18px;
    min-width: 0;
}

.igb-mm2-title {
    font-size: 25px;
    letter-spacing: -.6px;
    font-weight: 650;
    line-height: 1.2;
}

.igb-mm2-subtitle {
    font-size: 12px;
    color: var(--mm2-muted);
}

.igb-mm2-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
}

.igb-mm2-panel .igb-mm2-all {
    font-size: 12px;
    color: var(--mm2-accent);
    font-weight: 650;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.igb-mm2-panel .igb-mm2-all:hover {
    color: var(--mm2-accent-dark);
}

.igb-mm2-close {
    border: 1px solid var(--mm2-line);
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    padding: 0;
    background: #fff;
}

.igb-mm2-close:hover {
    background: var(--mm2-soft);
}

.igb-mm2-scroll {
    overflow: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    min-height: 0;
    border-top: 1px solid var(--mm2-line);
}

/* Kolumny */
.igb-mm2-grid {
    display: grid;
    grid-template-columns: repeat(var(--igb-mm2-cols, 5), minmax(0, 1fr));
    padding: 23px 27px 20px;
}

.igb-mm2-col {
    display: flex;
    flex-direction: column;
    gap: 22px;
    padding: 0 22px;
    border-right: 1px solid var(--mm2-line);
    min-width: 0;
}

.igb-mm2-col:first-child {
    padding-left: 0;
}

.igb-mm2-col:last-child {
    padding-right: 0;
    border-right: 0;
}

.igb-mm2-group-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 38px;
    list-style: none;
    cursor: default;
    pointer-events: none;
}

.igb-mm2-group-head::-webkit-details-marker {
    display: none;
}

.igb-mm2-group-head > .igb-mm2-ui {
    display: none;
}

.igb-mm2-group-title {
    display: flex;
    gap: 8px;
    align-items: center;
    font-size: 14px;
    line-height: 1.35;
    font-weight: 750;
    letter-spacing: -.25px;
}

.igb-mm2-group-title .igb-mm2-icon {
    color: var(--mm2-accent);
    width: 22px;
    height: 22px;
}

.igb-mm2-hint {
    font-size: 10px;
    color: var(--mm2-muted);
    margin: 4px 0 10px;
    line-height: 1.5;
}

.igb-mm2-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.igb-mm2-li {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0 3px;
    margin: 0;
    padding: 0;
    min-width: 0;
}

.igb-mm2-panel .igb-mm2-link {
    flex: 1;
    min-width: 0;
    font-size: 12.5px;
    line-height: 1.4;
    padding: 7px 0;
}

.igb-mm2-panel .igb-mm2-link:hover {
    color: var(--mm2-accent);
}

.igb-mm2-li.is-featured > .igb-mm2-link {
    font-weight: 700;
}

.igb-mm2-li.is-divider {
    padding-top: 6px;
    margin-top: 5px;
    border-top: 1px solid var(--mm2-line);
}

.igb-mm2-expand {
    width: 24px;
    height: 29px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 4px;
    background: none;
    color: #95959e !important;
    flex-shrink: 0;
}

.igb-mm2-expand:hover {
    color: var(--mm2-accent) !important;
    background: var(--mm2-tint);
}

.igb-mm2-expand .igb-mm2-ui {
    width: 13px;
    height: 13px;
    transition: transform .15s;
}

.igb-mm2-expand[aria-expanded="true"] .igb-mm2-ui {
    transform: rotate(90deg);
}

.igb-mm2-expand[aria-busy="true"] {
    opacity: .5;
}

.igb-mm2-sub {
    flex-basis: 100%;
    list-style: none;
    margin: 0 0 6px;
    padding: 2px 0 4px 10px;
    border-left: 2px solid var(--mm2-tint-line);
}

.igb-mm2-sub li {
    margin: 0;
    padding: 0;
}

.igb-mm2-panel .igb-mm2-sub a {
    display: block;
    font-size: 12px;
    line-height: 1.4;
    padding: 4px 0;
    color: #4a4b53;
}

.igb-mm2-panel .igb-mm2-sub a:hover {
    color: var(--mm2-accent);
}

.igb-mm2-panel .igb-mm2-sub .igb-mm2-sub-all {
    color: var(--mm2-accent);
    font-weight: 650;
    font-size: 11px;
}

.igb-mm2-panel .igb-mm2-group-footer {
    display: flex;
    align-items: center;
    gap: 6px;
    padding-top: 11px;
    margin-top: 8px;
    border-top: 1px solid var(--mm2-line);
    font-size: 11px;
    font-weight: 650;
    color: var(--mm2-accent);
}

.igb-mm2-panel .igb-mm2-group-footer:hover {
    color: var(--mm2-accent-dark);
}

/* Paski: Styl + Według pomieszczenia — ten sam układ i wysokość */
.igb-mm2-bars {
    border-top: 1px solid var(--mm2-line);
}

.igb-mm2-bar,
.igb-mm2-bar-part {
    display: flex;
    align-items: center;
    gap: 20px;
    min-height: 62px;
    padding: 13px 27px;
}

.igb-mm2-bar + .igb-mm2-bar {
    border-top: 1px solid var(--mm2-line);
}

.igb-mm2-bar--style {
    background: linear-gradient(100deg, #f1f3fb, #f7f8fd 45%, #fff 100%);
}

.igb-mm2-bar--rooms {
    gap: 0;
    background: var(--mm2-soft);
    padding: 0;
}

.igb-mm2-bar--rooms > .igb-mm2-bar-part {
    flex: 1;
}

.igb-mm2-bar--rooms.has-outdoor {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
}

.igb-mm2-bar-part--outdoor {
    border-left: 1px solid var(--mm2-line);
}

.igb-mm2-bar-label {
    flex: 0 0 140px;
    max-width: 140px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .04em;
    color: var(--mm2-muted);
    text-transform: uppercase;
    line-height: 1.5;
}

.igb-mm2-bar-part--outdoor .igb-mm2-bar-label {
    flex: 0 0 auto;
    max-width: none;
}

.igb-mm2-bar-label--style {
    display: flex;
    align-items: center;
    gap: 9px;
    text-transform: none;
    letter-spacing: 0;
    color: var(--mm2-ink);
}

.igb-mm2-bar-label--style .igb-mm2-icon {
    color: var(--mm2-accent);
    width: 21px;
    height: 21px;
}

.igb-mm2-bar-label--style strong {
    display: block;
    font-size: 15px;
    line-height: 1.3;
    letter-spacing: -.2px;
}

.igb-mm2-bar-label--style small {
    display: block;
    font-size: 10px;
    font-weight: 400;
    color: var(--mm2-muted);
}

.igb-mm2-chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
    flex: 1;
    min-width: 0;
}

.igb-mm2-panel .igb-mm2-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 32px;
    padding: 6px 12px;
    font-size: 12px;
    line-height: 1.4;
    white-space: nowrap;
    color: var(--mm2-ink);
    background: #fff;
    border: 1px solid #dedee5;
    border-radius: 5px;
}

.igb-mm2-panel .igb-mm2-chip:hover {
    border-color: var(--mm2-accent);
    color: var(--mm2-accent);
}

.igb-mm2-panel .igb-mm2-chip--style {
    border-color: var(--mm2-tint-line);
    border-radius: 20px;
}

.igb-mm2-panel .igb-mm2-chip--more {
    border-style: dashed;
    border-radius: 20px;
    background: none;
    color: #505464;
}

.igb-mm2-chip.is-extra {
    display: none !important;
}

.igb-mm2-chips.is-expanded .igb-mm2-chip.is-extra {
    display: inline-flex !important;
}

.igb-mm2-chips.is-expanded .igb-mm2-chip--more {
    display: none;
}

/* Kafle wyróżnione */
.igb-mm2-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    padding: 15px 27px 18px;
    border-top: 1px solid var(--mm2-line);
}

.igb-mm2-panel .igb-mm2-feature {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 11px 15px;
    border: 1px solid var(--mm2-line);
    border-radius: 7px;
    background: #fff;
}

.igb-mm2-panel .igb-mm2-feature:hover {
    border-color: var(--mm2-tint-line);
    background: #f8f9fd;
}

.igb-mm2-feature-icon {
    display: grid;
    place-items: center;
    width: 35px;
    height: 35px;
    flex-shrink: 0;
    border-radius: 6px;
    background: var(--mm2-tint);
    color: var(--mm2-accent);
}

.igb-mm2-feature-text {
    min-width: 0;
}

.igb-mm2-feature strong {
    display: block;
    font-size: 12px;
    font-weight: 650;
    line-height: 1.4;
}

.igb-mm2-feature small {
    display: block;
    margin-top: 2px;
    font-size: 10px;
    color: var(--mm2-muted);
}

.igb-mm2-feature > .igb-mm2-ui {
    margin-left: auto;
    color: #92939b;
}

/* --- Komputer --- */
@media (min-width: 991px) {
    .igb-mm2-backdrop {
        position: fixed;
        inset: 0;
        z-index: 3000;
        background: rgba(27, 28, 39, .64);
        backdrop-filter: blur(1px);
        animation: igbMm2Fade .15s ease;
    }

    body.igb-mm2-open .header-main {
        z-index: 3001;
    }

    .igb-mm2-panel {
        position: absolute;
        top: var(--igb-mm2-top, 140px);
        left: 50%;
        z-index: 3002;
        display: flex;
        flex-direction: column;
        width: calc(100% - 48px);
        max-width: 1408px;
        max-height: var(--igb-mm2-maxh, calc(100vh - 160px));
        overflow: hidden;
        border: 1px solid var(--mm2-line);
        border-top: 0;
        border-radius: 0 0 14px 14px;
        box-shadow: 0 24px 56px rgba(27, 29, 42, .14);
        transform: translateX(-50%);
        animation: igbMm2In .16s ease;
    }
}

@media (min-width: 991px) and (max-width: 1250px) {
    .igb-mm2-head,
    .igb-mm2-grid,
    .igb-mm2-bar,
    .igb-mm2-bar-part,
    .igb-mm2-features {
        padding-left: 20px;
        padding-right: 20px;
    }

    .igb-mm2-col {
        padding: 0 14px;
    }

    .igb-mm2-group-title {
        font-size: 13px;
    }

    .igb-mm2-panel .igb-mm2-link {
        font-size: 12px;
    }

    .igb-mm2-subtitle {
        display: none;
    }

    .igb-mm2-bar-label {
        flex-basis: 110px;
        max-width: 110px;
    }

    .igb-mm2-panel .igb-mm2-chip {
        padding: 6px 10px;
        font-size: 11px;
    }
}

/* Węższe ekrany: „Na zewnątrz” jako osobny wiersz tej samej wysokości (chipy w jednej linii) */
@media (min-width: 991px) and (max-width: 1399px) {
    .igb-mm2-bar--rooms.has-outdoor {
        grid-template-columns: 1fr;
    }

    .igb-mm2-bar-part--outdoor {
        border-left: 0;
        border-top: 1px solid var(--mm2-line);
    }

    .igb-mm2-bar-part--outdoor .igb-mm2-bar-label {
        flex: 0 0 140px;
        max-width: 140px;
    }
}

@media (min-width: 991px) and (max-width: 1250px) {
    .igb-mm2-bar-part--outdoor .igb-mm2-bar-label {
        flex-basis: 110px;
        max-width: 110px;
    }
}

/* --- Telefon i tablet: pełny ekran nad menu mobilnym --- */
@media (max-width: 990px) {
    .igb-mm2-backdrop {
        display: none !important;
    }

    .igb-mm2-panel {
        position: fixed;
        inset: 0;
        z-index: 10050;
        display: flex;
        flex-direction: column;
        height: 100vh;
        height: 100dvh;
        animation: igbMm2Slide .18s ease;
    }

    body.igb-mm2-mobile-open {
        overflow: hidden;
    }

    .igb-mm2-head {
        gap: 8px;
        min-height: 64px;
        padding: 12px 16px;
        padding-top: max(12px, env(safe-area-inset-top));
        border-bottom: 1px solid var(--mm2-line);
    }

    .igb-mm2-back {
        display: grid;
        place-items: center;
        width: 36px;
        height: 36px;
        margin-left: -8px;
        color: var(--mm2-ink);
    }

    .igb-mm2-back .igb-mm2-ui,
    .igb-mm2-close .igb-mm2-ui {
        width: 18px;
        height: 18px;
    }

    .igb-mm2-heading {
        flex: 1;
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
    }

    .igb-mm2-title {
        font-size: 20px;
    }

    .igb-mm2-subtitle {
        display: none;
    }

    .igb-mm2-actions {
        gap: 10px;
    }

    .igb-mm2-panel .igb-mm2-all {
        font-size: 11px;
        max-width: 120px;
        line-height: 1.3;
    }

    .igb-mm2-close {
        width: 38px;
        height: 38px;
    }

    .igb-mm2-scroll {
        flex: 1;
        border-top: 0;
        -webkit-overflow-scrolling: touch;
        padding-bottom: env(safe-area-inset-bottom);
    }

    .igb-mm2-grid {
        display: block;
        padding: 0 16px;
    }

    .igb-mm2-col {
        display: block;
        padding: 0 !important;
        border-right: 0;
    }

    .igb-mm2-group {
        border-bottom: 1px solid var(--mm2-line);
    }

    .igb-mm2-group-head {
        min-height: 56px;
        padding: 14px 0;
        cursor: pointer;
        pointer-events: auto;
    }

    .igb-mm2-group-head > .igb-mm2-ui {
        display: block;
        width: 15px;
        height: 15px;
        color: var(--mm2-muted);
        transition: transform .2s;
    }

    .igb-mm2-group[open] > .igb-mm2-group-head > .igb-mm2-ui {
        transform: rotate(180deg);
    }

    .igb-mm2-group-title .igb-mm2-icon {
        width: 21px;
        height: 21px;
    }

    .igb-mm2-hint {
        margin: 0 0 4px 30px;
    }

    .igb-mm2-list {
        padding-left: 30px;
    }

    .igb-mm2-panel .igb-mm2-link {
        font-size: 14px;
        padding: 10px 0;
    }

    .igb-mm2-expand {
        width: 40px;
        height: 40px;
    }

    .igb-mm2-panel .igb-mm2-sub a {
        font-size: 13px;
        padding: 8px 0;
    }

    .igb-mm2-panel .igb-mm2-group-footer {
        margin: 4px 0 14px 30px;
        font-size: 12px;
    }

    .igb-mm2-bars {
        border-top: 0;
    }

    .igb-mm2-bar,
    .igb-mm2-bar-part {
        display: block;
        min-height: 0;
        padding: 16px;
    }

    .igb-mm2-bar--rooms,
    .igb-mm2-bar--rooms.has-outdoor {
        display: block;
        padding: 0;
    }

    .igb-mm2-bar-part--outdoor {
        border-left: 0;
        border-top: 1px solid var(--mm2-line);
    }

    .igb-mm2-bar-label,
    .igb-mm2-bar-part--outdoor .igb-mm2-bar-label {
        max-width: none;
        margin-bottom: 10px;
    }

    .igb-mm2-panel .igb-mm2-chip {
        min-height: 36px;
        padding: 7px 12px;
    }

    .igb-mm2-features {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 16px 16px 28px;
    }

    /* Pozycja działu w ciemnym menu mobilnym — strzałka jak przy innych podmenu */
    .mobile-menu > li.igb-mm2-item > a::after {
        content: "";
        width: 8px;
        height: 8px;
        margin-right: 6px;
        border-right: 1.6px solid #aaa;
        border-bottom: 1.6px solid #aaa;
        transform: rotate(-45deg);
        flex-shrink: 0;
    }
}

@keyframes igbMm2Fade {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes igbMm2In {
    from { opacity: 0; transform: translate(-50%, -6px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

@keyframes igbMm2Slide {
    from { opacity: 0; transform: translateX(24px); }
    to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    .igb-mm2-panel,
    .igb-mm2-backdrop,
    .igb-mm2-item > a::before,
    .igb-mm2-item > a::after {
        animation: none !important;
        transition: none !important;
    }
}
