/* === BELKA RABATOWA === */
.header-rabat-info {
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
}
.rabat-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
    font-size: 12px;
    color: #323232;
    height: 46px;
}
.rabat-left, .rabat-center, .rabat-right {
    flex: 1;
    min-width: 200px;
}
.rabat-left { text-align: left; }
.rabat-center { text-align: center; }
.rabat-right { text-align: right; }
.rabat-link, .rabat-phone, .rabat-mail {
    color: #323232;
    text-decoration: none;
    transition: color .2s;
}
.rabat-link:hover, .rabat-phone:hover, .rabat-mail:hover {
    color: var(--tb-theme-color-hover);
    text-decoration: underline;
}
.rabat-separator {
    color: #999;
    margin: 0 12px;
    font-weight: 400;
}
@media (max-width: 990px) {
    .header-rabat-info { display: none !important; }
}

/* ============================================
   HEADER - PRZEBUDOWANY OD PODSTAW
   ============================================ */

.header-main {
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    position: relative;
    z-index: 100;
    width: 100%;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 92px;
}

.logo {
    display: flex;
    align-items: center;
}
.logo img {
    height: 62px;
    display: block;
}

/* === MENU DESKTOP === */
.header-nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

.main-menu {
    display: flex;
    gap: 45px;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
}

.main-menu > li {
    position: relative;
}

.main-menu > li > a {
    font-family: 'Helvetica', Arial, sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 15px;
    color: #222;
    transition: color .2s, background-color .2s;
    padding: 10px 12px;
    background: none;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    display: block;
    position: relative; /* dla pseudo-elementu bridge */
}

.main-menu > li > a:hover {
    color: var(--tb-theme-color-hover);
    text-decoration: none;
    background-color: #fbfbfb;
}

.main-menu > li.current-menu-item > a {
    color: var(--tb-theme-color-hover);
}

.main-menu > li > a::after {
    display: none;
}

/* ============================================
   MEGA MENU - FULL WIDTH DROPDOWN
   Ta sama wysokość co podstawowemenu (position: absolute, top: 100%)
   ============================================ */

.mega-menu-parent {
    position: relative;
}

/* Mega-menu dropdown - position absolute dla spójnej wysokości z podstawowemenu */
/* Left ustawiany przez JS dla wyrównania z krawędzią viewportu */
.mega-menu-parent > .sub-menu {
    position: absolute;
    top: calc(100% + 5px);
    width: 100vw;
    margin: 0;
    padding: 0;
    background: #fff;
    border-bottom: 1px solid #ededed;
    box-shadow: 0 8px 32px rgba(0,0,0,0.08);
    z-index: 3000;
    box-sizing: border-box;

    /* Ukryte domyślnie */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.15s ease, visibility 0.15s ease;
}

/* Pokazanie mega-menu - TYLKO przez klasę JS (mega-open) */
.mega-menu-parent.mega-open > .sub-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Kontener wewnętrzny mega-menu - wycentrowana zawartość */
.mega-menu-content {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 32px;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
}

/* Grid z kategoriami */
.mega-menu-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: 42px;
    width: 100%;
    padding: 25px 0 15px 0;
}

.mega-menu-inner > .mega-col {
    flex: 0 0 210px;
    min-width: 180px;
    max-width: 320px;
    margin: 0 8px;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.mega-menu-inner > .mega-col > li {
    list-style: none;
    margin-bottom: 2px;
    font-weight: 400;
    font-size: 15px;
}

.mega-menu-inner > .mega-col > li > a {
    color: #232323;
    text-decoration: none;
    display: block;
    transition: color .18s, background-color .18s;
    padding: 6px 10px;
    font-weight: 400;
    font-size: 16px;
    background: none;
    border: none;
    border-radius: 4px;
}

.mega-menu-inner > .mega-col > li > a:hover {
    color: var(--tb-theme-color);
    background-color: #fbfbfb;
}

/* Skróty na dole mega-menu */
.mega-menu-shortcuts {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 44px;
    padding: 14px 0 19px 0;
    border-top: 1px solid #e0e0e0;
    background: #fff;
    margin-top: 12px;
}

.mega-menu-shortcuts a {
    color: #2a3392;
    font-weight: bold;
    font-size: 15px;
    letter-spacing: 0.06em;
    text-decoration: none;
    padding: 2px 6px;
    transition: color 0.14s;
    text-transform: uppercase;
    display: flex;
    align-items: center;
}

.mega-menu-shortcuts a:not(:last-child)::after {
    content: "";
    display: inline-block;
    width: 1.5px;
    height: 22px;
    background: #e0e0e0;
    margin-left: 22px;
    border-radius: 2px;
}

.mega-menu-shortcuts a:hover {
    color: #232b7c;
    text-decoration: underline;
}

/* Responsywność mega-menu */
@media (max-width: 1400px) {
    .mega-menu-content {
        max-width: 98vw;
        padding: 0 2vw;
    }
    .mega-menu-inner > .mega-col {
        margin: 0 6px;
        min-width: 120px;
    }
}

@media (max-width: 1200px) {
    .mega-menu-shortcuts {
        padding: 10px 0 15px 10px;
        gap: 24px;
    }
    .mega-menu-shortcuts a {
        font-size: 13px;
    }
    .mega-menu-shortcuts a:not(:last-child)::after {
        height: 18px;
        margin-left: 12px;
    }
}

/* ============================================
   DROPDOWN (PODSTAWOWEMENU) - zwykłe dropdown
   Pozycjonowanie: absolute względem rodzica (jak na produkcji)
   ============================================ */

.podstawowemenu {
    position: relative;
}

.podstawowemenu > .sub-menu {
    position: absolute;
    left: 0;
    top: calc(100% + 5px);
    min-width: 220px;
    background: #fff;
    box-shadow: 0 6px 30px rgba(0,0,0,0.08);
    z-index: 3000;
    padding: 8px 0;
    list-style: none;
    border-bottom: 1px solid #ededed;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.18s, visibility 0.18s;
}

/* Pokazanie przez JS (klasa dropdown-open) */
.podstawowemenu.dropdown-open > .sub-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.podstawowemenu > .sub-menu li > a {
    display: block;
    padding: 10px 28px 10px 18px;
    color: #222;
    background: none;
    text-decoration: none;
    transition: background 0.15s;
    font-weight: 400;
    font-size: 15px;
}

.podstawowemenu > .sub-menu li > a:hover {
    background: #f7f8fa;
    color: #2a3392;
}

/* ============================================
   RESPONSYWNE ZMNIEJSZENIE MENU NA MNIEJSZYCH DESKTOPACH
   ============================================ */

@media (max-width: 1200px) {
    .main-menu {
        gap: 15px;
    }
    .main-menu > li > a {
        font-size: 13px;
        padding: 8px 6px;
        white-space: nowrap;
    }
}

/* ============================================
   UKRYCIE DESKTOP MENU NA MOBILE
   ============================================ */

@media (max-width: 990px) {
    .mega-menu-parent > .sub-menu,
    .podstawowemenu > .sub-menu,
    .main-menu,
    .header-nav,
    .nav-main {
        display: none !important;
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
    }
}

/* ============================================
   SIDEBAR KATEGORII SKLEPU
   ============================================ */

.shop-sidebar ul.menu,
.shop-sidebar ul.sub-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    background: none;
}

