.frontend-pagination {
    display: flex;
    width: min(100%, 980px);
    flex-direction: column;
    align-items: center;
    gap: 13px;
    margin-inline: auto;
}

.frontend-pagination__summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px 16px;
    color: #68707a;
    font-size: 12px;
    line-height: 1.5;
    text-align: center;
}

.frontend-pagination__summary strong {
    color: #27313b;
    font-weight: 800;
}

.frontend-pagination__page-count {
    padding-left: 15px;
    border-left: 1px solid #dfe3e7;
}

.frontend-pagination__list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.frontend-pagination__item {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
}

.frontend-pagination__link {
    display: inline-flex;
    min-width: 42px;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 13px;
    color: #303943;
    background: #fff;
    border: 1px solid #dfe3e8;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(22, 31, 42, .035);
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    transition: color .2s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.frontend-pagination a.frontend-pagination__link:hover,
.frontend-pagination a.frontend-pagination__link:focus-visible {
    color: var(--brand-red, #e62028);
    background: #fff7f7;
    border-color: var(--brand-red, #e62028);
    box-shadow: 0 7px 18px rgba(230, 32, 40, .10);
    transform: translateY(-2px);
    outline: none;
}

.frontend-pagination__link--active {
    color: #fff;
    background: var(--brand-red, #e62028);
    border-color: var(--brand-red, #e62028);
    box-shadow: 0 6px 16px rgba(230, 32, 40, .18);
}

.frontend-pagination__link--disabled {
    color: #aab1b9;
    background: #f7f8f9;
    border-color: #e8ebee;
    box-shadow: none;
    cursor: not-allowed;
}

.frontend-pagination__link i {
    display: inline-block;
    flex: 0 0 auto;
    font-size: 12px;
    line-height: 1;
}

.frontend-pagination__item--ellipsis {
    min-width: 22px;
    min-height: 42px;
    color: #929aa3;
    font-size: 14px;
}

@media (max-width: 680px) {
    .frontend-pagination {
        gap: 10px;
    }

    .frontend-pagination__list {
        gap: 5px;
    }

    .frontend-pagination__link {
        min-width: 38px;
        min-height: 38px;
        padding-inline: 10px;
        border-radius: 7px;
        font-size: 12px;
    }

    .frontend-pagination__label {
        display: none;
    }

    .frontend-pagination__item--compact {
        display: none;
    }

    .frontend-pagination__item--ellipsis {
        min-width: 12px;
        min-height: 38px;
    }

    .frontend-pagination__page-count {
        padding-left: 0;
        border-left: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .frontend-pagination__link {
        transition: none;
    }

    .frontend-pagination a.frontend-pagination__link:hover,
    .frontend-pagination a.frontend-pagination__link:focus-visible {
        transform: none;
    }
}
