.msh-product-search {
    position: absolute;
    z-index: 10006;
    top: calc(100% + 12px);
    left: 50%;
    width: min(780px, calc(100% - 48px));
    margin: 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translate(-50%, -10px) scale(.985);
    transform-origin: top center;
    transition: opacity .18s ease, transform .2s ease, visibility 0s linear .2s;
}

.msh-product-search-toggle {
    position: relative;
    z-index: 2;
    flex: 0 0 46px;
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    margin-left: 10px;
    padding: 0;
    border: 1px solid rgba(17, 19, 22, .10);
    border-radius: 14px;
    color: #f58220;
    background: #f1f2f3;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8);
    cursor: pointer;
    touch-action: manipulation;
    transition: color .18s ease, background-color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.msh-product-search-toggle:hover,
.msh-product-search-toggle:focus-visible {
    outline: 0;
    color: #fff;
    background: #f58220;
    box-shadow: 0 9px 24px rgba(245, 130, 32, .27);
    transform: translateY(-1px);
}

.msh-product-search-toggle svg {
    position: absolute;
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: opacity .16s ease, transform .2s ease;
}

.msh-product-search-toggle__close {
    opacity: 0;
    transform: rotate(-35deg) scale(.72);
}

.main-header.msh-search-open .msh-product-search-toggle__search {
    opacity: 0;
    transform: rotate(35deg) scale(.72);
}

.main-header.msh-search-open .msh-product-search-toggle__close {
    opacity: 1;
    transform: rotate(0) scale(1);
}

.main-header.msh-search-open .msh-product-search {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate(-50%, 0) scale(1);
    transition-delay: 0s, 0s, 0s;
}

@media (min-width: 992px) {

    .msh-home-page .msh-hero-grid { padding-top: 165px; }
    .page-title { padding-top: 150px !important; }
}

.msh-product-search__form {
    position: relative;
    min-height: 58px;
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr) 42px auto;
    align-items: center;
    overflow: hidden;
    border: 1px solid #d8dce1;
    border-radius: 17px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(16, 21, 27, .10), inset 0 1px 0 #fff;
    touch-action: manipulation;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.msh-product-search__form:focus-within {
    border-color: rgba(245, 130, 32, .78);
    box-shadow: 0 0 0 4px rgba(245, 130, 32, .13), 0 14px 34px rgba(16, 21, 27, .14);
}

.msh-product-search__leading {
    display: grid;
    place-items: center;
    color: #f58220;
}

.msh-product-search__leading svg,
.msh-product-search__submit svg,
.msh-product-search__clear svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.msh-product-search__input {
    width: 100%;
    min-width: 0;
    height: 56px;
    padding: 0 8px 0 0;
    border: 0 !important;
    outline: 0 !important;
    color: #17191d;
    background: transparent !important;
    box-shadow: none !important;
    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.25;
    appearance: none;
    -webkit-appearance: none;
    touch-action: manipulation;
}

.msh-product-search__input::-webkit-search-cancel-button { display: none; }
.msh-product-search__form .msh-product-search__input:focus,
.msh-product-search__form .msh-product-search__input:focus-visible {
    outline: none !important;
}
.msh-product-search__input::placeholder { color: #858b93; font-weight: 500; opacity: 1; }

.msh-product-search__clear {
    grid-column: 3;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: #6f757c;
    background: #f0f2f4;
    cursor: pointer;
}

.msh-product-search__clear[hidden] { display: none; }
.msh-product-search__clear:hover { color: #17191d; background: #e6e9ec; }

.msh-product-search__submit {
    grid-column: 4;
    min-width: 104px;
    align-self: stretch;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 0 22px;
    border: 0;
    color: #17191d;
    background: #f58220;
    font-size: 14px;
    font-weight: 900;
    cursor: pointer;
    transition: background-color .18s ease, color .18s ease;
}

.msh-product-search__submit:hover,
.msh-product-search__submit:focus-visible { color: #fff; background: #dc6d10; }

.msh-product-search__results {
    position: absolute;
    top: calc(100% + 9px);
    left: 0;
    right: 0;
    max-height: min(510px, calc(100dvh - 180px));
    display: none;
    overflow: auto;
    overscroll-behavior: contain;
    padding: 8px;
    border: 1px solid #e0e3e7;
    border-radius: 18px;
    background: rgba(255, 255, 255, .985);
    box-shadow: 0 24px 70px rgba(12, 16, 20, .24);
    backdrop-filter: blur(22px) saturate(135%);
    -webkit-backdrop-filter: blur(22px) saturate(135%);
}

.msh-product-search__results.is-open { display: block; }

.msh-product-search__result-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px 7px;
    color: #777e86;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .11em;
    text-transform: uppercase;
}

.msh-product-search__result {
    min-height: 78px;
    display: grid;
    grid-template-columns: 62px minmax(0, 1fr) 34px;
    gap: 13px;
    align-items: center;
    padding: 9px 11px;
    border-radius: 13px;
    color: #17191d !important;
    text-decoration: none !important;
    transition: background-color .16s ease, transform .16s ease;
}

.msh-product-search__result + .msh-product-search__result { border-top: 1px solid #eef0f2; }
.msh-product-search__result:hover,
.msh-product-search__result:focus-visible,
.msh-product-search__result.is-active { outline: 0; background: #f4f5f6; transform: translateX(2px); }

.msh-product-search__thumb {
    width: 62px;
    height: 62px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid #eceef0;
    border-radius: 11px;
    background: #fff;
}

.msh-product-search__thumb img { width: 100%; height: 100%; object-fit: contain; }
.msh-product-search__copy { min-width: 0; }
.msh-product-search__name { overflow: hidden; color: #17191d; font-size: 15px; font-weight: 800; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.msh-product-search__meta { display: flex; flex-wrap: wrap; gap: 5px 10px; margin-top: 6px; color: #7a8189; font-size: 12px; line-height: 1.25; }
.msh-product-search__code { color: #b75a0e; font-weight: 800; }
.msh-product-search__arrow { display: grid; place-items: center; color: #f58220; font-size: 22px; }

.msh-product-search__message {
    min-height: 112px;
    display: grid;
    place-items: center;
    padding: 24px;
    color: #707780;
    text-align: center;
    font-size: 14px;
    line-height: 1.55;
}

.msh-product-search__message strong { display: block; margin-bottom: 4px; color: #25282d; font-size: 15px; }
.msh-product-search__spinner { width: 22px; height: 22px; margin: 0 auto 10px; border: 2px solid #e3e6e9; border-top-color: #f58220; border-radius: 50%; animation: msh-search-spin .65s linear infinite; }

.msh-product-search__all {
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 5px;
    padding: 10px 14px;
    border-radius: 12px;
    color: #17191d !important;
    background: #f58220;
    font-size: 13px;
    font-weight: 900;
    text-decoration: none !important;
}

@keyframes msh-search-spin { to { transform: rotate(360deg); } }

@media (max-width: 991px) {
    .header-style-four .logo-box { order: 1; }
    .msh-product-search-toggle { order: 2; width: 44px; height: 44px; flex-basis: 44px; margin-left: auto; border-radius: 12px; }
    .header-style-four .nav-outer { order: 3; margin-left: 8px !important; }
    .msh-product-search { top: calc(100% + 10px); right: 10px; left: 10px; width: auto; max-width: none; transform: translateY(-8px) scale(.985); }
    .main-header.msh-search-open .msh-product-search { transform: translateY(0) scale(1); }
    .msh-product-search__form { min-height: 54px; grid-template-columns: 43px minmax(0, 1fr) 38px auto; border-radius: 15px; }
    .msh-product-search__input { height: 52px; font-size: 16px !important; }
    .msh-product-search__submit { min-width: 78px; padding: 0 15px; }
    .msh-product-search__submit svg { display: none; }
    .msh-product-search__results { max-height: calc(100dvh - 165px); border-radius: 16px; }
    .msh-menu-open .msh-product-search { visibility: hidden; opacity: 0; pointer-events: none; }
}

@media (max-width: 480px) {
    .msh-product-search { width: 100%; }
    .msh-product-search__form { grid-template-columns: 40px minmax(0, 1fr) 36px 66px; }
    .msh-product-search__submit { min-width: 66px; padding: 0 12px; }
    .msh-product-search__leading svg { width: 19px; height: 19px; }
    .msh-product-search__result { min-height: 72px; grid-template-columns: 54px minmax(0, 1fr) 25px; gap: 10px; padding: 8px; }
    .msh-product-search__thumb { width: 54px; height: 54px; }
    .msh-product-search__name { font-size: 14px; }
    .msh-product-search__meta { font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
    .msh-product-search,
    .msh-product-search-toggle,
    .msh-product-search-toggle svg,
    .msh-product-search__form,
    .msh-product-search__result,
    .msh-product-search__submit { transition: none !important; }
    .msh-product-search__spinner { animation-duration: 1.2s; }
}
