/* Mobile header redesign - experimental orange version */
/* Safe to delete this file + revert the two lines added in header.tpl to undo */

/* Hide new mobile-only elements by default (desktop) - only shown inside the mobile media query below */
.mhr-icons,
.mhr-search-row,
.mhr-footer-lang,
#header_logo img.logo-mobile-white {
    display: none;
}

@media (max-width: 767px) {
    /* Hide legacy desktop search/account/cart block - replaced by mhr-icons + mhr-search-row below */
    #search_block_top,
    #blocktopinfo,
    .cart-container {
        display: none !important;
    }

    /* Hide old top bar (country flag dropdown + hours + phone) - country switcher moved to footer, phone already in mhr-icons */
    .header-content .bg {
        display: none !important;
    }

    /* Country switcher, relocated into the footer on mobile */
    .mhr-footer-lang {
        display: block;
        text-align: center;
        padding: 10px 0;
    }
    .mhr-footer-lang .dropdown {
        display: inline-block;
        position: relative;
    }
    .mhr-footer-lang .dropbtn {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        cursor: pointer;
        color: #fff;
        font-size: 14px;
    }
    .mhr-footer-lang .dropdown-content {
        display: none;
        position: absolute;
        bottom: 100%;
        left: 50%;
        transform: translateX(-50%);
        background: #fff;
        border-radius: 6px;
        box-shadow: 0 2px 10px rgba(0,0,0,0.2);
        min-width: 180px;
        z-index: 50;
        padding: 6px 0;
    }
    .mhr-footer-lang .dropdown:active .dropdown-content,
    .mhr-footer-lang .dropdown.mhr-open .dropdown-content {
        display: block;
    }
    .mhr-footer-lang .dropdown-content a {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 8px 14px;
        color: #333;
        text-decoration: none;
        font-size: 13px;
        white-space: nowrap;
    }

    #my_top_menu.main-header {
        background: #ff6a00;
        padding: 10px 12px 12px;
        position: relative;
    }

    #my_top_menu.main-header::after {
        content: "";
        display: block;
        clear: both;
    }

    #my_top_menu #mobile_menu,
    #my_top_menu #header_logo,
    #my_top_menu .mhr-icons {
        display: inline-flex;
        align-items: center;
        vertical-align: middle;
        float: none;
    }

    #my_top_menu {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
    }

    #my_top_menu #mobile_menu {
        order: 1;
        margin: 0;
    }
    #my_top_menu #mobile_menu .navbar-header { margin: 0; }
    #my_top_menu #mobile_menu .navbar-toggle {
        background: transparent;
        border: none;
        margin: 0;
        padding: 4px 6px;
    }
    #my_top_menu #mobile_menu .navbar-toggle .fa-bars {
        color: #fff;
        font-size: 24px;
    }

    #my_top_menu #header_logo {
        order: 2;
        flex: 1 1 auto;
        text-align: center;
        margin: 0 6px;
        max-width: 58%;
    }
    #my_top_menu #header_logo img.logo {
        display: none;
    }
    #my_top_menu #header_logo img.logo-mobile-white {
        display: inline-block;
        max-height: 54px;
        max-width: 100%;
        width: auto;
        margin: 0 auto;
    }

    #my_top_menu #search_toggler {
        display: none;
    }

    #my_top_menu .mhr-icons {
        order: 3;
        display: flex;
        align-items: center;
        gap: 9px;
        margin: 0 8px 0 0;
        flex-shrink: 0;
    }
    #my_top_menu .mhr-icons a {
        color: #fff;
        font-size: 26px;
        line-height: 1;
        position: relative;
        text-decoration: none;
        display: inline-block;
    }
    #my_top_menu .mhr-icons .mhr-icon-cart {
        padding-right: 2px;
    }
    #my_top_menu .mhr-icons .mhr-icon-phone i.icon-phone:before {
        color: #fff !important;
        font-size: 26px;
    }
    #my_top_menu .mhr-icons .mhr-icon-wishlist i:before {
        font-size: 26px;
    }
    #my_top_menu .mhr-cart-badge {
        position: absolute;
        top: -8px;
        right: -10px;
        background: #fff;
        color: #ff6a00;
        font-size: 10px;
        font-weight: 700;
        border-radius: 50%;
        min-width: 16px;
        height: 16px;
        line-height: 16px;
        text-align: center;
        padding: 0 3px;
    }

    #my_top_menu .mhr-search-row {
        display: block;
        order: 4;
        flex: 0 0 100%;
        width: 100%;
        margin-top: 10px;
    }
    #my_top_menu .mhr-search-form {
        display: flex;
        background: #fff;
        border-radius: 24px;
        overflow: hidden;
    }
    #my_top_menu .mhr-search-input {
        flex: 1 1 auto;
        border: none;
        outline: none;
        background: transparent;
        padding: 10px 16px;
        font-size: 14px;
        border-radius: 24px 0 0 24px;
        box-shadow: none;
        height: auto;
    }
    #my_top_menu .mhr-search-btn {
        border: none;
        background: #000;
        color: #fff;
        width: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 16px;
    }
}
