.custom-orderby-wrapper {
    display: flex;
    justify-content: space-between; /* селектор слева, кнопка справа */
    align-items: center;
    width: 100%;
    padding: 0 32px 42px !important;
}

.custom-orderby {
    position: relative; /* важно для правильного позиционирования дропдауна */
}

.custom-orderby-toggle {
    display: flex;
    width: 250px;
    color: black;
    height: 52px;
    font-family: Manrope, 'sans-serif';
    padding: 10px 0;
    justify-content: space-between;
    align-items: center;
    border-radius: 0;
    background-color: #FFFFFF;
    border-top: none;
    border-right: none;
    border-left: none;
    border-bottom: 1px solid #C2C2C2;
    font-size: 20px;
    font-weight: 400;
    cursor: pointer;
}

.custom-orderby-list {
    display: none;
    position: absolute; /* теперь относительно .custom-orderby */
    top: 100%;
    left: 0;
    width: 250px;
    background: #fff;
    border-radius: 0;
    box-shadow: 0 3px 6px rgba(0,0,0,0.15);
    list-style: none;
    padding: 0 10px;
    margin: 4px 0 0 0;
    z-index: 999;
    border: none;
    font-weight: 400;
    font-size: 18px;
    font-family: Manrope, 'sans-serif';
    text-align: left;
    /*opacity: 0.7;*/
}

.custom-orderby-list li a {
    display: block;
    padding: 8px 0;
    text-decoration: none;
    color: #333;
}

.custom-orderby-list li.active a {
    font-weight: bold;
}

.custom-orderby-list li a:hover {
    background: #f5f5f5;
}


/* Средние экраны (1000-1599px) */
@media (min-width: 1000px) and (max-width: 1599px) {
    /*.custom-orderby-wrapper {*/
    /*    padding: 60px 40px !important;*/
    /*}*/

    .custom-orderby-toggle,
    .custom-orderby-list {
        width: 300px;
    }
}

/* Планшеты (768-999px) */
@media (min-width: 768px) and (max-width: 999px) {
    .custom-orderby {
        width: 100% !important;
    }

    .custom-orderby-toggle,
    .custom-orderby-list {
        width: 100% !important;
        font-size: 18px;
    }
}

/* Мобильные (480-767px) */
@media (min-width: 480px) and (max-width: 767px) {

    .custom-orderby {
        width: 100% !important;
    }

    .custom-orderby-toggle,
    .custom-orderby-list {
        width: 100% !important;
        font-size: 18px;
    }
}

/* Малые экраны (320-479px) */
@media (max-width: 479px) {
    .custom-orderby-wrapper {
        padding: 30px 20px !important;
    }

    .custom-orderby {
        width: 100% !important;
    }

    .custom-orderby-toggle,
    .custom-orderby-list {
        width: 100% !important;
        font-size: 16px;
    }
}