
/* ================== search_page ================== */

.main_search_page{
    padding-top: 24px;
    padding-bottom: 100px;
    width: 100%;
    background-color: rgba(242, 244, 246, 1);
}

.container_search_page{
    display: flex;
    flex-direction: column;
    /*max-width: 360px;*/
    gap: 30px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 10px;
    padding-right: 10px;
    padding-top: 20px;
}


.section_top_btn_input_search{
    width: 100%;

}

.form_top_btn_input_search{
    display: flex;
    flex-direction: column;
    gap: 20px;
}


.label_search{
    display: flex;
    flex-direction: column;
    gap: 5px;
    position: relative;
    width: 100%;

}



.text_label_search {
    font-family: var(--font-family-main);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.21;
    color: rgba(41, 44, 81, 1);
}

.input_search{
    width: 100%;
    border-radius: 10px;
    padding: 16px 46px;
    background-color: rgba(255, 255, 255, 1);
    font-family: var(--font-family-main);
    font-size: 16px;
    font-weight: 500;
    line-height: 1.21;
    color: rgba(20, 25, 33, 1);
}




.parent_cat_select, .child_cat_select{
    width: 100%;
    border-radius: 10px;
    background-color: rgba(255, 255, 255, 1);
    font-family: var(--font-family-main);
    font-size: 16px;
    font-weight: 500;
    line-height: 1.21;
    color: rgba(20, 25, 33, 1);
    padding: 16px 12px;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all var(--transition-time-all);
}

.icon_close_top_btn_input_search{
    transition: all var(--transition-time-all);
}

.icon_close_top_btn_input_search:hover{
    cursor: pointer;
    opacity: 0.6;
}

.list_child_cat, .list_parent_cat{
    position: absolute;
    max-height: 0;
    overflow: hidden;
    top: 100%;
    visibility: hidden;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px;
    transition: all var(--transition-time-all);
    background-color: rgb(255,255,255);
    border-bottom-right-radius: 10px;
    border-bottom-left-radius: 10px;
    z-index: 100;
}

.item_parent_cat, .item_child_cat{
    padding: 6px 10px;
    font-family: var(--font-family-main);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.21;
    transition: all var(--transition-time-all);
}

.parent_cat_select.open, .child_cat_select.open {
    border-bottom-right-radius: 0;
    border-bottom-left-radius: 0;
}



.list_child_cat::-webkit-scrollbar,.list_parent_cat::-webkit-scrollbar {
    width: 6px;
}

.list_child_cat::-webkit-scrollbar-track, .list_parent_cat::-webkit-scrollbar-track {
    background: #f0f0f0;
}

.list_child_cat::-webkit-scrollbar-thumb, .list_parent_cat::-webkit-scrollbar-thumb {
    background: #c0c0c0;
    border-radius: 3px;
}

.list_child_cat::-webkit-scrollbar-thumb:hover, .list_parent_cat::-webkit-scrollbar-thumb:hover {
    background: #a0a0a0;
}


.list_child_cat.open, .list_parent_cat.open {
    max-height: 400px;
    visibility: visible;
    overflow-y: auto;
    z-index: 100;
}


.parent_cat_select:hover, .child_cat_select:hover {
    cursor: pointer;
}

.parent_cat_select::after, .child_cat_select::after {
    content: '';
    display: block;
    width: 20px;
    height: 20px;
    background-image: url("../img/icons/icon_arrow_black.svg");
    transition: all var(--transition-time-all);
}

.parent_cat_select.open::after, .child_cat_select.open::after {
    transform: rotate(180deg);
}

.icon_search_top_btn_input_search{
    position: absolute;
    bottom: 13px;
    left: 12px;
    display: block;
    width: 26px;
    height: 26px;
    background-repeat: no-repeat;
    background-position: center center;
    background-size: 100% 100%;
    background-image: url('../img/icons/icon_search_black.svg');
}

.icon_close_top_btn_input_search{
    position: absolute;
    bottom: 13px;
    right: 12px;
    display: block;
    width: 26px;
    height: 26px;
    padding: 6px;
    background-repeat: no-repeat;
    background-position: center center;
    background-size: 14px 14px;
    background-image: url('../img/icons/icon_close_black_update.svg');
}


.btn_search_top_btn_input_search{
    width: 100%;
    padding-top: 10px;
    padding-bottom: 10px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(235, 28, 36, 1);
    font-family: var(--font-family-main);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.42;
    color: rgba(255, 255, 255, 1);
    transition: all var(--transition-time-all);
}

.btn_search_top_btn_input_search:hover {
    background-color: rgba(82, 98, 120, 1);
}


.btn_search_top_btn_input_search::after {
    content: "";
    display: block;
    width: 20px;
    height: 20px;
    margin-left: 10px;
    background-size: 100% 100%;
    background-image: url('../img/icons/search.svg');
}


