.products-wrapper {
    position: relative;
}

/* Контейнер сортування */
.sorting-row {
    display: flex;
    align-items: center;
    gap: 15px;
    font-family: sans-serif;
    height: max-content;
    position: absolute;
    top: unset;
    right: 0;
    bottom: calc(100% + 32px);
}

/* Адаптивність для мобільних пристроїв */
@media screen and (max-width: 599px) {
    .sorting-row {
        position: relative;
        bottom: unset;
        right: unset;
        margin: 0 0 24px;
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Мітка "Сортувати за:" */
.sorting-row .sorting-label {
    font-size: 14px;
    color: #888;
}

/* Обгортка селекту */
.sorting-row .custom-select-wrapper {
    position: relative;
    user-select: none;
    width: 250px;
}

@media screen and (max-width: 599px) {
    .sorting-row .custom-select-wrapper {
        width: 100%;
    }
}

/* Основний блок селекту */
.sorting-row .custom-select {
    position: relative;
    display: flex;
    flex-direction: column;
}

/* Тригер (видима частина) */
.sorting-row .custom-select__trigger {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    font-size: 15px;
    font-weight: 500;
    color: #333;
    height: 45px;
    line-height: 45px;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.sorting-row .custom-select__trigger:hover {
    border-color: #333;
}

/* Стрілка */
.sorting-row .arrow {
    position: relative;
    height: 10px;
    width: 10px;
}

.sorting-row .arrow::before,
.sorting-row .arrow::after {
    content: "";
    position: absolute;
    bottom: 0px;
    width: 2px;
    height: 100%;
    transition: all 0.3s;
    background-color: #333;
}

.sorting-row .arrow::before {
    left: -3px;
    transform: rotate(-45deg);
}

.sorting-row .arrow::after {
    left: 3px;
    transform: rotate(45deg);
}

/* Стан відкритого селекту */
.sorting-row .custom-select.open .custom-select__trigger {
    border-radius: 8px 8px 0 0;
    border-bottom: none;
}

.sorting-row .custom-select.open .arrow::before {
    transform: rotate(45deg);
}

.sorting-row .custom-select.open .arrow::after {
    transform: rotate(-45deg);
}

.sorting-row .custom-select.open .custom-options {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
}

/* Список опцій */
.sorting-row .custom-options {
    position: absolute;
    display: block;
    top: 100%;
    left: 0;
    right: 0;
    border: 1px solid #e0e0e0;
    border-top: none;
    background: #fff;
    transition: all 0.3s;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 100;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

/* Окрема опція */
.sorting-row .custom-option {
    position: relative;
    display: block;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 400;
    color: #333;
    cursor: pointer;
    transition: all 0.3s;
}

.sorting-row .custom-option:hover {
    background-color: #f5f5f5;
    color: #000;
}

/* Обрана опція */
.sorting-row .custom-option.selected {
    color: #fff;
    background-color: #1E564B;
}