/**
 * Mega Menu Styles for Arif.pl
 * New horizontal menu with dropdown mega-menu
 */

/* ==========================================================================
   MAIN MENU BAR
   ========================================================================== */

/* TEST - widoczny border dla weryfikacji czy CSS działa */
#block_top_menu {
    background: #2c2c2c !important;
    width: 100%;
    margin: 0 !important;
    padding: 0 !important;
    border-top: 5px solid red !important;
}

#block_top_menu .sf-menu {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    height: 100% !important;
}

#block_top_menu .sf-menu > li {
    position: relative !important;
    margin: 0 !important;
    padding: 0 !important;
    border-right: 1px solid rgba(255, 255, 255, 0.1) !important;
    display: flex !important;
    align-items: stretch !important;
}

#block_top_menu .sf-menu > li:last-child {
    border-right: none !important;
}

#block_top_menu .sf-menu > li > a {
    display: flex !important;
    align-items: center !important;
    padding: 0 20px !important;
    color: #ffffff !important;
    text-decoration: none !important;
    text-transform: uppercase !important;
    font-family: 'Oswald', sans-serif !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    letter-spacing: 0.5px !important;
    transition: all 0.3s ease !important;
    height: 100% !important;
    min-height: 50px !important;
}

#block_top_menu .sf-menu > li > a:hover,
#block_top_menu .sf-menu > li.sfHover > a,
#block_top_menu .sf-menu > li.sfHoverForce > a {
    background: #FF5A00 !important;
    color: #ffffff !important;
}

/* Halloween special styling */
#block_top_menu .sf-menu > li.menu-halloween > a {
    color: #FF5A00 !important;
}

#block_top_menu .sf-menu > li.menu-halloween > a:hover {
    background: #FF5A00 !important;
    color: #ffffff !important;
}

/* ==========================================================================
   MEGA MENU DROPDOWN (SUPERFISH UL SUBMENU)
   ========================================================================== */

/* Submenu dla Superfish - szare tło na całą szerokość */
.sf-menu > li:hover > ul,
.sf-menu > li.sfHover > ul {
    background: #f5f5f5 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    position: fixed !important;
    top: auto !important;
    margin-top: 0 !important;
    padding: 20px 0 !important;
    border-top: 1px solid #e0e0e0 !important;
    border-bottom: 1px solid #e0e0e0 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    max-width: 100% !important;
    display: flex !important;
    justify-content: center !important;
    align-items: flex-start !important;
}

/* Wrapper dla podkategorii (ul wewnątrz) - białe tło, ograniczona szerokość */
.sf-menu > li > ul {
    max-width: 1170px !important;
    margin: 0 auto !important;
    background: #ffffff !important;
    padding: 20px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
    position: relative !important;
}

.mega-menu-dropdown {
    display: none !important;
    position: fixed;
    top: auto;
    left: 0;
    right: 0;
    width: 100%;
    background: #f5f5f5 !important;
    border-top: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 9999 !important;
    padding: 20px 0;
}

.has-submenu:hover > .mega-menu-dropdown,
#block_top_menu .has-submenu:hover > .mega-menu-dropdown {
    display: block !important;
}

