.catalog-toolbar {
    display: flex;
    padding: 20px 0 0;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
}

.catalog-toolbar-inner {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    flex-wrap: wrap;
}

.catalog-toolbar-search {
    flex: 1 1 340px;
    max-width: 420px;
}

.catalog-toolbar-selects {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1 1 auto;
    flex-wrap: wrap;
}

.catalog-toolbar-selects .form-select {
    min-width: 220px;
    flex: 0 1 240px;
}

.catalog-sort-button,
.catalog-filter-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    font-size: 0.9rem;
    white-space: nowrap;
}

.catalog-filter-trigger {
    display: none;
}

.catalog-filter-trigger.visible {
    display: inline-flex;
}

.catalog-inline-filters,
.catalog-content-shell {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
}

.catalog-inline-filters {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
}

.catalog-inline-search {
    flex: 1 1 340px;
    max-width: 420px;
}

.catalog-inline-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-left: auto;
}

.catalog-products-shell {
    padding-top: 12px;
}

.catalog-pagination-shell {
    padding-top: 28px;
}

.catalog-scroll-sentinel {
    width: 100%;
    height: 1px;
}

.catalog-filters-modal-content {
    max-width: 560px;
    width: 100%;
    margin-top: 104px;
    max-height: calc(100vh - 124px);
}

.catalog-filters-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 24px 18px;
    border-bottom: 1px solid var(--border-color);
}

.catalog-filters-reset {
    border: none;
    background: transparent;
    color: #7bb3ff;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
}

.catalog-filters-reset:hover {
    color: #9ec7ff;
}

.catalog-filters-title {
    flex: 1;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.catalog-filters-close {
    width: 32px;
    min-width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 10px;
    transition: background 0.2s ease, color 0.2s ease;
}

.catalog-filters-close:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.catalog-filters-modal-body {
    padding: 20px 24px 0;
    overflow-y: auto;
    max-height: calc(90vh - 170px);
}

.catalog-filters-modal-footer {
    padding: 18px 24px 24px;
}

.catalog-filters-apply-btn {
    width: 100%;
}

.catalog-filter-grid {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.catalog-filter-field {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.catalog-filter-label {
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--text-primary);
}

.catalog-filter-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.catalog-filter-option {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 0 0 12px;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    background: transparent;
    color: var(--text-primary);
    text-align: left;
    cursor: pointer;
}

.catalog-filter-option:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.catalog-filter-option-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.catalog-filter-option-title {
    font-size: 0.98rem;
    font-weight: 600;
    color: var(--text-primary);
}

.catalog-filter-option-subtitle {
    font-size: 0.84rem;
    line-height: 1.4;
    color: var(--text-muted);
}

.catalog-filter-option-radio {
    width: 26px;
    height: 26px;
    min-width: 26px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.02);
    position: relative;
    transition: all 0.2s ease;
}

.catalog-filter-option.selected .catalog-filter-option-radio {
    border-color: rgba(155, 160, 255, 0.85);
    background: rgba(155, 160, 255, 0.18);
}

.catalog-filter-option.selected .catalog-filter-option-radio::after {
    content: '';
    position: absolute;
    inset: 5px;
    border-radius: 50%;
    background: #cfd3ff;
}

.catalog-range-inputs {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 24px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
}

.catalog-range-separator {
    text-align: center;
    color: var(--text-muted);
    font-size: 1.1rem;
}

.catalog-filter-switch-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 0 0 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.catalog-filter-switch {
    position: relative;
    width: 54px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.catalog-filter-switch input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.catalog-filter-switch-track {
    width: 100%;
    height: 100%;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.14);
    position: relative;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.catalog-filter-switch-track::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 4px 12px rgba(15, 16, 28, 0.32);
    transition: transform 0.2s ease;
}

.catalog-filter-switch input:checked + .catalog-filter-switch-track {
    background: rgba(129, 140, 248, 0.42);
    border-color: rgba(129, 140, 248, 0.72);
}

.catalog-filter-switch input:checked + .catalog-filter-switch-track::after {
    transform: translateX(22px);
}

@media (max-width: 992px) {
    .catalog-toolbar-inner,
    .catalog-inline-filters {
        gap: 12px;
    }

    .catalog-toolbar-search,
    .catalog-inline-search {
        max-width: none;
    }

    .catalog-toolbar-selects {
        flex: 1 1 100%;
    }
}

@media (max-width: 768px) {
    .catalog-toolbar,
    .catalog-inline-filters,
    .catalog-content-shell {
        width: 100%;
        padding-left: 16px;
        padding-right: 16px;
    }

    .catalog-toolbar {
        padding-top: 14px;
    }

    .catalog-toolbar-inner,
    .catalog-inline-filters {
        flex-direction: column;
        align-items: stretch;
    }

    .catalog-toolbar-search,
    .catalog-inline-search,
    .catalog-toolbar-selects,
    .catalog-inline-actions {
        flex: 0 0 auto;
        max-width: none;
        width: 100%;
    }

    .catalog-toolbar-selects {
        flex-direction: column;
        gap: 12px;
    }

    .catalog-toolbar-selects .form-select,
    .catalog-inline-actions > .btn,
    .catalog-sort-button,
    #apply-filters {
        width: 100%;
    }

    .catalog-inline-actions {
        margin-left: 0;
        gap: 10px;
    }

    .catalog-filters-modal-content {
        width: min(100%, 100vw);
        max-width: none;
        margin-top: auto;
        max-height: calc(100dvh - 12px);
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
    }

    .catalog-filters-modal-header,
    .catalog-filters-modal-body,
    .catalog-filters-modal-footer {
        padding-left: 18px;
        padding-right: 18px;
    }

    .catalog-filters-modal-footer {
        padding-bottom: calc(18px + env(safe-area-inset-bottom));
    }

    .catalog-products-shell .empty-state {
        padding: 36px 16px 24px;
    }

    .catalog-products-shell .empty-state-icon {
        margin-bottom: 14px;
    }

    .catalog-products-shell .empty-state-title {
        font-size: 1.1rem;
        margin-bottom: 8px;
    }

    .catalog-products-shell .empty-state-text {
        margin-bottom: 0;
        font-size: 0.92rem;
    }
}

