/* Header redesign foundation scoped to the custom header only. */
.mc-header-root,
.mc-header-root * {
    box-sizing: border-box;
}

.mc-header-root {
    position: relative;
    z-index: 20;
    width: 100%;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 20px;
}

.mc-header-shell {
    display: flex;
    align-items: center;
    gap: 32px;
    width: 100%;
    max-width: 1540px;
    margin: 0 auto;
    padding: 15px 24px 4px;
    direction: ltr;
}

.mc-header-logo {
    flex: 0 0 auto;
    order: 0;
}

.mc-header-logo__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 180px;
    height: 64px;
}

.mc-header-root a,
.mc-header-root a:visited {
    color: #1f2933;
}

.mc-header-root a:hover {
    color: #1f2933;
    text-decoration: none;
}

.mc-header-logo__image {
    display: block;
    width: auto;
    max-width: 180px;
    max-height: 64px;
    height: auto;
    object-fit: contain;
}

.mc-header-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(520px, 880px) auto auto minmax(0, 1fr);
    align-items: center;
    column-gap: 20px;
    flex: 1 1 auto;
    min-width: 0;
    order: 1;
}

.mc-header-search {
    grid-column: 2;
    min-width: 220px;
}

.mc-header-search__form {
    width: 100%;
    margin: 0;
}

.mc-header-search__control {
    width: 100%;
}

.mc-header-search__label {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

.mc-header-search__control {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 46px;
    border-radius: 99px;
    background: transparent;
}

.mc-header-search__control::before {
    position: absolute;
    inset: 0;
    z-index: 3;
    border: 1px solid #aeb8c6;
    border-radius: inherit;
    content: "";
    pointer-events: none;
}

.mc-header-search__control::after {
    position: absolute;
    inset: 0;
    z-index: 0;
    border-radius: inherit;
    background: #ffffff;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
    content: "";
    pointer-events: none;
}

.mc-header-search__input {
    appearance: none;
    -webkit-appearance: none;
    position: relative;
    z-index: 1;
    width: 100%;
    min-height: 44px;
    border: 0 !important;
    border-radius: 0;
    box-shadow: none !important;
    padding: 0 18px;
    background: transparent !important;
    background-color: transparent !important;
}

.mc-header-search__input:focus {
    outline: none;
    box-shadow: none !important;
    background: transparent !important;
    background-color: transparent !important;
}

.mc-header-search__input:-webkit-autofill,
.mc-header-search__input:-webkit-autofill:hover,
.mc-header-search__input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px transparent inset !important;
    -webkit-text-fill-color: #1f2933;
    transition: background-color 9999s ease-in-out 0s;
}

.mc-header-search__input::placeholder {
    color: rgba(31, 41, 51, 0.48);
    opacity: 0.7;
}

.mc-header-search__control:focus-within {
    box-shadow: none;
}

.mc-header-search__control:focus-within::after {
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.12);
}

.mc-header-search__submit,
.mc-header-account__link,
.mc-header-cart {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    color: #1f2933;
    text-decoration: none;
    transition: color 0.15s ease-in-out;
    white-space: nowrap;
}

.mc-header-root .mc-header-account__link:hover,
.mc-header-account__dropdown:hover .mc-header-account__trigger,
.mc-header-root .mc-header-cart:hover {
    color: #4f8fb8 !important;
    text-decoration: none;
}

.mc-header-cart[hidden] {
    display: none;
}

.mc-header-account__icon,
.mc-header-cart__icon {
    display: block;
    width: 22px;
    height: 22px;
    margin-bottom: 3px;
    color: inherit;
    font-size: 22px;
    line-height: 1;
    transition: color 0.15s ease-in-out;
}

.mc-header-cart__icon-wrap {
    position: relative;
    display: block;
    margin-bottom: 3px;
}

.mc-header-cart__icon {
    margin-bottom: 0;
}

.mc-header-cart__counter {
    position: absolute;
    top: -10px;
    right: -12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 19px;
    height: 19px;
    border-radius: 999px;
    padding: 0 5px;
    background: #5da038;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}

.mc-header-cart__counter[hidden] {
    display: none;
}

.mc-header-account__label,
.mc-header-cart__label {
    font-size: 12px;
    line-height: 1.2;
}

.mc-header-search__submit {
    position: relative;
    z-index: 1;
    flex-direction: row;
    gap: 6px;
    align-self: stretch;
    margin: 0;
    border: 0;
    border-radius: 0 99px 99px 0;
    padding: 0 20px;
    background: var(--mc-button-color, #00a9d6);
    color: var(--mc-button-text-color, #ffffff);
    cursor: pointer;
}

.mc-header-search__submit:hover {
    background: var(--mc-button-color-hover, #008fb6);
}

.mc-header-search__submit-icon {
    display: block;
    width: 18px;
    height: 18px;
    line-height: 1;
}

.mc-header-account {
    display: flex;
    align-items: center;
    gap: 14px;
}

.mc-header-account__dropdown {
    position: relative;
}

.mc-header-account__trigger {
    border: 0;
    padding: 0;
    background: transparent;
    cursor: pointer;
}

.mc-header-account__menu {
    position: absolute;
    top: 100%;
    right: 50%;
    z-index: 30;
    display: none;
    min-width: 150px;
    padding: 10px 8px 8px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
    transform: translateX(50%);
}

.mc-header-account__dropdown:hover .mc-header-account__menu,
.mc-header-account__dropdown:focus-within .mc-header-account__menu {
    display: block;
}

.mc-header-account__menu-link {
    display: block;
    padding: 8px 10px;
    color: #1f2933;
    border-radius: 4px;
    text-decoration: none;
    white-space: nowrap;
}

.mc-header-account__menu-link:hover {
    color: #111827;
    background: #eef3f8;
    text-decoration: none;
}

@media (max-width: 1180px) {
    .mc-header-shell {
        gap: 20px;
    }

    .mc-header-actions {
        grid-template-columns: minmax(0, 1fr) auto auto;
        column-gap: 14px;
    }

    .mc-header-search {
        grid-column: 1;
    }
}

@media (max-width: 980px) {
    .mc-header-shell {
        flex-wrap: wrap;
    }

    .mc-header-actions {
        flex-basis: 100%;
        grid-template-columns: minmax(0, 1fr) auto auto;
    }

    .mc-header-search {
        grid-column: 1;
    }

    .mc-header-search__control::after {
        box-shadow: none;
    }

    .mc-header-search__control:focus-within::after {
        box-shadow: none;
    }
}

@media (max-width: 767px) {
    .mc-header-shell,
    .mc-header-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .mc-header-shell {
        gap: 18px;
        padding: 16px;
    }

    .mc-header-actions {
        display: flex;
        width: 100%;
        gap: 12px;
    }

    .mc-header-account {
        justify-content: space-between;
    }
}

@media (min-width: 768px) and (max-width: 980px) {
    .mc-header-actions {
        grid-template-columns: minmax(0, 1fr) auto auto;
    }

    .mc-header-search {
        grid-column: 1;
        grid-row: 1;
    }

    .mc-header-account {
        grid-column: 2;
        grid-row: 1;
    }

    .mc-header-cart {
        grid-column: 3;
        grid-row: 1;
    }
}
