/*
 * Centered Retail header
 * ----------------------
 * Standalone template. These rules do not re-style Pilot Classic.
 */
body.pilot-centered-retail-active .page-header > .header.content {
    display: none !important;
}

/*
 * The Magento navigation container is a sibling of the standalone header.
 * Publish the navigation palette on <body> so both trees share the same
 * Storefront Editor palette without duplicating markup or using JavaScript.
 */
body.pilot-centered-retail-active {
    --pilot-centered-nav-bg: var(--pilot-editor-light, #f6f9ff);
    --pilot-centered-nav-text: var(--pilot-editor-light-text, #071b39);
    --pilot-centered-nav-underline: var(--pilot-editor-primary, #0b4dcc);
}

html[data-pilot-header-template="retail-blue"] body.pilot-centered-retail-active {
    --pilot-centered-nav-bg: var(--pilot-editor-primary-dark, #071b39);
    --pilot-centered-nav-text: var(--pilot-editor-primary-dark-text, #fff);
    --pilot-centered-nav-underline: var(--pilot-editor-primary-dark-text, #fff);
}

html[data-pilot-header-template="marketplace"] body.pilot-centered-retail-active {
    --pilot-centered-nav-bg: var(--pilot-editor-light, #0d1523);
    --pilot-centered-nav-text: var(--pilot-editor-light-text, #f8fafc);
    --pilot-centered-nav-underline: var(--pilot-editor-light-text, #f8fafc);
}

html[data-pilot-header-template="split-brand"] body.pilot-centered-retail-active {
    --pilot-centered-nav-bg: var(--pilot-editor-primary, #9a6a2f);
    --pilot-centered-nav-text: var(--pilot-editor-primary-text, #fffdf8);
    --pilot-centered-nav-underline: var(--pilot-editor-primary-text, #fffdf8);
}

html[data-pilot-header-template="clean"] body.pilot-centered-retail-active {
    --pilot-centered-nav-bg: var(--pilot-editor-light, #fff);
    --pilot-centered-nav-text: var(--pilot-editor-light-text, #111827);
    --pilot-centered-nav-underline: var(--pilot-editor-primary, #2563eb);
}

body.pilot-centered-retail-active .pilot-centered-retail-header {
    --pilot-centered-bg: var(--pilot-editor-light, #f6f9ff);
    --pilot-centered-text: var(--pilot-editor-header-button-text, var(--pilot-editor-light-text, #071b39));
    --pilot-centered-border: var(--pilot-editor-light-border, #d9e1ec);
    --pilot-centered-nav-bg: var(--pilot-editor-light, #f6f9ff);
    --pilot-centered-nav-text: var(--pilot-editor-light-text, #071b39);
    --pilot-centered-nav-underline: var(--pilot-editor-primary, #0b4dcc);
    background: var(--pilot-centered-bg);
    border-bottom: 1px solid var(--pilot-centered-border);
    color: var(--pilot-centered-text);
    width: 100%;
}

body.pilot-centered-retail-active .pilot-centered-retail-header--retail-blue {
    --pilot-centered-bg: var(--pilot-editor-primary, #0b4dcc);
    --pilot-centered-border: color-mix(in srgb, var(--pilot-centered-text) 16%, transparent);
    --pilot-centered-nav-bg: var(--pilot-editor-primary-dark, #071b39);
    --pilot-centered-nav-text: var(--pilot-editor-primary-dark-text, #fff);
    --pilot-centered-nav-underline: var(--pilot-editor-primary-text, #fff);
}

body.pilot-centered-retail-active .pilot-centered-retail-header--marketplace {
    --pilot-centered-bg: var(--pilot-editor-primary, #101827);
    --pilot-centered-border: color-mix(in srgb, var(--pilot-centered-text) 16%, transparent);
    --pilot-centered-nav-bg: var(--pilot-editor-light, #0d1523);
    --pilot-centered-nav-text: var(--pilot-editor-light-text, #f8fafc);
    --pilot-centered-nav-underline: var(--pilot-editor-primary-text, #f8fafc);
}

body.pilot-centered-retail-active .pilot-centered-retail-header--split-brand {
    --pilot-centered-nav-bg: var(--pilot-editor-primary, #9a6a2f);
    --pilot-centered-nav-text: var(--pilot-editor-primary-text, #fffdf8);
    --pilot-centered-nav-underline: var(--pilot-editor-primary-text, #fffdf8);
}

body.pilot-centered-retail-active .pilot-centered-retail-header--clean {
    --pilot-centered-nav-bg: var(--pilot-editor-light, #fff);
    --pilot-centered-nav-text: var(--pilot-editor-light-text, #111827);
    --pilot-centered-nav-underline: var(--pilot-editor-primary, #2563eb);
}

body.pilot-centered-retail-active .pilot-centered-retail-header__main {
    align-items: center;
    box-sizing: border-box;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    margin: 0 auto;
    max-width: 1920px;
    min-height: 108px;
    padding: 0 48px;
    position: relative;
    width: 100%;
}

body.pilot-centered-retail-active .pilot-centered-retail-header__brand {
    align-items: center;
    display: flex;
    grid-column: 2;
    justify-content: center;
    justify-self: center;
    min-width: 0;
}

body.pilot-centered-retail-active .pilot-centered-retail-header__brand .logo {
    float: none;
    margin: 0;
    max-width: none;
    position: static;
}

body.pilot-centered-retail-active .pilot-centered-retail-header__brand .logo img {
    display: block;
    height: auto;
    margin: 0;
    max-height: 62px;
    width: var(--pilot-logo-desktop-width, 210px);
}

body.pilot-centered-retail-active .pilot-centered-retail-header__actions {
    align-items: center;
    color: var(--pilot-centered-text);
    display: flex;
    gap: 18px;
    grid-column: 3;
    justify-self: end;
    margin-right: 50px;
}

body.pilot-centered-retail-active .pilot-centered-retail-action {
    align-items: center;
    appearance: none;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    box-sizing: border-box;
    color: inherit;
    cursor: pointer;
    display: inline-flex;
    flex: 0 0 38px;
    height: 38px;
    justify-content: center;
    margin: 0;
    min-width: 38px;
    padding: 0;
    position: relative;
    text-decoration: none;
    width: 38px;
}

body.pilot-centered-retail-active .pilot-centered-retail-action:hover,
body.pilot-centered-retail-active .pilot-centered-retail-action:focus,
body.pilot-centered-retail-active .pilot-centered-retail-action:active {
    background: transparent;
    box-shadow: none;
    color: inherit;
    outline: none;
    text-decoration: none;
}

body.pilot-centered-retail-active .pilot-centered-retail-action:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
}

body.pilot-centered-retail-active .pilot-centered-retail-action svg {
    display: block;
    fill: none;
    height: 27px;
    overflow: visible;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.65;
    width: 27px;
}

body.pilot-centered-retail-active .pilot-centered-retail-search-shell {
    color: inherit;
    flex: 0 0 38px;
    height: 38px;
    position: relative;
    width: 38px;
}

body.pilot-centered-retail-active .pilot-centered-retail-search-toggle {
    height: 38px;
    margin: 0;
    position: relative;
    width: 38px;
    z-index: 2;
}

body.pilot-centered-retail-active .pilot-centered-retail-search-toggle > summary {
    list-style: none;
}

body.pilot-centered-retail-active .pilot-centered-retail-search-toggle > summary::-webkit-details-marker {
    display: none;
}

/*
 * Keep the real Pilot/Magento search block rendered from first paint. The
 * panel is only visually hidden, rather than placed inside a closed details
 * element, so the existing mega-search integration can initialise against
 * the same measurable DOM it receives in Pilot Classic.
 */
body.pilot-centered-retail-active .pilot-centered-retail-search__panel {
    background: var(--pilot-editor-search-dropdown-bg, #fff);
    border: 1px solid var(--pilot-editor-search-dropdown-border, #d9e1ec);
    border-radius: 3px;
    box-shadow: 0 16px 40px rgba(7, 27, 57, .14);
    box-sizing: border-box;
    color: var(--pilot-editor-search-dropdown-text, #071b39);
    opacity: 0;
    padding: 8px;
    pointer-events: none;
    position: absolute;
    right: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%);
    visibility: hidden;
    width: min(760px, calc(100vw - 420px));
    z-index: 1600;
}

body.pilot-centered-retail-active
.pilot-centered-retail-search-toggle[open] + .pilot-centered-retail-search__panel {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
}

/*
 * Reuse Magento_Search::form.mini.phtml unchanged. These rules only change
 * its presentation inside Centered Retail, preserving the exact Pilot Classic
 * IDs/classes/data-mage-init hooks used by the site's mega-search integration.
 */
body.pilot-theme.pilot-centered-retail-active
.pilot-centered-retail-search__panel .block-search.pilot-search {
    box-sizing: border-box;
    float: none !important;
    margin: 0 !important;
    max-width: none !important;
    min-width: 0 !important;
    padding: 0 !important;
    position: relative !important;
    width: 100% !important;
    z-index: auto !important;
}

body.pilot-theme.pilot-centered-retail-active
.pilot-centered-retail-search__panel .pilot-search .block-title,
body.pilot-theme.pilot-centered-retail-active
.pilot-centered-retail-search__panel .pilot-search .label {
    display: none !important;
}

body.pilot-theme.pilot-centered-retail-active
.pilot-centered-retail-search__panel .pilot-search .block-content {
    margin: 0 !important;
    width: 100% !important;
}

body.pilot-theme.pilot-centered-retail-active
.pilot-centered-retail-search__panel .pilot-minisearch {
    align-items: stretch !important;
    display: flex !important;
    height: 46px !important;
    margin: 0 !important;
    position: relative !important;
    width: 100% !important;
}

body.pilot-theme.pilot-centered-retail-active
.pilot-centered-retail-search__panel .pilot-minisearch .field.search {
    flex: 1 1 auto !important;
    margin: 0 !important;
    min-width: 0 !important;
    padding: 0 !important;
    width: auto !important;
}

body.pilot-theme.pilot-centered-retail-active
.pilot-centered-retail-search__panel .pilot-minisearch .control {
    float: none !important;
    height: 46px !important;
    margin: 0 !important;
    padding: 0 !important;
    position: relative !important;
    width: 100% !important;
}

body.pilot-theme.pilot-centered-retail-active
.pilot-centered-retail-search__panel .pilot-minisearch input.input-text {
    background: var(--pilot-editor-search-dropdown-bg, #fff) !important;
    border: 1px solid var(--pilot-editor-search-dropdown-border, #d9e1ec) !important;
    border-radius: 3px 0 0 3px !important;
    border-right: 0 !important;
    box-shadow: none !important;
    box-sizing: border-box !important;
    color: var(--pilot-editor-search-dropdown-text, #071b39) !important;
    font-size: 14px !important;
    height: 46px !important;
    margin: 0 !important;
    padding: 0 14px !important;
    width: 100% !important;
}

body.pilot-theme.pilot-centered-retail-active
.pilot-centered-retail-search__panel .pilot-minisearch input.input-text:focus {
    border-color: var(--pilot-editor-search-dropdown-accent, #0b4dcc) !important;
    box-shadow: none !important;
    outline: none !important;
}

body.pilot-theme.pilot-centered-retail-active
.pilot-centered-retail-search__panel .pilot-minisearch .actions {
    bottom: auto !important;
    display: block !important;
    flex: 0 0 48px !important;
    height: 46px !important;
    margin: 0 !important;
    position: static !important;
    right: auto !important;
    top: auto !important;
    width: 48px !important;
    z-index: auto !important;
}

body.pilot-theme.pilot-centered-retail-active
.pilot-centered-retail-search__panel .pilot-minisearch button.action.search {
    align-items: center !important;
    background: var(--pilot-editor-search-dropdown-accent, #0b4dcc) !important;
    border: 1px solid var(--pilot-editor-search-dropdown-accent, #0b4dcc) !important;
    border-radius: 0 3px 3px 0 !important;
    box-shadow: none !important;
    color: #fff !important;
    display: inline-flex !important;
    height: 46px !important;
    justify-content: center !important;
    margin: 0 !important;
    min-width: 48px !important;
    padding: 0 !important;
    position: static !important;
    width: 48px !important;
}

body.pilot-theme.pilot-centered-retail-active
.pilot-centered-retail-search__panel .pilot-minisearch button.action.search::before {
    display: none !important;
}

body.pilot-theme.pilot-centered-retail-active
.pilot-centered-retail-search__panel .pilot-minisearch button.action.search > span {
    display: none !important;
}

body.pilot-theme.pilot-centered-retail-active
.pilot-centered-retail-search__panel .pilot-search-icon {
    display: block;
    height: 20px;
    width: 20px;
}

body.pilot-theme.pilot-centered-retail-active
.pilot-centered-retail-search__panel .search-autocomplete {
    left: 0 !important;
    margin-top: 6px !important;
    max-height: min(520px, calc(100vh - 180px));
    overflow-y: auto;
    position: absolute !important;
    top: 100% !important;
    width: 100% !important;
    z-index: 1700 !important;
}

/*
 * Centered Retail minicart
 * ------------------------
 * Use Magento's native minicart template and JavaScript binding. Only its
 * presentation changes here; the customer-data and dropdown behaviour stay
 * identical to Pilot Classic.
 */
body.pilot-theme.pilot-centered-retail-active
.pilot-centered-retail-header__actions > .minicart-wrapper {
    flex: 0 0 38px !important;
    float: none !important;
    height: 38px !important;
    margin: 0 !important;
    max-width: 38px !important;
    min-width: 38px !important;
    overflow: visible !important;
    padding: 0 !important;
    position: relative !important;
    width: 38px !important;
    z-index: 1400;
}

body.pilot-theme.pilot-centered-retail-active
.pilot-centered-retail-header__actions > .minicart-wrapper .action.showcart {
    align-items: center !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    box-sizing: border-box !important;
    color: inherit !important;
    display: inline-flex !important;
    height: 38px !important;
    justify-content: center !important;
    margin: 0 !important;
    min-width: 38px !important;
    padding: 0 !important;
    position: relative !important;
    text-decoration: none !important;
    width: 38px !important;
}

body.pilot-theme.pilot-centered-retail-active
.pilot-centered-retail-header__actions > .minicart-wrapper .action.showcart::before {
    content: none !important;
    display: none !important;
}

body.pilot-theme.pilot-centered-retail-active
.pilot-centered-retail-header__actions > .minicart-wrapper .action.showcart::after {
    background: currentColor;
    content: "" !important;
    display: block !important;
    height: 27px;
    margin: 0;
    -webkit-mask-image: url("../images/pilot/minicart-bag.svg");
    -webkit-mask-position: center;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-size: contain;
    mask-image: url("../images/pilot/minicart-bag.svg");
    mask-position: center;
    mask-repeat: no-repeat;
    mask-size: contain;
    width: 27px;
}

body.pilot-theme.pilot-centered-retail-active
.pilot-centered-retail-header__actions > .minicart-wrapper .action.showcart:hover,
body.pilot-theme.pilot-centered-retail-active
.pilot-centered-retail-header__actions > .minicart-wrapper .action.showcart:focus,
body.pilot-theme.pilot-centered-retail-active
.pilot-centered-retail-header__actions > .minicart-wrapper .action.showcart:active {
    background: transparent !important;
    box-shadow: none !important;
    color: inherit !important;
    text-decoration: none !important;
}

body.pilot-theme.pilot-centered-retail-active
.pilot-centered-retail-header__actions > .minicart-wrapper .action.showcart:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
}

body.pilot-theme.pilot-centered-retail-active
.pilot-centered-retail-header__actions > .minicart-wrapper .action.showcart .text {
    display: none !important;
}

body.pilot-theme.pilot-centered-retail-active
.pilot-centered-retail-header__actions > .minicart-wrapper .action.showcart > .counter.qty,
body.pilot-theme.pilot-centered-retail-active
.pilot-centered-retail-header__actions > .minicart-wrapper .action.showcart > .counter.qty.empty {
    align-items: center !important;
    background: var(--pilot-centered-bg) !important;
    border: 1px solid currentColor !important;
    border-radius: 50% !important;
    box-shadow: none !important;
    box-sizing: border-box !important;
    color: var(--pilot-centered-text) !important;
    display: inline-flex !important;
    font-size: 8px !important;
    font-weight: 700 !important;
    height: 14px !important;
    justify-content: center !important;
    line-height: 12px !important;
    margin: 0 !important;
    min-width: 14px !important;
    opacity: .82;
    padding: 0 !important;
    position: absolute !important;
    right: -1px !important;
    top: -1px !important;
    transform: none !important;
    width: 14px !important;
    z-index: 3 !important;
}

body.pilot-theme.pilot-centered-retail-active
.pilot-centered-retail-header__actions > .minicart-wrapper
.action.showcart > .counter.qty > .counter-number {
    color: inherit !important;
    display: inline-flex !important;
    font-size: 8px !important;
    font-weight: 700 !important;
    height: 12px !important;
    justify-content: center !important;
    line-height: 12px !important;
    margin: 0 !important;
    padding: 0 !important;
    text-align: center !important;
    text-shadow: none !important;
    width: 12px !important;
}

body.pilot-theme.pilot-centered-retail-active
.pilot-centered-retail-header__actions > .minicart-wrapper .counter-label,
body.pilot-theme.pilot-centered-retail-active
.pilot-centered-retail-header__actions > .minicart-wrapper .counter.qty::after {
    content: none !important;
    display: none !important;
}

body.pilot-theme.pilot-centered-retail-active
.pilot-centered-retail-header__actions > .minicart-wrapper
.action.showcart > .counter.qty:not(.empty)::before {
    content: none !important;
    display: none !important;
}

body.pilot-theme.pilot-centered-retail-active
.pilot-centered-retail-header__actions > .minicart-wrapper
.action.showcart > .counter.qty.empty > .counter-number {
    display: none !important;
}

body.pilot-theme.pilot-centered-retail-active
.pilot-centered-retail-header__actions > .minicart-wrapper
.action.showcart > .counter.qty.empty::before {
    align-items: center !important;
    color: inherit !important;
    content: "0" !important;
    display: inline-flex !important;
    font-size: 8px !important;
    font-weight: 700 !important;
    height: 12px !important;
    justify-content: center !important;
    line-height: 12px !important;
    width: 12px !important;
}

body.pilot-theme.pilot-centered-retail-active
.pilot-centered-retail-header__actions > .minicart-wrapper .block-minicart {
    left: auto !important;
    right: 0 !important;
    z-index: 1500 !important;
}

body.pilot-theme.pilot-centered-retail-active .nav-sections,
body.pilot-theme.pilot-centered-retail-active .nav-sections-items,
body.pilot-theme.pilot-centered-retail-active .nav-sections-item-content {
    background: var(--pilot-centered-nav-bg) !important;
    border-color: color-mix(in srgb, var(--pilot-centered-nav-text) 16%, transparent) !important;
}

body.pilot-centered-retail-active .nav-sections {
    border-bottom-style: solid !important;
    border-bottom-width: 1px !important;
    margin: 0;
}

body.pilot-centered-retail-active .pilot-centered-nav {
    background: var(--pilot-centered-nav-bg) !important;
    color: var(--pilot-centered-nav-text);
    box-sizing: border-box;
    display: block;
    height: auto;
    margin: 0;
    max-width: none;
    min-height: 52px;
    padding: 0;
    position: relative;
    width: 100%;
}

body.pilot-centered-retail-active .pilot-centered-nav__bar {
    align-items: center;
    box-sizing: border-box;
    display: flex;
    gap: 34px;
    justify-content: center;
    margin: 0 auto;
    min-height: 52px;
    padding: 0 28px;
    width: 100%;
}

body.pilot-centered-retail-active .pilot-centered-nav__link {
    align-items: center;
    appearance: none;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    color: var(--pilot-centered-nav-text);
    display: inline-flex;
    font-size: 12px;
    font-weight: 500;
    gap: 8px;
    height: 52px;
    justify-content: center;
    letter-spacing: .025em;
    line-height: 1;
    margin: 0;
    padding: 0;
    position: relative;
    text-decoration: none;
    text-transform: uppercase;
    white-space: nowrap;
}

body.pilot-centered-retail-active .pilot-centered-nav__link::after {
    background: var(--pilot-centered-nav-underline);
    bottom: 0;
    content: "";
    height: 3px;
    left: 22%;
    opacity: 0;
    position: absolute;
    right: 22%;
    transform: scaleX(.45);
    transition: opacity .15s ease, transform .15s ease;
}

body.pilot-centered-retail-active button.pilot-centered-nav__link {
    cursor: pointer;
    font-family: inherit;
}

body.pilot-centered-retail-active .pilot-centered-nav__link:hover,
body.pilot-centered-retail-active .pilot-centered-nav__link:focus,
body.pilot-centered-retail-active .pilot-centered-nav__link:active,
body.pilot-centered-retail-active .pilot-centered-nav__link[aria-expanded="true"] {
    background: transparent;
    box-shadow: none;
    color: var(--pilot-centered-nav-text);
    text-decoration: none;
}

body.pilot-centered-retail-active .pilot-centered-nav__link:hover::after,
body.pilot-centered-retail-active .pilot-centered-nav__link:focus-visible::after,
body.pilot-centered-retail-active .pilot-centered-nav__link[aria-expanded="true"]::after {
    opacity: 1;
    transform: scaleX(1);
}

body.pilot-centered-retail-active .pilot-centered-nav__menu-icon {
    fill: none;
    height: 16px;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-width: 1.7;
    width: 16px;
}

body.pilot-centered-retail-active .pilot-centered-nav.pilot-category-menu--open .pilot-mega-menu {
    display: block;
}

@media (max-width: 1023px) {
    body.pilot-centered-retail-active .pilot-centered-retail-header__main {
        min-height: 92px;
        padding: 0 24px;
    }

    body.pilot-centered-retail-active .pilot-centered-retail-header__actions {
        gap: 10px;
        margin-right: 0;
    }

    body.pilot-centered-retail-active .pilot-centered-retail-action {
        flex-basis: 36px;
        height: 36px;
        min-width: 36px;
        width: 36px;
    }

    body.pilot-centered-retail-active .pilot-centered-retail-action svg {
        height: 24px;
        width: 24px;
    }

    body.pilot-centered-retail-active .pilot-centered-retail-search-shell,
    body.pilot-centered-retail-active .pilot-centered-retail-search-toggle {
        flex-basis: 36px;
        height: 36px;
        width: 36px;
    }

    body.pilot-centered-retail-active .pilot-centered-retail-search__panel {
        right: calc(100% + 8px);
        width: min(620px, calc(100vw - 260px));
    }

    body.pilot-centered-retail-active .pilot-centered-nav__bar {
        gap: 22px;
        justify-content: flex-start;
        overflow-x: auto;
        padding: 0 20px;
        scrollbar-width: none;
    }
}

@media (max-width: 767px) {
    body.pilot-centered-retail-active .pilot-centered-retail-header__main {
        grid-template-columns: auto 1fr;
        min-height: 76px;
        padding: 0 14px;
    }

    body.pilot-centered-retail-active .pilot-centered-retail-header__brand {
        grid-column: 1;
        justify-self: start;
    }

    body.pilot-centered-retail-active .pilot-centered-retail-header__brand .logo img {
        max-height: 46px;
        width: var(--pilot-logo-mobile-width, 160px);
    }

    body.pilot-centered-retail-active .pilot-centered-retail-header__actions {
        grid-column: 2;
    }

    body.pilot-centered-retail-active .pilot-centered-retail-header__actions > a:nth-of-type(2) {
        display: none;
    }

    /*
     * Anchor the real Magento search panel to the mobile header itself.
     * This keeps it directly below the header even when Pilot Maintenance
     * or another preview bar changes the header's vertical page position.
     */
    body.pilot-centered-retail-active .pilot-centered-retail-search-shell {
        position: static;
    }

    body.pilot-centered-retail-active .pilot-centered-retail-search__panel {
        left: 12px;
        position: absolute;
        right: 12px;
        top: calc(100% + 8px);
        transform: none;
        width: auto;
        z-index: 2100;
    }
}

/*
 * Premium Retail mobile header final pass.
 * ----------------------------------------
 * Premium-only rules. Pilot Commerce / Classic is not targeted here.
 * Keep the logo on the true viewport centre, remove Account on mobile, and
 * make the hidden search use the same responsive input/button geometry as
 * Pilot Commerce while remaining opened by the Premium search icon.
 */
@media (max-width: 767px) {
    body.pilot-theme.pilot-centered-retail-active .pilot-centered-retail-header__main {
        gap: 8px !important;
        grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) !important;
        min-height: 76px !important;
        padding: 0 12px !important;
        position: relative !important;
    }

    body.pilot-theme.pilot-centered-retail-active .pilot-centered-retail-mobile-menu {
        grid-column: 1 !important;
        justify-self: start !important;
    }

    body.pilot-theme.pilot-centered-retail-active .pilot-centered-retail-header__brand {
        grid-column: 2 !important;
        justify-self: center !important;
        min-width: 0 !important;
    }

    body.pilot-theme.pilot-centered-retail-active .pilot-centered-retail-header__brand .logo {
        align-items: center !important;
        display: flex !important;
        justify-content: center !important;
        margin: 0 !important;
        max-width: none !important;
        width: auto !important;
    }

    body.pilot-theme.pilot-centered-retail-active .pilot-centered-retail-header__brand .logo img {
        display: block !important;
        height: auto !important;
        margin: 0 auto !important;
        max-height: 46px !important;
        max-width: calc(100vw - 190px) !important;
        transform-origin: center center !important;
        width: var(--pilot-logo-mobile-width, 145px) !important;
    }

    body.pilot-theme.pilot-centered-retail-active .pilot-centered-retail-header__actions {
        gap: 2px !important;
        grid-column: 3 !important;
        justify-self: end !important;
        margin-right: 0 !important;
    }

    body.pilot-theme.pilot-centered-retail-active .pilot-centered-retail-account,
    body.pilot-theme.pilot-centered-retail-active .pilot-centered-retail-header__actions > a.pilot-centered-retail-action:first-of-type,
    body.pilot-theme.pilot-centered-retail-active .pilot-centered-retail-header__actions > a.pilot-centered-retail-action:nth-of-type(2) {
        display: none !important;
    }

    /* Anchor the opened search to the whole header row, not the 34px icon. */
    body.pilot-theme.pilot-centered-retail-active .pilot-centered-retail-search-shell {
        position: static !important;
    }

    body.pilot-theme.pilot-centered-retail-active .pilot-centered-retail-search__panel {
        background: #f4f6f9 !important;
        border: 1px solid rgba(7, 27, 57, 0.08) !important;
        border-radius: 4px !important;
        box-shadow: 0 8px 22px rgba(7, 27, 57, 0.18) !important;
        box-sizing: border-box !important;
        left: 12px !important;
        max-width: none !important;
        min-width: 0 !important;
        padding: 10px !important;
        position: absolute !important;
        right: 12px !important;
        top: calc(100% + 8px) !important;
        transform: none !important;
        width: auto !important;
        z-index: 2100 !important;
    }

    body.pilot-theme.pilot-centered-retail-active .pilot-centered-retail-search__panel .block-search.pilot-search,
    body.pilot-theme.pilot-centered-retail-active .pilot-centered-retail-search__panel .pilot-search .block-content,
    body.pilot-theme.pilot-centered-retail-active .pilot-centered-retail-search__panel .pilot-minisearch {
        box-sizing: border-box !important;
        float: none !important;
        margin: 0 !important;
        max-width: none !important;
        min-width: 0 !important;
        padding: 0 !important;
        width: 100% !important;
    }

    body.pilot-theme.pilot-centered-retail-active .pilot-centered-retail-search__panel .pilot-minisearch {
        align-items: stretch !important;
        display: flex !important;
        height: 46px !important;
        position: relative !important;
    }

    body.pilot-theme.pilot-centered-retail-active .pilot-centered-retail-search__panel .pilot-minisearch .field.search {
        flex: 1 1 auto !important;
        float: none !important;
        height: 46px !important;
        margin: 0 !important;
        min-width: 0 !important;
        padding: 0 !important;
        width: auto !important;
    }

    body.pilot-theme.pilot-centered-retail-active .pilot-centered-retail-search__panel .pilot-minisearch .control {
        border: 0 !important;
        box-sizing: border-box !important;
        clear: none !important;
        float: none !important;
        height: 46px !important;
        margin: 0 !important;
        min-width: 0 !important;
        padding: 0 !important;
        position: relative !important;
        width: 100% !important;
    }

    body.pilot-theme.pilot-centered-retail-active .pilot-centered-retail-search__panel .pilot-minisearch input.input-text {
        background: var(--pilot-editor-search-box-bg, #fff) !important;
        border: 1px solid var(--pilot-editor-search-box-border, #d9e1ec) !important;
        border-radius: 4px 0 0 4px !important;
        border-right: 0 !important;
        box-shadow: none !important;
        box-sizing: border-box !important;
        color: var(--pilot-editor-search-box-text, #344054) !important;
        display: block !important;
        font-size: 12px !important;
        height: 46px !important;
        left: auto !important;
        line-height: 46px !important;
        margin: 0 !important;
        max-width: none !important;
        min-width: 0 !important;
        padding: 0 14px !important;
        position: static !important;
        top: auto !important;
        width: 100% !important;
    }

    body.pilot-theme.pilot-centered-retail-active .pilot-centered-retail-search__panel .pilot-minisearch input.input-text::placeholder {
        color: var(--pilot-editor-search-box-placeholder, #667085) !important;
        opacity: 1 !important;
    }

    body.pilot-theme.pilot-centered-retail-active .pilot-centered-retail-search__panel .pilot-minisearch .actions {
        bottom: auto !important;
        display: block !important;
        flex: 0 0 48px !important;
        height: 46px !important;
        left: auto !important;
        margin: 0 !important;
        position: static !important;
        right: auto !important;
        top: auto !important;
        width: 48px !important;
    }

    body.pilot-theme.pilot-centered-retail-active .pilot-centered-retail-search__panel .pilot-minisearch button.action.search,
    body.pilot-theme.pilot-centered-retail-active .pilot-centered-retail-search__panel .pilot-minisearch button.action.search:hover,
    body.pilot-theme.pilot-centered-retail-active .pilot-centered-retail-search__panel .pilot-minisearch button.action.search:focus {
        align-items: center !important;
        background: var(--pilot-editor-search-button, #0b4dcc) !important;
        border: 1px solid var(--pilot-editor-search-button, #0b4dcc) !important;
        border-radius: 0 4px 4px 0 !important;
        box-shadow: none !important;
        color: var(--pilot-editor-search-box-icon, #fff) !important;
        display: inline-flex !important;
        height: 46px !important;
        justify-content: center !important;
        margin: 0 !important;
        min-width: 48px !important;
        opacity: 1 !important;
        padding: 0 !important;
        position: static !important;
        width: 48px !important;
    }

    body.pilot-theme.pilot-centered-retail-active .pilot-centered-retail-search__panel .pilot-minisearch .search-autocomplete {
        box-sizing: border-box !important;
        left: 0 !important;
        margin-top: 6px !important;
        max-width: calc(100vw - 24px) !important;
        min-width: 0 !important;
        position: absolute !important;
        right: auto !important;
        top: 100% !important;
        width: calc(100% + 48px) !important;
        z-index: 2200 !important;
    }
}