.shop-sidebar ul.menu > li,
.shop-sidebar ul.sub-menu > li {
    border-bottom: none;
    position: relative;
}

.shop-sidebar ul.menu > li > a,
.shop-sidebar ul.sub-menu > li > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #232323;
    font-weight: 600;
    padding: 11px 8px;
    text-decoration: none;
    font-size: 15px !important;
    line-height: 1.2;
    transition: color .2s, background-color .2s;
    cursor: pointer;
    background: none;
    border: none;
    border-radius: 4px;
}

.shop-sidebar ul.menu > li > a:hover,
.shop-sidebar ul.menu > li.open > a,
.shop-sidebar ul.sub-menu > li > a:hover,
.shop-sidebar ul.sub-menu > li.open > a {
    color: #2a3392;
    background-color: #fbfbfb;
}

.shop-sidebar .menu-arrow-wrap {
    display: flex;
    align-items: center;
    margin-left: 8px;
    cursor: pointer;
    min-width: 18px;
    min-height: 18px;
}

.shop-sidebar .menu-arrow {
    width: 18px;
    height: 18px;
    display: block;
    transition: transform .25s cubic-bezier(.77,0,.18,1), color .2s;
    fill: #aaa;
}

.shop-sidebar .menu-arrow.open {
    transform: rotate(90deg);
    fill: #3d46c1;
}

.shop-sidebar ul.sub-menu > li > a {
    font-weight: 400;
    color: #232323;
    font-size: 15px !important;
}

.shop-sidebar ul.sub-menu ul.sub-menu > li > a {
    font-size: 15px !important;
    padding-left: 5px;
}

/* Aktywne elementy w sidebar */
.shop-sidebar ul.menu > li.current-menu-item > a,
.shop-sidebar ul.menu > li.current_page_item > a,
.shop-sidebar ul.menu > li.current-menu-ancestor > a,
.shop-sidebar ul.menu > li.current_page_ancestor > a,
.shop-sidebar ul.sub-menu > li.current-menu-item > a,
.shop-sidebar ul.sub-menu > li.current_page_item > a,
.shop-sidebar ul.sub-menu > li.current-menu-ancestor > a,
.shop-sidebar ul.sub-menu > li.current_page_ancestor > a,
.shop-sidebar ul.sub-menu ul.sub-menu > li.current-menu-item > a,
.shop-sidebar ul.sub-menu ul.sub-menu > li.current_page_item > a {
    font-weight: bold;
}

.shop-sidebar ul.menu li,
.shop-sidebar ul.sub-menu li {
    list-style: none !important;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
}

.shop-sidebar li.open > a,
.shop-sidebar li.open > a:focus {
    color: #3d46c1;
    font-weight: 700;
}

.shop-sidebar ul.sub-menu {
    display: none;
}

.shop-sidebar li.open > ul.sub-menu {
    display: block;
}

@media (max-width: 600px) {
    .shop-sidebar ul.menu > li > a,
    .shop-sidebar ul.sub-menu > li > a {
        font-size: 15px !important;
        padding: 11px 0 11px 6px;
    }
    .shop-sidebar .menu-arrow {
        width: 22px;
        height: 22px;
    }
}

.shop-sidebar .menu-arrow svg polyline {
    stroke: #aaa !important;
}

.shop-sidebar .menu-arrow.open svg polyline {
    stroke: #aaa !important;
}

/* ============================================
   WOOCOMMERCE FIXES
   ============================================ */
