.v2-inline-search-open #header {
    z-index: 100;
    position: relative;
    background: white;
}

.affix-top #header {
    background: transparent;
}

.detail_page #header {
    background: white;
}

.v2-search-block__form {
    display: flex;
    gap: 20px;
}

.v2-search-block__close {
    display: none;
}

.v2-inline-search-open .wrapper1 .header_wrap {
    z-index: 120;
}

.v2-search-block-backdrop {
    content: "";
    position: fixed;
    z-index: 100;
    left: 0;
    right: 0;
    bottom: 0;
    top: 0;
    background: rgba(0, 0, 0, 0.8);
    opacity: 0;
    transition: opacity 0.3s;
    visibility: hidden;
}

.v2-inline-search-open .v2-search-block-backdrop {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s;
}

.v2-inline-search-btn {
    display: flex;
    width: 50px;
    aspect-ratio: 1;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-position: center;
    background-repeat: no-repeat;
    background-image: url("../jknits_img/search_big_black.svg");
    cursor: pointer;
    border: none;
    background-color: transparent;
    background-size: 25px;
}

.v2-inline-search-open .v2-inline-search-btn {
    background-color: #ffe2d466;
    background-image: url("../images/close.svg");
    background-size: 12px;
}

.v2-search-block {
    position: absolute;
    top: 0px;
    left: 0;
    right: 0;
    padding: 28px;
    background: white;
    z-index: 110;
    opacity: 1;
    transition: all 0.5s;
}

body:not(.v2-inline-search-open) .v2-search-block {
    opacity: 0;
    top: -1000px !important;
    visibility: hidden;
}

.v2-search-block__row {
    display: flex;
    gap: 32px;
}

.v2-search-block__col1 {
    width: 25%;
    flex-shrink: 0;
    display: flex;
    gap: 28px;
    flex-direction: column;
}

.v2-search-block__col2 {
    flex-grow: 1;
}

.v2-search-block__history {
    flex-grow: 1;
}

.v2-search-block__form {
    width: 100%;
}

.v2-search-block__input {
    display: block;
    height: 74px !important;
    border: 1px solid #f6e8e0 !important;
    background: #fcf6f3 !important;
    color: #151716 !important;
    font-size: 16px !important;
    text-align: left !important;
    background-image: url("../images/search.svg") !important;
    background-position: 16px 50% !important;
    background-repeat: no-repeat !important;
    padding: 0 15px 0 50px !important;
    position: relative;
    margin-left: -2px;
    flex-grow: 1;
}

.v2-search-block__input::placeholder {
    color: #e7c0ab !important;
}

.v2-search-block .bottom_nav {
    display: none;
}

.v2-search-block .catalog_block.items .item_block {
    padding: 0 10px 0px;
}

.v2-search-block__history-title {
    font-size: 16px;
    font-weight: 400;
    line-height: 20px;
    text-align: left;
    color: #15171663;
}

.v2-search-block__history-items {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    overflow-y: auto;
}

.v2-search-block__history-items a {
    font-size: 16px;
    font-weight: 400;
    line-height: 19.2px;
    text-align: left;
    text-decoration: none;
    padding: 22px 0;
    color: #151716;
    display: flex;
    align-items: start;
    gap: 1em;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.v2-search-block__history-items a:hover {
    opacity: 0.8;
}

.v2-search-block__history-items a::first-letter {
    text-transform: uppercase;
}

.v2-search-block__history-items a:not(:last-child) {
    border-bottom: 1px solid #F6E8E0;
}

.v2-search-block .loading {
    opacity: 0.3;
    position: relative;
    transition: all 0.3s;
}

.v2-search-block .no_products {
    display: none;
}

.v2-search-block .no_goods::before {
    content: "Ничего не найдено";
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 80px;
}

.v2-search-block__items {
    display: flex;
    flex-direction: column;
    gap: 28px;
    margin: 0 -15px;
}

.v2-search-block__more-block {}

.v2-search-block__more-btn {
    display: flex;
    cursor: pointer;
    width: 100%;
    height: 60px;
    background: #D38B641A;
    color: #D38B64;
    font-size: 14px;
    font-weight: 400;
    line-height: 16.8px;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.v2-search-block__more-btn:hover {
    background: #d38b643b;
    color: #D38B64 !important;
}

.v2-search-block__history-result a:first-child {
    justify-content: space-between;
    align-items: baseline;
}

.v2-search-block__history-result a:first-child::after {
    content: '';
    flex-shrink: 0;
    width: 1em;
    height: 0.7em;
    background: url(../images/arr-right.svg) center no-repeat;
    background-size: contain;
}

.v2-search-block__history-result a:not(:first-child) {
    align-items: start;
}

.v2-search-block__history-result a:not(:first-child)::before {
    content: '';
    flex-shrink: 0;
    width: 1em;
    height: 1.2em;
    background: url(../images/search.svg) center no-repeat;
    background-size: contain;
    filter: brightness(0);
}

.v2-search-block__items .top_wrapper {
    padding: 0 6px;
}

@media (max-width: 767px) {
    .v2-search-block {
        position: fixed;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        overflow-y: auto;
        z-index: 10000;
        padding: 15px 15px 100px;
    }

    .v2-search-block__items {
        display: flex;
        flex-direction: column;
        gap: 28px;
        margin: 0px;
        padding: 0;
    }

    body:not(.v2-inline-search-open) .v2-search-block {
        opacity: 0;
        top: 0px !important;
        left: -1000px !important;
        visibility: hidden;
    }

    .v2-search-block>.maxwidth-theme {
        padding: 0;
    }

    .v2-search-block__row {
        display: flex;
        gap: 28px;
        flex-direction: column;
    }

    .v2-search-block__col1 {
        width: 100%;
    }

    .v2-search-block__close {
        display: block;
        width: 20px;
        background: url(../images/arr-lg-left.svg) center no-repeat;
        border: none;
        cursor: pointer;
    }

    .v2-search-block__more-block {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: white;
        padding: 10px;
        z-index: 100;
    }

    .v2-search-block__input {
        height: 60px !important;
    }
}

.search-page-wrap form {
    display: flex;
    display: none;
}

.search-page-wrap form .form-control {
    flex-grow: 1;
}

.v2-search-result-title {
    font-size: 36px;
    font-weight: 400;
    line-height: 43.2px;
    letter-spacing: -0.02em;
    text-align: left;
    display: flex;
    gap: 15px;
}

.v2-search-result-close-btn {
    border: none;
    background: none;
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: start;
}

.v2-search-result-close-btn:after {
    content: "";
    background-image: url("../images/close.svg");
    background-repeat: no-repeat;
    background-size: 12px;
    width: 50px;
    aspect-ratio: 1;
    background-position: center;
    border: none;
    border-radius: 50%;
    background-color: #FCF6F3;
}

.top_block_filter_section {
    display: none;
}

@media (max-width: 767px) {
    .v2-search-result-title {
        font-size: 18px;
        font-weight: 400;
        line-height: 21.6px;
        letter-spacing: -0.02em;
        text-align: left;
    }

    .v2-search-result-close-btn:after {
        background-size: 8px;
        width: 30px;
    }
}
