/* 业务聚合页 — marketplace 壳，品牌色 */

.aggregate {
    position: relative;
    width: min(1440px, 100%);
    margin: 0 auto;
    padding: 1rem 1rem 2.5rem;
}

@media (min-width: 768px) {
    .aggregate {
        padding: 1.5rem 1.25rem 3rem;
    }
}

.aggregate-cates {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    padding: 0.75rem 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

@media (min-width: 768px) {
    .aggregate-cates {
        flex-wrap: wrap;
        gap: 1rem;
        justify-content: space-between;
        overflow: visible;
    }
}

.aggregate-cate {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 7.5rem;
    height: 6.5rem;
    padding: 0.75rem;
    border: 2px solid transparent;
    border-radius: 1rem;
    background: color-mix(in srgb, var(--color-header, #0b0b0c) 66%, transparent);
    color: var(--color-header-text, #e8eaee);
    text-decoration: none;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.aggregate-cate:hover {
    border-color: var(--color-brand, #e23a2e);
    background: var(--color-secondary, #0b0b0c);
    color: var(--color-brand-foreground, #fff);
}

.aggregate-cate.is-active {
    border-color: var(--color-brand, #e23a2e);
    background: var(--color-brand, #e23a2e);
    color: var(--color-brand-foreground, #fff);
}

.aggregate-cate img {
    display: block;
    width: 2.25rem;
    height: 2.25rem;
    object-fit: contain;
}

.aggregate-cate-label {
    font-size: 0.9375rem;
    font-weight: 600;
    white-space: nowrap;
}

.aggregate-panel {
    padding: 1rem;
    border: 1px solid var(--color-border, #e5e7eb);
    border-radius: 0.75rem;
    background: var(--color-card, #fff);
}

@media (min-width: 768px) {
    .aggregate-panel {
        padding: 1.5rem;
    }
}

.aggregate-search {
    display: flex;
    align-items: center;
    overflow: hidden;
    width: 100%;
    height: 3.75rem;
    margin-bottom: 1.75rem;
    border: 1px solid var(--color-footer-muted, #999);
    border-radius: 10px;
    background: var(--color-card, #fff);
}

.aggregate-search svg {
    flex: 0 0 auto;
    margin-inline: 0.85rem;
    color: var(--color-muted-foreground, #6b7280);
}

.aggregate-search-input {
    flex: 1 1 auto;
    min-width: 0;
    height: 100%;
    border: 0;
    outline: none;
    background: transparent;
    color: var(--color-foreground, #111214);
    font-size: 1rem;
}

.aggregate-search-all {
    flex: 0 0 auto;
    height: 100%;
    padding: 0 1.25rem;
    border: 0;
    background: var(--color-header, #0b0b0c);
    color: var(--color-brand-foreground, #fff);
    font-weight: 700;
    cursor: pointer;
}

.aggregate-search-all:hover {
    background: var(--color-brand-dark, #c22f24);
}

.aggregate-heading {
    margin: 0 0 1.25rem;
    color: var(--color-foreground, #111214);
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
}

.aggregate-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

@media (min-width: 768px) {
    .aggregate-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 1rem;
    }
}

.aggregate-game {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 3.5rem;
    padding: 1rem;
    border: 1px solid var(--color-border, #e5e7eb);
    border-radius: 0.5rem;
    background: var(--color-muted, #f4f5f7);
    color: var(--color-foreground, #111214);
    font-weight: 600;
    text-decoration: none;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.aggregate-game:hover {
    border-color: var(--color-brand, #e23a2e);
    background: var(--color-brand-soft, #fff4f2);
    color: var(--color-foreground, #111214);
}

.aggregate-game-name {
    padding-right: 4.5rem;
    word-break: break-word;
}

.aggregate-game-offers {
    position: absolute;
    top: 0.625rem;
    right: 0.625rem;
    padding: 0.15rem 0.5rem;
    border-radius: 0.375rem;
    background: color-mix(in srgb, var(--color-brand, #e23a2e) 13%, transparent);
    color: var(--color-ink-2, #575757);
    font-size: 0.75rem;
    font-weight: 700;
}

.aggregate-pager {
    display: flex;
    justify-content: center;
    padding: 0.5rem 0 0.25rem;
}

.aggregate-pager .pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.aggregate-pager .page-item .page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.25rem;
    min-height: 2.25rem;
    padding: 0.35rem 0.6rem;
    border: 1px solid var(--color-border, #e5e7eb);
    border-radius: 0.375rem;
    background: var(--color-card, #fff);
    color: var(--color-foreground, #111214);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
}

.aggregate-pager .page-item.active .page-link,
.aggregate-pager .page-item .page-link:hover {
    border-color: var(--color-brand, #e23a2e);
    color: var(--color-brand, #e23a2e);
}

.aggregate-pager .page-item.disabled .page-link {
    opacity: 0.45;
    pointer-events: none;
}

.aggregate-empty {
    display: grid;
    place-items: center;
    gap: 0.75rem;
    padding: 2rem 1rem;
    text-align: center;
}

.aggregate-empty img {
    max-width: 12rem;
}

.aggregate-empty-text {
    margin: 0;
    font-size: 14px;
    color: var(--color-ink-2, #3c4043);
}

.aggregate-busy {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: grid;
    place-items: center;
    background: color-mix(in srgb, var(--color-card, #fff) 55%, transparent);
}

.aggregate-busy-spin {
    width: 2rem;
    height: 2rem;
    border: 3px solid var(--color-border, #e5e7eb);
    border-top-color: var(--color-brand, #e23a2e);
    border-radius: 999px;
    animation: aggregate-spin 0.7s linear infinite;
}

@keyframes aggregate-spin {
    to {
        transform: rotate(360deg);
    }
}
