:root {
    --white: #ffffff;
    --white-EFEFEF: #EFEFEF;
    --white-opacity: rgba(255, 255, 255, 0.25);
    --black: #000000;
    --black-000000-opacity: rgba(0, 0, 0, 0.08);
    --black-000000-opacity-003: rgba(0, 0, 0, 0.03);
    --black-1D1D1F: #1D1D1F;
    --black-424245: #424245;
    --green-00431C: #00431C;
    --white-D9D9D9: #D9D9D9;
    --white-D9D9D9-opacity: rgba(217, 217, 217, 0.7);
    --white-F5F5F7: #F5F5F7;
    --gray-C7C7CC: #C7C7CC;
    --gray-8E8E93: #8E8E93;
    --gray-6E6E73: #6E6E73;
    --gray-777777: #777777;
    --gray-4E4E52: #4E4E52;
    --gray-C7C7CC-opacity: rgba(199, 199, 204, 0.08);
    --green-008337: #008337; 
    --green-008337-opacity: rgba(0, 131, 55, 0.8);
    --green-00431C: #00431C;
    --gray-D9D9D9: #D9D9D9;
    --gray-A9A9A9: #A9A9A9;
    --gray-5C5757: #5C5757;
    --white-F2F2F7: #F2F2F7;
    --red-attention-opacity: rgba(255, 59, 48,  0.7);
    --red-attention: #FF3B30;
    --blue-0066CC-opacity: rgba(0, 102, 204, 0.7);
    --blue-0066CC: #0066CC;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

main {
    font-family: "Satoshi", sans-serif;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.window_wrapper {
    width: 1248px;
    margin: 28px auto 0 auto;
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 35px;
}


/*Filter Window*/
.filterWindow {
    position: sticky;
    top: 0;
    height: 100vh;
    max-width: 445px;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.filterWindow::-webkit-scrollbar {
    display: none;
}
.searchBlock {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}
.filter_heading_button_block {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}
.filterTypeHeading {
    margin: 0 auto 0 8px;
    font-size: 20px;
    line-height: 30px;
    letter-spacing: 0.02px;
    font-weight: 500;
    color: var(--green-00431C);
}
.clear_search_filters_btn {
    font-family: 'Satoshi', sans-serif;
    cursor: pointer;
    margin: 0 8px 0 auto;
    display: none;
    justify-content: center;
    align-items: center;
    gap: 10px;
    background-color: transparent;
    border: none;
    padding: 0;
    font-size: 18px;
    line-height: 24px;
    font-weight: 500;
    color: var(--red-attention-opacity);
    transition: color 0.3s ease;
}
.clear_search_filters_btn:hover {
    color: var(--red-attention);
}
.clear_search_filters_btn svg {
    width: 14px;
    height: 22px;
    margin-top: 1px;
}
.clear_search_filters_btn svg path {
    fill-opacity: 1;
    fill: var(--red-attention-opacity);
    transition: fill 0.3s ease;
}
.clear_search_filters_btn:hover svg path {
    fill: var(--red-attention);
}
.search_input {
    margin-top: 12px;
    width: 445px;
    height: 47px;
    border: solid 1px var(--gray-777777);
    border-radius: 8px;
    font-size: 17px;
    line-height: 25px;
    color: var(--black-1D1D1F);
    font-style: italic;
    padding: 11px 14px;
    background-color: transparent;
}
.search_input:focus {
    font-style: normal;
}
.filterBlock {
    margin: 24px 0 0 0;
}

.category-btn,
.ingredient-btn,
.excluded_ingredient-btn,
.attribute-btn {
    cursor: pointer;
    font-size: 17px;
    line-height: 26px;
    letter-spacing: 0.17px;
    color: var(--green-008337);
    background-color: transparent;
    padding: 4px 20px;
    border: solid 1px var(--green-008337);
    border-radius: 12px;
    white-space: nowrap; /* Не переносить текст внутри кнопки */
    transition: color 0.3s ease, background-color 0.3s ease, border 0.3s ease;
}
.category-btn:hover,
.ingredient-btn:hover,
.excluded_ingredient-btn:hover,
.attribute-btn:hover {
    color: var(--white);
    background-color: var(--green-008337-opacity); 
    border: solid 1px var(--green-008337-opacity); 
}

.category-btn.active,
.ingredient-btn.active,
.excluded_ingredient-btn.active,
.attribute-btn.active {
    color: var(--white);
    background-color: var(--green-008337);
    border: solid 1px var(--green-008337);
}

/* Drop Down Filter Blocks */
.filter_drop_down_block {
    margin: 14px 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}
.filter_drop_down_btn {
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}
.filter_drop_down_p {
    margin: 0;
    font-size: 17px;
    line-height: 24px;
    font-weight: 500;
    color: var(--gray-4E4E52);
    transition: color 0.3s ease;
}
.filter_drop_down_icon {
    margin-top: 1px;
    transition: transform 0.3s ease;
}
.filter_drop_down_element {
    fill: var(--gray-4E4E52);
    transition: fill 0.3s ease;
}
.filter_drop_down_btn:hover .filter_drop_down_p {
    color: var(--black);
}
.filter_drop_down_btn:hover .filter_drop_down_element {
    fill: var(--black);
}
.filter_drop_down_list {
    list-style: none;
    margin: 11px auto 0 0;
    padding: 0;
    display: none;
    opacity: 0;
    flex-direction: row;
    align-items: flex-start;
    flex-wrap: wrap;  /* Разрешить перенос содержимого */
    gap: 8px;
    max-height: 0px;
    transition: max-height 1s ease, opacity 0.3s ease;
}
.filter_drop_down_list.notes {
    margin-top: 10px;
    flex-direction: column;
    justify-content: flex-start;
    gap: 5px;
}
.filter_drop_down_list.active {
    max-height: 1000px;
    opacity: 1;
}
.filter_drop_down_icon.rotate {
    transform: rotate(180deg);
}
.filter_drop_down_list a {
    max-width: 210px;
    text-decoration: none;
    color: var(--gray-8E8E93);
    font-size: 17px;
    line-height: 26px;
    font-weight: 500;
    transition: color 0.3s ease;
}
.filter_drop_down_list a:hover {
    color: var(--black);
}
.filter_separator_line {
    width: 100vh;
    max-width: 445px;
    height: 0.8px;
    border-radius: 1px;
    background-color: var(--gray-D9D9D9);
}

.note_definition {
    margin: 0;
    font-size: 14px;
    line-height: 21px;
    font-weight: 400;
    letter-spacing: 0.28px;
    color: var(--gray-6E6E73);
}
.note_attribute {
    font-weight: 500;
    color: var(--gray-4E4E52);
}
.note_separator_line {
    max-width: 445px;
    width: 100vh;
    height: 0.8px;
    border-radius: 1px;
    background-color: var(--white-D9D9D9-opacity);
}
.note_separator_line:last-of-type {
    display: none;
}


/* Продукты */
.products_length {
    margin: 0 auto 0 18px;
    font-size: 18px;
    line-height: 28px;
    font-weight: 500;
    color: var(--black-1D1D1F);
}
.productWrapper {
    margin-top: 2px;

    overflow: hidden;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0px;
}
.product_block_link {
    margin: 10px;
    text-decoration: none;
    width: 236px;
    border-radius: 8px;
    box-shadow: 0 3px 10px var(--black-000000-opacity);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background-color: var(--white);
    outline: solid 1px var(--black-000000-opacity-003);
}
.image_wrapper {
    width: 100%;
    height: 177px;
    position: relative;
    transition: scale 0.3s ease;
}
.product_image {
    display: block;
    width: 100%;
    height: 177px;
    object-fit: cover;
    transition: scale 0.3s ease;
}
.action_p {
    position: absolute;
    top: 10px;
    left: 10px;
    margin: 0;
    font-size: 16px;
    line-height: 16px;
    letter-spacing: 0.32px;
    font-weight: 500;
    color: var(--white);
    background-color: var(--green-008337-opacity);
    padding: 7px 14px;
    border-radius: 8px;
}
.action_p_no_image {
    margin: 10px auto auto 10px;
    font-size: 16px;
    line-height: 16px;
    letter-spacing: 0.32px;
    font-weight: 500;
    color: var(--white);
    background-color: var(--green-008337-opacity);
    padding: 7px 14px;
    border-radius: 8px;  
}
.text_content_block {
    position: relative;
    padding: 7px 12px 10px 12px;
    box-shadow: 0 -1px 0 var(--black-000000-opacity);
    background-color: var(--white);
    flex-grow: 1;
}
.text_content_block::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background-color: var(--green-008337-opacity);
    z-index: 0;

    transition: width 0.4s ease;
}
.product_block_link:hover .text_content_block::before {
    width: 100%;
}
.product_block_link:hover .text_content_block {
    border-top: none;
}
.product_block_link:hover .text_content_block::before {
    width: 100%;
}
.product_block_link:hover .image_wrapper {
    scale: 1.04;
}
.product_block_link:hover .product_image {
    scale: 1.04;
}
.product_heading {
    position: relative;
    z-index: 1;
    margin: 0;
    font-size: 17px;
    line-height: 24px;
    font-weight: 400;
    letter-spacing: 0.17px;
    color: var(--black-1D1D1F);
    z-index: 1;
    transition: color 0.4s ease;
}
.product_block_link:hover .product_heading {
    color: var(--white);
}
.no_products_p {
    margin: 0;
    margin-left: 23px;
    font-size: 17px;
    line-height: 28px;
    color: var(--black-1D1D1F);
}