.category-showcase-groups {
    display: flex;
    flex-direction: column;
    gap: 26px;
}

#products-grid.category-showcase-mode {
    display: block;
}

.category-showcase-group {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.category-showcase-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, 250px);
    gap: 10px 8px;
    align-items: start;
    justify-content: start;
}

.category-showcase-game-link {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.category-showcase-game-icon {
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 12px 24px rgba(10, 12, 24, 0.2);
}

.category-showcase-game-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.category-showcase-game-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.category-showcase-game-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-decoration: none;
}

.category-showcase-game-subtitle {
    margin-top: 2px;
    font-size: 0.86rem;
    font-weight: 500;
    color: var(--text-secondary);
    line-height: 1.3;
    text-decoration: none;
}

.category-showcase-icon-link {
    text-decoration: none;
    color: inherit;
}

.category-showcase-text-link {
    transition: color var(--transition-fast), opacity var(--transition-fast);
}

.category-showcase-text-link:hover {
    color: var(--accent-primary);
}

.category-showcase-game-subtitle.category-showcase-text-link:hover {
    color: var(--accent-secondary);
}

.category-showcase-group .product-card {
    width: 100%;
}

.category-showcase-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 250px;
    min-width: 250px;
    max-width: 250px;
}

.category-showcase-item .product-card {
    width: 250px;
    min-width: 250px;
    max-width: 250px;
    height: 322px;
}

.category-showcase-item .product-card-image {
    height: auto;
    flex: 0 0 auto;
    aspect-ratio: 250 / 182;
}

.category-showcase-item .product-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: transparent;
}

.category-showcase-game-link-card {
    padding: 0;
}

@media (max-width: 768px) {
    .category-showcase-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px 10px;
    }

    .category-showcase-item {
        width: 100%;
    }

    .category-showcase-item .product-card {
        width: 100%;
        min-width: 0;
        max-width: none;
    }

    .category-showcase-item .product-card-image {
        aspect-ratio: 4 / 3;
    }

    .category-showcase-game-link-card {
        padding: 0;
        margin-bottom: 2px;
    }

    #products-grid.category-showcase-mode {
        padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px));
    }

    .category-showcase-game-link {
        gap: 8px;
    }

    .category-showcase-game-icon {
        width: 36px;
        height: 36px;
        min-width: 36px;
        border-radius: 10px;
    }

    .category-showcase-game-title {
        font-size: 0.92rem;
        white-space: normal;
    }

    .category-showcase-game-subtitle {
        font-size: 0.8rem;
    }
}