.mega-menu-content {
    display: flex;
    gap: 0;
    max-width: 1170px;
    margin: 0 auto;
    padding: 0;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* ==========================================================================
   SPECIAL LINKS (NEW, POLECANE)
   ========================================================================== */

.mega-menu-special-links {
    min-width: 200px;
    border-right: 1px solid #e0e0e0;
    padding: 20px;
    background: #ffffff;
}

.mega-menu-special-links ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mega-menu-special-links li {
    margin-bottom: 15px;
}

.mega-menu-special-links a {
    display: block;
    padding: 12px 15px;
    color: #2c2c2c;
    text-decoration: none;
    text-transform: uppercase;
    font-family: 'Oswald', sans-serif;
    font-size: 16px;
    font-weight: 600;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.mega-menu-special-links a:hover {
    background: #FF5A00;
    color: #ffffff;
    border-color: #FF5A00;
}

.mega-menu-special-links .menu-new a {
    border-color: #FF5A00;
    color: #FF5A00;
}

.mega-menu-special-links .menu-new a:hover {
    background: #FF5A00;
    color: #ffffff;
}

.mega-menu-special-links .star {
    font-size: 18px;
    margin-right: 5px;
}

/* ==========================================================================
   MEGA MENU CATEGORIES
   ========================================================================== */

.mega-menu-categories {
    flex: 1;
    padding: 20px;
    background: #ffffff;
}

.mega-menu-categories > ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.mega-menu-categories > ul > li {
    position: relative;
}

.mega-menu-categories > ul > li > a {
    display: block;
    padding: 10px 15px;
    color: #2c2c2c;
    text-decoration: none;
    text-transform: uppercase;
    font-family: 'Oswald', sans-serif;
    font-size: 14px;
    font-weight: 500;
    background: #f5f5f5;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.mega-menu-categories > ul > li > a:hover {
    background: #FF5A00;
    color: #ffffff;
}

/* Sub-submenu (third level) */
.mega-menu-categories .submenu {
    display: none;
    position: absolute;
    left: 100%;
    top: 0;
    min-width: 250px;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.1);
    padding: 10px;
    z-index: 10000;
    list-style: none;
    margin: 0;
}

.mega-menu-categories > ul > li.has-submenu:hover > .submenu {
    display: block;
}

.mega-menu-categories .submenu li {
    margin: 0;
    padding: 0;
}

.mega-menu-categories .submenu li a {
    display: block;
    padding: 8px 12px;
    color: #2c2c2c;
    text-decoration: none;
    font-family: 'Oswald', sans-serif;
    font-size: 13px;
    text-transform: uppercase;
    transition: all 0.2s ease;
}

.mega-menu-categories .submenu li a:hover {
    background: #f5f5f5;
    color: #FF5A00;
    padding-left: 18px;
}

/* Category icons */
.mega-menu-categories img {
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-right: 8px;
    vertical-align: middle;
}

/* ==========================================================================
   RIGHT COLUMN - PROMO BOX WITH GRAY BACKGROUND
   ========================================================================== */

/* Prawa kolumna promocyjna - z rozciągniętym szarym tłem do końca ekranu */
.submenu-col-right {
    background: transparent !important;
    position: absolute !important;
    right: 0 !important;
    top: 0 !important;
    width: 350px !important;
    padding: 20px !important;
    z-index: 10 !important;
}

/* Pseudo-element rozciągający szare tło od boksu promocyjnego do końca ekranu */
.submenu-col-right::after {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 100% !important;
    width: 100vw !important;
    height: 100% !important;
    background: #f5f5f5 !important;
    z-index: -1 !important;
}

/* Wszystkie boxy promocyjne w prawej kolumnie */
.submenu-col-right .promo-banner-wholesale,
.submenu-col-right .promo-banner,
.submenu-col-right [class*="promo-banner"] {
    background: #f5f5f5 !important;
    padding: 20px !important;
    max-width: 100% !important;
    border-radius: 0 !important;
    position: relative !important;
    z-index: 1 !important;
}

/* Lewa kolumna - special links */
.submenu-col-left {
    background: transparent !important;
}

/* ==========================================================================
   MOBILE RESPONSIVE
   ========================================================================== */

@media (max-width: 1199px) and (min-width: 992px) {
    .mega-menu-content {
        max-width: 970px;
    }
}

@media (max-width: 991px) and (min-width: 768px) {
    .mega-menu-content {
        max-width: 750px;
    }

    #block_top_menu .sf-menu {
        flex-direction: column;
    }

    #block_top_menu .sf-menu > li {
        width: 100%;
    }

    .mega-menu-dropdown {
        position: static;
        width: 100%;
        box-shadow: none;
        border: none;
        border-top: 1px solid #e0e0e0;
        padding: 15px 0;
    }

    .mega-menu-content {
        flex-direction: column;
        gap: 20px;
        padding: 0 15px;
    }

    .mega-menu-special-links {
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
        padding-right: 0;
        padding-bottom: 15px;
    }

    .mega-menu-categories > ul {
        grid-template-columns: 1fr;
    }

    .mega-menu-categories .submenu {
        position: static;
        display: none;
        box-shadow: none;
        border: none;
        border-left: 2px solid #FF5A00;
        margin-left: 15px;
        margin-top: 10px;
    }

    .mega-menu-categories > ul > li.has-submenu.open > .submenu {
        display: block;
    }
}

@media (max-width: 767px) {
    .mega-menu-content {
        max-width: 100%;
        padding: 0 15px;
    }

    #block_top_menu .sf-menu {
        flex-direction: column;
    }

    #block_top_menu .sf-menu > li {
        width: 100%;
    }

    .mega-menu-dropdown {
        position: static;
        width: 100%;
        box-shadow: none;
        border: none;
        border-top: 1px solid #e0e0e0;
        padding: 15px 0;
    }

    .mega-menu-content {
        flex-direction: column;
        gap: 20px;
    }

    .mega-menu-special-links {
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
        padding-right: 0;
        padding-bottom: 15px;
    }

    .mega-menu-categories > ul {
        grid-template-columns: 1fr;
    }

    .mega-menu-categories .submenu {
        position: static;
        display: none;
        box-shadow: none;
        border: none;
        border-left: 2px solid #FF5A00;
        margin-left: 15px;
        margin-top: 10px;
    }

    .mega-menu-categories > ul > li.has-submenu.open > .submenu {
        display: block;
    }

    #block_top_menu .sf-menu > li > a {
        padding: 12px 15px;
        font-size: 13px;
    }

    .mega-menu-special-links a {
        padding: 10px 12px;
        font-size: 14px;
    }
}

/* ==========================================================================
   ANIMATIONS
   ========================================================================== */

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mega-menu-dropdown {
    animation: slideDown 0.3s ease;
}

/* ==========================================================================
   KONTAKT MENU (existing - preserve)
   ========================================================================== */

#block_top_menu .sf-menu > li.more-contact {
    margin-left: auto;
}

/* ==========================================================================
   UTILITIES
   ========================================================================== */

.text-orange {
    color: #FF5A00 !important;
}

.clearfix::after {
    content: "";
    display: table;
    clear: both;
}
