/* общий хедер */
header.woocommerce-products-header {
    display: flex;
    width: 100%;
    align-items: flex-start;
    flex-direction: column;
    padding: 50px;
}

/* только для категорий */
/*header.woocommerce-products-header--category {*/
/*    height: 920px;*/
/*}*/

/* для поиска – можно оставить пониже */
header.woocommerce-products-header--search {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.search-header {
    display: flex;
    width: 100%;
    align-items: flex-start;
    gap: 50px;
    justify-content: center;
}

.woocommerce-products-header__title {
    color: #1F1F1F;
    text-align: center;
    font-size: 24px;
    font-style: normal;
    font-weight: 700;
    line-height: normal;
    text-transform: uppercase;
    margin: 0;
    align-items: center;
    gap: 8px; /* отступ между заголовком и числом */
    position: relative; /* чтобы можно было позиционировать счетчик */
    display: inline-block;
}

.term-description {
    font-family: Manrope, 'sans-serif';
    font-size: 20px;
    font-weight: 400;
}

.term-description p {
    margin: 12px 0 0 0
}

.category-header {
    display: flex;
    flex-direction: row;
    gap: 50px;
    align-items: stretch; /* оба блока по высоте равны высоте контейнера */
    width: 100%;
    height: 690px;
}


/* левая часть (текст) */
.products-label-container {
    flex: 1 1 50%; /* занимает 50% */
    display: flex;
    flex-direction: column;
    justify-content: center; /* вертикальное центрирование текста */
    align-items: flex-start; /* прижать влево */
    padding: 4px 32px 24px 32px;
    /*padding: 20px;*/
}

/* правая часть (баннер) */
.products-banner-container {
    flex: 1 1 50%;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    height: 100%;
    /*overflow: hidden; !* прячем, если картинка больше контейнера *!*/
}


.products-count {
    text-align: center;
    opacity: 0.5;
    font-size: 24px;
    font-style: normal;
    font-weight: 700;
    line-height: normal;
    vertical-align: super;
    margin-left: 4px;
}

.products-banner-container img {
    height: 100%; /* растягиваем на всю высоту контейнера */
    object-fit: cover; /* обрезаем лишнее, чтобы сохранить пропорции */
}

.empty-search-header {
    align-self: stretch;
    height: 400px;
    padding-left: 20px;
    padding-right: 20px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 32px;
    display: inline-flex;
}

.empty-search-header-title-container {
    justify-content: flex-start;
    align-items: flex-start;
    gap: 12px;
    display: inline-flex;
}

.empty-search-header-title {
    text-align: center;
    color: #1F1F1F;
    font-size: 24px;
    font-weight: 700;
    text-transform: uppercase;
    word-wrap: break-word
}

.empty-search-header-description-text {
    text-align: center;
    color: #1F1F1F;
    font-size: 18px;
    font-weight: 400;
    font-family: Manrope, 'sans-serif';
    word-wrap: break-word;
    text-transform: none;
}

.empty-search-header-search-button-container {
    height: 52px;
    padding: 10px 16px;
    background: #1F1F1F;
    justify-content: center;
    align-items: center;
    gap: 10px;
    display: inline-flex
}

.empty-search-header-search-button {
    color: white;
    font-size: 18px;
    font-weight: 400;
    font-family: Manrope, 'sans-serif';

    word-wrap: break-word
}
.empty-search-header-search-button-container:hover {
    opacity: 0.7;
}

@media (max-width: 1000px) {
    .term-description {
        font-size: 18px;
    }
}


/* Для экранов меньше 768px */
@media (max-width: 768px) {
    header.woocommerce-products-header--category {
        height: auto;
        padding: 0;
    }

    .category-header {
        flex-direction: column; /* баннер сверху, текст снизу */
        height: auto; /* высота подстраивается под контент */
        gap: 20px;
    }

    .products-banner-container {
        order: -1; /* баннер поднимаем наверх */
        width: 100%;
        height: auto;
        justify-content: center;
    }

    .products-banner-container img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .products-label-container {
        flex: none; /* убираем flex-grow */
        width: 100%;
        text-align: center; /* выравниваем текст по центру */
        align-items: center;
    }

    .woocommerce-products-header__title {
        font-size: 24px; /* уменьшаем заголовок для маленьких экранов */
    }

    .products-count {
        font-size: 18px; /* уменьшаем счетчик */
        vertical-align: middle;
    }
}

/* Для очень маленьких экранов (мобильные телефоны) */
@media (max-width: 480px) {
    .products-banner-container {
        flex: 1;
    }
    .products-label-container {
        padding: 4px 20px 24px 20px;
    }

    .woocommerce-products-header__title {
        font-size: 20px;
    }

    .products-count {
        font-size: 16px;
    }
}

@media (max-width: 320px) {
    .term-description {
        font-size: 16px;
    }
}
