/* Leave room for the legacy rows' negative margins on desktop. */
@media (min-width: 960px) {
    .container,
    .page-content[data-md-catalog="cards-v2"] > .container {
        max-width: calc(100% - 30px);
        box-sizing: border-box;
    }
}

/* Search results */
.search-results-layout {
    align-items: flex-start;
    display: flex;
    gap: 24px;
}

.search-category-filters {
    background: #fff;
    border: 1px solid #e7e7e7;
    border-radius: 8px;
    box-shadow: 0 3px 14px rgba(0, 0, 0, .05);
    flex: 0 0 250px;
    overflow: hidden;
    position: sticky;
    top: 18px;
}

.search-category-filters__title {
    border-bottom: 1px solid #ececec;
    font-size: 17px;
    font-weight: 700;
    margin: 0;
    padding: 16px 18px;
}

.search-category-filters__list {
    list-style: none;
    margin: 0;
    max-height: 620px;
    overflow-y: auto;
    padding: 8px 0;
}

.search-category-filters__link {
    align-items: center;
    color: #333;
    display: flex;
    font-size: 13px;
    gap: 10px;
    justify-content: space-between;
    line-height: 1.35;
    padding: 9px 18px;
}

.search-category-filters__link:hover,
.search-category-filters__link:focus,
.search-category-filters__link.is-active {
    background: #fff3e5;
    color: #c96b00;
    text-decoration: none;
}

.search-category-filters__link.is-active {
    border-left: 3px solid #f08301;
    font-weight: 700;
    padding-left: 15px;
}

.search-category-filters__count {
    background: #f2f2f2;
    border-radius: 12px;
    color: #666;
    flex: 0 0 auto;
    font-size: 11px;
    min-width: 28px;
    padding: 2px 7px;
    text-align: center;
}

.search-category-filters__toggle {
    height: 1px;
    opacity: 0;
    pointer-events: none;
    position: absolute;
    width: 1px;
}

.search-category-filters__more {
    display: none;
}

.search-results-products {
    flex: 1 1 auto;
    min-width: 0;
}

.search-selected-category {
    color: #555;
    font-size: 14px;
    margin: -6px 0 18px;
}

.search-selected-category strong {
    color: #c96b00;
}

.search-empty-assistant {
    background: #f08301;
    border: 0;
    border-radius: 7px;
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    font-size: 14px;
    font-weight: 700;
    margin: 8px 0 24px;
    padding: 12px 18px;
}

.search-empty-assistant:hover,
.search-empty-assistant:focus {
    background: #c96b00;
    color: #fff;
    outline: none;
}