.section_search_results{
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.title_search_results{
    font-family: var(--font-family-minor);
    font-size: 24px;
    font-weight: 500;
    line-height: 1.3;
    color: rgba(20, 25, 33, 1);
}


.list_cart_search_results{
    display: flex;
    width: 100%;
    flex-wrap: wrap;
    column-gap: 10px;
    row-gap: 24px;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.link_item_cart_search_results{
    /*max-width: 165px;*/
    display: flex;
    flex-direction: column;
    gap: 6px;
    border-radius: 12px;
    overflow: hidden;
    background-color: rgba(255, 255, 255, 1);
}

.photo_item_cart_search_results{
    padding-top: 11.76px;
    padding-left: 10.48px;
    padding-right: 10.48px;
    display: block;
    margin-bottom: 6px;
}

.text_item_cart_search_results{
    margin: 8px;
    font-family: var(--font-family-main);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.21;
    color: rgba(20, 25, 33, 1);
    transition: all var(--transition-time-all);
    display: -webkit-box; /* Включаємо flex-контейнер */
    -webkit-box-orient: vertical; /* Орієнтація для обрізання тексту */
    overflow: hidden; /* Приховуємо зайвий текст */
    text-overflow: ellipsis; /* Додаємо три крапки */
    -webkit-line-clamp: 3; /* Кількість видимих рядків */
}



.icon_bottom_right_item_cart_search_results{
    display: none;
}


.container_parent_cat, .container_child_cat {
    display: flex;
    flex-direction: column;
    gap: 5px;
}


.item_parent_cat:hover, .item_child_cat:hover {
    color: rgba(235, 28, 36, 1);
    cursor: pointer;
}

.item_parent_cat.active, .item_child_cat.active {
    color: rgba(235, 28, 36, 1);
}

.section_search_results img {
    /*height:108.24px ;*/
    /*width: 144.05px;*/
    object-fit: contain;
}



@media screen and (min-width: 768px) {
    .main_search_page{
        padding-top: 96px;
        padding-bottom: 105px;
    }

    .container_search_page{
        width: 704px;
        max-width: none;
        padding-left: 0;
        padding-right: 0;
        padding-top: 30px;
    }



    .form_top_btn_input_search{
        flex-direction: row;
        gap: 20px;
        flex-wrap: wrap;
        align-items: flex-end;
    }


    .label_search{
        width: 342px;
    }



    .btn_search_top_btn_input_search{
        width: 342px;
        padding-top: 16px;
        padding-bottom: 16px;
        border-radius: 12px;
    }


    .title_search_results{
        font-size: 28px;
    }


    .list_cart_search_results{
        column-gap: 20px;
        row-gap: 28px;
        display: flex;
    }

    .link_item_cart_search_results{
        max-width: none;
        position: relative;
        width: 342px;
        flex-direction: column-reverse;
        gap: 18px;
        border-radius: 24px;
        transition: all var(--transition-time-all);
    }



    .photo_item_cart_search_results{
        margin-top: 24px;
        margin-left: 20px;
        margin-bottom: 20px;
        padding: 0;
        width: 215px;
        height: 160px;
        display: block;
    }

    .section_search_results img {
        padding: 0;
        width: 215px;
        height: 160px;
        display: block;
    }

    .text_item_cart_search_results{
        padding: 18px 16px 8px 16px;
        transition: all var(--transition-time-all);
    }

    .link_item_cart_search_results:hover .text_item_cart_search_results{
        color: rgba(235, 28, 36, 1);
        text-decoration: underline !important;
        text-underline-offset: 3px;
    }


    .photo_item_cart_search_results::after {
        position: absolute;
        display: inline-block;
        content: '';
        width: 23.89px;
        height: 22px;
        -webkit-mask: url('../img/icons/icon_bottom_right.svg') no-repeat center;
        mask: url('../img/icons/icon_bottom_right.svg') no-repeat center;
        background-color: currentColor;
        right: 21.71px;
        bottom: 20px;
        transition: all var(--transition-time-all);
        color: rgba(20, 20, 20, 1);
    }

    .link_item_cart_search_results:hover .photo_item_cart_search_results::after {
        transform: rotate(136deg);
        color: rgba(235, 28, 36, 1);
    }

    .link_item_cart_search_results:hover {
        cursor: pointer;
        box-shadow: 0px 2px 15px 0px rgba(98, 114, 132, 0.25);
    }

}

@media screen and (min-width: 1440px) {
    .main_search_page{
        padding-top: 112px;
        padding-bottom: 120px;
    }

    .container_search_page{
        width: 1320px;
    }


    .form_top_btn_input_search{
        flex-wrap: nowrap;
        justify-content: space-between;
    }

    .label_search{
        width: 381px;
    }

    .btn_search_top_btn_input_search{
        width: fit-content;
        padding-left: 20px;
        padding-right: 20px;
    }


    .link_item_cart_search_results{
        width: 315px;
        height: 100%;
        justify-content: space-between;
    }


}


/* ================== section_empty_result ================== */


.section_empty_result{
    padding-top: 60px;
    padding-bottom: 100px;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.box_icon_text_empty_result{
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
    max-width: 365px;
    height: auto;
}


.title_empty_result{
    font-family: var(--font-family-main);
    font-size: 20px;
    font-weight: 600;
    line-height: 1.2;
    color: rgba(20, 25, 33, 1);
}

.text_empty_result{
    font-family: var(--font-family-main);
    font-size: 16px;
    font-weight: 400;
    line-height: 1.56;
    color: rgba(82, 98, 120, 1);
    text-align: center;
}


/* ================== /section_empty_result ================== */

/* ================== /search_page ================== */