/* =========================================================
   Header layout: hamburger left | logo center | utilities right
   Search lives inside the left offcanvas menu
   ========================================================= */

#header .elementor-element-081225e,
#header .elementor-element-081225e.wdt-header-rearranged {
    position: relative;
}

#header .elementor-element-081225e > .elementor-container {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 78px;
    position: relative;
    width: 100%;
}

/* Empty old search column steals left space — hide it */
#header .elementor-element-8b686c8 {
    display: none !important;
    width: 0 !important;
    flex: 0 0 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
}

/* Left: hamburger only */
#header .elementor-element-3c0f653,
#header .wdt-header-left-col {
    width: auto !important;
    min-width: 44px !important;
    max-width: none !important;
    flex: 0 0 auto !important;
    order: 0 !important;
    margin-right: auto !important;
    z-index: 5;
}

#header .elementor-element-3c0f653 > .elementor-widget-wrap,
#header .wdt-header-left-col > .elementor-widget-wrap {
    display: flex !important;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: 0;
    width: auto !important;
    min-height: 44px;
}

/* Force left hamburger visible (IDs can change in Elementor) */
#header .wdt-header-left-menu,
#header .wdt-header-left-col .elementor-widget-wdt-header-menu {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: auto !important;
    margin: 0 !important;
    position: relative !important;
    left: auto !important;
    right: auto !important;
}

#header .wdt-header-left-menu .menu-container,
#header .wdt-header-left-col .elementor-widget-wdt-header-menu .menu-container {
    display: none !important;
}

#header .wdt-header-left-menu .mobile-nav-container,
#header .wdt-header-left-col .elementor-widget-wdt-header-menu .mobile-nav-container {
    display: block !important;
    float: none !important;
    margin: 0 !important;
    width: auto !important;
    visibility: visible !important;
}

#header .wdt-header-left-menu .menu-trigger,
#header .wdt-header-left-col .menu-trigger {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 44px !important;
    height: 44px !important;
    margin: 0 !important;
    padding: 0 !important;
    visibility: visible !important;
    opacity: 1 !important;
    color: var(--wdtHeadAltColor, #1b2430) !important;
}

#header .wdt-header-left-menu .menu-trigger > span,
#header .wdt-header-left-col .menu-trigger > span {
    display: none !important;
}

#header .wdt-header-left-menu .menu-trigger > i,
#header .wdt-header-left-col .menu-trigger > i {
    display: block !important;
    position: relative !important;
    width: 22px !important;
    height: 2px !important;
    margin: 0 !important;
    background-color: currentColor !important;
    visibility: visible !important;
    opacity: 1 !important;
}

#header .wdt-header-left-menu .menu-trigger > i:before,
#header .wdt-header-left-menu .menu-trigger > i:after,
#header .wdt-header-left-col .menu-trigger > i:before,
#header .wdt-header-left-col .menu-trigger > i:after {
    content: "" !important;
    position: absolute !important;
    left: 0 !important;
    width: 22px !important;
    height: 2px !important;
    background-color: currentColor !important;
}

#header .wdt-header-left-menu .menu-trigger > i:before,
#header .wdt-header-left-col .menu-trigger > i:before {
    top: -7px !important;
}

#header .wdt-header-left-menu .menu-trigger > i:after,
#header .wdt-header-left-col .menu-trigger > i:after {
    top: 7px !important;
}

/* Hide duplicate menu widgets */
#header .wdt-header-menu-duplicate {
    display: none !important;
}

/* Center logo slot (JS moves logo here) */
#header .wdt-header-center-logo {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    width: auto;
    max-width: 46%;
    pointer-events: auto;
    text-align: center;
}

#header .wdt-header-center-logo .elementor-widget-wdt-logo {
    position: static !important;
    transform: none !important;
    left: auto !important;
    top: auto !important;
    width: auto !important;
    margin: 0 !important;
    text-align: center;
}

#header .wdt-header-center-logo .wdt-logo-container,
#header .wdt-header-center-logo .elementor-widget-container {
    text-align: center;
}

#header .wdt-header-center-logo img {
    margin: 0 auto;
    display: inline-block;
}

/* Hide header search only — do NOT hide its whole column */
#header .elementor-element-a94d3ff,
#header .search-item,
#header .wdt-search-menu-icon,
#header .wdt-search-form-container,
#header #searchform {
    display: none !important;
}

/* Right: Account / Cart */
#header .elementor-element-127b8e4,
#header .wdt-header-right-col {
    width: auto !important;
    max-width: none !important;
    flex: 0 0 auto !important;
    order: 3;
    margin-left: auto;
    z-index: 3;
}