.search-assistant-cta {
    align-items: center;
    background: linear-gradient(135deg, #fff8ef 0%, #fff 100%);
    border: 1px solid #f2c38b;
    border-radius: 12px;
    display: flex;
    gap: 16px;
    margin: 32px 0 4px;
    padding: 20px 22px;
}

.search-assistant-cta[hidden] {
    display: none;
}

.search-assistant-cta__icon {
    align-items: center;
    background: #f08301;
    border-radius: 50%;
    color: #fff;
    display: flex;
    flex: 0 0 48px;
    font-size: 22px;
    height: 48px;
    justify-content: center;
}

.search-assistant-cta__content {
    flex: 1 1 auto;
    min-width: 0;
}

.search-assistant-cta__content h2 {
    color: #292929;
    font-size: 18px;
    line-height: 1.25;
    margin: 0 0 4px;
}

.search-assistant-cta__content p {
    color: #646464;
    font-size: 14px;
    line-height: 1.45;
    margin: 0;
}

.search-assistant-cta .search-empty-assistant {
    flex: 0 0 auto;
    margin: 0;
    white-space: nowrap;
}

@media (max-width: 991px) {
    .search-results-layout {
        display: block;
    }

    .search-category-filters {
        margin-bottom: 20px;
        position: static;
        width: 100%;
    }

    .search-category-filters__title {
        padding: 14px 16px;
    }

    .search-category-filters__list {
        display: block;
        max-height: none;
        overflow: visible;
        padding: 0;
    }

    .search-category-filters__list li {
        border-bottom: 1px solid #efefef;
        display: list-item;
    }

    .search-category-filters__link,
    .search-category-filters__link.is-active {
        border: 0;
        border-radius: 0;
        font-size: 14px;
        min-height: 44px;
        padding: 11px 14px;
    }

    .search-category-filters__link.is-active {
        border-left: 3px solid #f08301;
        padding-left: 11px;
    }

    .search-category-filters__list .is-mobile-extra {
        display: none;
    }

    .search-category-filters__toggle:checked + .search-category-filters__list .is-mobile-extra {
        display: list-item;
    }

    .search-category-filters__more {
        align-items: center;
        color: #c96b00;
        cursor: pointer;
        display: flex;
        font-size: 13px;
        font-weight: 700;
        justify-content: center;
        min-height: 46px;
        padding: 10px 14px;
        text-align: center;
    }

    .search-category-filters__more:hover,
    .search-category-filters__more:focus {
        background: #fff8ef;
    }

    .search-category-filters__less-label {
        display: none;
    }

    .search-category-filters__more-arrow {
        font-size: 18px;
        line-height: 1;
        margin-left: 7px;
        transition: transform .2s ease;
    }

    .search-category-filters__toggle:checked ~ .search-category-filters__more .search-category-filters__more-label {
        display: none;
    }

    .search-category-filters__toggle:checked ~ .search-category-filters__more .search-category-filters__less-label {
        display: inline;
    }

    .search-category-filters__toggle:checked ~ .search-category-filters__more .search-category-filters__more-arrow {
        transform: rotate(180deg);
    }

    .search-assistant-cta {
        align-items: flex-start;
        flex-wrap: wrap;
        gap: 12px;
        padding: 18px;
    }

    .search-assistant-cta__icon {
        flex-basis: 42px;
        height: 42px;
    }

    .search-assistant-cta__content {
        flex-basis: calc(100% - 54px);
    }

    .search-assistant-cta .search-empty-assistant {
        justify-content: center;
        width: 100%;
    }
}

/* Algolia category suggestions */
.autocomplete > .ui-autocomplete {
    background: #fff;
    border: 1px solid #dedede;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, .14);
    box-sizing: border-box;
    left: 0 !important;
    list-style: none;
    margin: 4px 0 0;
    max-height: 480px;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 0;
    top: 100% !important;
    width: 100% !important;
    z-index: 10020 !important;
}

.ui-autocomplete > li {
    list-style: none;
    margin: 0;
}

.ui-autocomplete .product-search-category {
    border-bottom: 1px solid #ececec;
}

.ui-autocomplete .product-search-category > a {
    align-items: center;
    background: #fff8ef;
    box-sizing: border-box;
    color: #262626;
    display: flex;
    gap: 10px;
    min-height: 58px;
    padding: 9px 12px;
    width: 100%;
}

.ui-autocomplete .product-search-category > a:hover,
.ui-autocomplete .product-search-category.ui-state-focus > a,
.ui-autocomplete .product-search-category > a.ui-state-active {
    background: #fff0dd;
    border: 0;
    margin: 0;
    text-decoration: none;
}

.product-search-category__icon {
    align-items: center;
    background: #f08301;
    border-radius: 50%;
    color: #fff;
    display: inline-flex;
    flex: 0 0 30px;
    font-size: 18px;
    height: 30px;
    justify-content: center;
}

.product-search-category__content {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    line-height: 1.25;
    min-width: 0;
}

.product-search-category__hint {
    color: #747474;
    font-size: 11px;
}

.product-search-category__name {
    color: #262626;
    display: block;
    font-size: 13px;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-search-category__count {
    color: #747474;
    flex: 0 0 auto;
    font-size: 12px;
    white-space: nowrap;
}

.ui-autocomplete .product-block-s {
    align-items: center;
    border-bottom: 1px solid #ececec;
    box-sizing: border-box;
    display: flex;
    min-height: 74px;
    padding: 8px 12px;
    width: 100%;
}

.ui-autocomplete .product-block-s:hover,
.ui-autocomplete .product-block-s.ui-state-active {
    background: #fafafa;
    border-color: #ececec;
    margin: 0;
    text-decoration: none;
}

.ui-autocomplete .product-block-s .image-block {
    flex: 0 0 54px;
    height: 54px;
    margin-right: 10px;
    width: 54px;
}

.ui-autocomplete .product-block-s .image-block img {
    height: 54px;
    object-fit: contain;
    width: 54px;
}

.ui-autocomplete .product-block-s .product-description {
    min-width: 0;
}

.ui-autocomplete .product-block-s .product-description h1 {
    color: #333;
    font-size: 13px;
    line-height: 1.3;
    margin: 0 0 4px;
}

.ui-autocomplete .product-block-s .product-description .price {
    color: #8f4213;
    font-size: 12px;
    font-weight: 700;
}

@media (min-width: 960px) {
    .search-form:not(.s-mobile) {
        overflow: visible;
    }

    .search-form:not(.s-mobile) .ais-InstantSearch,
    .search-form:not(.s-mobile) .ais-SearchBox,
    .search-form:not(.s-mobile) .autocomplete {
        height: 100%;
    }

    .search-form:not(.s-mobile) .autocomplete > .ui-autocomplete.ui-widget-content {
        border-radius: 10px;
        height: auto;
        left: 0 !important;
        max-height: none;
        min-height: 0;
        overflow: hidden;
        position: absolute;
        width: min(820px, calc(100vw - 48px)) !important;
    }

    .search-form:not(.s-mobile) .product-search-desktop__product {
        border-right: 1px solid #ececec;
        padding: 0 !important;
        width: 60%;
    }

    .search-form:not(.s-mobile) .product-search-desktop__product .product-block-s {
        min-height: 82px;
        padding: 10px 16px;
    }

    .search-form:not(.s-mobile) .product-search-desktop__product .image-block,
    .search-form:not(.s-mobile) .product-search-desktop__product .image-block img {
        height: 60px;
        width: 60px;
    }

    .search-form:not(.s-mobile) .product-search-desktop__product .image-block {
        flex-basis: 60px;
        margin-right: 14px;
    }

    .search-form:not(.s-mobile) .product-search-desktop__product .product-description h1 {
        font-size: 15px !important;
        line-height: 1.3;
        margin-bottom: 5px;
    }

    .search-form:not(.s-mobile) .product-search-desktop__product .product-description .price {
        color: #292929;
        font-size: 14px;
    }

    .search-form:not(.s-mobile) .product-search-desktop__category-header,
    .search-form:not(.s-mobile) .product-search-desktop__category {
        box-sizing: border-box;
        left: 60%;
        position: absolute !important;
        width: 40%;
    }

    .search-form:not(.s-mobile) .product-search-desktop__category-header {
        color: #8a8a8a;
        font-size: 12px;
        font-weight: 700;
        letter-spacing: .03em;
        padding: 17px 22px 8px !important;
        pointer-events: none;
        text-transform: uppercase;
        top: 0;
    }

    .search-form:not(.s-mobile) .product-search-desktop__category {
        border: 0;
        padding: 0 12px !important;
        top: var(--desktop-category-top);
    }

    .search-form:not(.s-mobile) .product-search-desktop__category-header:hover {
        background: #fff !important;
    }

    .search-form:not(.s-mobile) .product-search-desktop__category > a {
        background: #fff;
        gap: 12px;
        min-height: 40px;
        padding: 7px 10px;
    }

    .search-form:not(.s-mobile) .product-search-desktop__category > a:hover,
    .search-form:not(.s-mobile) .product-search-desktop__category.ui-state-focus > a,
    .search-form:not(.s-mobile) .product-search-desktop__category > a.ui-state-active {
        background: #fff8ef;
        border-radius: 7px;
    }

    .search-form:not(.s-mobile) .product-search-desktop__category .product-search-category__icon,
    .search-form:not(.s-mobile) .product-search-desktop__category .product-search-category__hint {
        display: none;
    }

    .search-form:not(.s-mobile) .product-search-desktop__category .product-search-category__content {
        display: block;
    }

    .search-form:not(.s-mobile) .product-search-desktop__category .product-search-category__name {
        font-size: 14px;
        font-weight: 600;
    }

    .search-form:not(.s-mobile) .product-search-desktop__category .product-search-category__count {
        color: #292929;
        font-size: 13px;
        font-weight: 700;
    }

    .search-form:not(.s-mobile) .product-search-desktop__all-results {
        border-right: 1px solid #ececec;
        padding: 0 !important;
        width: 60%;
    }

    .search-form:not(.s-mobile) .product-search-desktop__all-results-link {
        align-items: center;
        color: #c96b00;
        display: flex;
        font-size: 14px;
        font-weight: 700;
        justify-content: center;
        min-height: 54px;
        padding: 10px 18px;
        text-decoration: none;
    }

    .search-form:not(.s-mobile) .product-search-desktop__all-results-link span:last-child {
        font-size: 22px;
        margin-left: 8px;
    }

    .search-form:not(.s-mobile) .product-search-desktop__all-results-link:hover,
    .search-form:not(.s-mobile) .product-search-desktop__all-results-link:focus {
        background: #fff8ef;
        color: #a85400;
    }

    .search-form:not(.s-mobile) .product-search-empty {
        width: 100%;
    }
}

@media (min-width: 960px) and (max-width: 1199px) {
    .search-form:not(.s-mobile) .autocomplete > .ui-autocomplete.ui-widget-content {
        left: 50% !important;
        transform: translateX(-50%);
        width: min(720px, calc(100vw - 48px)) !important;
    }
}

.product-search-mobile__close,
.product-search-mobile__all {
    display: none;
}

.product-search-assistant {
    align-items: center;
    background: #fff8ef;
    border: 0;
    color: #392817;
    cursor: pointer;
    display: flex;
    font-family: inherit;
    gap: 11px;
    min-height: 62px;
    padding: 10px 12px;
    text-align: left;
    width: 100%;
}

.product-search-assistant__icon {
    align-items: center;
    background: #f08301;
    border-radius: 50%;
    color: #fff;
    display: inline-flex;
    flex: 0 0 34px;
    font-size: 17px;
    height: 34px;
    justify-content: center;
}

.product-search-assistant__content {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
    min-width: 0;
}

.product-search-assistant__content strong {
    font-size: 13px;
}

.product-search-assistant__content small {
    color: #777;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-search-empty {
    color: #777;
    font-size: 14px;
    padding: 24px 16px !important;
    text-align: center;
}


@media (max-width: 420px) { .product-search-category__count { font-size: 11px; } }
@media (max-width: 959px) {
    body.is-product-search-open {
        overflow: hidden;
    }

    .search-form.s-mobile.is-search-open {
        background: #f7f7f5;
        border: 0;
        border-radius: 0;
        bottom: 0;
        box-sizing: border-box;
        float: none;
        height: 100vh;
        height: 100dvh;
        left: 0;
        line-height: normal;
        margin: 0;
        overflow: hidden;
        padding: env(safe-area-inset-top) 0 0;
        position: fixed;
        right: 0;
        top: 0;
        width: 100%;
        z-index: 10050;
    }

    .search-form.s-mobile.is-search-open .ais-InstantSearch {
        height: 100%;
    }

    .search-form.s-mobile.is-search-open .ais-SearchBox {
        background: #fff;
        box-shadow: 0 2px 12px rgba(0, 0, 0, .08);
        box-sizing: border-box;
        min-height: 76px;
        padding: 12px 16px;
        position: relative;
        z-index: 2;
    }

    .search-form.s-mobile.is-search-open .ais-SearchBox-form {
        align-items: center;
        display: flex;
        gap: 10px;
        height: 52px;
    }

    .search-form.s-mobile.is-search-open .product-search-mobile__close {
        align-items: center;
        background: transparent;
        border: 0;
        color: #252525;
        cursor: pointer;
        display: inline-flex;
        flex: 0 0 34px;
        font-size: 25px;
        height: 44px;
        justify-content: center;
        padding: 0;
    }

    .search-form.s-mobile.is-search-open .autocomplete {
        flex: 1 1 auto;
        height: 48px;
        min-width: 0;
    }

    .search-form.s-mobile.is-search-open input[type=search] {
        background: #f3f3f1;
        border: 1px solid #deded9 !important;
        border-radius: 12px;
        box-sizing: border-box;
        font-size: 16px;
        height: 48px;
        padding: 8px 46px 8px 14px;
    }

    .search-form.s-mobile.is-search-open .ais-SearchBox-submit {
        background-color: #f08301;
        border-radius: 10px;
        height: 40px;
        right: 4px;
        top: 4px;
        width: 40px;
    }

    .search-form.s-mobile.is-search-open > .ui-autocomplete {
        background: #f7f7f5;
        border: 0;
        border-radius: 0;
        bottom: 0;
        box-shadow: none;
        box-sizing: border-box;
        height: auto !important;
        left: 0 !important;
        margin: 0;
        max-height: none !important;
        overflow-x: hidden;
        overflow-y: auto;
        padding: 10px 14px 24px;
        position: absolute !important;
        right: 0;
        top: calc(76px + env(safe-area-inset-top)) !important;
        width: 100% !important;
        z-index: 1 !important;
    }

    .search-form.s-mobile.is-search-open.has-search-results > .ui-autocomplete {
        bottom: calc(72px + env(safe-area-inset-bottom));
    }

    .search-form.s-mobile.is-search-open > .ui-autocomplete > li {
        background: #fff;
        border-left: 1px solid #e7e4df;
        border-right: 1px solid #e7e4df;
        border-radius: 0 !important;
        margin: 0;
        padding: 0 !important;
    }

    .search-form.s-mobile.is-search-open > .ui-autocomplete > li:first-child {
        border-radius: 12px 12px 0 0 !important;
        border-top: 1px solid #e7e4df;
        overflow: hidden;
    }

    .search-form.s-mobile.is-search-open > .ui-autocomplete > li:last-child {
        border-bottom: 1px solid #e7e4df;
        border-radius: 0 0 12px 12px !important;
        overflow: hidden;
    }

    .search-form.s-mobile.is-search-open .product-block-s {
        min-height: 86px;
        padding: 10px 12px;
    }

    .search-form.s-mobile.is-search-open .product-block-s .image-block,
    .search-form.s-mobile.is-search-open .product-block-s .image-block img {
        height: 62px;
        width: 62px;
    }

    .search-form.s-mobile.is-search-open .product-block-s .image-block {
        flex-basis: 62px;
        margin-right: 12px;
    }

    .search-form.s-mobile.is-search-open .product-block-s .product-description h1 {
        font-size: 15px !important;
        line-height: 1.25;
        margin-bottom: 6px;
    }

    .search-form.s-mobile.is-search-open .product-block-s .product-description .price {
        color: #8f4213;
        font-size: 14px;
    }

    .search-form.s-mobile.is-search-open .product-search-category > a {
        min-height: 60px;
        padding: 9px 12px;
    }

    .search-form.s-mobile.is-search-open .product-search-assistant-item {
        border-top: 8px solid #f7f7f5;
    }

    .search-form.s-mobile.is-search-open .product-search-mobile__all:not([hidden]) {
        align-items: center;
        background: #f08301;
        border-radius: 12px;
        bottom: calc(10px + env(safe-area-inset-bottom));
        box-shadow: 0 7px 18px rgba(122, 66, 0, .22);
        box-sizing: border-box;
        color: #fff;
        display: flex;
        font-size: 15px;
        font-weight: 700;
        height: 52px;
        justify-content: center;
        left: 14px;
        padding: 0 18px;
        position: absolute;
        right: 14px;
        text-align: center;
        text-decoration: none;
        z-index: 3;
    }
}