#header .elementor-element-127b8e4 > .elementor-widget-wrap,
#header .wdt-header-right-col > .elementor-widget-wrap {
    display: flex !important;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: 8px;
    width: auto !important;
}

/* Desktop: same offcanvas as mobile */
@media only screen and (min-width: 1281px) {
    .wdt-header-menu .menu-container {
        display: none;
    }

    .mobile-nav-container,
    .wdt-header-menu .mobile-nav-container,
    .wdt-no-header-builder-content .no-header .mobile-nav-container {
        display: block;
        float: none;
        margin: 0;
        width: auto;
    }

    .wdt-header-menu ul li.close-nav,
    .wdt-header-menu ul li.go-back,
    .wdt-header-menu ul li.see-all {
        display: none;
    }
}

@media only screen and (max-width: 767px) {
    #header .elementor-element-081225e > .elementor-container {
        min-height: 64px;
    }

    #header .wdt-header-center-logo {
        max-width: 42%;
    }
}

/* Never show the in-header placeholder panel (duplicate right menu) */
.mobile-nav-container > .mobile-menu {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* One left offcanvas panel only (body-appended) */
body > .mobile-menu {
    display: none;
    left: 0 !important;
    right: auto !important;
    top: 0 !important;
    max-width: 340px;
    width: 100%;
    height: 100%;
    z-index: 99999;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    background-color: var(--wdtAccentTxtColor, #fff);
    -webkit-transform: translateX(-100%);
    transform: translateX(-100%);
    -webkit-transition: transform 0.3s ease, opacity 0.25s ease, visibility 0.25s ease;
    transition: transform 0.3s ease, opacity 0.25s ease, visibility 0.25s ease;
}

body > .mobile-menu.nav-is-visible {
    display: block;
    opacity: 1;
    visibility: visible;
    -webkit-transform: translateX(0);
    transform: translateX(0);
    animation-name: anime-slidein-left;
    -webkit-animation-duration: 0.35s;
    animation-duration: 0.35s;
    -webkit-animation-fill-mode: both;
    animation-fill-mode: both;
}

/* Keep list inside the left panel */
body > .mobile-menu > ul,
body > .mobile-menu > ul ul.children,
body > .mobile-menu > ul ul.sub-menu,
body > .mobile-menu > ul ul.children > li > ul,
body > .mobile-menu > ul ul.sub-menu > li > ul {
    position: absolute !important;
    left: 0 !important;
    right: auto !important;
    top: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: 100%;
    z-index: 1;
}

body > .mobile-menu > ul {
    position: relative !important;
    height: auto;
    min-height: calc(100% - 90px);
}

/* Nested levels slide within the same panel */
body .mobile-menu.is-hidden,
body .mobile-menu > ul.is-hidden,
body .mobile-menu > ul li ul.is-hidden,
body .mobile-menu ul.sub-menu.is-hidden,
body .mobile-menu ul.sub-menu li ul.is-hidden {
    -webkit-transform: translateX(100%) !important;
    transform: translateX(100%) !important;
    visibility: hidden;
    pointer-events: none;
}

/* Search inside sidebar menu */
body > .mobile-menu .wdt-sidebar-search {
    position: relative;
    z-index: 6;
    padding: 18px 16px 14px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    background: inherit;
}

body > .mobile-menu .wdt-sidebar-search form {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    width: 100%;
}

body > .mobile-menu .wdt-sidebar-search .text_input,
body > .mobile-menu .wdt-sidebar-search input[type="text"],
body > .mobile-menu .wdt-sidebar-search input[type="search"] {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    height: 44px;
    margin: 0;
    padding: 0 18px;
    border: 1px solid rgba(0, 0, 0, 0.18);
    border-radius: 999px;
    background: #fff;
    box-shadow: none;
    font-size: 14px;
}

body > .mobile-menu .wdt-sidebar-search input[type="submit"],
body > .mobile-menu .wdt-sidebar-search button[type="submit"] {
    flex: 0 0 auto;
    height: 44px;
    min-width: 44px;
    margin: 0;
    padding: 0 14px;
    border: 0;
    border-radius: 999px;
    background: var(--wdtPrimaryColor, #1b2430);
    color: #fff;
    cursor: pointer;
}

body > .mobile-menu .wdt-sidebar-search .quick_search_results {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 100%;
    z-index: 10;
}

@-webkit-keyframes anime-slidein-left {
    0% {
        -webkit-transform: translateX(-100%);
        transform: translateX(-100%);
        opacity: 0;
    }

    100% {
        -webkit-transform: translateX(0);
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes anime-slidein-left {
    0% {
        -webkit-transform: translateX(-100%);
        transform: translateX(-100%);
        opacity: 0;
    }

    100% {
        -webkit-transform: translateX(0);
        transform: translateX(0);
        opacity: 1;
    }
}
